summaryrefslogtreecommitdiff
path: root/sql/log_event.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r--sql/log_event.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 6ad9fcebc78..60d63a416e3 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -3591,7 +3591,7 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
{
CHECK_SPACE(pos, end, 8);
sql_mode_inited= 1;
- sql_mode= (ulong) uint8korr(pos); // QQ: Fix when sql_mode is ulonglong
+ sql_mode= (sql_mode_t) uint8korr(pos);
DBUG_PRINT("info",("In Query_log_event, read sql_mode: %llu", sql_mode));
pos+= 8;
break;
@@ -4073,8 +4073,9 @@ void Query_log_event::print_query_header(IO_CACHE* file,
(unlikely(print_event_info->sql_mode != sql_mode ||
!print_event_info->sql_mode_inited)))
{
- my_b_printf(file,"SET @@session.sql_mode=%lu%s\n",
- (ulong)sql_mode, print_event_info->delimiter);
+ char llbuff[22];
+ my_b_printf(file,"SET @@session.sql_mode=%s%s\n",
+ ullstr(sql_mode, llbuff), print_event_info->delimiter);
print_event_info->sql_mode= sql_mode;
print_event_info->sql_mode_inited= 1;
}
@@ -4304,8 +4305,8 @@ int Query_log_event::do_apply_event(rpl_group_info *rgi,
*/
if (sql_mode_inited)
thd->variables.sql_mode=
- (ulong) ((thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE) |
- (sql_mode & ~(ulong) MODE_NO_DIR_IN_CREATE));
+ (sql_mode_t) ((thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE) |
+ (sql_mode & ~(ulong) MODE_NO_DIR_IN_CREATE));
if (charset_inited)
{
rpl_sql_thread_info *sql_info= thd->system_thread_info.rpl_sql_info;
@@ -10042,7 +10043,7 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
extra columns on the slave. In that case, do not force
MODE_NO_AUTO_VALUE_ON_ZERO.
*/
- ulonglong saved_sql_mode= thd->variables.sql_mode;
+ sql_mode_t saved_sql_mode= thd->variables.sql_mode;
if (!is_auto_inc_in_extra_columns())
thd->variables.sql_mode= MODE_NO_AUTO_VALUE_ON_ZERO;