diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-03-15 08:10:35 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-03-15 08:10:35 +0200 |
commit | 9c6135e81f29b3e3286d6b864c0fdafc2fea16ce (patch) | |
tree | 1974799a0afb2b2de7ddccc2e082a003544170bc /sql/sql_update.cc | |
parent | 1c43660aea349a92c13e04994941ded1b91714ff (diff) | |
parent | f217c761892683403b65da75b2f2abb8ebd295b2 (diff) | |
download | mariadb-git-9c6135e81f29b3e3286d6b864c0fdafc2fea16ce.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index e00fa401112..59adeea5fbf 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -371,7 +371,8 @@ int mysql_update(THD *thd, ha_rows *found_return, ha_rows *updated_return) { bool using_limit= limit != HA_POS_ERROR; - bool safe_update= thd->variables.option_bits & OPTION_SAFE_UPDATES; + bool safe_update= (thd->variables.option_bits & OPTION_SAFE_UPDATES) + && !thd->lex->describe; bool used_key_is_modified= FALSE, transactional_table; bool will_batch= FALSE; bool can_compare_record; @@ -599,7 +600,7 @@ int mysql_update(THD *thd, } /* If running in safe sql mode, don't allow updates without keys */ - if (table->quick_keys.is_clear_all()) + if (!select || !select->quick) { thd->set_status_no_index_used(); if (safe_update && !using_limit) |