| 1 |
## Test of general functionality of session_connect_attrs capability for mysqlxtest |
| 2 |
|
| 3 |
## Preamble |
| 4 |
--source ../include/have_performance_schema_statements.inc |
| 5 |
--source include/xplugin_preamble.inc |
| 6 |
--source include/xplugin_create_user.inc |
| 7 |
## Test starts here |
| 8 |
|
| 9 |
|
| 10 |
--write_file $MYSQL_TMP_DIR/mysqlxtest_connect_attrs.xpl |
| 11 |
|
| 12 |
stmtadmin list_clients; |
| 13 |
recvtovar %SQL_SESSION_ID% sql_session; |
| 14 |
stmtsql SELECT attr_name, |
| 15 |
IF(LENGTH(attr_value) >0, 'not empty', 'EMPTY!') AS attr_value |
| 16 |
FROM performance_schema.session_connect_attrs |
| 17 |
WHERE processlist_id = %SQL_SESSION_ID% AND attr_name NOT LIKE '_thread' |
| 18 |
ORDER BY ordinal_position; |
| 19 |
recvresult; |
| 20 |
|
| 21 |
EOF |
| 22 |
|
| 23 |
--replace_regex /(processlist_id = )[0-9]+/\1$SESSION_ID/ |
| 24 |
exec $MYSQLXTEST |
| 25 |
-ux_root --password='' |
| 26 |
--file=$MYSQL_TMP_DIR/mysqlxtest_connect_attrs.xpl 2>&1; |
| 27 |
|
| 28 |
--replace_regex /(processlist_id = )[0-9]+/\1$SESSION_ID/ |
| 29 |
exec $MYSQLXTEST |
| 30 |
-ux_root --password='' --no-connect-attrs |
| 31 |
--file=$MYSQL_TMP_DIR/mysqlxtest_connect_attrs.xpl 2>&1; |
| 32 |
|
| 33 |
|
| 34 |
## Cleanup |
| 35 |
--source ../include/xplugin_cleanup.inc |