Commit 897a8d0f authored by unknown's avatar unknown

Fix for bug#11685 SHOW TABLES; doesn't update Com_show_tables

parent e90a26a2
...@@ -674,7 +674,7 @@ Database Table In_use Name_locked ...@@ -674,7 +674,7 @@ Database Table In_use Name_locked
mysql user 0 0 mysql user 0 0
show status where variable_name like "%database%"; show status where variable_name like "%database%";
Variable_name Value Variable_name Value
Com_show_databases 0 Com_show_databases 3
show variables where variable_name like "skip_show_databas"; show variables where variable_name like "skip_show_databas";
Variable_name Value Variable_name Value
show global status like "Threads_running"; show global status like "Threads_running";
......
...@@ -2193,6 +2193,8 @@ int prepare_schema_table(THD *thd, LEX *lex, Table_ident *table_ident, ...@@ -2193,6 +2193,8 @@ int prepare_schema_table(THD *thd, LEX *lex, Table_ident *table_ident,
TABLE_LIST *table_list= (TABLE_LIST*) select_lex->table_list.first; TABLE_LIST *table_list= (TABLE_LIST*) select_lex->table_list.first;
table_list->schema_select_lex= sel; table_list->schema_select_lex= sel;
table_list->schema_table_reformed= 1; table_list->schema_table_reformed= 1;
statistic_increment(thd->status_var.com_stat[lex->orig_sql_command],
&LOCK_status);
DBUG_RETURN(0); DBUG_RETURN(0);
} }
...@@ -2365,9 +2367,10 @@ mysql_execute_command(THD *thd) ...@@ -2365,9 +2367,10 @@ mysql_execute_command(THD *thd)
my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--read-only"); my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--read-only");
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
if(lex->orig_sql_command == SQLCOM_END)
statistic_increment(thd->status_var.com_stat[lex->sql_command], statistic_increment(thd->status_var.com_stat[lex->sql_command],
&LOCK_status); &LOCK_status);
switch (lex->sql_command) { switch (lex->sql_command) {
case SQLCOM_SELECT: case SQLCOM_SELECT:
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment