| 1 |
# |
| 2 |
# Tests for the Performance Schema native functions ps_thread_id() |
| 3 |
# and ps_current_thread_id() with disabled Performance Schema |
| 4 |
|
| 5 |
# Verify the Performance Schema is disabled |
| 6 |
SELECT @@global.performance_schema AS 'Expect 0'; |
| 7 |
Expect 0 |
| 8 |
0 |
| 9 |
|
| 10 |
# Get the connection ID of this connection |
| 11 |
SELECT connection_id() INTO @cid; |
| 12 |
|
| 13 |
# The Performance Schema is not available |
| 14 |
SELECT ps_current_thread_id(); |
| 15 |
ERROR HY000: 'ps_current_thread_id': The Performance Schema is not enabled. |
| 16 |
|
| 17 |
SELECT ps_thread_id(@cid); |
| 18 |
ERROR HY000: 'ps_thread_id': The Performance Schema is not enabled. |
| 19 |
|