[wp-hackers] wordpress import. does it really work?
Brian Layman
wp-hackers at thecodecave.com
Mon Apr 9 22:52:40 UTC 2012
Ah, yes you've said it yourself, the answer is found in the details on
that page:
"From MySQL 5.0.13 on, the AUTO_INCREMENT counter is reset to zero by
TRUNCATE TABLE"
Other document states:
"(Some older versions may not reset the AUTO_INCREMENT value. In this
case, you can use ALTER TABLE tbl_name AUTO_INCREMENT=1 after the
TRUNCATE TABLE statement.)"
I hadn't realized this had changed & always kept doing the reset anytime
I truncate. Thanks for the followup.
It's one less thing to remember!
Brian Layman
On 4/9/2012 6:15 PM, Kokarn wrote:
> Why wouldn't truncate reset the auto_increment values?
>
> It's not 100% certain that they will but assuming he runs MySQL> 5.0.13
> (which i think is a pretty fair assumption) they will be reset AFAIK.
>
> My own tests say they do, the resources i find say they do and the MySQL
> documentation for truncate
> table<http://dev.mysql.com/doc/refman/5.0/en/truncate-table.html> says
> they do.
>
> What am I missing?
More information about the wp-hackers
mailing list