Bug #74112 | Create table loses AUTO_INCREMENT=N options when table_open_cache is full | ||
---|---|---|---|
Submitted: | 26 Sep 2014 22:05 | Modified: | 3 Oct 2014 17:05 |
Reporter: | Gavin Towey | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: DDL | Severity: | S3 (Non-critical) |
Version: | 5.6.19, 5.6.22 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[26 Sep 2014 22:05]
Gavin Towey
[29 Sep 2014 7:48]
MySQL Verification Team
Hello Gavin Towey, Thank you for the report and test case. Thanks, Umesh
[29 Sep 2014 7:54]
MySQL Verification Team
// 5.6.22 mysql> show variables like '%version%'; +-------------------------+---------------------------------------------------------+ | Variable_name | Value | +-------------------------+---------------------------------------------------------+ | innodb_version | 5.6.22 | | protocol_version | 10 | | slave_type_conversions | | | version | 5.6.22-enterprise-commercial-advanced-log | | version_comment | MySQL Enterprise Server - Advanced Edition (Commercial) | | version_compile_machine | x86_64 | | version_compile_os | Linux | +-------------------------+---------------------------------------------------------+ 7 rows in set (0.00 sec) // with 1..1024 count in provided script mysql> create table test ( a int unsigned not null auto_increment primary key) AUTO_INCREMENT=100; Query OK, 0 rows affected (0.02 sec) mysql> show create table test\G *************************** 1. row *************************** Table: test Create Table: CREATE TABLE `test` ( `a` int(10) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`a`) ) ENGINE=InnoDB AUTO_INCREMENT=100 DEFAULT CHARSET=latin1 1 row in set (0.00 sec) mysql> drop database test; Query OK, 1025 rows affected (8.83 sec) mysql> create database test; Query OK, 1 row affected (0.00 sec) //// with 1..2048 count in provided script mysql> use test Database changed mysql> create table test ( a int unsigned not null auto_increment primary key) AUTO_INCREMENT=100; Query OK, 0 rows affected (0.03 sec) mysql> show create table test\G *************************** 1. row *************************** Table: test Create Table: CREATE TABLE `test` ( `a` int(10) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 1 row in set (0.00 sec)
[3 Oct 2014 17:05]
Gavin Towey
I have some additional info. It looks like this has less to do with the table_open_cache and more the table_definition_cache. By doing SET GLOBAL table_definition_cache=10000; the issue goes away. This still should be considered a bug because it can "data loss" in terms of the table definition.