merge with 4.0 to get fix for SET enum_system_variable=NULL
This commit is contained in:
commit
e71b53a8fe
@ -515,6 +515,7 @@ scripts/fill_func_tables.sql
|
||||
scripts/fill_help_tables
|
||||
scripts/fill_help_tables.sql
|
||||
scripts/make_binary_distribution
|
||||
scripts/make_sharedlib_distribution
|
||||
scripts/make_win_src_distribution
|
||||
scripts/msql2mysql
|
||||
scripts/mysql_config
|
||||
|
@ -234,6 +234,8 @@ set myisam_max_sort_file_size=100;
|
||||
ERROR HY000: 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;
|
||||
ERROR HY000: Variable 'myisam_max_extra_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
set @@SQL_WARNINGS=NULL;
|
||||
ERROR HY000: Variable 'sql_warnings' can't be set to the value of 'NULL'
|
||||
set autocommit=1;
|
||||
set big_tables=1;
|
||||
select @@autocommit, @@big_tables;
|
||||
|
@ -150,6 +150,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
|
||||
|
||||
|
@ -464,9 +464,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,
|
||||
#ifdef HAVE_REPLICATION
|
||||
&sys_relay_log_purge,
|
||||
#endif
|
||||
@ -657,11 +657,11 @@ struct show_var_st init_vars[]= {
|
||||
{"secure_auth", (char*) &sys_secure_auth, 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},
|
||||
#ifdef HAVE_REPLICATION
|
||||
{sys_relay_log_purge.name, (char*) &sys_relay_log_purge, SHOW_SYS},
|
||||
#endif
|
||||
@ -1107,7 +1107,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), system_charset_info), *res;
|
||||
|
||||
if (var->value->result_type() == STRING_RESULT)
|
||||
@ -1117,7 +1118,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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user