MDEV-11539 test_if_reopen: Assertion `strcmp(share->unique_file_name,filename) || share->last_version' failed upon select from I_S
remove HA_EXTRA_PREPARE_FOR_RENAME - neither OPTIMIZE nor REPAIR need it (was introduced in b58e79566c5 when replacing remove_table_from_cache() with wait_while_table_is_used() even though remove_table_from_cache() did not have it).
This commit is contained in:
parent
1c10b256b3
commit
a0702dbcda
@ -22,3 +22,17 @@ a left(b,10)
|
|||||||
4 CCCCCCCCCC
|
4 CCCCCCCCCC
|
||||||
drop table t1;
|
drop table t1;
|
||||||
set debug_sync='reset';
|
set debug_sync='reset';
|
||||||
|
# End of 5.5 tests
|
||||||
|
CREATE TABLE t1 (i INT) ENGINE=MyISAM;
|
||||||
|
INSERT t1 VALUES (1);
|
||||||
|
LOCK TABLE t1 WRITE;
|
||||||
|
OPTIMIZE TABLE t1;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 optimize status OK
|
||||||
|
SELECT * FROM INFORMATION_SCHEMA.TABLES;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
i
|
||||||
|
1
|
||||||
|
UNLOCK TABLES;
|
||||||
|
DROP TABLE t1;
|
||||||
|
# End of 10.0 tests
|
||||||
|
@ -114,7 +114,7 @@ test.t1 repair status OK
|
|||||||
SET myisam_repair_threads=@@global.myisam_repair_threads;
|
SET myisam_repair_threads=@@global.myisam_repair_threads;
|
||||||
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
|
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
End of 4.1 tests
|
# End of 4.1 tests
|
||||||
# Test with a saved table from 4.1
|
# Test with a saved table from 4.1
|
||||||
SHOW TABLE STATUS LIKE 't1';
|
SHOW TABLE STATUS LIKE 't1';
|
||||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||||
@ -150,6 +150,7 @@ SELECT * FROM t1;
|
|||||||
id
|
id
|
||||||
1
|
1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
# End of 5.0 tests
|
||||||
DROP TABLE IF EXISTS tt1;
|
DROP TABLE IF EXISTS tt1;
|
||||||
CREATE TEMPORARY TABLE tt1 (c1 INT);
|
CREATE TEMPORARY TABLE tt1 (c1 INT);
|
||||||
REPAIR TABLE tt1 USE_FRM;
|
REPAIR TABLE tt1 USE_FRM;
|
||||||
@ -214,3 +215,17 @@ Table Op Msg_type Msg_text
|
|||||||
test.v1 repair status OK
|
test.v1 repair status OK
|
||||||
drop view v1;
|
drop view v1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
# End of 5.5 tests
|
||||||
|
CREATE TABLE t1 (i INT) ENGINE=MyISAM;
|
||||||
|
INSERT t1 VALUES (1);
|
||||||
|
LOCK TABLE t1 WRITE;
|
||||||
|
REPAIR TABLE t1;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 repair status OK
|
||||||
|
SELECT * FROM INFORMATION_SCHEMA.TABLES;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
i
|
||||||
|
1
|
||||||
|
UNLOCK TABLES;
|
||||||
|
DROP TABLE t1;
|
||||||
|
# End of 10.0 tests
|
||||||
|
24
mysql-test/suite/maria/repair.result
Normal file
24
mysql-test/suite/maria/repair.result
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
CREATE TABLE t1 (i INT) ENGINE=Aria TRANSACTIONAL=1;
|
||||||
|
INSERT t1 VALUES (1);
|
||||||
|
LOCK TABLE t1 WRITE;
|
||||||
|
REPAIR TABLE t1;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 repair status OK
|
||||||
|
SELECT * FROM INFORMATION_SCHEMA.TABLES;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
i
|
||||||
|
1
|
||||||
|
UNLOCK TABLES;
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (i INT) ENGINE=Aria TRANSACTIONAL=1;
|
||||||
|
INSERT t1 VALUES (1);
|
||||||
|
LOCK TABLE t1 WRITE;
|
||||||
|
OPTIMIZE TABLE t1;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 optimize status OK
|
||||||
|
SELECT * FROM INFORMATION_SCHEMA.TABLES;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
i
|
||||||
|
1
|
||||||
|
UNLOCK TABLES;
|
||||||
|
DROP TABLE t1;
|
24
mysql-test/suite/maria/repair.test
Normal file
24
mysql-test/suite/maria/repair.test
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#
|
||||||
|
# MDEV-11539 test_if_reopen: Assertion `strcmp(share->unique_file_name,filename) || share->last_version' failed upon select from I_S
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (i INT) ENGINE=Aria TRANSACTIONAL=1;
|
||||||
|
INSERT t1 VALUES (1);
|
||||||
|
LOCK TABLE t1 WRITE;
|
||||||
|
REPAIR TABLE t1;
|
||||||
|
--disable_result_log
|
||||||
|
SELECT * FROM INFORMATION_SCHEMA.TABLES;
|
||||||
|
--enable_result_log
|
||||||
|
SELECT * FROM t1;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
CREATE TABLE t1 (i INT) ENGINE=Aria TRANSACTIONAL=1;
|
||||||
|
INSERT t1 VALUES (1);
|
||||||
|
LOCK TABLE t1 WRITE;
|
||||||
|
OPTIMIZE TABLE t1;
|
||||||
|
--disable_result_log
|
||||||
|
SELECT * FROM INFORMATION_SCHEMA.TABLES;
|
||||||
|
--enable_result_log
|
||||||
|
SELECT * FROM t1;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
DROP TABLE t1;
|
@ -46,3 +46,20 @@ connection default;
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
set debug_sync='reset';
|
set debug_sync='reset';
|
||||||
|
|
||||||
|
--echo # End of 5.5 tests
|
||||||
|
|
||||||
|
#
|
||||||
|
# MDEV-11539 test_if_reopen: Assertion `strcmp(share->unique_file_name,filename) || share->last_version' failed upon select from I_S
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (i INT) ENGINE=MyISAM;
|
||||||
|
INSERT t1 VALUES (1);
|
||||||
|
LOCK TABLE t1 WRITE;
|
||||||
|
OPTIMIZE TABLE t1;
|
||||||
|
--disable_result_log
|
||||||
|
SELECT * FROM INFORMATION_SCHEMA.TABLES;
|
||||||
|
--enable_result_log
|
||||||
|
SELECT * FROM t1;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo # End of 10.0 tests
|
||||||
|
@ -115,7 +115,7 @@ SET myisam_repair_threads=@@global.myisam_repair_threads;
|
|||||||
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
|
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo End of 4.1 tests
|
--echo # End of 4.1 tests
|
||||||
|
|
||||||
#
|
#
|
||||||
# BUG#36055 - mysql_upgrade doesn't really 'upgrade' tables
|
# BUG#36055 - mysql_upgrade doesn't really 'upgrade' tables
|
||||||
@ -147,7 +147,8 @@ REPAIR TABLE t1 USE_FRM;
|
|||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
# End of 5.0 tests
|
|
||||||
|
--echo # End of 5.0 tests
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug#18775 - Temporary table from alter table visible to other threads
|
# Bug#18775 - Temporary table from alter table visible to other threads
|
||||||
@ -219,3 +220,21 @@ create view v1 as select * from t1;
|
|||||||
repair view v1;
|
repair view v1;
|
||||||
drop view v1;
|
drop view v1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
--echo # End of 5.5 tests
|
||||||
|
|
||||||
|
#
|
||||||
|
# MDEV-11539 test_if_reopen: Assertion `strcmp(share->unique_file_name,filename) || share->last_version' failed upon select from I_S
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (i INT) ENGINE=MyISAM;
|
||||||
|
INSERT t1 VALUES (1);
|
||||||
|
LOCK TABLE t1 WRITE;
|
||||||
|
REPAIR TABLE t1;
|
||||||
|
--disable_result_log
|
||||||
|
SELECT * FROM INFORMATION_SCHEMA.TABLES;
|
||||||
|
--enable_result_log
|
||||||
|
SELECT * FROM t1;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo # End of 10.0 tests
|
||||||
|
@ -638,8 +638,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
|
|||||||
*/
|
*/
|
||||||
if (lock_type == TL_WRITE && !table->table->s->tmp_table)
|
if (lock_type == TL_WRITE && !table->table->s->tmp_table)
|
||||||
{
|
{
|
||||||
if (wait_while_table_is_used(thd, table->table,
|
if (wait_while_table_is_used(thd, table->table, HA_EXTRA_NOT_USED))
|
||||||
HA_EXTRA_PREPARE_FOR_RENAME))
|
|
||||||
goto err;
|
goto err;
|
||||||
DEBUG_SYNC(thd, "after_admin_flush");
|
DEBUG_SYNC(thd, "after_admin_flush");
|
||||||
/* Flush entries in the query cache involving this table. */
|
/* Flush entries in the query cache involving this table. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user