mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
After merge fixes
Review of new pushed code client/mysqlbinlog.cc: After merge fixes sql/set_var.cc: After merge fixes sql/sql_select.cc: Removed not needed test (field->maybe_null() also tests field->table->maybe_null)
This commit is contained in:
parent
4dbc076e1e
commit
a560a9f3b3
3 changed files with 12 additions and 16 deletions
|
|
@ -1422,12 +1422,6 @@ bool sys_var_thd_ulong::update(THD *thd, set_var *var)
|
|||
{
|
||||
ulonglong tmp= var->save_result.ulonglong_value;
|
||||
|
||||
#if SIZEOF_LONG != SIZEOF_LONGLONG
|
||||
/* Avoid overflow on 32-bit platforms. */
|
||||
if (tmp > ULONG_MAX)
|
||||
tmp= ULONG_MAX;
|
||||
#endif
|
||||
|
||||
/* Don't use bigger value than given with --maximum-variable-name=.. */
|
||||
if ((ulong) tmp > max_system_variables.*offset)
|
||||
tmp= max_system_variables.*offset;
|
||||
|
|
@ -3225,6 +3219,7 @@ byte *sys_var_thd_sql_mode::symbolic_mode_representation(THD *thd, ulong val,
|
|||
{
|
||||
char buff[256];
|
||||
String tmp(buff, sizeof(buff), &my_charset_latin1);
|
||||
ulong length;
|
||||
|
||||
tmp.length(0);
|
||||
for (uint i= 0; val; val>>= 1, i++)
|
||||
|
|
@ -3236,12 +3231,14 @@ byte *sys_var_thd_sql_mode::symbolic_mode_representation(THD *thd, ulong val,
|
|||
tmp.append(',');
|
||||
}
|
||||
}
|
||||
if (tmp.length())
|
||||
tmp.length(tmp.length() - 1);
|
||||
*len= tmp.length();
|
||||
return (byte*) thd->strmake(tmp.ptr(), tmp.length());
|
||||
|
||||
if ((length= tmp.length()))
|
||||
length--;
|
||||
*len= length;
|
||||
return (byte*) thd->strmake(tmp.ptr(), length);
|
||||
}
|
||||
|
||||
|
||||
byte *sys_var_thd_sql_mode::value_ptr(THD *thd, enum_var_type type,
|
||||
LEX_STRING *base)
|
||||
{
|
||||
|
|
@ -3260,6 +3257,7 @@ void sys_var_thd_sql_mode::set_default(THD *thd, enum_var_type type)
|
|||
thd->variables.*offset= global_system_variables.*offset;
|
||||
}
|
||||
|
||||
|
||||
void fix_sql_mode_var(THD *thd, enum_var_type type)
|
||||
{
|
||||
if (type == OPT_GLOBAL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue