summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2020-10-29 12:14:19 +0300
committerAleksey Midenkov <midenok@gmail.com>2020-10-29 13:47:50 +0300
commit27b762e23d8305bbc65dc61d283fe192e2dbd00a (patch)
tree6f154756c7f83ee0f3cc1f13385a6c93afe24e00 /sql
parente451145aa981f3442977975687087183a05cda88 (diff)
downloadmariadb-git-27b762e23d8305bbc65dc61d283fe192e2dbd00a.tar.gz
MDEV-22805 SIGSEGV in check_fields on UPDATE
Additional case for PS protocol: UPDATE is converted to multi-update in mysql_multi_update_prepare().
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_update.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index c687b6ca2f5..9514b193407 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -190,6 +190,13 @@ static bool check_fields(THD *thd, TABLE_LIST *table, List<Item> &items,
my_error(ER_IT_IS_A_VIEW, MYF(0), table->table_name.str);
return TRUE;
}
+ if (thd->lex->sql_command == SQLCOM_UPDATE_MULTI)
+ {
+ my_error(ER_NOT_SUPPORTED_YET, MYF(0),
+ "updating and querying the same temporal periods table");
+
+ return true;
+ }
DBUG_ASSERT(thd->lex->sql_command == SQLCOM_UPDATE);
for (List_iterator_fast<Item> it(items); (item=it++);)
{