mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Added SHOW OPEN TABLES. Thanks to Antony T Curtis <antony@abacus.co.uk>
for the code.
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