polardbxengine/mysql-test/t/information_schema_statisti...

52 lines
1.5 KiB
Plaintext

#
# Bug#23209797 SEGMENTATION FAULT WHILE GETTING GET_SCHEMA_TABLES_RESULT()
# Make sure information_schema.tmp_tables_* tables are not
# directly accessible to users, except for SHOW COMMANDS.
#
CREATE TEMPORARY TABLE t1 (f1 int, f2 int primary key, UNIQUE KEY (f1));
SHOW COLUMNS FROM t1;
SHOW INDEXES FROM t1;
--error ER_UNKNOWN_TABLE
SELECT * FROM information_schema.tmp_tables_columns;
--error ER_UNKNOWN_TABLE
SELECT * FROM information_schema.tmp_tables_keys;
DROP TEMPORARY TABLE t1;
#
# Bug#23210930 ASSERTION `THD->GET_TRANSACTION()->IS_EMPTY(TRANSACTION_CTX::STMT)' FAILED.
# Make sure the INFORMATION_SCHEMA system views are usable in
# prepared statement.
#
CREATE TABLE t1 (f1 int);
SELECT TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE
FROM information_schema.tables WHERE table_name='t1';
LOCK TABLE t1 READ;
SELECT TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE
FROM information_schema.tables WHERE table_name='t1';
PREPARE st2 FROM
"SELECT TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE FROM
information_schema.tables WHERE table_name='t1'";
EXECUTE st2;
DEALLOCATE PREPARE st2;
UNLOCK TABLES;
DROP TABLE t1;
#
# Bug #28165060 MYSQL IS TRYING TO PERFORM A CONSISTENT READ BUT THE READ
# VIEW IS NOT ASSIGNED!
#
#
CREATE DATABASE abc;
CREATE TABLE abc.memorytable (id INT NOT NULL) ENGINE=MEMORY;
--source include/restart_mysqld.inc
--disable_result_log
# The following command would cause a assert, without the fix.
SELECT * FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'abc';
--enable_result_log
DROP DATABASE abc;