Use sql_mode_t for sql_mode.

This fixed several cases where we where using just ulong for sql_mode
This commit is contained in:
Monty 2016-10-02 16:39:40 +03:00
commit 7b96416f3c
33 changed files with 88 additions and 59 deletions

View file

@ -1196,7 +1196,7 @@ static bool acl_load(THD *thd, TABLE_LIST *tables)
bool check_no_resolve= specialflag & SPECIAL_NO_RESOLVE;
char tmp_name[SAFE_NAME_LEN+1];
int password_length;
ulonglong old_sql_mode= thd->variables.sql_mode;
sql_mode_t old_sql_mode= thd->variables.sql_mode;
DBUG_ENTER("acl_load");
thd->variables.sql_mode&= ~MODE_PAD_CHAR_TO_FULL_LENGTH;
@ -6600,7 +6600,7 @@ static bool grant_load(THD *thd, TABLE_LIST *tables)
TABLE *t_table, *c_table, *p_table;
bool check_no_resolve= specialflag & SPECIAL_NO_RESOLVE;
MEM_ROOT *save_mem_root= thd->mem_root;
ulonglong old_sql_mode= thd->variables.sql_mode;
sql_mode_t old_sql_mode= thd->variables.sql_mode;
DBUG_ENTER("grant_load");
thd->variables.sql_mode&= ~MODE_PAD_CHAR_TO_FULL_LENGTH;
@ -9643,7 +9643,7 @@ bool mysql_drop_user(THD *thd, List <LEX_USER> &list, bool handle_as_role)
List_iterator <LEX_USER> user_list(list);
TABLE_LIST tables[TABLES_MAX];
bool binlog= false;
ulonglong old_sql_mode= thd->variables.sql_mode;
sql_mode_t old_sql_mode= thd->variables.sql_mode;
DBUG_ENTER("mysql_drop_user");
DBUG_PRINT("entry", ("Handle as %s", handle_as_role ? "role" : "user"));