can we rebuild auto_increment values for a table under innodb engine

i thought the explain would mentoin this IS NULL optimization as type: ref_or_null, when i run a query where a column IS NULL.

why are you thinking that

because it's mentoined in the manual: http://dev.mysql.com/doc/refman/4.1/en/explain.html (type: ref_or_null…. This join type is like ref, but with the addition that MySQL does an extra search for rows that contain NULL
values.)

bot you dont have a join
but
so does not apply

ok.. :s = me.. of course.. i'll check it.. thanks!

so I just installed mysql 5.1.20 on this linux box of mine, and when I start the server it gives me an error "touch: file arguments missing" followed by "chown: too few arguments"
I believe it's because the $err_log in mysqld_safe isn't getting set, but I'm not at all sure why it isn't…
seeing stuff in the bug tracker about this exact problem but it claims these bugs have been fixed long time ago
OH!
nevermind, I see they apply to 5.1.20 after all

can we rebuild auto_increment values for a table under innodb engine?

Yes, but why would you ever need that?
You break dependencies with other tables that way

oh i don't mean that
after restart
it started from 0
insert into foo values(null,bla,bla,bla)

hm
You mean you lost values in auto_increment column?
Was the table empty upon restart?

values are accessible, but new rows added from the start
salle, no
it has about 37000 rows inserted

try SHOW CREATE TABLE and see what exactly it says for the auto_inc column and AUTO_INCREMENT options
Looks like somehow AUTO_INCREMENT was reset to 0
Get the MAX(id) and set AUTO_INCREMENT to MAX(id) + 1

i tried it but it didn't work

hmm
how the hell did I end up with 5.1 anyway
damn Dillo

salle you mean 'ALTER TABLE foo AUTO_INCREMENT= 37000' ?

yep

it didn't worked

*
To prove that you're not a bot, enter this code
Anti-Spam Image

Comments are closed.


Blog Tags:

Similar posts: