| 1 |
# |
| 2 |
# WL#15173: A component service to read status variable values |
| 3 |
# |
| 4 |
INSTALL COMPONENT "file://component_test_status_var_reader"; |
| 5 |
# FR5: test that no aggregation is triggered for session-altered variables |
| 6 |
# Should return 0 rows |
| 7 |
SELECT VARIABLE_NAME, VARIABLE_VALUE, test_get_status_var(VARIABLE_NAME, 0) |
| 8 |
FROM performance_schema.global_status |
| 9 |
WHERE VARIABLE_VALUE = test_get_status_var(VARIABLE_NAME, 0) AND |
| 10 |
VARIABLE_NAME IN ( |
| 11 |
'Bytes_received', |
| 12 |
'Bytes_sent'); |
| 13 |
# FR2, FR3, FR4.1 Test global status: should return 0 rows |
| 14 |
SELECT VARIABLE_NAME, VARIABLE_VALUE, test_get_status_var(VARIABLE_NAME, 0) |
| 15 |
FROM performance_schema.global_status |
| 16 |
WHERE VARIABLE_VALUE <> test_get_status_var(VARIABLE_NAME, 0) AND |
| 17 |
VARIABLE_NAME NOT IN ( |
| 18 |
'Bytes_received', |
| 19 |
'Bytes_sent', |
| 20 |
'Handler_commit', |
| 21 |
'Handler_external_lock', |
| 22 |
'Handler_write', |
| 23 |
'Handler_read_key', |
| 24 |
'Handler_read_next', |
| 25 |
'Handler_read_rnd_next', |
| 26 |
'Created_tmp_disk_tables', |
| 27 |
'Created_tmp_tables', |
| 28 |
'Handler_read_first', |
| 29 |
'Com_stmt_reprepare'); |
| 30 |
# FR4 Test session status: should return 0 rows |
| 31 |
SELECT VARIABLE_NAME, VARIABLE_VALUE, test_get_status_var(VARIABLE_NAME, 1) |
| 32 |
FROM performance_schema.session_status |
| 33 |
WHERE VARIABLE_VALUE <> test_get_status_var(VARIABLE_NAME, 1) AND |
| 34 |
VARIABLE_NAME NOT IN ( |
| 35 |
'Bytes_received', |
| 36 |
'Bytes_sent', |
| 37 |
'Handler_commit', |
| 38 |
'Handler_external_lock', |
| 39 |
'Handler_write', |
| 40 |
'Handler_read_key', |
| 41 |
'Handler_read_next', |
| 42 |
'Handler_read_rnd_next', |
| 43 |
'Created_tmp_disk_tables', |
| 44 |
'Created_tmp_tables', |
| 45 |
'Handler_read_first', |
| 46 |
'Com_stmt_reprepare'); |
| 47 |
UNINSTALL COMPONENT "file://component_test_status_var_reader"; |
| 48 |
# End of 8.0 tests |