diff options
| author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-03-15 14:49:24 +0200 |
|---|---|---|
| committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-03-15 14:49:24 +0200 |
| commit | 4ef44cc2f96bbb669216fc436eaa26e3a8a83799 (patch) | |
| tree | f679b54b0ca385a816bbef12385cd7885e71f3cc /sql/sql_update.cc | |
| parent | dafc5fb9c17637c6233e8a73c890f158d645a37c (diff) | |
| parent | 73fee39ea62037780c59161507e89dd76c10b7a3 (diff) | |
| download | mariadb-git-4ef44cc2f96bbb669216fc436eaa26e3a8a83799.tar.gz | |
Merge 10.5 into 10.6
Diffstat (limited to 'sql/sql_update.cc')
| -rw-r--r-- | sql/sql_update.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index f5aec151686..40eedbee63e 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2016, Oracle and/or its affiliates. - Copyright (c) 2011, 2021, MariaDB + Copyright (c) 2011, 2022, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -370,7 +370,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; @@ -597,7 +598,7 @@ int mysql_update(THD *thd, } /* If running in safe sql mode, don't allow updates without keys */ - if (table->opt_range_keys.is_clear_all()) + if (!select || !select->quick) { thd->set_status_no_index_used(); if (safe_update && !using_limit) |
