1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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.
This commit is contained in:
Davi Arnaut
2010-05-27 17:40:54 -03:00
parent 2397d7fe19
commit fcbc77b064
3 changed files with 39 additions and 0 deletions

View File

@ -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;