mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Added SHOW OPEN TABLES. Thanks to Antony T Curtis <antony@abacus.co.uk>
for the code. Docs/manual.texi: - added SHOW OPEN TABLES sql/gen_lex_hash.cc: - added SHOW OPEN TABLES sql/lex.h: - added SHOW OPEN TABLES sql/mysql_priv.h: - added SHOW OPEN TABLES sql/sql_base.cc: - added SHOW OPEN TABLES sql/sql_lex.h: - added SHOW OPEN TABLES sql/sql_parse.cc: - added SHOW OPEN TABLES sql/sql_show.cc: - added SHOW OPEN TABLES sql/sql_yacc.yy: - added SHOW OPEN TABLES
This commit is contained in:
@@ -1488,6 +1488,8 @@ mysql_execute_command(void)
|
||||
}
|
||||
#endif
|
||||
case SQLCOM_SHOW_TABLES:
|
||||
/* FALL THROUGH */
|
||||
case SQLCOM_SHOW_OPEN_TABLES:
|
||||
#ifdef DONT_ALLOW_SHOW_COMMANDS
|
||||
send_error(&thd->net,ER_NOT_ALLOWED_COMMAND); /* purecov: inspected */
|
||||
DBUG_VOID_RETURN;
|
||||
@@ -1508,8 +1510,11 @@ mysql_execute_command(void)
|
||||
if (check_access(thd,SELECT_ACL,db,&thd->col_access))
|
||||
goto error; /* purecov: inspected */
|
||||
/* grant is checked in mysqld_show_tables */
|
||||
if (lex->options & SELECT_DESCRIBE)
|
||||
res= mysqld_extend_show_tables(thd,db,
|
||||
if (lex->sql_command == SQLCOM_SHOW_OPEN_TABLES)
|
||||
res= mysqld_show_open_tables(thd,db,
|
||||
(lex->wild ? lex->wild->ptr() : NullS));
|
||||
else if (lex->options & SELECT_DESCRIBE)
|
||||
res= mysqld_extend_show_tables(thd,db,
|
||||
(lex->wild ? lex->wild->ptr() : NullS));
|
||||
else
|
||||
res= mysqld_show_tables(thd,db,
|
||||
|
||||
Reference in New Issue
Block a user