diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index 1d1c76ab3fe..269a9bfdbd9 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -584,3 +584,10 @@ set @@global.character_set_filesystem=default; select @@global.character_set_filesystem; @@global.character_set_filesystem binary +set @old_sql_big_selects = @@sql_big_selects; +set @@sql_big_selects = 1; +show variables like 'sql_big_selects'; +Variable_name Value +sql_big_selects ON +set @@sql_big_selects = @old_sql_big_selects; +End of 5.0 tests diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index 8d8dc7896df..5b8db2f8786 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -472,4 +472,12 @@ select @@character_set_filesystem; set @@global.character_set_filesystem=default; select @@global.character_set_filesystem; -# End of 5.0 tests +# +# Bug #17849: Show sql_big_selects in SHOW VARIABLES +# +set @old_sql_big_selects = @@sql_big_selects; +set @@sql_big_selects = 1; +show variables like 'sql_big_selects'; +set @@sql_big_selects = @old_sql_big_selects; + +--echo End of 5.0 tests diff --git a/sql/set_var.cc b/sql/set_var.cc index 71ecf97a6fa..4e8575f3df2 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -993,7 +993,8 @@ struct show_var_st init_vars[]= { #ifdef HAVE_SYS_UN_H {"socket", (char*) &mysqld_unix_port, SHOW_CHAR_PTR}, #endif - {sys_sort_buffer.name, (char*) &sys_sort_buffer, SHOW_SYS}, + {sys_sort_buffer.name, (char*) &sys_sort_buffer, SHOW_SYS}, + {sys_big_selects.name, (char*) &sys_big_selects, SHOW_SYS}, {sys_sql_mode.name, (char*) &sys_sql_mode, SHOW_SYS}, {"sql_notes", (char*) &sys_sql_notes, SHOW_BOOL}, {"sql_warnings", (char*) &sys_sql_warnings, SHOW_BOOL},