mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-31607 ER_DUP_KEY in mysql.innodb_table_stats upon RENAME on sequence
ha_innobase::delete_table(): Also on DROP SEQUENCE, do try to drop any persistent statistics. They should really not be created for SEQUENCE objects (which internally are 1-row no-rollback tables), but that is how happened to always work.
This commit is contained in:
@@ -248,3 +248,17 @@ SELECT NEXTVAL(s);
|
||||
NEXTVAL(s)
|
||||
1
|
||||
DROP SEQUENCE s;
|
||||
#
|
||||
# MDEV-31607 ER_DUP_KEY in mysql.table_stats upon REANME on sequence
|
||||
#
|
||||
CREATE SEQUENCE s1 ENGINE=InnoDB;
|
||||
CREATE SEQUENCE s2 ENGINE=InnoDB;
|
||||
SHOW CREATE SEQUENCE s1;
|
||||
Table Create Table
|
||||
s1 CREATE SEQUENCE `s1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB
|
||||
SHOW CREATE SEQUENCE s2;
|
||||
Table Create Table
|
||||
s2 CREATE SEQUENCE `s2` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB
|
||||
DROP SEQUENCE s2;
|
||||
RENAME TABLE s1 TO s2;
|
||||
DROP SEQUENCE s2;
|
||||
|
Reference in New Issue
Block a user