| 1 |
## This is test file for verification binding on multiple addresses |
| 2 |
## |
| 3 |
--source include/windows.inc |
| 4 |
--source include/xplugin_preamble.inc |
| 5 |
|
| 6 |
|
| 7 |
## Tests starting here |
| 8 |
--echo |
| 9 |
--echo |
| 10 |
--echo ## Table of testing |
| 11 |
--echo # |
| 12 |
--echo # 1. localhost bindings |
| 13 |
--echo # 2. "not existing hosts" bindings |
| 14 |
--echo # 3. skipped "*" binding |
| 15 |
--echo # 4. skipped "0.0.0.0" binding |
| 16 |
--echo # 5. skipped "empty address" binding |
| 17 |
--echo # 6. skipped "empty network namespace" binding |
| 18 |
--echo # 7. skipped "wildcard with namespace" binding |
| 19 |
--echo # 8. skipped "wrong network namespace" binding |
| 20 |
--echo # 9. skipped "distanthost" binding |
| 21 |
--echo # 10. default bindings |
| 22 |
--echo # |
| 23 |
|
| 24 |
--echo |
| 25 |
--echo # |
| 26 |
--echo # 1. localhost bindings |
| 27 |
--let $expect_bind_address=localhost,127.0.0.1 |
| 28 |
--let $expect_address=127.0.0.1,127.0.0.1 |
| 29 |
--let $restart_parameters = restart: --mysqlx_bind_address=$expect_bind_address |
| 30 |
call mtr.add_suppression("Plugin mysqlx reported: 'Value '127.0.0.1' set to `Mysqlx_bind_address`, X Plugin can't bind to it. Skipping this value.'"); |
| 31 |
call mtr.add_suppression("Plugin mysqlx reported: 'Setup of bind-address: '127.0.0.1' port: [0-9]* failed, `bind\\(\\)` failed with error: Address already in use \\([0-9]+\\). Do you already have another mysqld server running with Mysqlx \\?'"); |
| 32 |
--source ../include/restart_mysqld_and_verify_bind_addresses.inc |
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
--echo |
| 37 |
--echo # |
| 38 |
--echo # 2. "not existing hosts" bindings |
| 39 |
--let $expect_bind_address=otherhost,anotherhost |
| 40 |
--let $expect_address=UNDEFINED |
| 41 |
--let $wait_for_tcpsocket_status = undefined_value |
| 42 |
--let $restart_parameters = restart: --mysqlx_bind_address=$expect_bind_address |
| 43 |
call mtr.add_suppression("Plugin mysqlx reported: 'Value 'otherhost' set to `Mysqlx_bind_address`, X Plugin can't bind to it. Skipping this value.'"); |
| 44 |
call mtr.add_suppression("Plugin mysqlx reported: 'Setup of bind-address: 'otherhost' port: [0-9]* failed, can't resolve `hostname`'"); |
| 45 |
call mtr.add_suppression("Plugin mysqlx reported: 'Value 'anotherhost' set to `Mysqlx_bind_address`, X Plugin can't bind to it. Skipping this value.'"); |
| 46 |
call mtr.add_suppression("Plugin mysqlx reported: 'Setup of bind-address: 'anotherhost' port: [0-9]* failed, can't resolve `hostname`'"); |
| 47 |
call mtr.add_suppression("Plugin mysqlx reported: 'Preparation of I/O interfaces failed, X Protocol won't be accessible'"); |
| 48 |
--source ../include/restart_mysqld_and_verify_bind_addresses.inc |
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
--echo |
| 53 |
--echo # |
| 54 |
--echo # 3. skipped "*" binding |
| 55 |
--let $expect_bind_address=*,localhost |
| 56 |
--let $expect_address=127.0.0.1 |
| 57 |
--let $restart_parameters = restart: --mysqlx_bind_address=$expect_bind_address |
| 58 |
call mtr.add_suppression("Plugin mysqlx reported: 'Validation of value '\\*' set to `Mysqlx_bind_address` failed: wildcards are not allowed when there are more than one address. Skipping this value.'"); |
| 59 |
--source ../include/restart_mysqld_and_verify_bind_addresses.inc |
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
--echo |
| 64 |
--echo # |
| 65 |
--echo # 4. skipped "0.0.0.0" binding |
| 66 |
--let $expect_bind_address=0.0.0.0,localhost |
| 67 |
--let $expect_address=127.0.0.1 |
| 68 |
--let $restart_parameters = restart: --mysqlx_bind_address=$expect_bind_address |
| 69 |
call mtr.add_suppression("Plugin mysqlx reported: 'Validation of value '0.0.0.0' set to `Mysqlx_bind_address` failed: wildcards are not allowed when there are more than one address. Skipping this value.'"); |
| 70 |
--source ../include/restart_mysqld_and_verify_bind_addresses.inc |
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
--echo |
| 75 |
--echo # |
| 76 |
--echo # 5. skipped "empty address" binding |
| 77 |
--let $expect_bind_address=,localhost |
| 78 |
--let $expect_address=127.0.0.1 |
| 79 |
--let $restart_parameters = restart: --mysqlx_bind_address=$expect_bind_address |
| 80 |
call mtr.add_suppression("Plugin mysqlx reported: 'Validation of value '' set to `Mysqlx_bind_address` failed: wildcards are not allowed when there are more than one address. Skipping this value.'"); |
| 81 |
--source ../include/restart_mysqld_and_verify_bind_addresses.inc |
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
--echo |
| 86 |
--echo # |
| 87 |
--echo # 6. skipped "empty network namespace" binding |
| 88 |
--let $expect_bind_address=localhost/,localhost |
| 89 |
--let $expect_address=127.0.0.1 |
| 90 |
--let $restart_parameters = restart: --mysqlx_bind_address=$expect_bind_address |
| 91 |
call mtr.add_suppression("Plugin mysqlx reported: 'Validation of value 'localhost/' set to `Mysqlx_bind_address` failed: can't be parsed as an address. Skipping this value.'"); |
| 92 |
--source ../include/restart_mysqld_and_verify_bind_addresses.inc |
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
--echo |
| 97 |
--echo # |
| 98 |
--echo # 7. skipped "wildcard with namespace" binding |
| 99 |
--let $expect_bind_address=*/wrong,localhost |
| 100 |
--let $expect_address=127.0.0.1 |
| 101 |
--let $restart_parameters = restart: --mysqlx_bind_address=$expect_bind_address |
| 102 |
call mtr.add_suppression("Plugin mysqlx reported: 'Validation of value '\\*/wrong' set to `Mysqlx_bind_address` failed: network namespace are not allowed for wildcards. Skipping this value.'"); |
| 103 |
--source ../include/restart_mysqld_and_verify_bind_addresses.inc |
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
--echo |
| 108 |
--echo # |
| 109 |
--echo # 8. skipped "wrong network namespace" binding |
| 110 |
--let $expect_bind_address=localhost/wrong,localhost |
| 111 |
--let $expect_address=127.0.0.1 |
| 112 |
--let $restart_parameters = restart: --mysqlx_bind_address=$expect_bind_address |
| 113 |
call mtr.add_suppression("Plugin mysqlx reported: 'Value 'localhost/wrong' set to `Mysqlx_bind_address`, X Plugin can't bind to it. Skipping this value.'"); |
| 114 |
call mtr.add_suppression("Plugin mysqlx reported: 'Network Namespaces is not supported on this platform'"); |
| 115 |
call mtr.add_suppression("Plugin mysqlx reported: 'Setup of bind-address: 'localhost/wrong' port: [0-9]* failed, '"); |
| 116 |
--source ../include/restart_mysqld_and_verify_bind_addresses.inc |
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
--echo |
| 121 |
--echo # |
| 122 |
--echo # 9. skipped "distanthost" binding |
| 123 |
--let $expect_bind_address=distanthost,localhost |
| 124 |
--let $expect_address=127.0.0.1 |
| 125 |
--let $restart_parameters = restart: --mysqlx_bind_address=$expect_bind_address |
| 126 |
call mtr.add_suppression("Plugin mysqlx reported: 'Value 'distanthost' set to `Mysqlx_bind_address`, X Plugin can't bind to it. Skipping this value.'"); |
| 127 |
call mtr.add_suppression("Plugin mysqlx reported: 'Setup of bind-address: 'distanthost' port: [0-9]* failed, can't resolve `hostname`'"); |
| 128 |
--source ../include/restart_mysqld_and_verify_bind_addresses.inc |
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
--echo |
| 133 |
--echo # |
| 134 |
--echo # 10. default bindings |
| 135 |
--let $expect_bind_address=* |
| 136 |
--let $expect_address=:: |
| 137 |
--let $restart_parameters = restart: |
| 138 |
--source ../include/restart_mysqld_and_verify_bind_addresses.inc |
| 139 |
|
| 140 |
|
| 141 |
## Cleanup |