summaryrefslogtreecommitdiff
path: root/mysql-test/t/archive.test
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2010-05-27 17:40:54 -0300
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2010-05-27 17:40:54 -0300
commitfcbc77b064b7fde7c0d5519e89b3715bbac8fc2c (patch)
tree4e6ea173d93497d194e0298b20fc4abb785faee8 /mysql-test/t/archive.test
parent2397d7fe1938cca45f96dd5bf73a343ea0fcacf7 (diff)
downloadmariadb-git-fcbc77b064b7fde7c0d5519e89b3715bbac8fc2c.tar.gz
Bug#42643: InnoDB does not support replication of TRUNCATE TABLE
Post-merge fix: Retrieve handler statistics to workaround quirks of the archive storage engine. mysql-test/t/archive.test: Add test case. sql/sql_truncate.cc: Call info method with has side-effects related to the archive storage engine. It will cause rows to become visible, allowing a error to be thrown once we attempt to delete the rows.
Diffstat (limited to 'mysql-test/t/archive.test')
-rw-r--r--mysql-test/t/archive.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test
index b2545e98f3e..29f69f64d10 100644
--- a/mysql-test/t/archive.test
+++ b/mysql-test/t/archive.test
@@ -1669,3 +1669,13 @@ FLUSH TABLE t1;
SELECT * FROM t1;
--error ER_BAD_TABLE_ERROR
DROP TABLE t1;
+
+--echo #
+--echo # Ensure that TRUNCATE fails for non-empty archive tables.
+--echo #
+
+CREATE TABLE t1 (a INT) ENGINE=ARCHIVE;
+INSERT INTO t1 VALUES (1);
+--error ER_ILLEGAL_HA
+TRUNCATE TABLE t1;
+DROP TABLE t1;