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
commit6b6b8f0582b99d11d4519b63a1cb8c7642e2abef (patch)
tree04c2dcc71b16f519130f9b74b44872f687dc152a /sql/sql_base.cc
parentfe9352454f5596a77a363417b5a163bb0c6f55d0 (diff)
downloadmariadb-git-6b6b8f0582b99d11d4519b63a1cb8c7642e2abef.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);
}