summaryrefslogtreecommitdiff
path: root/sql/lock.cc
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2013-07-08 12:57:58 +0400
committerSergey Petrunya <psergey@askmonty.org>2013-07-08 12:57:58 +0400
commit50dda403b7c04e0c769895f3f69413f0c8087792 (patch)
tree9be6c185574332b5393f5d4b604b5735d72789f6 /sql/lock.cc
parent9f14736a407c402dc76235f688a7777a56a38919 (diff)
downloadmariadb-git-50dda403b7c04e0c769895f3f69413f0c8087792.tar.gz
Fix test errors like:
-Note 1031 Table storage engine for 't1' doesn't have this option +Note 1031 Table storage engine for 'InnoDB' doesn't have this option They were caused by a change in MariaDB which changed ER_ILLEGAL_HA message text to be like: "Storage engine InnoDB of the table `test`.`t1` doesn't have this option" Some the error calls were changed to pass new parameters, but some were left to be old. Also the error text in errmsg-ut8.txt was not changed.
Diffstat (limited to 'sql/lock.cc')
-rw-r--r--sql/lock.cc18
1 files changed, 8 insertions, 10 deletions
diff --git a/sql/lock.cc b/sql/lock.cc
index a0ab3aaa76e..de56ff09abc 100644
--- a/sql/lock.cc
+++ b/sql/lock.cc
@@ -93,7 +93,7 @@ extern HASH open_cache;
static int lock_external(THD *thd, TABLE **table,uint count);
static int unlock_external(THD *thd, TABLE **table,uint count);
-static void print_lock_error(int error, const char *);
+static void print_lock_error(int error, TABLE *table);
/* Map the return value of thr_lock to an error from errmsg.txt */
static int thr_lock_errno_to_mysql[]=
@@ -356,7 +356,7 @@ static int lock_external(THD *thd, TABLE **tables, uint count)
if ((error=(*tables)->file->ha_external_lock(thd,lock_type)))
{
- print_lock_error(error, (*tables)->file->table_type());
+ print_lock_error(error, *tables);
while (--i)
{
tables--;
@@ -671,7 +671,7 @@ static int unlock_external(THD *thd, TABLE **table,uint count)
if ((error=(*table)->file->ha_external_lock(thd, F_UNLCK)))
{
error_code=error;
- print_lock_error(error_code, (*table)->file->table_type());
+ print_lock_error(error_code, *table);
}
}
table++;
@@ -893,8 +893,7 @@ bool lock_object_name(THD *thd, MDL_key::enum_mdl_namespace mdl_type,
return FALSE;
}
-
-static void print_lock_error(int error, const char *table)
+static void print_lock_error(int error, TABLE *table)
{
int textno;
DBUG_ENTER("print_lock_error");
@@ -910,17 +909,16 @@ static void print_lock_error(int error, const char *table)
textno=ER_LOCK_DEADLOCK;
break;
case HA_ERR_WRONG_COMMAND:
- textno=ER_ILLEGAL_HA;
+ my_error(ER_ILLEGAL_HA, MYF(0), table->file->table_type(),
+ table->s->db.str, table->s->table_name.str);
+ DBUG_VOID_RETURN;
break;
default:
textno=ER_CANT_LOCK;
break;
}
- if ( textno == ER_ILLEGAL_HA )
- my_error(textno, MYF(ME_BELL+ME_OLDWIN+ME_WAITTANG), table);
- else
- my_error(textno, MYF(ME_BELL+ME_OLDWIN+ME_WAITTANG), error);
+ my_error(textno, MYF(0), error);
DBUG_VOID_RETURN;
}