summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-10-30 11:15:30 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-10-30 11:15:30 +0200
commit898521e2dd8a4a6706cba01b6ef0a7cea4114fd0 (patch)
tree4ef9a6ddc4298574bb75db673c2412f83c107c5b /sql/sql_parse.cc
parent571bcf9aaaf59b84e24bbfb809738dea25495d78 (diff)
parent199863d72b7cccaa4c75641c50c45a83b568ab8c (diff)
downloadmariadb-git-898521e2dd8a4a6706cba01b6ef0a7cea4114fd0.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 3eb28d960b3..3d43305431b 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -3835,6 +3835,7 @@ mysql_execute_command(THD *thd)
lex->sql_command != SQLCOM_BEGIN &&
lex->sql_command != SQLCOM_CALL &&
lex->sql_command != SQLCOM_EXECUTE &&
+ lex->sql_command != SQLCOM_EXECUTE_IMMEDIATE &&
!(sql_command_flags[lex->sql_command] & CF_AUTO_COMMIT_TRANS))
{
wsrep_start_trx_if_not_started(thd);
@@ -4407,6 +4408,11 @@ mysql_execute_command(THD *thd)
/* mysql_update return 2 if we need to switch to multi-update */
if (up_result != 2)
break;
+ if (thd->lex->period_conditions.is_set())
+ {
+ DBUG_ASSERT(0); // Should never happen
+ goto error;
+ }
}
/* fall through */
case SQLCOM_UPDATE_MULTI:
@@ -7926,7 +7932,6 @@ void mysql_parse(THD *thd, char *rawbuf, uint length,
bool is_com_multi,
bool is_next_command)
{
- int error __attribute__((unused));
DBUG_ENTER("mysql_parse");
DBUG_EXECUTE_IF("parser_debug", turn_parser_debug_on_MYSQLparse(););
DBUG_EXECUTE_IF("parser_debug", turn_parser_debug_on_ORAparse(););
@@ -8007,6 +8012,7 @@ void mysql_parse(THD *thd, char *rawbuf, uint length,
(char *) thd->security_ctx->host_or_ip,
0);
+ int error __attribute__((unused));
error= mysql_execute_command(thd);
MYSQL_QUERY_EXEC_DONE(error);
}
@@ -9105,8 +9111,6 @@ void add_join_natural(TABLE_LIST *a, TABLE_LIST *b, List<String> *using_fields,
SELECT_LEX *lex)
{
b->natural_join= a;
- a->part_of_natural_join= TRUE;
- b->part_of_natural_join= TRUE;
lex->prev_join_using= using_fields;
}