summaryrefslogtreecommitdiff
path: root/mysql-test/t/information_schema.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/information_schema.test')
-rw-r--r--mysql-test/t/information_schema.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test
index 9fdc29e88de..b2e18097c65 100644
--- a/mysql-test/t/information_schema.test
+++ b/mysql-test/t/information_schema.test
@@ -1819,6 +1819,23 @@ drop view v1;
--echo # Clean-up.
drop database mysqltest;
+--echo #
+--echo # Test for bug #16869534 - "QUERYING SUBSET OF COLUMNS DOESN'T USE TABLE
+--echo # CACHE; OPENED_TABLES INCREASES"
+--echo #
+--disable_result_log
+SELECT * FROM INFORMATION_SCHEMA.TABLES;
+--enable_result_log
+SELECT VARIABLE_VALUE INTO @val1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE
+ VARIABLE_NAME LIKE 'Opened_tables';
+--disable_result_log
+SELECT ENGINE FROM INFORMATION_SCHEMA.TABLES;
+--enable_result_log
+--echo # The below SELECT query should give same output as above SELECT query.
+SELECT VARIABLE_VALUE INTO @val2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE
+ VARIABLE_NAME LIKE 'Opened_tables';
+--echo # The below select should return '1'
+SELECT @val1 = @val2;
--echo #
--echo # End of 5.5 tests