| 1 |
## Test configuration |
| 2 |
## |
| 3 |
--let $wait_for_unixsocket_status = no_wait |
| 4 |
--let $wait_for_tcpsocket_status = no_wait |
| 5 |
--source include/xplugin_preamble.inc |
| 6 |
|
| 7 |
call mtr.add_suppression("option 'mysqlx-port-open-timeout': value -1 adjusted to 0"); |
| 8 |
call mtr.add_suppression("option 'mysqlx-port-open-timeout': unsigned value 10000 adjusted to 120"); |
| 9 |
call mtr.add_suppression("option 'mysqlx-port-open-timeout': unsigned value 2147483648 adjusted to 120"); |
| 10 |
call mtr.add_suppression("option 'mysqlx-port-open-timeout': unsigned value 1024 adjusted to 120"); |
| 11 |
call mtr.add_suppression("Parsing options for plugin 'mysqlx' failed"); |
| 12 |
|
| 13 |
|
| 14 |
## Test body |
| 15 |
## |
| 16 |
|
| 17 |
--echo # |
| 18 |
--echo # |
| 19 |
--echo # X Plugin started with timeout set to "0" |
| 20 |
--echo # |
| 21 |
--echo # |
| 22 |
|
| 23 |
--let $assert_text= Mysqlx_port_open_timeout global variablem must exist |
| 24 |
--let $assert_cond= [SELECT COUNT(@@GLOBAL.Mysqlx_port_open_timeout) as Result;, Result, 1] =1 |
| 25 |
--source include/assert.inc |
| 26 |
|
| 27 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 28 |
SET @@GLOBAL.Mysqlx_port_open_timeout=1; |
| 29 |
|
| 30 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 31 |
SET @@GLOBAL.Mysqlx_port_open_timeout="1.0.1.0"; |
| 32 |
|
| 33 |
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 34 |
SELECT COUNT(@@local.Mysqlx_port_open_timeout); |
| 35 |
|
| 36 |
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 37 |
SELECT COUNT(@@SESSION.Mysqlx_port_open_timeout); |
| 38 |
|
| 39 |
--let $assert_text= Mysqlx_port_open_timeout global variable must is read-only, should hold to 0 |
| 40 |
--let $assert_cond= [SELECT @@GLOBAL.Mysqlx_port_open_timeout as Result;, Result, 1] =0 |
| 41 |
--source include/assert.inc |
| 42 |
|
| 43 |
|
| 44 |
--echo # |
| 45 |
--echo # |
| 46 |
--echo # X Plugin started with timeout set to "1" |
| 47 |
--echo # |
| 48 |
--echo # |
| 49 |
--let $restart_parameters = restart: --loose-mysqlx-port-open-timeout=1 |
| 50 |
--source include/restart_mysqld.inc |
| 51 |
|
| 52 |
--let $assert_text= Mysqlx_port_open_timeout global variablem must exist |
| 53 |
--let $assert_cond= [SELECT COUNT(@@GLOBAL.Mysqlx_port_open_timeout) as Result;, Result, 1] =1 |
| 54 |
--source include/assert.inc |
| 55 |
|
| 56 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 57 |
SET @@GLOBAL.Mysqlx_port_open_timeout=1; |
| 58 |
|
| 59 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 60 |
SET @@GLOBAL.Mysqlx_port_open_timeout="1.0.1.0"; |
| 61 |
|
| 62 |
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 63 |
SELECT COUNT(@@local.Mysqlx_port_open_timeout); |
| 64 |
|
| 65 |
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 66 |
SELECT COUNT(@@SESSION.Mysqlx_port_open_timeout); |
| 67 |
|
| 68 |
--let $assert_text= Mysqlx_port_open_timeout global variable must is read-only, should hold to 1 |
| 69 |
--let $assert_cond= [SELECT @@GLOBAL.Mysqlx_port_open_timeout as Result;, Result, 1] =1 |
| 70 |
--source include/assert.inc |
| 71 |
|
| 72 |
--echo # |
| 73 |
--echo # |
| 74 |
--echo # X Plugin restarted with invalid values |
| 75 |
--echo # |
| 76 |
--echo # |
| 77 |
# Under the MIN value |
| 78 |
--let $restart_parameters = restart: --loose-mysqlx-port-open-timeout=-1 |
| 79 |
--source include/restart_mysqld.inc |
| 80 |
--let $assert_text= Mysqlx_port_open_timeout global variable must be changed to 0 by MySQL Server |
| 81 |
--let $assert_cond= [SELECT @@GLOBAL.Mysqlx_port_open_timeout as Result;, Result, 1] =0 |
| 82 |
--source include/assert.inc |
| 83 |
|
| 84 |
|
| 85 |
# Above the MAX value |
| 86 |
--let $restart_parameters = restart: --loose-mysqlx-port-open-timeout=10000 |
| 87 |
--source include/restart_mysqld.inc |
| 88 |
--let $assert_text= Mysqlx_port_open_timeout global variable must be changed to 120 by MySQL Server |
| 89 |
--let $assert_cond= [SELECT @@GLOBAL.Mysqlx_port_open_timeout as Result;, Result, 1] =120 |
| 90 |
--source include/assert.inc |
| 91 |
|
| 92 |
|
| 93 |
# Above the MAX value |
| 94 |
--let $restart_parameters = restart: --loose-mysqlx-port-open-timeout=2G |
| 95 |
--source include/restart_mysqld.inc |
| 96 |
--let $assert_text= 2Giga is outside the range of Mysqlx_port_open_timeout global variable, MySQL Server is going to set it to 120 |
| 97 |
--let $assert_cond= [SELECT @@GLOBAL.Mysqlx_port_open_timeout as Result;, Result, 1] =120 |
| 98 |
--source include/assert.inc |
| 99 |
|
| 100 |
|
| 101 |
# Above the MAX value |
| 102 |
--let $restart_parameters = restart: --loose-mysqlx-port-open-timeout=1K |
| 103 |
--source include/restart_mysqld.inc |
| 104 |
--let $assert_text= 1Kilo is outside the range of Mysqlx_port_open_timeout global variable, MySQL Server is going to set it to 120 |
| 105 |
--let $assert_cond= [SELECT @@GLOBAL.Mysqlx_port_open_timeout as Result;, Result, 1] =120 |
| 106 |
--source include/assert.inc |
| 107 |
|
| 108 |
## Cleanup |
| 109 |
--let $restart_parameters = restart: |
| 110 |
--source include/restart_mysqld.inc |