mariadb/mysql-test/suite/maria/temporary.result
Michael Widenius 8acbf9c1f9 MDEV-19595 fixed
The test cases for the MDEV found several independent bugs
in MariaDB server and Aria:
- If a temporary table was marked as crashed, it could never
  be deleted.
- Opening of a crashed temporary table gave an error message
  but the error was never forwarded to the caller which caused
  an assert() in my_ok()
- init_read_record() did mmap of all temporary tables, which is
  probably not a good idea as this area can potentially be
  very big. Changed code to only mmap internal temporary tables.
- mmap-ed tables where not unmapped in case of repair/optimize
  which caused bad data in table and crashes if the original
  table files where replaced with new ones (as the old mmap
  was still in place). Fixed by removing the mmap in case
  of repair.
- Cleaned up usage of code that disabled mmap in Aria
2019-06-19 00:35:44 +03:00

23 lines
578 B
Text

CREATE TABLE t1 (b INT);
INSERT INTO t1 VALUES (5);
CREATE TEMPORARY TABLE t1 (a INT) ENGINE=Aria ROW_FORMAT=DYNAMIC;
INSERT INTO t1 VALUES (1);
DELETE FROM t1 LIMIT 2;
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
SELECT * FROM t1;
a
INSERT INTO t1 VALUES (1),(2);
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
ALTER TABLE t1 CHANGE COLUMN IF EXISTS x x INT;
Warnings:
Note 1054 Unknown column 'x' in 't1'
ALTER TABLE t1;
DROP TEMPORARY TABLE t1;
DROP TABLE t1;