| 1 |
call mtr.add_suppression("Plugin mysqlx reported: 'Unable to switch context to user mysql.session'"); |
| 2 |
call mtr.add_suppression("Plugin mysqlx reported: 'Unable to accept connection, disconnecting client'"); |
| 3 |
call mtr.add_suppression("Plugin mysqlx reported: 'Could not open internal MySQL session'"); |
| 4 |
call mtr.add_suppression("Plugin mysqlx reported: '.*: Error initializing session for connection: Too many connections'"); |
| 5 |
call mtr.add_suppression("Plugin 'mysqlx' has ref_count=5 after shutdown"); |
| 6 |
call mtr.add_suppression("Plugin 'mysqlx' will be forced to shutdown"); |
| 7 |
# |
| 8 |
# Login with valid account |
| 9 |
# |
| 10 |
RUN SELECT PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where PLUGIN_NAME LIKE '%mysqlx%' |
| 11 |
PLUGIN_NAME PLUGIN_VERSION PLUGIN_STATUS PLUGIN_TYPE |
| 12 |
mysqlx_cache_cleaner 1.0 ACTIVE AUDIT |
| 13 |
mysqlx 1.0 ACTIVE DAEMON |
| 14 |
0 rows affected |
| 15 |
RUN create user xplugin@localhost identified by 'xplugin' |
| 16 |
|
| 17 |
0 rows affected |
| 18 |
RUN alter user xplugin@localhost password expire |
| 19 |
|
| 20 |
0 rows affected |
| 21 |
RUN create user nonblank@localhost identified by 'nonblank' |
| 22 |
|
| 23 |
0 rows affected |
| 24 |
RUN create user blank@localhost identified by '' |
| 25 |
|
| 26 |
0 rows affected |
| 27 |
RUN CREATE USER 'abc'@'localhost' IDENTIFIED BY 'abc' ACCOUNT LOCK |
| 28 |
|
| 29 |
0 rows affected |
| 30 |
RUN create user ''@localhost identified by 'ramana' |
| 31 |
|
| 32 |
0 rows affected |
| 33 |
RUN create user special@localhost identified by '1aram@&Tpu' |
| 34 |
|
| 35 |
0 rows affected |
| 36 |
RUN create user session@localhost identified by 'session' |
| 37 |
|
| 38 |
0 rows affected |
| 39 |
RUN grant all on *.* to session@localhost |
| 40 |
|
| 41 |
0 rows affected |
| 42 |
RUN show status like 'Mysqlx_connections_closed' |
| 43 |
Variable_name Value |
| 44 |
Mysqlx_connections_closed 0 |
| 45 |
0 rows affected |
| 46 |
RUN show status like 'Mysqlx_connections_accepted' |
| 47 |
Variable_name Value |
| 48 |
Mysqlx_connections_accepted 1 |
| 49 |
0 rows affected |
| 50 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 51 |
Variable_name Value |
| 52 |
Mysqlx_connection_accept_errors 0 |
| 53 |
0 rows affected |
| 54 |
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error' |
| 55 |
Variable_name Value |
| 56 |
Mysqlx_sessions 1 |
| 57 |
Mysqlx_sessions_accepted 1 |
| 58 |
Mysqlx_sessions_closed 0 |
| 59 |
Mysqlx_sessions_killed 0 |
| 60 |
Mysqlx_sessions_rejected 0 |
| 61 |
0 rows affected |
| 62 |
Mysqlx.Ok { |
| 63 |
msg: "bye!" |
| 64 |
} |
| 65 |
ok |
| 66 |
# Syncing with status [ 'Mysqlx_connections_closed' == 1 ] |
| 67 |
# Syncing with status [ 'Mysqlx_sessions_closed' == 1 ] |
| 68 |
show status like 'Mysqlx_connections_closed'; |
| 69 |
Variable_name Value |
| 70 |
Mysqlx_connections_closed 1 |
| 71 |
show status like 'Mysqlx_connections_accepted'; |
| 72 |
Variable_name Value |
| 73 |
Mysqlx_connections_accepted 1 |
| 74 |
show status like 'Mysqlx_connection_accept_errors'; |
| 75 |
Variable_name Value |
| 76 |
Mysqlx_connection_accept_errors 0 |
| 77 |
show status where |
| 78 |
`Variable_name`like 'Mysqlx_sessions%' and |
| 79 |
not `Variable_name` like 'Mysqlx_sessions_fatal_error'; |
| 80 |
Variable_name Value |
| 81 |
Mysqlx_sessions 0 |
| 82 |
Mysqlx_sessions_accepted 1 |
| 83 |
Mysqlx_sessions_closed 1 |
| 84 |
Mysqlx_sessions_killed 0 |
| 85 |
Mysqlx_sessions_rejected 0 |
| 86 |
# |
| 87 |
# Try to login with bogus accounts that could match a valid account by collation |
| 88 |
# |
| 89 |
Application terminated with expected error: Authentication failed, check username and password or try a secure connection (code 2510) |
| 90 |
ok |
| 91 |
Application terminated with expected error: Authentication failed, check username and password or try a secure connection (code 2510) |
| 92 |
ok |
| 93 |
# Syncing with status [ 'Mysqlx_sessions' == 0 ] |
| 94 |
# Syncing with status [ 'Mysqlx_connections_closed' == 3 ] |
| 95 |
show status like 'Mysqlx_connections_closed'; |
| 96 |
Variable_name Value |
| 97 |
Mysqlx_connections_closed 3 |
| 98 |
show status like 'Mysqlx_connections_accepted'; |
| 99 |
Variable_name Value |
| 100 |
Mysqlx_connections_accepted 3 |
| 101 |
show status like 'Mysqlx_connection_accept_errors'; |
| 102 |
Variable_name Value |
| 103 |
Mysqlx_connection_accept_errors 0 |
| 104 |
show status where |
| 105 |
`Variable_name`like 'Mysqlx_sessions%' and |
| 106 |
not `Variable_name` like 'Mysqlx_sessions_fatal_error'; |
| 107 |
Variable_name Value |
| 108 |
Mysqlx_sessions 0 |
| 109 |
Mysqlx_sessions_accepted 1 |
| 110 |
Mysqlx_sessions_closed 1 |
| 111 |
Mysqlx_sessions_killed 0 |
| 112 |
Mysqlx_sessions_rejected 2 |
| 113 |
# |
| 114 |
# Try login with user having special characters in password when mysqlxplugin installed |
| 115 |
# |
| 116 |
RUN select user(),current_user(),@@bind_address |
| 117 |
user() current_user() @@bind_address |
| 118 |
special@localhost special@localhost * |
| 119 |
0 rows affected |
| 120 |
Got expected error (code 0) |
| 121 |
RUN show status like 'Mysqlx_connections_closed' |
| 122 |
Variable_name Value |
| 123 |
Mysqlx_connections_closed 3 |
| 124 |
0 rows affected |
| 125 |
Got expected error (code 0) |
| 126 |
RUN show status like 'Mysqlx_connections_accepted' |
| 127 |
Variable_name Value |
| 128 |
Mysqlx_connections_accepted 4 |
| 129 |
0 rows affected |
| 130 |
Got expected error (code 0) |
| 131 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 132 |
Variable_name Value |
| 133 |
Mysqlx_connection_accept_errors 0 |
| 134 |
0 rows affected |
| 135 |
Got expected error (code 0) |
| 136 |
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error' |
| 137 |
Variable_name Value |
| 138 |
Mysqlx_sessions 1 |
| 139 |
Mysqlx_sessions_accepted 2 |
| 140 |
Mysqlx_sessions_closed 1 |
| 141 |
Mysqlx_sessions_killed 0 |
| 142 |
Mysqlx_sessions_rejected 2 |
| 143 |
0 rows affected |
| 144 |
Got expected error (code 0) |
| 145 |
Mysqlx.Ok { |
| 146 |
msg: "bye!" |
| 147 |
} |
| 148 |
ok |
| 149 |
# Syncing with status [ 'Mysqlx_sessions' == 0 ] |
| 150 |
# Syncing with status [ 'Mysqlx_connections_closed' == 4 ] |
| 151 |
show status like 'Mysqlx_connections_closed'; |
| 152 |
Variable_name Value |
| 153 |
Mysqlx_connections_closed 4 |
| 154 |
show status like 'Mysqlx_connections_accepted'; |
| 155 |
Variable_name Value |
| 156 |
Mysqlx_connections_accepted 4 |
| 157 |
show status like 'Mysqlx_connection_accept_errors'; |
| 158 |
Variable_name Value |
| 159 |
Mysqlx_connection_accept_errors 0 |
| 160 |
show status where |
| 161 |
`Variable_name`like 'Mysqlx_sessions%' and |
| 162 |
not `Variable_name` like 'Mysqlx_sessions_fatal_error'; |
| 163 |
Variable_name Value |
| 164 |
Mysqlx_sessions 0 |
| 165 |
Mysqlx_sessions_accepted 2 |
| 166 |
Mysqlx_sessions_closed 2 |
| 167 |
Mysqlx_sessions_killed 0 |
| 168 |
Mysqlx_sessions_rejected 2 |
| 169 |
# |
| 170 |
# try login with invalid host when mysqx plugin is installed |
| 171 |
# |
| 172 |
Application terminated with expected error: No such host is known 'mtr_test_invalid_mysql_host' (code 2005) |
| 173 |
ok |
| 174 |
|
| 175 |
# Syncing with status [ 'Mysqlx_sessions_rejected' == 2 ] |
| 176 |
# Syncing with status [ 'Mysqlx_connections_closed' == 4 ] |
| 177 |
show status like 'Mysqlx_connections_closed'; |
| 178 |
Variable_name Value |
| 179 |
Mysqlx_connections_closed 4 |
| 180 |
show status like 'Mysqlx_connections_accepted'; |
| 181 |
Variable_name Value |
| 182 |
Mysqlx_connections_accepted 4 |
| 183 |
show status like 'Mysqlx_connection_accept_errors'; |
| 184 |
Variable_name Value |
| 185 |
Mysqlx_connection_accept_errors 0 |
| 186 |
show status where |
| 187 |
`Variable_name`like 'Mysqlx_sessions%' and |
| 188 |
not `Variable_name` like 'Mysqlx_sessions_fatal_error'; |
| 189 |
Variable_name Value |
| 190 |
Mysqlx_sessions 0 |
| 191 |
Mysqlx_sessions_accepted 2 |
| 192 |
Mysqlx_sessions_closed 2 |
| 193 |
Mysqlx_sessions_killed 0 |
| 194 |
Mysqlx_sessions_rejected 2 |
| 195 |
# |
| 196 |
# Trying with valid user when mysqlx is not installed |
| 197 |
# |
| 198 |
# restart: --skip-mysqlx |
| 199 |
Application terminated with expected error:ERROR: Connection refused connecting to HOST:PORT (code 2002) |
| 200 |
ok |
| 201 |
show status like 'Mysqlx_connections_closed'; |
| 202 |
Variable_name Value |
| 203 |
show status like 'Mysqlx_connections_accepted'; |
| 204 |
Variable_name Value |
| 205 |
show status like 'Mysqlx_connection_accept_errors'; |
| 206 |
Variable_name Value |
| 207 |
show status where |
| 208 |
`Variable_name`like 'Mysqlx_sessions%' and |
| 209 |
not `Variable_name` like 'Mysqlx_sessions_fatal_error'; |
| 210 |
Variable_name Value |
| 211 |
# |
| 212 |
# Try login using mysqlx protocol when server and mysqlx loaded with super user |
| 213 |
# |
| 214 |
# restart: |
| 215 |
RUN select user(),current_user(),@@bind_address |
| 216 |
user() current_user() @@bind_address |
| 217 |
x_root@localhost x_root@localhost * |
| 218 |
0 rows affected |
| 219 |
Got expected error (code 0) |
| 220 |
RUN show status like 'Mysqlx_connections_closed' |
| 221 |
Variable_name Value |
| 222 |
Mysqlx_connections_closed 0 |
| 223 |
0 rows affected |
| 224 |
Got expected error (code 0) |
| 225 |
RUN show status like 'Mysqlx_connections_accepted' |
| 226 |
Variable_name Value |
| 227 |
Mysqlx_connections_accepted 1 |
| 228 |
0 rows affected |
| 229 |
Got expected error (code 0) |
| 230 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 231 |
Variable_name Value |
| 232 |
Mysqlx_connection_accept_errors 0 |
| 233 |
0 rows affected |
| 234 |
Got expected error (code 0) |
| 235 |
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error' |
| 236 |
Variable_name Value |
| 237 |
Mysqlx_sessions 1 |
| 238 |
Mysqlx_sessions_accepted 1 |
| 239 |
Mysqlx_sessions_closed 0 |
| 240 |
Mysqlx_sessions_killed 0 |
| 241 |
Mysqlx_sessions_rejected 0 |
| 242 |
0 rows affected |
| 243 |
Got expected error (code 0) |
| 244 |
Mysqlx.Ok { |
| 245 |
msg: "bye!" |
| 246 |
} |
| 247 |
ok |
| 248 |
# Syncing with status [ 'Mysqlx_connections_closed' == 1 ] |
| 249 |
# Syncing with status [ 'Mysqlx_sessions_closed' == 1 ] |
| 250 |
show status like 'Mysqlx_connections_closed'; |
| 251 |
Variable_name Value |
| 252 |
Mysqlx_connections_closed 1 |
| 253 |
show status like 'Mysqlx_connections_accepted'; |
| 254 |
Variable_name Value |
| 255 |
Mysqlx_connections_accepted 1 |
| 256 |
show status like 'Mysqlx_connection_accept_errors'; |
| 257 |
Variable_name Value |
| 258 |
Mysqlx_connection_accept_errors 0 |
| 259 |
show status where |
| 260 |
`Variable_name`like 'Mysqlx_sessions%' and |
| 261 |
not `Variable_name` like 'Mysqlx_sessions_fatal_error'; |
| 262 |
Variable_name Value |
| 263 |
Mysqlx_sessions 0 |
| 264 |
Mysqlx_sessions_accepted 1 |
| 265 |
Mysqlx_sessions_closed 1 |
| 266 |
Mysqlx_sessions_killed 0 |
| 267 |
Mysqlx_sessions_rejected 0 |
| 268 |
# |
| 269 |
# Try login with valid user but incorrect password |
| 270 |
# |
| 271 |
Application terminated with expected error: Authentication failed, check username and password or try a secure connection (code 2510) |
| 272 |
ok |
| 273 |
# Syncing with status [ 'Mysqlx_sessions_rejected' == 1 ] |
| 274 |
# Syncing with status [ 'Mysqlx_connections_closed' == 2 ] |
| 275 |
show status like 'Mysqlx_connections_closed'; |
| 276 |
Variable_name Value |
| 277 |
Mysqlx_connections_closed 2 |
| 278 |
show status like 'Mysqlx_connections_accepted'; |
| 279 |
Variable_name Value |
| 280 |
Mysqlx_connections_accepted 2 |
| 281 |
show status like 'Mysqlx_connection_accept_errors'; |
| 282 |
Variable_name Value |
| 283 |
Mysqlx_connection_accept_errors 0 |
| 284 |
show status where |
| 285 |
`Variable_name`like 'Mysqlx_sessions%' and |
| 286 |
not `Variable_name` like 'Mysqlx_sessions_fatal_error'; |
| 287 |
Variable_name Value |
| 288 |
Mysqlx_sessions 0 |
| 289 |
Mysqlx_sessions_accepted 1 |
| 290 |
Mysqlx_sessions_closed 1 |
| 291 |
Mysqlx_sessions_killed 0 |
| 292 |
Mysqlx_sessions_rejected 1 |
| 293 |
# |
| 294 |
# Try login with user doesn't exists when mysqlx installed |
| 295 |
# |
| 296 |
Application terminated with expected error: Authentication failed, check username and password or try a secure connection (code 2510) |
| 297 |
ok |
| 298 |
# Syncing with status [ 'Mysqlx_sessions_rejected' == 2 ] |
| 299 |
# Syncing with status [ 'Mysqlx_connections_closed' == 3 ] |
| 300 |
show status like 'Mysqlx_connections_closed'; |
| 301 |
Variable_name Value |
| 302 |
Mysqlx_connections_closed 3 |
| 303 |
show status like 'Mysqlx_connections_accepted'; |
| 304 |
Variable_name Value |
| 305 |
Mysqlx_connections_accepted 3 |
| 306 |
show status like 'Mysqlx_connection_accept_errors'; |
| 307 |
Variable_name Value |
| 308 |
Mysqlx_connection_accept_errors 0 |
| 309 |
show status where |
| 310 |
`Variable_name`like 'Mysqlx_sessions%' and |
| 311 |
not `Variable_name` like 'Mysqlx_sessions_fatal_error'; |
| 312 |
Variable_name Value |
| 313 |
Mysqlx_sessions 0 |
| 314 |
Mysqlx_sessions_accepted 1 |
| 315 |
Mysqlx_sessions_closed 1 |
| 316 |
Mysqlx_sessions_killed 0 |
| 317 |
Mysqlx_sessions_rejected 2 |
| 318 |
# |
| 319 |
# Try login with user whose password expired when mysqlx installed |
| 320 |
# |
| 321 |
Application terminated with expected error: Your password has expired. To log in you must change it using a client that supports expired passwords. (code 1862) |
| 322 |
ok |
| 323 |
# Syncing with status [ 'Mysqlx_sessions_rejected' == 3 ] |
| 324 |
# Syncing with status [ 'Mysqlx_connections_closed' == 4 ] |
| 325 |
show status like 'Mysqlx_connections_closed'; |
| 326 |
Variable_name Value |
| 327 |
Mysqlx_connections_closed 4 |
| 328 |
show status like 'Mysqlx_connections_accepted'; |
| 329 |
Variable_name Value |
| 330 |
Mysqlx_connections_accepted 4 |
| 331 |
show status like 'Mysqlx_connection_accept_errors'; |
| 332 |
Variable_name Value |
| 333 |
Mysqlx_connection_accept_errors 0 |
| 334 |
show status where |
| 335 |
`Variable_name`like 'Mysqlx_sessions%' and |
| 336 |
not `Variable_name` like 'Mysqlx_sessions_fatal_error'; |
| 337 |
Variable_name Value |
| 338 |
Mysqlx_sessions 0 |
| 339 |
Mysqlx_sessions_accepted 1 |
| 340 |
Mysqlx_sessions_closed 1 |
| 341 |
Mysqlx_sessions_killed 0 |
| 342 |
Mysqlx_sessions_rejected 3 |
| 343 |
# |
| 344 |
# Try login with user whose account is locked when mysqlx installed |
| 345 |
# |
| 346 |
Application terminated with expected error: Access denied for user 'abc'@'localhost'. Account is locked. (code 3118) |
| 347 |
ok |
| 348 |
# Syncing with status [ 'Mysqlx_sessions_rejected' == 4 ] |
| 349 |
# Syncing with status [ 'Mysqlx_connections_closed' == 5 ] |
| 350 |
show status like 'Mysqlx_connections_closed'; |
| 351 |
Variable_name Value |
| 352 |
Mysqlx_connections_closed 5 |
| 353 |
show status like 'Mysqlx_connections_accepted'; |
| 354 |
Variable_name Value |
| 355 |
Mysqlx_connections_accepted 5 |
| 356 |
show status like 'Mysqlx_connection_accept_errors'; |
| 357 |
Variable_name Value |
| 358 |
Mysqlx_connection_accept_errors 0 |
| 359 |
show status where |
| 360 |
`Variable_name`like 'Mysqlx_sessions%' and |
| 361 |
not `Variable_name` like 'Mysqlx_sessions_fatal_error'; |
| 362 |
Variable_name Value |
| 363 |
Mysqlx_sessions 0 |
| 364 |
Mysqlx_sessions_accepted 1 |
| 365 |
Mysqlx_sessions_closed 1 |
| 366 |
Mysqlx_sessions_killed 0 |
| 367 |
Mysqlx_sessions_rejected 4 |
| 368 |
# |
| 369 |
# Try login with internal user account and expect account is locked error |
| 370 |
# |
| 371 |
Application terminated with expected error: Authentication failed, check username and password or try a secure connection (code 2510) |
| 372 |
# Syncing with status [ 'Mysqlx_sessions_rejected' == 5 ] |
| 373 |
# Syncing with status [ 'Mysqlx_connections_closed' == 6 ] |
| 374 |
show status like 'Mysqlx_connections_closed'; |
| 375 |
Variable_name Value |
| 376 |
Mysqlx_connections_closed 6 |
| 377 |
show status like 'Mysqlx_connections_accepted'; |
| 378 |
Variable_name Value |
| 379 |
Mysqlx_connections_accepted 6 |
| 380 |
show status like 'Mysqlx_connection_accept_errors'; |
| 381 |
Variable_name Value |
| 382 |
Mysqlx_connection_accept_errors 0 |
| 383 |
show status where |
| 384 |
`Variable_name`like 'Mysqlx_sessions%' and |
| 385 |
not `Variable_name` like 'Mysqlx_sessions_fatal_error'; |
| 386 |
Variable_name Value |
| 387 |
Mysqlx_sessions 0 |
| 388 |
Mysqlx_sessions_accepted 1 |
| 389 |
Mysqlx_sessions_closed 1 |
| 390 |
Mysqlx_sessions_killed 0 |
| 391 |
Mysqlx_sessions_rejected 5 |
| 392 |
# |
| 393 |
# Login with valid user and valid password when mysqlx installed |
| 394 |
# |
| 395 |
RUN select user(),current_user(),@@bind_address |
| 396 |
user() current_user() @@bind_address |
| 397 |
nonblank@localhost nonblank@localhost * |
| 398 |
0 rows affected |
| 399 |
Got expected error (code 0) |
| 400 |
RUN show status like 'Mysqlx_connections_closed' |
| 401 |
Variable_name Value |
| 402 |
Mysqlx_connections_closed 6 |
| 403 |
0 rows affected |
| 404 |
Got expected error (code 0) |
| 405 |
RUN show status like 'Mysqlx_connections_accepted' |
| 406 |
Variable_name Value |
| 407 |
Mysqlx_connections_accepted 7 |
| 408 |
0 rows affected |
| 409 |
Got expected error (code 0) |
| 410 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 411 |
Variable_name Value |
| 412 |
Mysqlx_connection_accept_errors 0 |
| 413 |
0 rows affected |
| 414 |
Got expected error (code 0) |
| 415 |
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error' |
| 416 |
Variable_name Value |
| 417 |
Mysqlx_sessions 1 |
| 418 |
Mysqlx_sessions_accepted 2 |
| 419 |
Mysqlx_sessions_closed 1 |
| 420 |
Mysqlx_sessions_killed 0 |
| 421 |
Mysqlx_sessions_rejected 5 |
| 422 |
0 rows affected |
| 423 |
Got expected error (code 0) |
| 424 |
Mysqlx.Ok { |
| 425 |
msg: "bye!" |
| 426 |
} |
| 427 |
ok |
| 428 |
# Syncing with status [ 'Mysqlx_sessions_closed' == 2 ] |
| 429 |
# Syncing with status [ 'Mysqlx_connections_closed' == 7 ] |
| 430 |
show status like 'Mysqlx_connections_closed'; |
| 431 |
Variable_name Value |
| 432 |
Mysqlx_connections_closed 7 |
| 433 |
show status like 'Mysqlx_connections_accepted'; |
| 434 |
Variable_name Value |
| 435 |
Mysqlx_connections_accepted 7 |
| 436 |
show status like 'Mysqlx_connection_accept_errors'; |
| 437 |
Variable_name Value |
| 438 |
Mysqlx_connection_accept_errors 0 |
| 439 |
show status where |
| 440 |
`Variable_name`like 'Mysqlx_sessions%' and |
| 441 |
not `Variable_name` like 'Mysqlx_sessions_fatal_error'; |
| 442 |
Variable_name Value |
| 443 |
Mysqlx_sessions 0 |
| 444 |
Mysqlx_sessions_accepted 2 |
| 445 |
Mysqlx_sessions_closed 2 |
| 446 |
Mysqlx_sessions_killed 0 |
| 447 |
Mysqlx_sessions_rejected 5 |
| 448 |
# |
| 449 |
# Login with valid user and blank password when mysqlx installed |
| 450 |
# |
| 451 |
RUN select user(),current_user(),@@bind_address |
| 452 |
user() current_user() @@bind_address |
| 453 |
blank@localhost blank@localhost * |
| 454 |
0 rows affected |
| 455 |
Got expected error (code 0) |
| 456 |
RUN show status like 'Mysqlx_connections_closed' |
| 457 |
Variable_name Value |
| 458 |
Mysqlx_connections_closed 7 |
| 459 |
0 rows affected |
| 460 |
Got expected error (code 0) |
| 461 |
RUN show status like 'Mysqlx_connections_accepted' |
| 462 |
Variable_name Value |
| 463 |
Mysqlx_connections_accepted 8 |
| 464 |
0 rows affected |
| 465 |
Got expected error (code 0) |
| 466 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 467 |
Variable_name Value |
| 468 |
Mysqlx_connection_accept_errors 0 |
| 469 |
0 rows affected |
| 470 |
Got expected error (code 0) |
| 471 |
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error' |
| 472 |
Variable_name Value |
| 473 |
Mysqlx_sessions 1 |
| 474 |
Mysqlx_sessions_accepted 3 |
| 475 |
Mysqlx_sessions_closed 2 |
| 476 |
Mysqlx_sessions_killed 0 |
| 477 |
Mysqlx_sessions_rejected 5 |
| 478 |
0 rows affected |
| 479 |
Got expected error (code 0) |
| 480 |
Mysqlx.Ok { |
| 481 |
msg: "bye!" |
| 482 |
} |
| 483 |
ok |
| 484 |
# Syncing with status [ 'Mysqlx_sessions_closed' == 3 ] |
| 485 |
# Syncing with status [ 'Mysqlx_connections_closed' == 8 ] |
| 486 |
show status like 'Mysqlx_connections_closed'; |
| 487 |
Variable_name Value |
| 488 |
Mysqlx_connections_closed 8 |
| 489 |
show status like 'Mysqlx_connections_accepted'; |
| 490 |
Variable_name Value |
| 491 |
Mysqlx_connections_accepted 8 |
| 492 |
show status like 'Mysqlx_connection_accept_errors'; |
| 493 |
Variable_name Value |
| 494 |
Mysqlx_connection_accept_errors 0 |
| 495 |
show status where |
| 496 |
`Variable_name`like 'Mysqlx_sessions%' and |
| 497 |
not `Variable_name` like 'Mysqlx_sessions_fatal_error'; |
| 498 |
Variable_name Value |
| 499 |
Mysqlx_sessions 0 |
| 500 |
Mysqlx_sessions_accepted 3 |
| 501 |
Mysqlx_sessions_closed 3 |
| 502 |
Mysqlx_sessions_killed 0 |
| 503 |
Mysqlx_sessions_rejected 5 |
| 504 |
# |
| 505 |
# Try login with valid user when server started with localhost as bind-address and mysqlx loaded |
| 506 |
# |
| 507 |
# restart: --bind-address=localhost |
| 508 |
RUN select user(),current_user(),@@bind_address |
| 509 |
user() current_user() @@bind_address |
| 510 |
nonblank@localhost nonblank@localhost localhost |
| 511 |
0 rows affected |
| 512 |
Got expected error (code 0) |
| 513 |
RUN show status like 'Mysqlx_connections_closed' |
| 514 |
Variable_name Value |
| 515 |
Mysqlx_connections_closed 0 |
| 516 |
0 rows affected |
| 517 |
Got expected error (code 0) |
| 518 |
RUN show status like 'Mysqlx_connections_accepted' |
| 519 |
Variable_name Value |
| 520 |
Mysqlx_connections_accepted 1 |
| 521 |
0 rows affected |
| 522 |
Got expected error (code 0) |
| 523 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 524 |
Variable_name Value |
| 525 |
Mysqlx_connection_accept_errors 0 |
| 526 |
0 rows affected |
| 527 |
Got expected error (code 0) |
| 528 |
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error' |
| 529 |
Variable_name Value |
| 530 |
Mysqlx_sessions 1 |
| 531 |
Mysqlx_sessions_accepted 1 |
| 532 |
Mysqlx_sessions_closed 0 |
| 533 |
Mysqlx_sessions_killed 0 |
| 534 |
Mysqlx_sessions_rejected 0 |
| 535 |
0 rows affected |
| 536 |
Got expected error (code 0) |
| 537 |
Mysqlx.Ok { |
| 538 |
msg: "bye!" |
| 539 |
} |
| 540 |
ok |
| 541 |
# Syncing with status [ 'Mysqlx_sessions_closed' == 1 ] |
| 542 |
# Syncing with status [ 'Mysqlx_connections_closed' == 1 ] |
| 543 |
RUN select user(),current_user(),@@bind_address |
| 544 |
user() current_user() @@bind_address |
| 545 |
nonblank@localhost nonblank@localhost localhost |
| 546 |
0 rows affected |
| 547 |
Got expected error (code 0) |
| 548 |
RUN show status like 'Mysqlx_connections_closed' |
| 549 |
Variable_name Value |
| 550 |
Mysqlx_connections_closed 1 |
| 551 |
0 rows affected |
| 552 |
Got expected error (code 0) |
| 553 |
RUN show status like 'Mysqlx_connections_accepted' |
| 554 |
Variable_name Value |
| 555 |
Mysqlx_connections_accepted 2 |
| 556 |
0 rows affected |
| 557 |
Got expected error (code 0) |
| 558 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 559 |
Variable_name Value |
| 560 |
Mysqlx_connection_accept_errors 0 |
| 561 |
0 rows affected |
| 562 |
Got expected error (code 0) |
| 563 |
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error' |
| 564 |
Variable_name Value |
| 565 |
Mysqlx_sessions 1 |
| 566 |
Mysqlx_sessions_accepted 2 |
| 567 |
Mysqlx_sessions_closed 1 |
| 568 |
Mysqlx_sessions_killed 0 |
| 569 |
Mysqlx_sessions_rejected 0 |
| 570 |
0 rows affected |
| 571 |
Got expected error (code 0) |
| 572 |
Mysqlx.Ok { |
| 573 |
msg: "bye!" |
| 574 |
} |
| 575 |
ok |
| 576 |
# Syncing with status [ 'Mysqlx_sessions_closed' == 2 ] |
| 577 |
# Syncing with status [ 'Mysqlx_connections_closed' == 2 ] |
| 578 |
show status like 'Mysqlx_connections_closed'; |
| 579 |
Variable_name Value |
| 580 |
Mysqlx_connections_closed 2 |
| 581 |
show status like 'Mysqlx_connections_accepted'; |
| 582 |
Variable_name Value |
| 583 |
Mysqlx_connections_accepted 2 |
| 584 |
show status like 'Mysqlx_connection_accept_errors'; |
| 585 |
Variable_name Value |
| 586 |
Mysqlx_connection_accept_errors 0 |
| 587 |
show status where |
| 588 |
`Variable_name`like 'Mysqlx_sessions%' and |
| 589 |
not `Variable_name` like 'Mysqlx_sessions_fatal_error'; |
| 590 |
Variable_name Value |
| 591 |
Mysqlx_sessions 0 |
| 592 |
Mysqlx_sessions_accepted 2 |
| 593 |
Mysqlx_sessions_closed 2 |
| 594 |
Mysqlx_sessions_killed 0 |
| 595 |
Mysqlx_sessions_rejected 0 |
| 596 |
# |
| 597 |
# Try login with valid user when server started with 127.0.0.1 as bind-address and mysqlx loaded |
| 598 |
# |
| 599 |
# restart: --bind-address=127.0.0.1 |
| 600 |
RUN select user(),current_user(),@@bind_address |
| 601 |
user() current_user() @@bind_address |
| 602 |
nonblank@localhost nonblank@localhost 127.0.0.1 |
| 603 |
0 rows affected |
| 604 |
Got expected error (code 0) |
| 605 |
RUN show status like 'Mysqlx_connections_closed' |
| 606 |
Variable_name Value |
| 607 |
Mysqlx_connections_closed 0 |
| 608 |
0 rows affected |
| 609 |
Got expected error (code 0) |
| 610 |
RUN show status like 'Mysqlx_connections_accepted' |
| 611 |
Variable_name Value |
| 612 |
Mysqlx_connections_accepted 1 |
| 613 |
0 rows affected |
| 614 |
Got expected error (code 0) |
| 615 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 616 |
Variable_name Value |
| 617 |
Mysqlx_connection_accept_errors 0 |
| 618 |
0 rows affected |
| 619 |
Got expected error (code 0) |
| 620 |
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error' |
| 621 |
Variable_name Value |
| 622 |
Mysqlx_sessions 1 |
| 623 |
Mysqlx_sessions_accepted 1 |
| 624 |
Mysqlx_sessions_closed 0 |
| 625 |
Mysqlx_sessions_killed 0 |
| 626 |
Mysqlx_sessions_rejected 0 |
| 627 |
0 rows affected |
| 628 |
Got expected error (code 0) |
| 629 |
Mysqlx.Ok { |
| 630 |
msg: "bye!" |
| 631 |
} |
| 632 |
ok |
| 633 |
# Syncing with status [ 'Mysqlx_sessions_closed' == 1 ] |
| 634 |
# Syncing with status [ 'Mysqlx_connections_closed' == 1 ] |
| 635 |
show status like 'Mysqlx_connections_closed'; |
| 636 |
Variable_name Value |
| 637 |
Mysqlx_connections_closed 1 |
| 638 |
show status like 'Mysqlx_connections_accepted'; |
| 639 |
Variable_name Value |
| 640 |
Mysqlx_connections_accepted 1 |
| 641 |
show status like 'Mysqlx_connection_accept_errors'; |
| 642 |
Variable_name Value |
| 643 |
Mysqlx_connection_accept_errors 0 |
| 644 |
show status where |
| 645 |
`Variable_name`like 'Mysqlx_sessions%' and |
| 646 |
not `Variable_name` like 'Mysqlx_sessions_fatal_error'; |
| 647 |
Variable_name Value |
| 648 |
Mysqlx_sessions 0 |
| 649 |
Mysqlx_sessions_accepted 1 |
| 650 |
Mysqlx_sessions_closed 1 |
| 651 |
Mysqlx_sessions_killed 0 |
| 652 |
Mysqlx_sessions_rejected 0 |
| 653 |
RUN select user(),current_user(),@@bind_address |
| 654 |
user() current_user() @@bind_address |
| 655 |
nonblank@localhost nonblank@localhost 127.0.0.1 |
| 656 |
0 rows affected |
| 657 |
Got expected error (code 0) |
| 658 |
RUN show status like 'Mysqlx_connections_closed' |
| 659 |
Variable_name Value |
| 660 |
Mysqlx_connections_closed 1 |
| 661 |
0 rows affected |
| 662 |
Got expected error (code 0) |
| 663 |
RUN show status like 'Mysqlx_connections_accepted' |
| 664 |
Variable_name Value |
| 665 |
Mysqlx_connections_accepted 2 |
| 666 |
0 rows affected |
| 667 |
Got expected error (code 0) |
| 668 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 669 |
Variable_name Value |
| 670 |
Mysqlx_connection_accept_errors 0 |
| 671 |
0 rows affected |
| 672 |
Got expected error (code 0) |
| 673 |
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error' |
| 674 |
Variable_name Value |
| 675 |
Mysqlx_sessions 1 |
| 676 |
Mysqlx_sessions_accepted 2 |
| 677 |
Mysqlx_sessions_closed 1 |
| 678 |
Mysqlx_sessions_killed 0 |
| 679 |
Mysqlx_sessions_rejected 0 |
| 680 |
0 rows affected |
| 681 |
Got expected error (code 0) |
| 682 |
Mysqlx.Ok { |
| 683 |
msg: "bye!" |
| 684 |
} |
| 685 |
ok |
| 686 |
# Syncing with status [ 'Mysqlx_sessions_closed' == 2 ] |
| 687 |
# Syncing with status [ 'Mysqlx_connections_closed' == 2 ] |
| 688 |
show status like 'Mysqlx_connections_closed'; |
| 689 |
Variable_name Value |
| 690 |
Mysqlx_connections_closed 2 |
| 691 |
show status like 'Mysqlx_connections_accepted'; |
| 692 |
Variable_name Value |
| 693 |
Mysqlx_connections_accepted 2 |
| 694 |
show status like 'Mysqlx_connection_accept_errors'; |
| 695 |
Variable_name Value |
| 696 |
Mysqlx_connection_accept_errors 0 |
| 697 |
show status where |
| 698 |
`Variable_name`like 'Mysqlx_sessions%' and |
| 699 |
not `Variable_name` like 'Mysqlx_sessions_fatal_error'; |
| 700 |
Variable_name Value |
| 701 |
Mysqlx_sessions 0 |
| 702 |
Mysqlx_sessions_accepted 2 |
| 703 |
Mysqlx_sessions_closed 2 |
| 704 |
Mysqlx_sessions_killed 0 |
| 705 |
Mysqlx_sessions_rejected 0 |
| 706 |
# |
| 707 |
# Try login with valid non-super and super user when server is in offline mode and mysqlx loaded |
| 708 |
# |
| 709 |
# restart: --offline_mode=ON |
| 710 |
Application terminated with expected error: The server is currently in offline mode (code 3032) |
| 711 |
ok |
| 712 |
# Syncing with status [ 'Mysqlx_sessions_rejected' == 1 ] |
| 713 |
# Syncing with status [ 'Mysqlx_connections_closed' == 1 ] |
| 714 |
show status like 'Mysqlx_connections_closed'; |
| 715 |
Variable_name Value |
| 716 |
Mysqlx_connections_closed 1 |
| 717 |
show status like 'Mysqlx_connections_accepted'; |
| 718 |
Variable_name Value |
| 719 |
Mysqlx_connections_accepted 1 |
| 720 |
show status like 'Mysqlx_connection_accept_errors'; |
| 721 |
Variable_name Value |
| 722 |
Mysqlx_connection_accept_errors 0 |
| 723 |
show status where |
| 724 |
`Variable_name`like 'Mysqlx_sessions%' and |
| 725 |
not `Variable_name` like 'Mysqlx_sessions_fatal_error'; |
| 726 |
Variable_name Value |
| 727 |
Mysqlx_sessions 0 |
| 728 |
Mysqlx_sessions_accepted 0 |
| 729 |
Mysqlx_sessions_closed 0 |
| 730 |
Mysqlx_sessions_killed 0 |
| 731 |
Mysqlx_sessions_rejected 1 |
| 732 |
RUN select user(),current_user(),@@bind_address |
| 733 |
user() current_user() @@bind_address |
| 734 |
x_root@localhost x_root@localhost * |
| 735 |
0 rows affected |
| 736 |
Got expected error (code 0) |
| 737 |
RUN show status like 'Mysqlx_connections_closed' |
| 738 |
Variable_name Value |
| 739 |
Mysqlx_connections_closed 1 |
| 740 |
0 rows affected |
| 741 |
Got expected error (code 0) |
| 742 |
RUN show status like 'Mysqlx_connections_accepted' |
| 743 |
Variable_name Value |
| 744 |
Mysqlx_connections_accepted 2 |
| 745 |
0 rows affected |
| 746 |
Got expected error (code 0) |
| 747 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 748 |
Variable_name Value |
| 749 |
Mysqlx_connection_accept_errors 0 |
| 750 |
0 rows affected |
| 751 |
Got expected error (code 0) |
| 752 |
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error' |
| 753 |
Variable_name Value |
| 754 |
Mysqlx_sessions 1 |
| 755 |
Mysqlx_sessions_accepted 1 |
| 756 |
Mysqlx_sessions_closed 0 |
| 757 |
Mysqlx_sessions_killed 0 |
| 758 |
Mysqlx_sessions_rejected 1 |
| 759 |
0 rows affected |
| 760 |
Got expected error (code 0) |
| 761 |
Mysqlx.Ok { |
| 762 |
msg: "bye!" |
| 763 |
} |
| 764 |
ok |
| 765 |
# Syncing with status [ 'Mysqlx_sessions_closed' == 1 ] |
| 766 |
# Syncing with status [ 'Mysqlx_connections_closed' == 2 ] |
| 767 |
show status like 'Mysqlx_connections_closed'; |
| 768 |
Variable_name Value |
| 769 |
Mysqlx_connections_closed 2 |
| 770 |
show status like 'Mysqlx_connections_accepted'; |
| 771 |
Variable_name Value |
| 772 |
Mysqlx_connections_accepted 2 |
| 773 |
show status like 'Mysqlx_connection_accept_errors'; |
| 774 |
Variable_name Value |
| 775 |
Mysqlx_connection_accept_errors 0 |
| 776 |
show status where |
| 777 |
`Variable_name`like 'Mysqlx_sessions%' and |
| 778 |
not `Variable_name` like 'Mysqlx_sessions_fatal_error'; |
| 779 |
Variable_name Value |
| 780 |
Mysqlx_sessions 0 |
| 781 |
Mysqlx_sessions_accepted 1 |
| 782 |
Mysqlx_sessions_closed 1 |
| 783 |
Mysqlx_sessions_killed 0 |
| 784 |
Mysqlx_sessions_rejected 1 |
| 785 |
# |
| 786 |
# Start server with session tracking variables and monitor them using xprotocol |
| 787 |
# |
| 788 |
# restart: |
| 789 |
RUN SET @@session.session_track_system_variables='mysqlx_port,mysqlx_idle_worker_thread_timeout,mysqlx_max_allowed_packet,mysqlx_max_connections,mysqlx_min_worker_threads' |
| 790 |
|
| 791 |
0 rows affected |
| 792 |
RUN show variables like '%session_track%' |
| 793 |
Variable_name Value |
| 794 |
session_track_gtids OFF |
| 795 |
session_track_schema ON |
| 796 |
session_track_state_change OFF |
| 797 |
session_track_system_variables mysqlx_port,mysqlx_idle_worker_thread_timeout,mysqlx_max_allowed_packet,mysqlx_max_connections,mysqlx_min_worker_threads |
| 798 |
session_track_transaction_info OFF |
| 799 |
0 rows affected |
| 800 |
RUN uninstall plugin mysqlx; |
| 801 |
Got expected error: Command not supported by pluggable protocols (code 3130) |
| 802 |
RUN show warnings |
| 803 |
Level Code Message |
| 804 |
Error 3130 Command not supported by pluggable protocols |
| 805 |
0 rows affected |
| 806 |
RUN show variables like '%mysqlx_max_connections%' |
| 807 |
Variable_name Value |
| 808 |
mysqlx_max_connections 100 |
| 809 |
0 rows affected |
| 810 |
RUN set @@global.mysqlx_max_connections=100 |
| 811 |
|
| 812 |
0 rows affected |
| 813 |
RUN show variables like '%mysqlx_max_connections%' |
| 814 |
Variable_name Value |
| 815 |
mysqlx_max_connections 100 |
| 816 |
0 rows affected |
| 817 |
RUN show status like 'Mysqlx_connections_closed' |
| 818 |
Variable_name Value |
| 819 |
Mysqlx_connections_closed 0 |
| 820 |
0 rows affected |
| 821 |
RUN show status like 'Mysqlx_connections_accepted' |
| 822 |
Variable_name Value |
| 823 |
Mysqlx_connections_accepted 1 |
| 824 |
0 rows affected |
| 825 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 826 |
Variable_name Value |
| 827 |
Mysqlx_connection_accept_errors 0 |
| 828 |
0 rows affected |
| 829 |
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error' |
| 830 |
Variable_name Value |
| 831 |
Mysqlx_sessions 1 |
| 832 |
Mysqlx_sessions_accepted 1 |
| 833 |
Mysqlx_sessions_closed 0 |
| 834 |
Mysqlx_sessions_killed 0 |
| 835 |
Mysqlx_sessions_rejected 0 |
| 836 |
0 rows affected |
| 837 |
Mysqlx.Ok { |
| 838 |
msg: "bye!" |
| 839 |
} |
| 840 |
ok |
| 841 |
# Syncing with status [ 'Mysqlx_sessions_closed' == 1 ] |
| 842 |
# Syncing with status [ 'Mysqlx_connections_closed' == 1 ] |
| 843 |
show status like 'Mysqlx_connections_closed'; |
| 844 |
Variable_name Value |
| 845 |
Mysqlx_connections_closed 1 |
| 846 |
show status like 'Mysqlx_connections_accepted'; |
| 847 |
Variable_name Value |
| 848 |
Mysqlx_connections_accepted 1 |
| 849 |
show status like 'Mysqlx_connection_accept_errors'; |
| 850 |
Variable_name Value |
| 851 |
Mysqlx_connection_accept_errors 0 |
| 852 |
show status where |
| 853 |
`Variable_name`like 'Mysqlx_sessions%' and |
| 854 |
not `Variable_name` like 'Mysqlx_sessions_fatal_error'; |
| 855 |
Variable_name Value |
| 856 |
Mysqlx_sessions 0 |
| 857 |
Mysqlx_sessions_accepted 1 |
| 858 |
Mysqlx_sessions_closed 1 |
| 859 |
Mysqlx_sessions_killed 0 |
| 860 |
Mysqlx_sessions_rejected 0 |
| 861 |
# |
| 862 |
# Try login with user whose password expired when mysqlx installed and when server started with skip-disconnect-on-expired-password option |
| 863 |
# |
| 864 |
# restart: --skip-disconnect-on-expired-password |
| 865 |
NOTICE: Account password expired |
| 866 |
RUN select user(),current_user(),@@bind_address |
| 867 |
Got expected error: You must reset your password using ALTER USER statement before executing this statement. (code 1820) |
| 868 |
RUN show status like 'Mysqlx_connections_closed' |
| 869 |
Got expected error: You must reset your password using ALTER USER statement before executing this statement. (code 1820) |
| 870 |
RUN show status like 'Mysqlx_connections_accepted' |
| 871 |
Got expected error: You must reset your password using ALTER USER statement before executing this statement. (code 1820) |
| 872 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 873 |
Got expected error: You must reset your password using ALTER USER statement before executing this statement. (code 1820) |
| 874 |
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error' |
| 875 |
Got expected error: You must reset your password using ALTER USER statement before executing this statement. (code 1820) |
| 876 |
Mysqlx.Ok { |
| 877 |
msg: "bye!" |
| 878 |
} |
| 879 |
ok |
| 880 |
# Syncing with status [ 'Mysqlx_sessions_closed' == 1 ] |
| 881 |
# Syncing with status [ 'Mysqlx_connections_closed' == 1 ] |
| 882 |
show status like 'Mysqlx_connections_closed'; |
| 883 |
Variable_name Value |
| 884 |
Mysqlx_connections_closed 1 |
| 885 |
show status like 'Mysqlx_connections_accepted'; |
| 886 |
Variable_name Value |
| 887 |
Mysqlx_connections_accepted 1 |
| 888 |
show status like 'Mysqlx_connection_accept_errors'; |
| 889 |
Variable_name Value |
| 890 |
Mysqlx_connection_accept_errors 0 |
| 891 |
show status where |
| 892 |
`Variable_name`like 'Mysqlx_sessions%' and |
| 893 |
not `Variable_name` like 'Mysqlx_sessions_fatal_error'; |
| 894 |
Variable_name Value |
| 895 |
Mysqlx_sessions 0 |
| 896 |
Mysqlx_sessions_accepted 1 |
| 897 |
Mysqlx_sessions_closed 1 |
| 898 |
Mysqlx_sessions_killed 0 |
| 899 |
Mysqlx_sessions_rejected 0 |
| 900 |
# |
| 901 |
# Try to open xprotocol sessions more than mysqlx_max_connections, |
| 902 |
# expect error for last connection |
| 903 |
# |
| 904 |
# restart: --mysqlx_max_connections=2 |
| 905 |
RUN create user con1@localhost identified by 'con1' |
| 906 |
|
| 907 |
0 rows affected |
| 908 |
RUN create user con2@localhost identified by 'con2' |
| 909 |
|
| 910 |
0 rows affected |
| 911 |
RUN grant all on *.* to con2@localhost |
| 912 |
|
| 913 |
0 rows affected |
| 914 |
Test data |
| 915 |
expect Mysqlx.Sql.StmtExecuteOk |
| 916 |
client_id user host |
| 917 |
1 x_root localhost |
| 918 |
command ok |
| 919 |
create and activate new session con1 |
| 920 |
connecting... |
| 921 |
active session is now 'con1' |
| 922 |
expect Mysqlx.Sql.StmtExecuteOk |
| 923 |
client_id user host |
| 924 |
2 con1 localhost |
| 925 |
command ok |
| 926 |
open 3rd xprotocol connection where 2 sessions already opened (may fail) |
| 927 |
connecting... |
| 928 |
active session is now 'con2' |
| 929 |
closing session con2 |
| 930 |
switched to session default |
| 931 |
client_id user host |
| 932 |
1 x_root localhost |
| 933 |
2 con1 localhost |
| 934 |
command ok |
| 935 |
RUN show status like 'Mysqlx_connections_closed' |
| 936 |
Variable_name Value |
| 937 |
Mysqlx_connections_closed 0 |
| 938 |
0 rows affected |
| 939 |
RUN show status like 'Mysqlx_connections_accepted' |
| 940 |
Variable_name Value |
| 941 |
Mysqlx_connections_accepted 2 |
| 942 |
0 rows affected |
| 943 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 944 |
Variable_name Value |
| 945 |
Mysqlx_connection_accept_errors 0 |
| 946 |
0 rows affected |
| 947 |
Mysqlx.Ok { |
| 948 |
msg: "bye!" |
| 949 |
} |
| 950 |
ok |
| 951 |
# Syncing with status [ 'Mysqlx_connections_closed' == 2 ] |
| 952 |
# Syncing with status [ 'Mysqlx_connections_accepted' == 2 ] |
| 953 |
# Syncing with status [ 'Mysqlx_sessions_closed' == 2 ] |
| 954 |
show status like 'Mysqlx_connections_closed'; |
| 955 |
Variable_name Value |
| 956 |
Mysqlx_connections_closed 2 |
| 957 |
show status like 'Mysqlx_connections_accepted'; |
| 958 |
Variable_name Value |
| 959 |
Mysqlx_connections_accepted 2 |
| 960 |
show status like 'Mysqlx_connection_accept_errors'; |
| 961 |
Variable_name Value |
| 962 |
Mysqlx_connection_accept_errors 0 |
| 963 |
# |
| 964 |
# Try to open xprotocol sessions as that of mysqlx_max_connections set |
| 965 |
# |
| 966 |
drop user con1@localhost; |
| 967 |
drop user con2@localhost; |
| 968 |
# restart: --mysqlx_max_connections=3 |
| 969 |
RUN create user con1@localhost identified by 'con1' |
| 970 |
|
| 971 |
0 rows affected |
| 972 |
RUN create user con2@localhost identified by 'con2' |
| 973 |
|
| 974 |
0 rows affected |
| 975 |
RUN grant all on *.* to con2@localhost |
| 976 |
|
| 977 |
0 rows affected |
| 978 |
Test data |
| 979 |
expect Mysqlx.Sql.StmtExecuteOk |
| 980 |
client_id user host |
| 981 |
1 x_root localhost |
| 982 |
command ok |
| 983 |
create and activate new session con1 |
| 984 |
connecting... |
| 985 |
active session is now 'con1' |
| 986 |
expect Mysqlx.Sql.StmtExecuteOk |
| 987 |
client_id user host |
| 988 |
2 con1 localhost |
| 989 |
command ok |
| 990 |
open 3rd xprotocol connection where 2 sessions already opened |
| 991 |
connecting... |
| 992 |
active session is now 'con2' |
| 993 |
client_id user host |
| 994 |
1 x_root localhost |
| 995 |
2 con1 localhost |
| 996 |
3 con2 localhost |
| 997 |
command ok |
| 998 |
RUN show status like 'Mysqlx_connections_closed' |
| 999 |
Variable_name Value |
| 1000 |
Mysqlx_connections_closed 0 |
| 1001 |
0 rows affected |
| 1002 |
RUN show status like 'Mysqlx_connections_accepted' |
| 1003 |
Variable_name Value |
| 1004 |
Mysqlx_connections_accepted 3 |
| 1005 |
0 rows affected |
| 1006 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 1007 |
Variable_name Value |
| 1008 |
Mysqlx_connection_accept_errors 0 |
| 1009 |
0 rows affected |
| 1010 |
closing session con2 |
| 1011 |
Mysqlx.Ok { |
| 1012 |
msg: "bye!" |
| 1013 |
} |
| 1014 |
ok |
| 1015 |
# Syncing with status [ 'Mysqlx_connections_closed' == 3 ] |
| 1016 |
# Syncing with status [ 'Mysqlx_connections_accepted' == 3 ] |
| 1017 |
# Syncing with status [ 'Mysqlx_sessions_closed' == 3 ] |
| 1018 |
show status like 'Mysqlx_connections_closed'; |
| 1019 |
Variable_name Value |
| 1020 |
Mysqlx_connections_closed 3 |
| 1021 |
show status like 'Mysqlx_connections_accepted'; |
| 1022 |
Variable_name Value |
| 1023 |
Mysqlx_connections_accepted 3 |
| 1024 |
show status like 'Mysqlx_connection_accept_errors'; |
| 1025 |
Variable_name Value |
| 1026 |
Mysqlx_connection_accept_errors 0 |
| 1027 |
# |
| 1028 |
# Open max allowed connections and expect error for new connections and changes value and connect again,expect success |
| 1029 |
# |
| 1030 |
RUN create user xcon1@localhost identified by 'xcon1' |
| 1031 |
|
| 1032 |
0 rows affected |
| 1033 |
RUN create user xcon2@localhost identified by 'xcon2' |
| 1034 |
|
| 1035 |
0 rows affected |
| 1036 |
RUN grant all on *.* to xcon2@localhost |
| 1037 |
|
| 1038 |
0 rows affected |
| 1039 |
RUN set @@global.mysqlx_max_connections=2 |
| 1040 |
|
| 1041 |
0 rows affected |
| 1042 |
Test data |
| 1043 |
expect Mysqlx.Sql.StmtExecuteOk |
| 1044 |
client_id user host |
| 1045 |
4 x_root localhost |
| 1046 |
command ok |
| 1047 |
RUN show status like 'Mysqlx_connections_closed' |
| 1048 |
Variable_name Value |
| 1049 |
Mysqlx_connections_closed 3 |
| 1050 |
0 rows affected |
| 1051 |
RUN show status like 'Mysqlx_connections_accepted' |
| 1052 |
Variable_name Value |
| 1053 |
Mysqlx_connections_accepted 4 |
| 1054 |
0 rows affected |
| 1055 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 1056 |
Variable_name Value |
| 1057 |
Mysqlx_connection_accept_errors 0 |
| 1058 |
0 rows affected |
| 1059 |
create and activate new session con1 |
| 1060 |
connecting... |
| 1061 |
active session is now 'xcon1' |
| 1062 |
expect Mysqlx.Sql.StmtExecuteOk |
| 1063 |
client_id user host |
| 1064 |
5 xcon1 localhost |
| 1065 |
command ok |
| 1066 |
RUN show status like 'Mysqlx_connections_closed' |
| 1067 |
Variable_name Value |
| 1068 |
Mysqlx_connections_closed 3 |
| 1069 |
0 rows affected |
| 1070 |
RUN show status like 'Mysqlx_connections_accepted' |
| 1071 |
Variable_name Value |
| 1072 |
Mysqlx_connections_accepted 5 |
| 1073 |
0 rows affected |
| 1074 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 1075 |
Variable_name Value |
| 1076 |
Mysqlx_connection_accept_errors 0 |
| 1077 |
0 rows affected |
| 1078 |
open 3rd xprotocol connection where 2 sessions already opened |
| 1079 |
this scenario is related to Bug#21374656 |
| 1080 |
connecting... |
| 1081 |
active session is now 'xcon2' |
| 1082 |
closing session xcon2 |
| 1083 |
switched to session default |
| 1084 |
switched to session default |
| 1085 |
client_id user host |
| 1086 |
4 x_root localhost |
| 1087 |
5 xcon1 localhost |
| 1088 |
command ok |
| 1089 |
RUN set @@global.mysqlx_max_connections=3 |
| 1090 |
|
| 1091 |
0 rows affected |
| 1092 |
RUN show status like 'Mysqlx_connections_closed' |
| 1093 |
Variable_name Value |
| 1094 |
Mysqlx_connections_closed 3 |
| 1095 |
0 rows affected |
| 1096 |
RUN show status like 'Mysqlx_connections_accepted' |
| 1097 |
Variable_name Value |
| 1098 |
Mysqlx_connections_accepted 5 |
| 1099 |
0 rows affected |
| 1100 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 1101 |
Variable_name Value |
| 1102 |
Mysqlx_connection_accept_errors 0 |
| 1103 |
0 rows affected |
| 1104 |
connecting... |
| 1105 |
active session is now 'xcon2' |
| 1106 |
client_id user host |
| 1107 |
4 x_root localhost |
| 1108 |
5 xcon1 localhost |
| 1109 |
7 xcon2 localhost |
| 1110 |
command ok |
| 1111 |
RUN drop user xcon1@localhost |
| 1112 |
|
| 1113 |
0 rows affected |
| 1114 |
RUN drop user xcon2@localhost |
| 1115 |
|
| 1116 |
0 rows affected |
| 1117 |
RUN set @@global.mysqlx_max_connections=100 |
| 1118 |
|
| 1119 |
0 rows affected |
| 1120 |
RUN show status like 'Mysqlx_connections_closed' |
| 1121 |
Variable_name Value |
| 1122 |
Mysqlx_connections_closed 3 |
| 1123 |
0 rows affected |
| 1124 |
RUN show status like 'Mysqlx_connections_accepted' |
| 1125 |
Variable_name Value |
| 1126 |
Mysqlx_connections_accepted 6 |
| 1127 |
0 rows affected |
| 1128 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 1129 |
Variable_name Value |
| 1130 |
Mysqlx_connection_accept_errors 0 |
| 1131 |
0 rows affected |
| 1132 |
closing session xcon2 |
| 1133 |
Mysqlx.Ok { |
| 1134 |
msg: "bye!" |
| 1135 |
} |
| 1136 |
ok |
| 1137 |
# Syncing with status [ 'Mysqlx_connections_closed' == 6 ] |
| 1138 |
# Syncing with status [ 'Mysqlx_connections_accepted' == 6 ] |
| 1139 |
# Syncing with status [ 'Mysqlx_sessions_closed' == 6 ] |
| 1140 |
show status like 'Mysqlx_connections_closed'; |
| 1141 |
Variable_name Value |
| 1142 |
Mysqlx_connections_closed 6 |
| 1143 |
show status like 'Mysqlx_connections_accepted'; |
| 1144 |
Variable_name Value |
| 1145 |
Mysqlx_connections_accepted 6 |
| 1146 |
show status like 'Mysqlx_connection_accept_errors'; |
| 1147 |
Variable_name Value |
| 1148 |
Mysqlx_connection_accept_errors 0 |
| 1149 |
kill xprotocol session when some operations are going on there using mysqx protocol |
| 1150 |
RUN create user xcon1@localhost identified by 'xcon1' |
| 1151 |
|
| 1152 |
0 rows affected |
| 1153 |
RUN create user xcon2@localhost identified by 'xcon2' |
| 1154 |
|
| 1155 |
0 rows affected |
| 1156 |
RUN grant all on *.* to xcon2@localhost |
| 1157 |
|
| 1158 |
0 rows affected |
| 1159 |
RUN SET GLOBAL mysqlx_connect_timeout = 300 |
| 1160 |
|
| 1161 |
0 rows affected |
| 1162 |
Test data |
| 1163 |
expect Mysqlx.Sql.StmtExecuteOk |
| 1164 |
client_id user host |
| 1165 |
8 x_root localhost |
| 1166 |
command ok |
| 1167 |
RUN show status like 'Mysqlx_connections_closed' |
| 1168 |
Variable_name Value |
| 1169 |
Mysqlx_connections_closed 6 |
| 1170 |
0 rows affected |
| 1171 |
RUN show status like 'Mysqlx_connections_accepted' |
| 1172 |
Variable_name Value |
| 1173 |
Mysqlx_connections_accepted 7 |
| 1174 |
0 rows affected |
| 1175 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 1176 |
Variable_name Value |
| 1177 |
Mysqlx_connection_accept_errors 0 |
| 1178 |
0 rows affected |
| 1179 |
create and activate new session con1 |
| 1180 |
connecting... |
| 1181 |
active session is now 'xcon1' |
| 1182 |
RUN show status like 'Mysqlx_connections_closed' |
| 1183 |
Variable_name Value |
| 1184 |
Mysqlx_connections_closed 6 |
| 1185 |
0 rows affected |
| 1186 |
RUN show status like 'Mysqlx_connections_accepted' |
| 1187 |
Variable_name Value |
| 1188 |
Mysqlx_connections_accepted 8 |
| 1189 |
0 rows affected |
| 1190 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 1191 |
Variable_name Value |
| 1192 |
Mysqlx_connection_accept_errors 0 |
| 1193 |
0 rows affected |
| 1194 |
expect Mysqlx.Sql.StmtExecuteOk |
| 1195 |
client_id user host |
| 1196 |
9 xcon1 localhost |
| 1197 |
command ok |
| 1198 |
send Mysqlx.Sql.StmtExecute { |
| 1199 |
stmt: "select sleep(100);" |
| 1200 |
} |
| 1201 |
|
| 1202 |
open 3rd xprotocol connection where 2 sessions already opened |
| 1203 |
connecting... |
| 1204 |
active session is now 'xcon2' |
| 1205 |
RUN show status like 'Mysqlx_connections_closed' |
| 1206 |
Variable_name Value |
| 1207 |
Mysqlx_connections_closed 6 |
| 1208 |
0 rows affected |
| 1209 |
RUN show status like 'Mysqlx_connections_accepted' |
| 1210 |
Variable_name Value |
| 1211 |
Mysqlx_connections_accepted 9 |
| 1212 |
0 rows affected |
| 1213 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 1214 |
Variable_name Value |
| 1215 |
Mysqlx_connection_accept_errors 0 |
| 1216 |
0 rows affected |
| 1217 |
switched to session default |
| 1218 |
client_id user host |
| 1219 |
8 x_root localhost |
| 1220 |
9 xcon1 localhost |
| 1221 |
10 xcon2 localhost |
| 1222 |
command ok |
| 1223 |
RUN show status like 'Mysqlx_connections_closed' |
| 1224 |
Variable_name Value |
| 1225 |
Mysqlx_connections_closed 6 |
| 1226 |
0 rows affected |
| 1227 |
RUN show status like 'Mysqlx_connections_accepted' |
| 1228 |
Variable_name Value |
| 1229 |
Mysqlx_connections_accepted 9 |
| 1230 |
0 rows affected |
| 1231 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 1232 |
Variable_name Value |
| 1233 |
Mysqlx_connection_accept_errors 0 |
| 1234 |
0 rows affected |
| 1235 |
connecting... |
| 1236 |
active session is now 'xcon3' |
| 1237 |
client_id user host |
| 1238 |
8 x_root localhost |
| 1239 |
9 xcon1 localhost |
| 1240 |
10 xcon2 localhost |
| 1241 |
11 xcon2 localhost |
| 1242 |
command ok |
| 1243 |
expect Mysqlx.Sql.StmtExecuteOk |
| 1244 |
|
| 1245 |
command ok |
| 1246 |
switched to session xcon1 |
| 1247 |
Server disconnected |
| 1248 |
closing session xcon1 |
| 1249 |
switched to session default |
| 1250 |
client_id user host |
| 1251 |
8 x_root localhost |
| 1252 |
10 xcon2 localhost |
| 1253 |
11 xcon2 localhost |
| 1254 |
command ok |
| 1255 |
RUN drop user xcon1@localhost |
| 1256 |
|
| 1257 |
0 rows affected |
| 1258 |
RUN drop user xcon2@localhost |
| 1259 |
|
| 1260 |
0 rows affected |
| 1261 |
RUN show status like 'Mysqlx_connections_closed' |
| 1262 |
Variable_name Value |
| 1263 |
Mysqlx_connections_closed 7 |
| 1264 |
0 rows affected |
| 1265 |
RUN show status like 'Mysqlx_connections_accepted' |
| 1266 |
Variable_name Value |
| 1267 |
Mysqlx_connections_accepted 10 |
| 1268 |
0 rows affected |
| 1269 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 1270 |
Variable_name Value |
| 1271 |
Mysqlx_connection_accept_errors 0 |
| 1272 |
0 rows affected |
| 1273 |
Mysqlx.Ok { |
| 1274 |
msg: "bye!" |
| 1275 |
} |
| 1276 |
ok |
| 1277 |
# Syncing with status [ 'Mysqlx_connections_closed' == 10 ] |
| 1278 |
# Syncing with status [ 'Mysqlx_connections_accepted' == 10 ] |
| 1279 |
# Syncing with status [ 'Mysqlx_sessions_closed' == 10 ] |
| 1280 |
show status like 'Mysqlx_connections_closed'; |
| 1281 |
Variable_name Value |
| 1282 |
Mysqlx_connections_closed 10 |
| 1283 |
show status like 'Mysqlx_connections_accepted'; |
| 1284 |
Variable_name Value |
| 1285 |
Mysqlx_connections_accepted 10 |
| 1286 |
show status like 'Mysqlx_connection_accept_errors'; |
| 1287 |
Variable_name Value |
| 1288 |
Mysqlx_connection_accept_errors 0 |
| 1289 |
open more xconnections than specified max_connections,expect error |
| 1290 |
RUN create user mysqlcon1@localhost identified by 'mysqlcon1' |
| 1291 |
|
| 1292 |
0 rows affected |
| 1293 |
RUN create user mysqlcon2@localhost identified by 'mysqlcon2' |
| 1294 |
|
| 1295 |
0 rows affected |
| 1296 |
RUN set @@global.max_connections=2 |
| 1297 |
|
| 1298 |
0 rows affected |
| 1299 |
Test data |
| 1300 |
expect Mysqlx.Sql.StmtExecuteOk |
| 1301 |
client_id user host |
| 1302 |
12 x_root localhost |
| 1303 |
command ok |
| 1304 |
create and activate new session con1 |
| 1305 |
connecting... |
| 1306 |
active session is now 'con1' |
| 1307 |
expect Mysqlx.Sql.StmtExecuteOk |
| 1308 |
client_id user host |
| 1309 |
13 mysqlcon1 localhost |
| 1310 |
command ok |
| 1311 |
open 3rd xprotocol connection where 2 sessions already opened |
| 1312 |
connecting... |
| 1313 |
active session is now 'con2' |
| 1314 |
Mysqlx.Error { |
| 1315 |
severity: FATAL |
| 1316 |
code: 1040 |
| 1317 |
msg: "Too many connections" |
| 1318 |
sql_state: "HY000" |
| 1319 |
} |
| 1320 |
|
| 1321 |
closing session con2 |
| 1322 |
switched to session default |
| 1323 |
client_id user host |
| 1324 |
12 x_root localhost |
| 1325 |
13 mysqlcon1 localhost |
| 1326 |
command ok |
| 1327 |
RUN show status like 'Mysqlx_connections_closed' |
| 1328 |
Variable_name Value |
| 1329 |
Mysqlx_connections_closed 11 |
| 1330 |
0 rows affected |
| 1331 |
RUN show status like 'Mysqlx_connections_accepted' |
| 1332 |
Variable_name Value |
| 1333 |
Mysqlx_connections_accepted 13 |
| 1334 |
0 rows affected |
| 1335 |
RUN show status like 'Mysqlx_connection_accept_errors' |
| 1336 |
Variable_name Value |
| 1337 |
Mysqlx_connection_accept_errors 0 |
| 1338 |
0 rows affected |
| 1339 |
RUN set @@global.max_connections=150 |
| 1340 |
|
| 1341 |
0 rows affected |
| 1342 |
Mysqlx.Ok { |
| 1343 |
msg: "bye!" |
| 1344 |
} |
| 1345 |
ok |
| 1346 |
connecting... |
| 1347 |
Got expected error: Access denied for user 'abc'@'localhost'. Account is locked. (code 3118) |
| 1348 |
ok |
| 1349 |
show status like 'Mysqlx_connections_closed'; |
| 1350 |
Variable_name Value |
| 1351 |
Mysqlx_connections_closed 15 |
| 1352 |
show status like 'Mysqlx_connections_accepted'; |
| 1353 |
Variable_name Value |
| 1354 |
Mysqlx_connections_accepted 15 |
| 1355 |
show status like 'Mysqlx_connection_accept_errors'; |
| 1356 |
Variable_name Value |
| 1357 |
Mysqlx_connection_accept_errors 0 |
| 1358 |
# restart: |
| 1359 |
drop user xplugin@localhost; |
| 1360 |
drop user nonblank@localhost; |
| 1361 |
drop user blank@localhost; |
| 1362 |
drop user abc@localhost; |
| 1363 |
drop user con1@localhost; |
| 1364 |
drop user con2@localhost; |
| 1365 |
drop user mysqlcon1@localhost; |
| 1366 |
drop user mysqlcon2@localhost; |
| 1367 |
drop user ''@localhost; |
| 1368 |
drop user special@localhost; |
| 1369 |
drop user session@localhost; |
| 1370 |
SET GLOBAL mysqlx_connect_timeout = DEFAULT; |