summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mysql.com>2009-01-16 17:18:17 +0100
committerSergei Golubchik <serg@mysql.com>2009-01-16 17:18:17 +0100
commit60f3a340ab42fcf5a2d5d1ca7696dd90c92c1ddc (patch)
treef6cdb9a39d38232170945aad249e6bd4ee371211 /sql
parent9c96fde1206f254d0dd25dbe2cc1706c44e4bdea (diff)
parent364f8611b0035e404b4acc137361176dea7a45bd (diff)
downloadmariadb-git-60f3a340ab42fcf5a2d5d1ca7696dd90c92c1ddc.tar.gz
merged
trnman_get_state/trnman_set_state renamed to trnman_get/set_flags TRN::state - to TRN::flags accordingly
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_insert.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 175358140e1..b10a7789079 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -3493,6 +3493,12 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
MYSQL_LOCK_IGNORE_FLUSH, &not_used)) ||
hooks->postlock(&table, 1))
{
+ /* purecov: begin tested */
+ /*
+ This can happen in innodb when you get a deadlock when using same table
+ in insert and select
+ */
+ my_error(ER_CANT_LOCK, MYF(0), my_errno);
if (*lock)
{
mysql_unlock_tables(thd, *lock);
@@ -3502,6 +3508,7 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
if (!create_info->table_existed)
drop_open_table(thd, table, create_table->db, create_table->table_name);
DBUG_RETURN(0);
+ /* purecov: end */
}
DBUG_RETURN(table);
}