mariadb/mysql-test/main/myisam_repair.result
Monty 8819b5eea5 MDEV-23318 Assertion `cache_empty(keycache)' failed in prepare_resize_simple_key_cache
The reason was that during MyISAM parallel repair two threads used the
same changed TABLE object to compute virtual columns

Fixed by adding a mutex in compute_vcols()
2020-09-25 13:07:04 +03:00

51 lines
1.3 KiB
Text

#
# MDEV-23318 Assertion `cache_empty(keycache)' failed in
# prepare_resize_simple_key_cache
#
SET @buffer_size.save= @@key_buffer_size;
SET GLOBAL key_buffer_size= 134217728;
SET myisam_repair_threads= 6;
CREATE TABLE t1 (
pk INT AUTO_INCREMENT,
a INTEGER,
b DATE,
c VARCHAR(1),
d BLOB,
PRIMARY KEY (pk),
KEY (a),
KEY (b),
KEY (c, a),
UNIQUE (d)
) ENGINE=MyISAM;
INSERT INTO t1 (a,b,c) SELECT seq, '2020-12-12', 'x' FROM seq_1_to_20;
ALTER TABLE t1 DISABLE KEYS;
SET GLOBAL c.key_buffer_size= 13700864;
Warnings:
Warning 1292 Truncated incorrect key_buffer_size value: '13700864'
INSERT INTO t1 SELECT 1;
ERROR 21S01: Column count doesn't match value count at row 1
SET GLOBAL c.key_buffer_size= 0;
DROP TABLE t1;
SET GLOBAL key_buffer_size= 134217728;
CREATE TABLE t1 (
pk INT AUTO_INCREMENT,
a INTEGER,
b DATE,
c VARCHAR(1),
d VARBINARY(40982),
PRIMARY KEY (pk),
KEY (a),
KEY (b),
KEY (c, a),
UNIQUE (d)
) ENGINE=MyISAM;
INSERT INTO t1 (a,b,c) SELECT seq, '2020-12-12', 'x' FROM seq_1_to_20;
ALTER TABLE t1 DISABLE KEYS;
SET GLOBAL c.key_buffer_size= 13700864;
Warnings:
Warning 1292 Truncated incorrect key_buffer_size value: '13700864'
INSERT INTO t1 SELECT 1;
ERROR 21S01: Column count doesn't match value count at row 1
SET GLOBAL c.key_buffer_size= 0;
DROP TABLE t1;
SET GLOBAL key_buffer_size= @buffer_size.save;