diff options
Diffstat (limited to 'mysql-test/suite/maria/maria2.test')
-rw-r--r-- | mysql-test/suite/maria/maria2.test | 80 |
1 files changed, 75 insertions, 5 deletions
diff --git a/mysql-test/suite/maria/maria2.test b/mysql-test/suite/maria/maria2.test index df691569e05..0f4a50ad99d 100644 --- a/mysql-test/suite/maria/maria2.test +++ b/mysql-test/suite/maria/maria2.test @@ -1,10 +1,5 @@ --source include/have_maria.inc -# Initialise ---disable_warnings -drop table if exists t1,t2; ---enable_warnings - # Test for BUG#36319 # "Aria: table is not empty but DELETE and SELECT find no rows" @@ -109,3 +104,78 @@ select * from t1 order by pk; load data infile '../../std_data/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk); select * from t1 order by pk; drop table t1; + +--echo # +--echo # End of 5.5 tests +--echo # + +--echo # +--echo # MDEV-27303 Table corruption after insert into a non-InnoDB table with DESC index +--echo # +create table t1 ( + a bigint default 0, + b bigint default 0, + c binary(128) not null, + d datetime default '0000-00-00 00:00:00', + key (c desc,b,d,a) +) engine=aria; +insert into t1 (c) values + ('xx'),('bb'),('tt'),('pp'),('mm'),('yy'),('rr'),('bb'),('yy'),('gg'), + ('dd'),('fx'),('wi'),('ix'),('ox'),('mu'),('ux'),('pm'),('mx'),('xu'), + ('ul'),('lp'),('px'),('lp'),('xx'),('pq'),('qs'),('se'),('ee'),('xx'), + ('rv'),('ff'),('vj'),('jy'),('yn'),('nc'),('nx'),('hj'),('ji'),('ik'), + ('kk'),('ww'),('xx'),('yd'),('dw'),('wk'),('kr'),('dd'),('rj'),('jf'), + ('bx'),('fc'),('cp'),('pm'),('mw'),('wy'),('yl'),('li'),('ic'),('he'), + ('ci'),('il'),('lz'),('zd'),('gz'),('xd'),('ze'),('dm'),('ms'),('xd'), + ('sw'),('we'),('nb'),('tx'),('vr'),('xw'),('aa'),('ah'),('hd'),('jl'), + ('lf'),('fw'),('wx'),('xh'),('hr'),('zx'),('vw'),('rm'),('mx'),('xt'), + ('tp'),('ps'),('sh'),('ga'),('df'),('as'),('gz'),('xd'),('yy'),('xr'); +check table t1 extended; +drop table t1; + +--echo # +--echo # MDEV-27309 Server crash or ASAN memcpy-param-overlap upon INSERT into Aria/MyISAM table with DESC key +--echo # +CREATE TABLE t1 (id INT, c BINARY(80), PRIMARY KEY(id)); +ALTER TABLE t1 ADD KEY(c DESC, id); +INSERT INTO t1 VALUES (1,NULL),(2,''),(3,''); +DROP TABLE t1; + +--echo # +--echo # MDEV-27330 Wrong sorting order with DESC index and empty strings in MyISAM/Aria table +--echo # +create table t (id int, c char(128) not null, key (c desc)) engine=aria; +insert into t values (1,''),(2,'foo'),(3,''),(4,'bar'); +select c from t order by c; +drop table t; + +--echo # +--echo # MDEV-27340 NULL gets lost (becomes empty string), SELECT hangs with DESC index on MyISAM/Aria table +--echo # +create table t (c char(8), key(c desc)) engine=aria character set utf8mb4; +insert into t values (''),('foo'),(null),(''),('bar'); +check table t; +check table t extended; +select distinct c from t; +select c from t; +drop table t; + +--echo # +--echo # MDEV-27434 DESC attribute does not work with auto-increment on secondary column of multi-part index +--echo # +create table t (a int auto_increment, b int, unique(b,a desc)) engine=aria; +insert ignore into t (b) values (10),(10),(10); +select * from t; +drop table t; + +--echo # +--echo # MDEV-27585 Auto-increment on secondary column increments unexpectedly with DESC key +--echo # +create table t (c char(16), i int auto_increment, index (c,i desc)) engine=aria collate latin1_swedish_ci; +insert into t (c) values ('รค'),('a'); +select hex(c),c,i from t order by c, i; +drop table t; + +--echo # +--echo # End of 10.8 tests +--echo # |