summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-11-20 02:57:02 +0200
committerunknown <monty@donna.mysql.com>2000-11-20 02:57:02 +0200
commit89ee326c1d27f3bee4acba67060a475811ebd842 (patch)
treed3f52866508b583c2d4549b66887b4b50aa9fe22 /sql/sql_update.cc
parent5dae19b394e3385c0e48d896fec1174437f2308a (diff)
downloadmariadb-git-89ee326c1d27f3bee4acba67060a475811ebd842.tar.gz
Bug fix for NATURAL JOIN, Split manual sections and more statistic variables
Docs/manual.texi: Split BDB into different sections Added MySQL developers section Changed an SQL to a SQL include/my_sys.h: More statistic variables libmysql/libmysql.c: Added option "interactive-timeout" mysys/mf_tempfile.c: More statistic variables mysys/my_static.c: More statistic variables sql-bench/crash-me.sh: Fixed bug in truncate table test sql-bench/limits/mysql-3.23.cfg: Updated to crash-me 1.51 sql-bench/limits/mysql.cfg: Updated to crash-me 1.51 sql/filesort.cc: More statistics sql/mysql_priv.h: More statistics sql/mysqld.cc: More statistics sql/sql_base.cc: Fix for NATURAL JOIN sql/sql_delete.cc: cleanup + Added logging if one doesn't use index sql/sql_parse.cc: Logging if one doesn't use index sql/sql_select.cc: Logging if one doesn't use index sql/sql_update.cc: cleanup + Added logging if one doesn't use index sql/structs.h: Fix for NATURAL JOIN support-files/my-huge.cnf.sh: Added interactive-timeout to [mysqlhotcopy] support-files/my-large.cnf.sh: Added interactive-timeout to [mysqlhotcopy] support-files/my-medium.cnf.sh: Added interactive-timeout to [mysqlhotcopy] support-files/my-small.cnf.sh: Added interactive-timeout to [mysqlhotcopy]
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 29e9c8b8aac..41a1a9be7c2 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -100,15 +100,17 @@ int mysql_update(THD *thd,TABLE_LIST *table_list,List<Item> &fields,
DBUG_RETURN(0);
}
/* If running in safe sql mode, don't allow updates without keys */
- if ((thd->options & OPTION_SAFE_UPDATES) && !table->quick_keys &&
- limit == HA_POS_ERROR)
+ if (!table->quick_keys)
{
- delete select;
- table->time_stamp=save_time_stamp;
- send_error(&thd->net,ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE);
- DBUG_RETURN(1);
+ thd->options|=OPTION_NO_INDEX_USED;
+ if ((thd->options & OPTION_SAFE_UPDATES) && limit == HA_POS_ERROR)
+ {
+ delete select;
+ table->time_stamp=save_time_stamp;
+ send_error(&thd->net,ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE);
+ DBUG_RETURN(1);
+ }
}
-
/* Check if we are modifying a key that we are used to search with */
if (select && select->quick)
used_key_is_modified= (!select->quick->unique_key_range() &&