diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 6df5b890217..3c0a2982aa8 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1637,6 +1637,33 @@ drop table if exists t1;drop table if exists t1; drop table if exists t1;drop table if exists Warnings: Warning 1265 Data truncated for column 'VARIABLE_VALUE' at row 1 +select * from information_schema.global_variables where variable_name like 'init%' order by variable_name; +VARIABLE_NAME VARIABLE_VALUE +INIT_CONNECT drop table if exists t1;drop table if exists t1; +drop table if exists t1;drop table if exists t1; +drop table if exists t1;drop table if exists t1; +drop table if exists t1;drop table if exists t1; +drop table if exists t1;drop table if exists t1; +drop table if exists t1;drop table if exists t1; +drop table if exists t1;drop table if exists t1; +drop table if exists t1;drop table if exists t1; +drop table if exists t1;drop table if exists t1; +drop table if exists t1;drop table if exists t1; +drop table if exists t1;drop table if exists t1; +drop table if exists t1;drop table if exists t1; +drop table if exists t1;drop table if exists t1; +drop table if exists t1;drop table if exists t1; +drop table if exists t1;drop table if exists t1; +drop table if exists t1;drop table if exists t1; +drop table if exists t1;drop table if exists t1; +drop table if exists t1;drop table if exists t1; +drop table if exists t1;drop table if exists t1; +drop table if exists t1;drop table if exists t1; +drop table if exists t1;drop table if exists +INIT_FILE +INIT_SLAVE +Warnings: +Warning 1265 Data truncated for column 'VARIABLE_VALUE' at row # set global init_connect=""; create table t0 select * from information_schema.global_status where VARIABLE_NAME='COM_SELECT'; SELECT 1; diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index b51555295b3..bc77b2c2a8f 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -1358,6 +1358,8 @@ drop table if exists t1;drop table if exists t1;\ drop table if exists t1;drop table if exists t1;\ drop table if exists t1;drop table if exists t1;"; select * from information_schema.global_variables where variable_name='init_connect'; +--replace_regex /at row [123]/at row #/ +select * from information_schema.global_variables where variable_name like 'init%' order by variable_name; set global init_connect=""; # diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 9962075595c..ad60fc86060 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -3111,7 +3111,6 @@ static bool show_status_array(THD *thd, const char *wild, break; } table->field[1]->store(pos, (uint32) (end - pos), charset); - thd->count_cuted_fields= CHECK_FIELD_IGNORE; table->field[1]->set_notnull(); mysql_mutex_unlock(&LOCK_global_system_variables); @@ -3121,6 +3120,7 @@ static bool show_status_array(THD *thd, const char *wild, res= TRUE; goto end; } + thd->get_stmt_da()->inc_current_row_for_warning(); } } }