mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
fix for bug #12183 "SHOW OPEN TABLES behavior doesn't match grammar"
(after review commit) mysql-test/r/show_check.result: test the extended functionality (so far not documented) of SHOW OPEN FILES mysql-test/t/show_check.test: test the extended functionality (so far not documented) of SHOW OPEN FILES sql/mysql_priv.h: pass the name of the database for checking sql/sql_base.cc: first check against the db if present (SHOW OPEN FILES FROM xxx) then do wild compare but only against the table name sql/sql_show.cc: pass the DB if specified
This commit is contained in:
@ -512,3 +512,46 @@ t1 CREATE TABLE `t1` (
|
||||
KEY `c2` USING BTREE (`c2`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE txt1(a int);
|
||||
CREATE TABLE tyt2(a int);
|
||||
CREATE TABLE urkunde(a int);
|
||||
FLUSH TABLES;
|
||||
SELECT 1 FROM mysql.db, mysql.proc, mysql.user, mysql.time_zone, mysql.time_zone_name, txt1, tyt2, urkunde LIMIT 0;
|
||||
1
|
||||
SHOW OPEN TABLES;
|
||||
Database Table In_use Name_locked
|
||||
mysql db 0 0
|
||||
test urkunde 0 0
|
||||
mysql time_zone 0 0
|
||||
mysql user 0 0
|
||||
test txt1 0 0
|
||||
mysql proc 0 0
|
||||
test tyt2 0 0
|
||||
mysql time_zone_name 0 0
|
||||
SHOW OPEN TABLES FROM mysql;
|
||||
Database Table In_use Name_locked
|
||||
mysql db 0 0
|
||||
mysql time_zone 0 0
|
||||
mysql user 0 0
|
||||
mysql proc 0 0
|
||||
mysql time_zone_name 0 0
|
||||
SHOW OPEN TABLES FROM mysql LIKE 'u%';
|
||||
Database Table In_use Name_locked
|
||||
mysql user 0 0
|
||||
SHOW OPEN TABLES LIKE 't%';
|
||||
Database Table In_use Name_locked
|
||||
mysql time_zone 0 0
|
||||
test txt1 0 0
|
||||
test tyt2 0 0
|
||||
mysql time_zone_name 0 0
|
||||
SHOW OPEN TABLES LIKE '%o%';
|
||||
Database Table In_use Name_locked
|
||||
mysql time_zone 0 0
|
||||
mysql proc 0 0
|
||||
mysql time_zone_name 0 0
|
||||
FLUSH TABLES;
|
||||
SHOW OPEN TABLES;
|
||||
Database Table In_use Name_locked
|
||||
DROP TABLE txt1;
|
||||
DROP TABLE tyt2;
|
||||
DROP TABLE urkunde;
|
||||
|
@ -387,3 +387,21 @@ SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
#
|
||||
# BUG 12183 - SHOW OPEN TABLES behavior doesn't match grammar
|
||||
# First we close all open tables with FLUSH tables and then we open some.
|
||||
CREATE TABLE txt1(a int);
|
||||
CREATE TABLE tyt2(a int);
|
||||
CREATE TABLE urkunde(a int);
|
||||
FLUSH TABLES;
|
||||
SELECT 1 FROM mysql.db, mysql.proc, mysql.user, mysql.time_zone, mysql.time_zone_name, txt1, tyt2, urkunde LIMIT 0;
|
||||
SHOW OPEN TABLES;
|
||||
SHOW OPEN TABLES FROM mysql;
|
||||
SHOW OPEN TABLES FROM mysql LIKE 'u%';
|
||||
SHOW OPEN TABLES LIKE 't%';
|
||||
SHOW OPEN TABLES LIKE '%o%';
|
||||
FLUSH TABLES;
|
||||
SHOW OPEN TABLES;
|
||||
DROP TABLE txt1;
|
||||
DROP TABLE tyt2;
|
||||
DROP TABLE urkunde;
|
||||
|
Reference in New Issue
Block a user