Commit 0a44ae65 authored by Monty's avatar Monty

Fix that FLUSH TABLES FOR EXPORT also works for Aria tables.

- Added missing test case for MyISAM
parent 05da63f0
...@@ -2569,6 +2569,14 @@ OPTIMIZE TABLE t1; ...@@ -2569,6 +2569,14 @@ OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 optimize status OK test.t1 optimize status OK
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1(a INT, b CHAR(10), KEY(a), KEY(b)) engine=myisam;
INSERT INTO t1 VALUES(1,'0'),(2,'0'),(3,'0'),(4,'0'),(5,'0'),
(6,'0'),(7,'0');
flush tables test.t1 for export;
insert into t1 values (8,'0');
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
unlock tables;
drop table t1;
show variables like 'myisam_block_size'; show variables like 'myisam_block_size';
Variable_name Value Variable_name Value
myisam_block_size 1024 myisam_block_size 1024
......
...@@ -2790,3 +2790,11 @@ test.t1 check status OK ...@@ -2790,3 +2790,11 @@ test.t1 check status OK
SET aria_repair_threads=@@global.aria_repair_threads; SET aria_repair_threads=@@global.aria_repair_threads;
SET aria_sort_buffer_size=@@global.aria_sort_buffer_size; SET aria_sort_buffer_size=@@global.aria_sort_buffer_size;
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1(a INT, b CHAR(10), KEY(a), KEY(b));
INSERT INTO t1 VALUES(1,'0'),(2,'0'),(3,'0'),(4,'0'),(5,'0'),
(6,'0'),(7,'0');
flush tables test.t1 for export;
insert into t1 values (8,'0');
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
unlock tables;
drop table t1;
...@@ -2018,6 +2018,19 @@ SET aria_repair_threads=@@global.aria_repair_threads; ...@@ -2018,6 +2018,19 @@ SET aria_repair_threads=@@global.aria_repair_threads;
SET aria_sort_buffer_size=@@global.aria_sort_buffer_size; SET aria_sort_buffer_size=@@global.aria_sort_buffer_size;
DROP TABLE t1; DROP TABLE t1;
#
# Check FLUSH FOR EXPORT
#
CREATE TABLE t1(a INT, b CHAR(10), KEY(a), KEY(b));
INSERT INTO t1 VALUES(1,'0'),(2,'0'),(3,'0'),(4,'0'),(5,'0'),
(6,'0'),(7,'0');
flush tables test.t1 for export;
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
insert into t1 values (8,'0');
unlock tables;
drop table t1;
# #
# End of test # End of test
# #
......
...@@ -1769,6 +1769,19 @@ ALTER TABLE t1 DISABLE KEYS; ...@@ -1769,6 +1769,19 @@ ALTER TABLE t1 DISABLE KEYS;
OPTIMIZE TABLE t1; OPTIMIZE TABLE t1;
DROP TABLE t1; DROP TABLE t1;
#
# Check FLUSH FOR EXPORT
#
CREATE TABLE t1(a INT, b CHAR(10), KEY(a), KEY(b)) engine=myisam;
INSERT INTO t1 VALUES(1,'0'),(2,'0'),(3,'0'),(4,'0'),(5,'0'),
(6,'0'),(7,'0');
flush tables test.t1 for export;
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
insert into t1 values (8,'0');
unlock tables;
drop table t1;
# #
# Check some variables # Check some variables
# #
......
...@@ -989,7 +989,7 @@ int_table_flags(HA_NULL_IN_KEY | HA_CAN_FULLTEXT | HA_CAN_SQL_HANDLER | ...@@ -989,7 +989,7 @@ int_table_flags(HA_NULL_IN_KEY | HA_CAN_FULLTEXT | HA_CAN_SQL_HANDLER |
HA_DUPLICATE_POS | HA_CAN_INDEX_BLOBS | HA_AUTO_PART_KEY | HA_DUPLICATE_POS | HA_CAN_INDEX_BLOBS | HA_AUTO_PART_KEY |
HA_FILE_BASED | HA_CAN_GEOMETRY | CANNOT_ROLLBACK_FLAG | HA_FILE_BASED | HA_CAN_GEOMETRY | CANNOT_ROLLBACK_FLAG |
HA_CAN_BIT_FIELD | HA_CAN_RTREEKEYS | HA_CAN_REPAIR | HA_CAN_BIT_FIELD | HA_CAN_RTREEKEYS | HA_CAN_REPAIR |
HA_CAN_VIRTUAL_COLUMNS | HA_CAN_VIRTUAL_COLUMNS | HA_CAN_EXPORT |
HA_HAS_RECORDS | HA_STATS_RECORDS_IS_EXACT), HA_HAS_RECORDS | HA_STATS_RECORDS_IS_EXACT),
can_enable_indexes(1), bulk_insert_single_undo(BULK_INSERT_NONE) can_enable_indexes(1), bulk_insert_single_undo(BULK_INSERT_NONE)
{} {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment