summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorRohit Kalhans <rohit.kalhans@oracle.com>2012-04-03 00:35:43 +0530
committerRohit Kalhans <rohit.kalhans@oracle.com>2012-04-03 00:35:43 +0530
commitd1573ac1e0f9a0679f8cd4f9277e757da9819db0 (patch)
tree04c2dcc71b16f519130f9b74b44872f687dc152a /sql/sql_base.cc
parent1a02c266d1220011f0d6d72b7d24515424c86f00 (diff)
downloadmariadb-git-d1573ac1e0f9a0679f8cd4f9277e757da9819db0.tar.gz
BUG#11765650 Follow-up patch for Valgrind failures on PB2.
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 6784bacdea6..a411e433faf 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -5711,6 +5711,8 @@ bool lock_tables(THD *thd, TABLE_LIST *tables, uint count,
if (!query_table->placeholder() &&
query_table->lock_type >= TL_WRITE_ALLOW_WRITE &&
unique_keys > 1 && thd->lex->sql_command == SQLCOM_INSERT &&
+ /* Duplicate key update is not supported by INSERT DELAYED */
+ thd->command != COM_DELAYED_INSERT &&
thd->lex->duplicates == DUP_UPDATE)
thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_INSERT_TWO_KEYS);
}