Package: mysql-server
Severity: important
Cannot set the next auto_increment value in CREATE TABLE and
ALTER TABLE statements. No error message is returned, mysql
server just silently skip the command. For example:
CREATE TABLE `test` (
`id` int(11) NOT NULL auto_increment,
`txt` varchar(100) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=11;
INSERT INTO `test` (`txt`) VALUES ('should be 11');
INSERT INTO `test` (`txt`) VALUES ('should be 12');
SELECT * FROM `test`;
+----+--------------+
| id | txt |
+----+--------------+
| 1 | should be 11 |
| 2 | should be 12 |
+----+--------------+
This prevents loading SQL dumps with saved auto increment
values and creating databases with non 1-based auto increment
primary keys, such as a user database starting with uid=10001.
The same issue reproduced using the ALTER TABLE command.
The bug can be reproduced using the mysql command line client,
PHPMyAdmin or anything else that can run SQL commands.
This feature should work starting with mysql-server 4.1.2.
SQL dumps with stored auto_increment values cannot be restored
correctly, that prevents correct backup of databases sensitive
for this kind of bug.
mysql-server version 4.1.11 from Debian stable does not work
correctly. mysql-server version 4.1.15 from Debian unstable
handles the above command correctly and sets the
auto increment value as requested. ALTER TABLE also works
for 4.1.15.
-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.15-1-686-smp
Locale: LANG=hu_HU, LC_CTYPE=hu_HU (charmap=ISO-8859-2)
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]