| 1 |
# |
| 2 |
# Verify that query results are the same with and without indexes. |
| 3 |
# |
| 4 |
--source include/have_debug_sync.inc |
| 5 |
|
| 6 |
let $table = "events_statements_summary_by_digest"; |
| 7 |
let $key_group = 17; |
| 8 |
let $target_schema = test2; |
| 9 |
|
| 10 |
--echo TABLE: $table |
| 11 |
--echo INDEXES: PK (SCHEMA_NAME, DIGEST) |
| 12 |
|
| 13 |
--source ../include/idx_compare_setup.inc |
| 14 |
|
| 15 |
truncate performance_schema.events_statements_summary_by_digest; |
| 16 |
|
| 17 |
# Create a uniquely identifiable statement from user 2 |
| 18 |
|
| 19 |
--echo ## Connection 2 |
| 20 |
CREATE DATABASE test2; |
| 21 |
--connection con2 |
| 22 |
USE test2; |
| 23 |
SELECT COUNT(*) FROM test.t1; |
| 24 |
USE test; |
| 25 |
--echo ## Default connection |
| 26 |
--connection default |
| 27 |
|
| 28 |
--disable_query_log |
| 29 |
# Get a digest for user2 |
| 30 |
eval SELECT digest INTO @target_digest |
| 31 |
FROM performance_schema.events_statements_summary_by_digest |
| 32 |
WHERE schema_name = '$target_schema' LIMIT 1; |
| 33 |
--enable_query_log |
| 34 |
|
| 35 |
--echo |
| 36 |
--echo ## Test SCHEMA_NAME, DIGEST |
| 37 |
let $key_group = 17; |
| 38 |
# Specify columns for the result set tables to avoid errors with CREATE TABLE |
| 39 |
SET @pfs_columns = "SCHEMA_NAME, DIGEST, DIGEST_TEXT"; |
| 40 |
--source ../include/idx_compare_load.inc |
| 41 |
|
| 42 |
DROP DATABASE test2; |
| 43 |
|
| 44 |
--source ../include/idx_compare_cleanup.inc |