summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index d928dfbc3ae..334b6b2d667 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -4357,8 +4357,11 @@ TABLE *select_create::create_table_from_items(THD *thd,
/*
This can happen in innodb when you get a deadlock when using same table
in insert and select or when you run out of memory.
+ It can also happen if there was a conflict in
+ THD::decide_logging_format()
*/
- my_error(ER_CANT_LOCK, MYF(0), my_errno);
+ if (!thd->is_error())
+ my_error(ER_CANT_LOCK, MYF(0), my_errno);
if (*lock)
{
mysql_unlock_tables(thd, *lock);