mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 10.4 into 10.5
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user