diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2018-01-24 12:29:31 +0200 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2018-01-24 12:29:31 +0200 |
commit | d833bb65d53b9a4375fa71cc485b4719fdb0ee53 (patch) | |
tree | d1271339e1c3a660e4788a5c9913bfe54e0271f1 /mysql-test/suite/maria/lock.test | |
parent | e431d90065d277e62fa4f81a1654790f58a84146 (diff) | |
parent | 76577e1e2602f3c30859a176808c433a263e1b0a (diff) | |
download | mariadb-git-d833bb65d53b9a4375fa71cc485b4719fdb0ee53.tar.gz |
Merge remote-tracking branch '5.5' into 10.0
Diffstat (limited to 'mysql-test/suite/maria/lock.test')
-rw-r--r-- | mysql-test/suite/maria/lock.test | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/mysql-test/suite/maria/lock.test b/mysql-test/suite/maria/lock.test index 5b6d17069e7..57447a18c55 100644 --- a/mysql-test/suite/maria/lock.test +++ b/mysql-test/suite/maria/lock.test @@ -50,3 +50,58 @@ drop table t1; CREATE TABLE t1 (i INT) ENGINE=Aria; LOCK TABLES t1 WRITE, t1 AS t1a WRITE; DROP TABLE t1; + +--echo # +--echo # MDEV-8200 aria bug with insert select when select is a aria table +--echo # (wrong result or assertion failure: +--echo # `table->file->stats.records > 0 || error') +--echo # + +CREATE TABLE t1 (f1 INT) ENGINE=Aria; +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (1); +CREATE TABLE t2 (f2 INT) ENGINE=MyISAM; +CREATE TABLE tmp (f3 INT) engine=Aria; +LOCK TABLE t2 WRITE, tmp WRITE, tmp AS tmp_alias WRITE, t1 WRITE; +INSERT INTO tmp SELECT f1 FROM t1; +INSERT INTO t2 SELECT f3 FROM tmp AS tmp_alias; +select * from t2; +unlock tables; +DROP TABLE t1,t2,tmp; + +--echo # +--echo # Same without transactional +--echo # + +CREATE TABLE t1 (f1 INT) transactional=0 ENGINE=Aria; +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (2); +CREATE TABLE t2 (f2 INT) ENGINE=MyISAM; +CREATE TABLE tmp (f3 INT) transactional=0 engine=Aria; +LOCK TABLE t2 WRITE, tmp WRITE, tmp AS tmp_alias WRITE, t1 WRITE; +INSERT INTO tmp SELECT f1 FROM t1; +INSERT INTO t2 SELECT f3 FROM tmp AS tmp_alias; +select * from t2; +unlock tables; +DROP TABLE t1,t2,tmp; + +--echo # +--echo # Using spatical keys (disables versioning) +--echo # + +CREATE TABLE t1 (f1 INT, c1 geometry NOT NULL, SPATIAL KEY i1 (c1)) transactional=1 ENGINE=Aria; +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (3, +PolygonFromText('POLYGON((-18.6086111000 -66.9327777000, + -18.6055555000 -66.8158332999, + -18.7186111000 -66.8102777000, + -18.7211111000 -66.9269443999, + -18.6086111000 -66.9327777000))')); +CREATE TABLE t2 (f2 INT) ENGINE=MyISAM; +CREATE TABLE tmp (f3 INT, c1 geometry NOT NULL, SPATIAL KEY i1 (c1)) transactional=1 ENGINE=Aria; +LOCK TABLE t2 WRITE, tmp WRITE, tmp AS tmp_alias WRITE, t1 WRITE; +INSERT INTO tmp SELECT f1,c1 FROM t1; +INSERT INTO t2 (f2) SELECT f3 FROM tmp AS tmp_alias; +select * from t2; +unlock tables; +DROP TABLE t1,t2,tmp; |