MDEV-23843 Assertions in Diagnostics_area upon table operations under FTWRL
Fixed binary logging in ANALYZE TABLE to work as optimize table
This commit is contained in:
parent
a6c6c4f463
commit
82efe4a15a
@ -20,3 +20,14 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
|||||||
connection default;
|
connection default;
|
||||||
disconnect con1;
|
disconnect con1;
|
||||||
unlock tables;
|
unlock tables;
|
||||||
|
# Second test from MDEV-23843
|
||||||
|
CREATE TABLE t (a INT);
|
||||||
|
FLUSH TABLES WITH READ LOCK;
|
||||||
|
connect con1,localhost,root,,;
|
||||||
|
SET lock_wait_timeout= 1;
|
||||||
|
ANALYZE TABLE t;
|
||||||
|
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||||
|
disconnect con1;
|
||||||
|
connection default;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
DROP TABLE t;
|
||||||
|
@ -27,3 +27,17 @@ FLUSH TABLES;
|
|||||||
--connection default
|
--connection default
|
||||||
--disconnect con1
|
--disconnect con1
|
||||||
unlock tables;
|
unlock tables;
|
||||||
|
|
||||||
|
--echo # Second test from MDEV-23843
|
||||||
|
|
||||||
|
CREATE TABLE t (a INT);
|
||||||
|
FLUSH TABLES WITH READ LOCK;
|
||||||
|
--connect (con1,localhost,root,,)
|
||||||
|
SET lock_wait_timeout= 1;
|
||||||
|
--error ER_LOCK_WAIT_TIMEOUT
|
||||||
|
ANALYZE TABLE t;
|
||||||
|
# Cleanup
|
||||||
|
--disconnect con1
|
||||||
|
--connection default
|
||||||
|
UNLOCK TABLES;
|
||||||
|
DROP TABLE t;
|
||||||
|
@ -1396,7 +1396,9 @@ bool Sql_cmd_analyze_table::execute(THD *thd)
|
|||||||
/*
|
/*
|
||||||
Presumably, ANALYZE and binlog writing doesn't require synchronization
|
Presumably, ANALYZE and binlog writing doesn't require synchronization
|
||||||
*/
|
*/
|
||||||
|
thd->get_stmt_da()->set_overwrite_status(true);
|
||||||
res= write_bin_log(thd, TRUE, thd->query(), thd->query_length());
|
res= write_bin_log(thd, TRUE, thd->query(), thd->query_length());
|
||||||
|
thd->get_stmt_da()->set_overwrite_status(false);
|
||||||
}
|
}
|
||||||
m_lex->first_select_lex()->table_list.first= first_table;
|
m_lex->first_select_lex()->table_list.first= first_table;
|
||||||
m_lex->query_tables= first_table;
|
m_lex->query_tables= first_table;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user