mirror of
https://github.com/MariaDB/server.git
synced 2025-11-10 23:02:54 +03:00
- InnoDB fails to update the autoinc persistently after bulk insert operation. row_merge_bulk_t::write_to_index(): Update the autoinc value persistently
45 lines
1.3 KiB
Plaintext
45 lines
1.3 KiB
Plaintext
#
|
|
# Start of 10.6 tests
|
|
#
|
|
#
|
|
# MDEV-27214 Import with disabled keys corrupts meta-data like rows, indexes, ...
|
|
#
|
|
CREATE DATABASE db1;
|
|
CREATE TABLE db1.t1 (id int, a int,PRIMARY KEY (id)) ENGINE=InnoDB
|
|
STATS_PERSISTENT=1 STATS_AUTO_RECALC=1;
|
|
INSERT INTO db1.t1 VALUES (1,2),(2,3),(3,4);
|
|
DROP DATABASE IF EXISTS db1;
|
|
CREATE DATABASE db1;
|
|
# Wait till statistics update after bulk insert operation
|
|
SELECT TABLE_ROWS, AVG_ROW_LENGTH>0 FROM INFORMATION_SCHEMA.TABLES
|
|
WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='db1';
|
|
TABLE_ROWS AVG_ROW_LENGTH>0
|
|
3 1
|
|
OPTIMIZE TABLE db1.t1;
|
|
Table Op Msg_type Msg_text
|
|
db1.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
|
db1.t1 optimize status OK
|
|
# Wait till statistics update after bulk insert operation
|
|
SELECT TABLE_ROWS, AVG_ROW_LENGTH>0 FROM INFORMATION_SCHEMA.TABLES
|
|
WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='db1';
|
|
TABLE_ROWS AVG_ROW_LENGTH>0
|
|
3 1
|
|
DROP DATABASE db1;
|
|
#
|
|
# End of 10.6 tests
|
|
#
|
|
#
|
|
# MDEV-30796 Auto_increment values not updated after bulk
|
|
# insert operation
|
|
#
|
|
CREATE TABLE t1(f1 INT NOT NULL AUTO_INCREMENT,
|
|
f2 INT NOT NULL, PRIMARY KEY(f1))ENGINE=InnoDB;
|
|
INSERT INTO t1 VALUES(1, 2), (25, 3), (2, 4);
|
|
# restart
|
|
INSERT INTO t1(f2) VALUES(5);
|
|
SELECT max(f1) FROM t1;
|
|
max(f1)
|
|
26
|
|
DROP TABLE t1;
|
|
# End of 10.9 tests
|