1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Yet another follow-up for the 5.5 version of fix for

bug #46947 "Embedded SELECT without FOR UPDATE is causing 
a lock".

Fixed comments in tests. Improved comments and performance of
auxiliary scripts.
This commit is contained in:
Dmitry Lenev
2010-05-30 13:27:44 +04:00
parent c4b2cf2da5
commit c7395690c6
7 changed files with 24 additions and 26 deletions

View File

@ -10,9 +10,9 @@
# $con_aux2 Name of the second auxiliary connection to be used by this
# script.
# $statement Statement to be checked.
# $restore_table Table which might be modified affected by statement to be
# checked and thus needs backing up before its execution
# and restoring after it (can be empty).
# $restore_table Table which might be modified by statement to be checked
# and thus needs backing up before its execution and
# restoring after it (can be empty).
#
# EXAMPLE
# lock_sync.test
@ -25,7 +25,7 @@ set debug_sync= "RESET";
if (`SELECT '$restore_table' <> ''`)
{
--eval create table t_backup select * from $restore_table;
--eval create temporary table t_backup select * from $restore_table;
}
connection $con_aux1;
@ -34,7 +34,7 @@ set debug_sync='after_lock_tables_takes_lock SIGNAL parked WAIT_FOR go';
connection $con_aux2;
set debug_sync='now WAIT_FOR parked';
--send_eval insert into $table values (0);
--send_eval insert into $table (i) values (0);
--enable_result_log
--enable_query_log
@ -43,7 +43,7 @@ connection default;
# of our statement.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
where state = "Table lock" and info = "insert into $table values (0)";
where state = "Table lock" and info = "insert into $table (i) values (0)";
--source include/wait_condition.inc
--disable_result_log
@ -71,7 +71,7 @@ if (`SELECT '$restore_table' <> ''`)
{
--eval truncate table $restore_table;
--eval insert into $restore_table select * from t_backup;
drop table t_backup;
drop temporary table t_backup;
}
# Clean-up. Reset DEBUG_SYNC facility after use.