| 1 |
--source include/have_ndb.inc |
| 2 |
|
| 3 |
# The variable ndb-schema-dist-lock-wait-timeout controls how long the |
| 4 |
# ndbcluster binlog injector thread will wait for locks to be acquired while |
| 5 |
# handling schema operations. Acquiring these locks are necessary to update the |
| 6 |
# data dictionary (DD) with latest metadata. While it's important to update |
| 7 |
# the DD, it's even more important that the ndbcluster binlog injector thread |
| 8 |
# does not block for an extended amount of time but instead rather skip |
| 9 |
# updating the DD if lock acquisition fails. By using this variable, it's |
| 10 |
# possible to configure how long it's acceptable for the thread to wait. |
| 11 |
|
| 12 |
let $save_lock_wait_timeout = `select @@ndb_schema_dist_lock_wait_timeout`; |
| 13 |
|
| 14 |
--echo # Current value of ndb-schema-dist-lock-wait-timeout |
| 15 |
select @@ndb_schema_dist_lock_wait_timeout; |
| 16 |
|
| 17 |
# Check that variable is global variable |
| 18 |
set @@global.ndb_schema_dist_lock_wait_timeout = 1; |
| 19 |
select @@ndb_schema_dist_lock_wait_timeout; |
| 20 |
|
| 21 |
# Check that variable is not a session variable |
| 22 |
--error ER_GLOBAL_VARIABLE |
| 23 |
set @@session.ndb_schema_dist_lock_wait_timeout = 1; |
| 24 |
--error ER_GLOBAL_VARIABLE |
| 25 |
set @@ndb_schema_dist_lock_wait_timeout = 1; |
| 26 |
|
| 27 |
# Check that variable can be set to zero |
| 28 |
set @@global.ndb_schema_dist_lock_wait_timeout = 0; |
| 29 |
select @@ndb_schema_dist_lock_wait_timeout; |
| 30 |
|
| 31 |
# Check that variable can be set to the max value |
| 32 |
set @@global.ndb_schema_dist_lock_wait_timeout = 1200; |
| 33 |
select @@ndb_schema_dist_lock_wait_timeout; |
| 34 |
|
| 35 |
# Restore intial value |
| 36 |
eval set @@global.ndb_schema_dist_lock_wait_timeout = $save_lock_wait_timeout; |