summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-03-18 12:34:48 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2021-03-18 12:34:48 +0200
commit19052b6debc1aeb4ef6ccbc36cdc92c10cf968b6 (patch)
tree9eec011f81a7c4868283ed02b823771798fe45d4 /sql/sql_parse.cc
parenteb7c5530eccb7d6782077e5562f5a471d2ccbc01 (diff)
parentc557e9540ab6058713a7c78dfa3df366ea92dd92 (diff)
downloadmariadb-git-19052b6debc1aeb4ef6ccbc36cdc92c10cf968b6.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc24
1 files changed, 15 insertions, 9 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index c0748a93d6e..1208ed536e1 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -3623,6 +3623,11 @@ mysql_execute_command(THD *thd)
#ifdef HAVE_REPLICATION
} /* endif unlikely slave */
#endif
+ /* store old value of binlog format */
+ enum_binlog_format orig_binlog_format,orig_current_stmt_binlog_format;
+
+ thd->get_binlog_format(&orig_binlog_format,
+ &orig_current_stmt_binlog_format);
#ifdef WITH_WSREP
if (wsrep && WSREP(thd))
{
@@ -3674,12 +3679,6 @@ mysql_execute_command(THD *thd)
DBUG_ASSERT(thd->transaction.stmt.modified_non_trans_table == FALSE);
- /* store old value of binlog format */
- enum_binlog_format orig_binlog_format,orig_current_stmt_binlog_format;
-
- thd->get_binlog_format(&orig_binlog_format,
- &orig_current_stmt_binlog_format);
-
/*
Assign system variables with values specified by the clause
SET STATEMENT var1=value1 [, var2=value2, ...] FOR <statement>
@@ -7441,9 +7440,14 @@ void THD::reset_for_next_command(bool do_clear_error)
save_prep_leaf_list= false;
- DBUG_PRINT("debug",
- ("is_current_stmt_binlog_format_row(): %d",
- is_current_stmt_binlog_format_row()));
+#ifdef WITH_WSREP
+#if !defined(DBUG_OFF)
+ if (mysql_bin_log.is_open())
+#endif
+#endif
+ DBUG_PRINT("debug",
+ ("is_current_stmt_binlog_format_row(): %d",
+ is_current_stmt_binlog_format_row()));
DBUG_VOID_RETURN;
}
@@ -8863,6 +8867,8 @@ push_new_name_resolution_context(THD *thd,
left_op->first_leaf_for_name_resolution();
on_context->last_name_resolution_table=
right_op->last_leaf_for_name_resolution();
+ on_context->select_lex = thd->lex->current_select;
+ on_context->outer_context = thd->lex->current_context()->outer_context;
return thd->lex->push_context(on_context, thd->mem_root);
}