summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-02-22 15:47:00 +0200
committerunknown <monty@mysql.com>2005-02-22 15:47:00 +0200
commitce99d4430f71a0e83298e67f2e33b660630c715d (patch)
tree775f6aaae95a3574b8d285d2433c3797b653e482 /sql/sql_update.cc
parent6965e72bd07874efee8ff6f94ab664533fc422e0 (diff)
parent2ae6eb094bb02a3e41ab611c9e9f27982a2ef9c3 (diff)
downloadmariadb-git-ce99d4430f71a0e83298e67f2e33b660630c715d.tar.gz
Merge with 4.1
BitKeeper/etc/logging_ok: auto-union client/mysql.cc: Auto merged extra/my_print_defaults.c: Auto merged include/m_string.h: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/r/ctype_utf8.result: Auto merged mysql-test/r/user_var.result: Auto merged mysql-test/t/user_var.test: Auto merged scripts/make_binary_distribution.sh: Auto merged sql/item_func.cc: Auto merged sql/sql_yacc.yy: Auto merged strings/ctype-simple.c: Auto merged strings/ctype-ucs2.c: Auto merged strings/ctype-utf8.c: Auto merged libmysql/libmysql.c: ul mysql-test/r/ps_1general.result: Merge mysql-test/t/derived.test: Merge mysql-test/t/ps_1general.test: Merge mysql-test/t/type_float.test: Merge sql/field.cc: ul sql/item.cc: ul sql/item.h: ul sql/item_func.h: ul sql/item_strfunc.cc: ul sql/item_sum.cc: ul sql/item_sum.h: ul sql/procedure.h: ul sql/sql_derived.cc: Trivial merge sql/sql_parse.cc: ul sql/sql_update.cc: Trivial merge strings/strtod.c: Use updated code from 4.1 This is bascily same code as we had before or 5.0, execpt that we now have higher accuracy for floating points value that are integers (like 123.45E+02)
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index b7a088ff37c..80ad13195c8 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -707,7 +707,12 @@ bool mysql_multi_update_prepare(THD *thd)
else
{
DBUG_PRINT("info",("setting table `%s` for read-only", tl->alias));
- tl->lock_type= TL_READ;
+ /*
+ If we are using the binary log, we need TL_READ_NO_INSERT to get
+ correct order of statements. Otherwise, we use a TL_READ lock to
+ improve performance.
+ */
+ tl->lock_type= using_update_log ? TL_READ_NO_INSERT : TL_READ;
tl->updating= 0;
}