2012-05-16 17:44:17 +02:00
|
|
|
#
|
|
|
|
# Testing of potential problems in Aria with locking
|
|
|
|
#
|
|
|
|
|
|
|
|
-- source include/have_maria.inc
|
|
|
|
|
|
|
|
drop table if exists t1,t2;
|
|
|
|
|
|
|
|
#
|
|
|
|
# Test for Bug#973039
|
|
|
|
# Assertion `share->in_trans == 0' failed in maria_close on DROP TABLE
|
|
|
|
# under LOCK
|
|
|
|
#
|
|
|
|
|
2012-05-17 00:47:28 +02:00
|
|
|
# Test DROP TABLE
|
|
|
|
|
2012-05-16 17:44:17 +02:00
|
|
|
CREATE TABLE t1 (i INT) ENGINE=Aria;
|
|
|
|
CREATE TABLE t2 (i INT) ENGINE=Aria;
|
|
|
|
LOCK TABLE t1 WRITE, t2 WRITE;
|
|
|
|
# Also fails with FLUSH TABLE t1 and with REPAIR TABLE t1 USE_FRM
|
|
|
|
DROP TABLE t1;
|
|
|
|
UNLOCK TABLES;
|
|
|
|
DROP TABLE t2;
|
2012-05-17 00:47:28 +02:00
|
|
|
|
|
|
|
#Test FLUSH TABLE
|
|
|
|
|
|
|
|
CREATE TABLE t1 (i INT) ENGINE=Aria;
|
|
|
|
CREATE TABLE t2 (i INT) ENGINE=Aria;
|
|
|
|
LOCK TABLE t1 WRITE, t2 WRITE;
|
|
|
|
FLUSH TABLE t1;
|
|
|
|
select * from t1;
|
|
|
|
unlock tables;
|
|
|
|
drop table t1,t2;
|
|
|
|
|
|
|
|
# Test REPAIR ... USE_FRM and unlock tables last
|
|
|
|
|
|
|
|
CREATE TABLE t1 (i INT) ENGINE=Aria;
|
|
|
|
CREATE TABLE t2 (i INT) ENGINE=Aria;
|
|
|
|
LOCK TABLE t1 WRITE, t2 WRITE;
|
|
|
|
repair table t1 use_frm;
|
|
|
|
select * from t1;
|
|
|
|
drop table t2;
|
|
|
|
unlock tables;
|
|
|
|
drop table t1;
|
2012-08-15 13:37:55 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# MDEV-366: lock table twice with LOCK TABLES and then drop it
|
|
|
|
#
|
|
|
|
|
|
|
|
CREATE TABLE t1 (i INT) ENGINE=Aria;
|
|
|
|
LOCK TABLES t1 WRITE, t1 AS t1a WRITE;
|
|
|
|
DROP TABLE t1;
|