From d4d3ca204f9d36b01be2c4dad15d0cc5b078c6e6 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Fri, 18 May 2012 16:02:11 +0300 Subject: Fixed lp:997460 Truncate table on partitioned Aria table fails with ER_ILLEGAL_HA Fix is done by doing an autocommit in truncate table inside Aria storage/maria/ha_maria.cc: Force a commit for TRUNCATE TABLE inside lock tables Check that we don't call TRUNCATE with concurrent inserts going on. Make ha_maria::implict_commit faster when we don't have Aria tables in the transaction. (Most of the patch is just re-indentation because I removed an if level) --- mysql-test/suite/maria/maria.test | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mysql-test/suite/maria/maria.test') diff --git a/mysql-test/suite/maria/maria.test b/mysql-test/suite/maria/maria.test index b371394b2b3..6ebcf08d952 100644 --- a/mysql-test/suite/maria/maria.test +++ b/mysql-test/suite/maria/maria.test @@ -1805,7 +1805,11 @@ insert into t1 values (1); lock table t1 write concurrent; # should be fixed with fully implemented versioning --error ER_CHECK_NOT_IMPLEMENTED +delete from t1 where a>0; +--error ER_CHECK_NOT_IMPLEMENTED delete from t1; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +truncate t1; unlock tables; drop table t1; -- cgit v1.2.1