mirror of
https://github.com/MariaDB/server.git
synced 2025-01-28 01:34:17 +01:00
ec6aa9ac42
The problem was two fold: - REPAIR TABLE t1 USE_FRM did not work for transactional Aria tables (Table was thought to be repaired, which it was not) which caused issues in later usage of the table. - When swapping tmp_data file to data file, sort_info files where not updated. This caused problems if there was several unique keys and there was a duplicate for the second key.
87 lines
2.2 KiB
Text
87 lines
2.2 KiB
Text
CREATE TABLE t1 (i INT) ENGINE=Aria TRANSACTIONAL=1;
|
|
INSERT t1 VALUES (1);
|
|
LOCK TABLE t1 WRITE;
|
|
REPAIR TABLE t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 repair status OK
|
|
SELECT * FROM INFORMATION_SCHEMA.TABLES;
|
|
SELECT * FROM t1;
|
|
i
|
|
1
|
|
UNLOCK TABLES;
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (i INT) ENGINE=Aria TRANSACTIONAL=1;
|
|
INSERT t1 VALUES (1);
|
|
LOCK TABLE t1 WRITE;
|
|
OPTIMIZE TABLE t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 optimize status OK
|
|
SELECT * FROM INFORMATION_SCHEMA.TABLES;
|
|
SELECT * FROM t1;
|
|
i
|
|
1
|
|
UNLOCK TABLES;
|
|
DROP TABLE t1;
|
|
#
|
|
# MDEV-23824 SIGSEGV in end_io_cache on REPAIR LOCAL TABLE for Aria table
|
|
#
|
|
CREATE TABLE t1 (i INT) ENGINE=Aria;
|
|
INSERT INTO t1 VALUES (1);
|
|
SET max_session_mem_used=50000;
|
|
REPAIR LOCAL TABLE t1 USE_FRM;
|
|
REPAIR LOCAL TABLE t1;
|
|
DROP TABLE t1;
|
|
SET max_session_mem_used=default;
|
|
|
|
# MDEV-17223 Assertion `thd->killed != 0' failed in
|
|
# ha_maria::enable_indexes
|
|
#
|
|
CREATE OR REPLACE TABLE t1 (c VARCHAR(1024) NOT NULL) ENGINE=Aria ROW_FORMAT FIXED;
|
|
insert into t1 select char(seq) from seq_65_to_256;
|
|
insert into t1 values ("a");
|
|
ALTER TABLE t1 ADD PRIMARY KEY(c(67));
|
|
ERROR 23000: Duplicate entry 'a' for key 'PRIMARY'
|
|
select count(*) from t1;
|
|
count(*)
|
|
193
|
|
drop table t1;
|
|
|
|
# MDEV-17223 Assertion `thd->killed != 0' failed in
|
|
# ha_maria::enable_indexes
|
|
#
|
|
SET SESSION aria_sort_buffer_size=1023;
|
|
Warnings:
|
|
Warning 1292 Truncated incorrect aria_sort_buffer_size value: '1023'
|
|
CREATE TABLE t2 (c TEXT,INDEX(c(1000))) ENGINE=Aria;
|
|
INSERT INTO t2 select char(seq) from seq_65_to_255;
|
|
SELECT COUNT(*) FROM t2;
|
|
COUNT(*)
|
|
191
|
|
DROP TABLE t2;
|
|
SET SESSION aria_sort_buffer_size=default;
|
|
#
|
|
# End of 10.3 tests
|
|
#
|
|
#
|
|
# MDEV-34055 Assertion `readbytes != (size_t)-1 ||
|
|
# (*__errno_location ()) != 9' failure or corruption errors upon
|
|
# REPAIR on Aria tables
|
|
#
|
|
CREATE OR REPLACE TABLE t1 (a INT, b INT, UNIQUE(b), UNIQUE(a)) ENGINE=Aria;
|
|
INSERT INTO t1 VALUES (1,2);
|
|
REPAIR TABLE t1 EXTENDED QUICK USE_FRM;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 repair warning Number of rows changed from 0 to 1
|
|
test.t1 repair status OK
|
|
CREATE TABLE t2 (c INT) ENGINE=Aria;
|
|
SELECT * FROM t2;
|
|
c
|
|
REPLACE INTO t1 VALUES (1,3);
|
|
REPAIR TABLE t2, t1 QUICK;
|
|
Table Op Msg_type Msg_text
|
|
test.t2 repair status OK
|
|
test.t1 repair status OK
|
|
DROP TABLE t1, t2;
|
|
#
|
|
# End of 10.5 tests
|
|
#
|