ALTER TABLE / AUTO_INCREMENT Don't work?!

Problems with the Windows version of XAMPP, questions, comments, and anything related.

ALTER TABLE / AUTO_INCREMENT Don't work?!

Postby ifiult » 01. October 2013 17:45

Please, I'm using XAMPP 1.8.3 (Windows), and when I run the command

Code: Select all
ALTER TABLE  `users` AUTO_INCREMENT =2;


in MySQL through phpMyAdmin, it shows run successfully but does not execute the command. Why?
Thank you!
ifiult
 
Posts: 4
Joined: 23. December 2010 01:42

Re: ALTER TABLE / AUTO_INCREMENT Don't work?!

Postby Altrea » 01. October 2013 18:31

ifiult wrote:it shows run successfully but does not execute the command.

How do you check it is not executed?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6482
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: ALTER TABLE / AUTO_INCREMENT Don't work?!

Postby ifiult » 01. October 2013 19:33

Please, follow to reproduce the problem:

phpMyAdmin (XAMPP 1.8.3 Windows)

1 - Insert some data in row 1, 2 and 3 (all with "id" column AUTO_INCREMENT)
2 - Delete the row 3
3 - Click on the "Operations" tab and change table options "AUTO_INCREMENT = 4" to "AUTO_INCREMENT = 3" then click "Go". Wait for the message: "Your SQL query has been executed successfully".
4 - Click on the "Browse" tab, and click again to the "Operations" tab.

See that the change was not saved in AUTO_INCREMENT.
ifiult
 
Posts: 4
Joined: 23. December 2010 01:42

Re: ALTER TABLE / AUTO_INCREMENT Don't work?!

Postby Altrea » 01. October 2013 20:48

Yeah, i see.
That is because auto_increments in INNODB are handled different than these from MyISAM (where decreasing the auto_increment with this command is still working).
So it's an INNODB limitation.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6482
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: ALTER TABLE / AUTO_INCREMENT Don't work?!

Postby ifiult » 01. October 2013 21:00

Thank you very much! ;)
ifiult
 
Posts: 4
Joined: 23. December 2010 01:42


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 84 guests