mariadb/mysql-test/suite/perfschema/t/discovery.test
Sergey Vojtovich 0fcc350f73 MDEV-7922 - ERROR 1939 (HY000): Engine PERFORMANCE_SCHEMA failed to discover
table

Performance schema discovery fails if connection has no active database set.

This happened due to restriction in SQL parser: table name with no database name
is ambiguous in such case.

Fixed by temporary substitution of default database with being discovered table
database.
2015-05-07 20:45:46 +04:00

15 lines
451 B
Text

--source include/not_embedded.inc
--source include/have_perfschema.inc
--echo #
--echo # MDEV-7922 - ERROR 1939 (HY000): Engine PERFORMANCE_SCHEMA failed to
--echo # discover table
--echo #
FLUSH TABLES;
CREATE DATABASE test_drop;
USE test_drop;
DROP DATABASE test_drop;
--disable_result_log
SELECT TABLE_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='performance_schema';
--enable_result_log
SELECT @@warning_count;