summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-05-17 01:47:28 +0300
committerMichael Widenius <monty@askmonty.org>2012-05-17 01:47:28 +0300
commitb1485a4780808cd95cbc37c1f59024b39d542584 (patch)
tree9210bb1c318e4268a3dc3d47954cfc26a1debb6f /mysql-test/suite
parent26cc22f3fe95cfd535d61540101fe89cd10c9026 (diff)
downloadmariadb-git-b1485a4780808cd95cbc37c1f59024b39d542584.tar.gz
More fixes for LOCK TABLE and REPAIR/FLUSH
Changed HA_EXTRA_NORMAL to HA_EXTRA_NOT_USED (more clean) mysql-test/suite/maria/lock.result: More extensive tests of LOCK TABLE with FLUSH and REPAIR mysql-test/suite/maria/lock.test: More extensive tests of LOCK TABLE with FLUSH and REPAIR sql/sql_admin.cc: Fix that REPAIR TABLE ... USE_FRM works with LOCK TABLES sql/sql_base.cc: Ensure that transactions are closed in ARIA when doing flush HA_EXTRA_NORMAL -> HA_EXTRA_NOT_USED Don't call extra many times for a table in close_all_tables_for_name() Added test if table_list->table as this can happen in error situations sql/sql_partition.cc: HA_EXTRA_NORMAL -> HA_EXTRA_NOT_USED sql/sql_reload.cc: Fixed comment sql/sql_table.cc: HA_EXTRA_NORMAL -> HA_EXTRA_NOT_USED sql/sql_trigger.cc: HA_EXTRA_NORMAL -> HA_EXTRA_NOT_USED sql/sql_truncate.cc: HA_EXTRA_FORCE_REOPEN -> HA_EXTRA_PREPARE_FOR_DROP for truncate, as this speeds up truncate by not having to flush the cache to disk.
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/maria/lock.result19
-rw-r--r--mysql-test/suite/maria/lock.test23
2 files changed, 42 insertions, 0 deletions
diff --git a/mysql-test/suite/maria/lock.result b/mysql-test/suite/maria/lock.result
index 606cb5fed4d..101347c7d4c 100644
--- a/mysql-test/suite/maria/lock.result
+++ b/mysql-test/suite/maria/lock.result
@@ -8,3 +8,22 @@ LOCK TABLE t1 WRITE, t2 WRITE;
DROP TABLE t1;
UNLOCK TABLES;
DROP TABLE t2;
+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;
+i
+unlock tables;
+drop table t1,t2;
+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;
+Table Op Msg_type Msg_text
+test.t1 repair status OK
+select * from t1;
+i
+drop table t2;
+unlock tables;
+drop table t1;
diff --git a/mysql-test/suite/maria/lock.test b/mysql-test/suite/maria/lock.test
index 564cf965d17..6116f0b5f08 100644
--- a/mysql-test/suite/maria/lock.test
+++ b/mysql-test/suite/maria/lock.test
@@ -12,6 +12,8 @@ drop table if exists t1,t2;
# under LOCK
#
+# Test DROP TABLE
+
CREATE TABLE t1 (i INT) ENGINE=Aria;
CREATE TABLE t2 (i INT) ENGINE=Aria;
LOCK TABLE t1 WRITE, t2 WRITE;
@@ -19,3 +21,24 @@ LOCK TABLE t1 WRITE, t2 WRITE;
DROP TABLE t1;
UNLOCK TABLES;
DROP TABLE t2;
+
+#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;