mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
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.
This commit is contained in:
parent
9f14736a40
commit
50dda403b7
7 changed files with 28 additions and 41 deletions
|
@ -2,5 +2,5 @@ drop table if exists t1,t2;
|
|||
CREATE TABLE t1 (a INT, INDEX(a)) engine=innodb;
|
||||
ALTER TABLE t1 RENAME TO t2, DISABLE KEYS;
|
||||
Warnings:
|
||||
Note 1031 Table storage engine for 't1' doesn't have this option
|
||||
Note 1031 Storage engine InnoDB of the table `test`.`t1` doesn't have this option
|
||||
DROP TABLE t2;
|
||||
|
|
|
@ -1508,7 +1508,7 @@ id name
|
|||
1 Monty
|
||||
2 David
|
||||
ALTER TABLE federated.alter_me MODIFY COLUMN id int(16) NOT NULL;
|
||||
ERROR HY000: Table storage engine for 'alter_me' doesn't have this option
|
||||
ERROR HY000: Storage engine FEDERATED of the table `federated`.`alter_me` doesn't have this option
|
||||
SELECT * FROM federated.alter_me;
|
||||
id name
|
||||
1 Monty
|
||||
|
|
|
@ -1097,8 +1097,10 @@ int ha_prepare(THD *thd)
|
|||
else
|
||||
{
|
||||
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
|
||||
ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA),
|
||||
ER_GET_ERRNO, ER(ER_GET_ERRNO),
|
||||
HA_ERR_WRONG_COMMAND,
|
||||
ha_resolve_storage_engine_name(ht));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3313,7 +3315,9 @@ void handler::print_error(int error, myf errflag)
|
|||
textno=ER_OUT_OF_RESOURCES;
|
||||
break;
|
||||
case HA_ERR_WRONG_COMMAND:
|
||||
textno=ER_ILLEGAL_HA;
|
||||
my_error(ER_ILLEGAL_HA, MYF(0), table_type(), table_share->db.str,
|
||||
table_share->table_name.str);
|
||||
DBUG_VOID_RETURN;
|
||||
break;
|
||||
case HA_ERR_OLD_FILE:
|
||||
textno=ER_OLD_KEYFILE;
|
||||
|
|
18
sql/lock.cc
18
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;
|
||||
}
|
||||
|
|
|
@ -699,29 +699,10 @@ ER_GET_ERRNO
|
|||
swe "Fick felkod %M från databashanteraren"
|
||||
ukr "Отримано помилку %M від дескриптора таблиці"
|
||||
ER_ILLEGAL_HA
|
||||
cze "Obsluha tabulky '%-.192s' nemá tento parametr"
|
||||
dan "Denne mulighed eksisterer ikke for tabeltypen '%-.192s'"
|
||||
nla "Tabel handler voor '%-.192s' heeft deze optie niet"
|
||||
eng "Table storage engine for '%-.192s' doesn't have this option"
|
||||
est "Tabeli '%-.192s' handler ei toeta antud operatsiooni"
|
||||
fre "Le handler de la table '%-.192s' n'a pas cette option"
|
||||
ger "Diese Option gibt es nicht (Speicher-Engine für '%-.192s')"
|
||||
greek "Ο χειριστής πίνακα (table handler) για '%-.192s' δεν διαθέτει αυτή την επιλογή"
|
||||
hun "A(z) '%-.192s' tablakezelonek nincs ilyen opcioja"
|
||||
ita "Il gestore delle tabelle per '%-.192s' non ha questa opzione"
|
||||
jpn "表 '%-.192s' のストレージエンジンでは提供されないオプションです。"
|
||||
kor "'%-.192s'의 테이블 handler는 이러한 옵션을 제공하지 않읍니다."
|
||||
nor "Tabell håndtereren for '%-.192s' har ikke denne muligheten"
|
||||
norwegian-ny "Tabell håndteraren for '%-.192s' har ikkje denne moglegheita"
|
||||
pol "Obsługa tabeli '%-.192s' nie posiada tej opcji"
|
||||
por "Manipulador de tabela para '%-.192s' não tem esta opção"
|
||||
rum "Handlerul tabelei pentru '%-.192s' nu are aceasta optiune"
|
||||
rus "Обработчик таблицы '%-.192s' не поддерживает эту возможность"
|
||||
serbian "Handler tabela za '%-.192s' nema ovu opciju"
|
||||
slo "Obsluha tabuľky '%-.192s' nemá tento parameter"
|
||||
spa "El manejador de la tabla de '%-.192s' no tiene esta opcion"
|
||||
swe "Tabellhanteraren for tabell '%-.192s' stödjer ej detta"
|
||||
ukr "Дескриптор таблиці '%-.192s' не має цієї властивості"
|
||||
eng "Storage engine %s of the table %`s.%`s doesn't have this option"
|
||||
ger "Diese Option gibt es nicht in Speicher-Engine %s für %`s.%`s"
|
||||
rus "Обработчик %s таблицы %`s.%`s не поддерживает эту возможность"
|
||||
ukr "Дескриптор %s таблиці %`s.%`s не має цієї властивості"
|
||||
ER_KEY_NOT_FOUND
|
||||
cze "Nemohu najít záznam v '%-.192s'"
|
||||
dan "Kan ikke finde posten i '%-.192s'"
|
||||
|
|
|
@ -305,7 +305,8 @@ bool mysql_ha_open(THD *thd, TABLE_LIST *tables, SQL_HANDLER *reopen)
|
|||
/* There can be only one table in '*tables'. */
|
||||
if (! (table->file->ha_table_flags() & HA_CAN_SQL_HANDLER))
|
||||
{
|
||||
my_error(ER_ILLEGAL_HA, MYF(0), tables->alias);
|
||||
my_error(ER_ILLEGAL_HA, MYF(0), table->file->table_type(),
|
||||
table->s->db.str, table->s->table_name.str);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
@ -903,7 +904,8 @@ retry:
|
|||
break;
|
||||
}
|
||||
default:
|
||||
my_message(ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA), MYF(0));
|
||||
my_error(ER_ILLEGAL_HA, MYF(0), table->file->table_type(),
|
||||
table->s->db.str, table->s->table_name.str);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
|
|
@ -1156,7 +1156,7 @@ static int execute_ddl_log_action(THD *thd, DDL_LOG_ENTRY *ddl_log_entry)
|
|||
plugin_ref plugin= ha_resolve_by_name(thd, &handler_name);
|
||||
if (!plugin)
|
||||
{
|
||||
my_error(ER_ILLEGAL_HA, MYF(0), ddl_log_entry->handler_name);
|
||||
my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), ddl_log_entry->handler_name);
|
||||
goto error;
|
||||
}
|
||||
hton= plugin_data(plugin, handlerton*);
|
||||
|
@ -5965,7 +5965,9 @@ bool alter_table_manage_keys(TABLE *table, int indexes_were_disabled,
|
|||
{
|
||||
push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_NOTE,
|
||||
ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA),
|
||||
table->s->table_name.str);
|
||||
table->file->table_type(),
|
||||
table->s->db.str, table->s->table_name.str);
|
||||
|
||||
error= 0;
|
||||
} else if (error)
|
||||
table->file->print_error(error, MYF(0));
|
||||
|
|
Loading…
Reference in a new issue