Commit 2d3840f5 authored by monty@mashka.mysql.fi's avatar monty@mashka.mysql.fi

Fixed bug in SET enum_system_variable=NULL

parent c95d142f
......@@ -539,3 +539,4 @@ scripts/make_win_src_distribution
libmysql/vio_priv.h
libmysql_r/vio_priv.h
hardcopy.0
scripts/make_sharedlib_distribution
......@@ -244,6 +244,8 @@ set myisam_max_sort_file_size=100;
Variable 'myisam_max_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL
set myisam_max_extra_sort_file_size=100;
Variable 'myisam_max_extra_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL
set @@SQL_WARNINGS=NULL;
Variable 'sql_warnings' can't be set to the value of 'NULL'
set autocommit=1;
set big_tables=1;
select @@autocommit, @@big_tables;
......
......@@ -153,6 +153,8 @@ select @@global.sql_auto_is_null;
set myisam_max_sort_file_size=100;
--error 1229
set myisam_max_extra_sort_file_size=100;
--error 1231
set @@SQL_WARNINGS=NULL;
# Test setting all variables
......
......@@ -394,9 +394,9 @@ sys_var *sys_variables[]=
&sys_quote_show_create,
&sys_rand_seed1,
&sys_rand_seed2,
&sys_range_alloc_block_size,
&sys_read_buff_size,
&sys_read_rnd_buff_size,
&sys_range_alloc_block_size,
&sys_rpl_recovery_rank,
&sys_safe_updates,
&sys_select_limit,
......@@ -555,11 +555,11 @@ struct show_var_st init_vars[]= {
{sys_query_cache_type.name, (char*) &sys_query_cache_type, SHOW_SYS},
#endif /* HAVE_QUERY_CACHE */
{sys_query_prealloc_size.name, (char*) &sys_query_prealloc_size, SHOW_SYS},
{sys_range_alloc_block_size.name, (char*) &sys_range_alloc_block_size,
SHOW_SYS},
{sys_read_buff_size.name, (char*) &sys_read_buff_size, SHOW_SYS},
{sys_readonly.name, (char*) &sys_readonly, SHOW_SYS},
{sys_read_rnd_buff_size.name,(char*) &sys_read_rnd_buff_size, SHOW_SYS},
{sys_range_alloc_block_size.name, (char*) &sys_range_alloc_block_size,
SHOW_SYS},
{sys_rpl_recovery_rank.name,(char*) &sys_rpl_recovery_rank, SHOW_SYS},
{sys_server_id.name, (char*) &sys_server_id, SHOW_SYS},
{sys_slave_net_timeout.name,(char*) &sys_slave_net_timeout, SHOW_SYS},
......@@ -972,7 +972,8 @@ byte *sys_var_thd_bool::value_ptr(THD *thd, enum_var_type type)
bool sys_var::check_enum(THD *thd, set_var *var, TYPELIB *enum_names)
{
char buff[80], *value;
char buff[80];
const char *value;
String str(buff,sizeof(buff)), *res;
if (var->value->result_type() == STRING_RESULT)
......@@ -982,7 +983,7 @@ bool sys_var::check_enum(THD *thd, set_var *var, TYPELIB *enum_names)
(ulong) find_type(res->c_ptr(), enum_names, 3)-1))
< 0)
{
value=res->c_ptr();
value= res ? res->c_ptr() : "NULL";
goto err;
}
}
......
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