From 6b6b8f0582b99d11d4519b63a1cb8c7642e2abef Mon Sep 17 00:00:00 2001 From: Rohit Kalhans Date: Tue, 3 Apr 2012 00:35:43 +0530 Subject: [PATCH] BUG#11765650 Follow-up patch for Valgrind failures on PB2. --- sql/sql_base.cc | 2 ++ 1 file changed, 2 insertions(+) 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); }