1
0
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:
tim@cane.mysql.fi
2000-12-18 23:22:20 +02:00
parent f11d5c837d
commit 5fdf032769
9 changed files with 137 additions and 7 deletions

View File

@ -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,