Skip to content

Commit

Permalink
Cleanup rpl_ddl_high_priority.inc and fix a typo
Browse files Browse the repository at this point in the history
Summary:
Squash with D5679795.

Slave thread no longer needs to set lock_wait_timeout for high_priority commands.

Reviewed By: abhinav04sharma

Differential Revision: D5682683

fbshipit-source-id: 06ee30b
  • Loading branch information
tianx authored and facebook-github-bot committed Aug 22, 2017
1 parent 7e41852 commit 434d496
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 27 deletions.
15 changes: 1 addition & 14 deletions mysql-test/include/rpl_ddl_high_priority.inc
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,6 @@ sync_slave_with_master;
connection slave;
select * from t1;

let $sql_thread=`select id from information_schema.processlist where state
like 'Slave has read all relay log; waiting for the slave I/O thread%'`;
let $worker_thread=`select id from information_schema.processlist where state
like 'Waiting for%'`;

--echo # set slave thread's lock_wait_timeout to a small value

--replace_regex /session [0-9]*/session sql_thread/
--eval set session $sql_thread lock_wait_timeout = 0.2

--replace_regex /session [0-9]*/session sql_thread/
--eval show session $sql_thread variables like 'lock_wait_timeout'

--echo connection slave_block
connection slave_block;

Expand All @@ -51,7 +38,7 @@ connection master;
create high_priority index idx1 on t1 (i);
show create table t1;

# sync
# sync. high_priority_lock_wait_timeout is 1 second by default
sync_slave_with_master;

--echo connection slave;
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/r/mysqld--help-notwin-profiling.result
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ The following options may be given as the first argument:
--high-priority-lock-wait-timeout=#
Timeout in seconds to wait for a lock before returning an
error. This timeout is specifically for high_priority
commands (DDLs), when a high_priority keyward is
commands (DDLs), when a high_priority keyword is
specified, or the high_priority_ddl variable is turned
on. The argument will be treated as a decimal value with
nanosecond precision.
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/r/mysqld--help-notwin.result
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ The following options may be given as the first argument:
--high-priority-lock-wait-timeout=#
Timeout in seconds to wait for a lock before returning an
error. This timeout is specifically for high_priority
commands (DDLs), when a high_priority keyward is
commands (DDLs), when a high_priority keyword is
specified, or the high_priority_ddl variable is turned
on. The argument will be treated as a decimal value with
nanosecond precision.
Expand Down
5 changes: 0 additions & 5 deletions mysql-test/suite/rocksdb_rpl/r/rpl_ddl_high_priority.result
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ i
1
2
3
# set slave thread's lock_wait_timeout to a small value
set session sql_thread lock_wait_timeout = 0.2;
show session sql_thread variables like 'lock_wait_timeout';
Variable_name Value
lock_wait_timeout 0.200000
connection slave_block
lock tables t1 read;
connection master;
Expand Down
5 changes: 0 additions & 5 deletions mysql-test/suite/rpl/r/rpl_ddl_high_priority.result
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ i
1
2
3
# set slave thread's lock_wait_timeout to a small value
set session sql_thread lock_wait_timeout = 0.2;
show session sql_thread variables like 'lock_wait_timeout';
Variable_name Value
lock_wait_timeout 0.200000
connection slave_block
lock tables t1 read;
connection master;
Expand Down
2 changes: 1 addition & 1 deletion sql/sys_vars.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1910,7 +1910,7 @@ static Sys_var_double Sys_high_priority_lock_wait_timeout(
"high_priority_lock_wait_timeout",
"Timeout in seconds to wait for a lock before returning an error. "
"This timeout is specifically for high_priority commands (DDLs), "
"when a high_priority keyward is specified, or the high_priority_ddl "
"when a high_priority keyword is specified, or the high_priority_ddl "
"variable is turned on. "
"The argument will be treated as a decimal value with nanosecond "
"precision.",
Expand Down

0 comments on commit 434d496

Please sign in to comment.