1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# Testing of potential problems in Aria and alter table
-- source include/have_maria.inc
drop table if exists t1;
#
# MDEV-4970 Wrong result with Aria table populated with disabled keys
#
CREATE TABLE t1 (pk INT, d DATETIME, PRIMARY KEY(pk), KEY(d)) ENGINE=Aria;
ALTER TABLE t1 DISABLE KEYS;
INSERT INTO t1 VALUES (1,'2000-01-01 22:22:22'),(2,'2012-12-21 12:12:12');
INSERT INTO t1 VALUES (3, '2008-07-24');
ALTER TABLE t1 ENABLE KEYS;
SELECT t1a.pk FROM t1 AS t1a LEFT JOIN t1 AS t1b ON t1a.pk = t1b.pk;
SELECT * FROM t1 AS t1a LEFT JOIN t1 AS t1b ON t1a.pk = t1b.pk;
DROP TABLE t1;
CREATE TABLE t1 (pk INT PRIMARY KEY, i INT, KEY(i)) ENGINE=Aria;
ALTER TABLE t1 DISABLE KEYS;
INSERT INTO t1 VALUES (1,11);
INSERT INTO t1 VALUES (2,0),(3,33),(4,0),(5,55),(6,66),(7,0),(8,88),(9,99);
ALTER TABLE t1 ENABLE KEYS;
SELECT * FROM t1 WHERE i = 0 OR pk BETWEEN 6 AND 10;
DROP TABLE t1;
#
# MDEV-14943
# Assertion `block->type == PAGECACHE_EMPTY_PAGE || block->type == type ||
# type == PAGECACHE_LSN_PAGE || type == PAGECACHE_READ_UNKNOWN_PAGE ||
# block->type == PAGECACHE_READ_UNKNOWN_PAGE' failed in pagecache_read upon
# CREATE ... SELECT from Aria table
#
CREATE TABLE t1 (f INT) ENGINE=Aria transactional=1;
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES (1),(2);
--error ER_BAD_FIELD_ERROR
ALTER TABLE t1 ORDER BY unknown_column;
SHOW CREATE TABLE t1;
CREATE TABLE t2 SELECT * FROM t1;
DROP TABLE t1, t2;
|