From 93b95819daba16ce6ac2d915f34bae3c51be939b Mon Sep 17 00:00:00 2001
From: unknown <serg@serg.mysql.com>
Date: Fri, 8 Nov 2002 22:22:23 +0100
Subject: [PATCH] corrected error message for OPTIMIZE/ANALYZE/etc, also for
 InnoDB that supports CHECK table but not REPAIR

---
 sql/share/czech/errmsg.txt        | 2 +-
 sql/share/danish/errmsg.txt       | 2 +-
 sql/share/dutch/errmsg.txt        | 2 +-
 sql/share/english/errmsg.txt      | 2 +-
 sql/share/estonian/errmsg.txt     | 2 +-
 sql/share/french/errmsg.txt       | 2 +-
 sql/share/german/errmsg.txt       | 2 +-
 sql/share/greek/errmsg.txt        | 2 +-
 sql/share/hungarian/errmsg.txt    | 2 +-
 sql/share/italian/errmsg.txt      | 2 +-
 sql/share/japanese/errmsg.txt     | 2 +-
 sql/share/korean/errmsg.txt       | 2 +-
 sql/share/norwegian-ny/errmsg.txt | 2 +-
 sql/share/norwegian/errmsg.txt    | 2 +-
 sql/share/polish/errmsg.txt       | 2 +-
 sql/share/portuguese/errmsg.txt   | 2 +-
 sql/share/romanian/errmsg.txt     | 2 +-
 sql/share/russian/errmsg.txt      | 2 +-
 sql/share/slovak/errmsg.txt       | 2 +-
 sql/share/spanish/errmsg.txt      | 2 +-
 sql/share/swedish/errmsg.txt      | 2 +-
 sql/share/ukrainian/errmsg.txt    | 2 +-
 sql/sql_table.cc                  | 9 +++++++--
 23 files changed, 29 insertions(+), 24 deletions(-)

diff --git a/sql/share/czech/errmsg.txt b/sql/share/czech/errmsg.txt
index 18b32447dc..b69484cb38 100644
--- a/sql/share/czech/errmsg.txt
+++ b/sql/share/czech/errmsg.txt
@@ -188,7 +188,7 @@
 "Update tabulky bez WHERE s kl-Bíèem není v módu bezpeèných update dovoleno",
 "Kl-Bíè '%-.64s' v tabulce '%-.64s' neexistuje",
 "Nemohu otev-Bøít tabulku",
-"Handler tabulky nepodporuje check/repair",
+"Handler tabulky nepodporuje %s",
 "Proveden-Bí tohoto pøíkazu není v transakci dovoleno",
 "Chyba %d p-Bøi COMMIT",
 "Chyba %d p-Bøi ROLLBACK",
diff --git a/sql/share/danish/errmsg.txt b/sql/share/danish/errmsg.txt
index d652875319..ccbc53a0d2 100644
--- a/sql/share/danish/errmsg.txt
+++ b/sql/share/danish/errmsg.txt
@@ -182,7 +182,7 @@
 "Du bruger sikker opdaterings modus ('safe update mode') og du forsøgte at opdatere en tabel uden en WHERE klausul, der gør brug af et KEY felt",
 "Nøglen '%-.64s' eksisterer ikke i tabellen '%-.64s'",
 "Kan ikke åbne tabellen",
-"Denne tabeltype understøtter ikke CHECK/REPAIR",
+"Denne tabeltype understøtter ikke %s",
 "Du må ikke bruge denne kommando i en transaktion",
 "Modtog fejl %d mens kommandoen COMMIT blev udført",
 "Modtog fejl %d mens kommandoen ROLLBACK blev udført",
diff --git a/sql/share/dutch/errmsg.txt b/sql/share/dutch/errmsg.txt
index 514b4ee078..7fce0c7b4f 100644
--- a/sql/share/dutch/errmsg.txt
+++ b/sql/share/dutch/errmsg.txt
@@ -190,7 +190,7 @@
 "U gebruikt 'safe update mode' en u probeerde een tabel te updaten zonder een WHERE met een KEY kolom",
 "Zoeksleutel '%-.64s' bestaat niet in tabel '%-.64s'",
 "Kan tabel niet openen",
-"De 'handler' voor de tabel ondersteund geen check/repair",
+"De 'handler' voor de tabel ondersteund geen %s",
 "Het is u niet toegestaan dit commando uit te voeren binnen een transactie",
 "Kreeg fout %d tijdens COMMIT",
 "Kreeg fout %d tijdens ROLLBACK",
diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt
index 0999dce571..105cf90ca7 100644
--- a/sql/share/english/errmsg.txt
+++ b/sql/share/english/errmsg.txt
@@ -179,7 +179,7 @@
 "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column",
 "Key '%-.64s' doesn't exist in table '%-.64s'",
 "Can't open table",
-"The handler for the table doesn't support check/repair",
+"The handler for the table doesn't support %s",
 "You are not allowed to execute this command in a transaction",
 "Got error %d during COMMIT",
 "Got error %d during ROLLBACK",
diff --git a/sql/share/estonian/errmsg.txt b/sql/share/estonian/errmsg.txt
index f160be03e8..d0a30b2f43 100644
--- a/sql/share/estonian/errmsg.txt
+++ b/sql/share/estonian/errmsg.txt
@@ -184,7 +184,7 @@
 "Katse muuta tabelit turvalises rezhiimis ilma WHERE klauslita",
 "Võti '%-.64s' ei eksisteeri tabelis '%-.64s'",
 "Ei suuda avada tabelit",
-"Antud tabelitüüp ei toeta CHECK/REPAIR käske",
+"Antud tabelitüüp ei toeta %s käske",
 "Seda käsku ei saa kasutada transaktsiooni sees",
 "Viga %d käsu COMMIT täitmisel",
 "Viga %d käsu ROLLBACK täitmisel",
diff --git a/sql/share/french/errmsg.txt b/sql/share/french/errmsg.txt
index c8d92d72b5..ab1761ca04 100644
--- a/sql/share/french/errmsg.txt
+++ b/sql/share/french/errmsg.txt
@@ -179,7 +179,7 @@
 "Vous êtes en mode 'safe update' et vous essayez de faire un UPDATE sans clause WHERE utilisant un index",
 "L'index '%-.64s' n'existe pas sur la table '%-.64s'",
 "Impossible d'ouvrir la table",
-"Ce type de table ne supporte pas les check/repair",
+"Ce type de table ne supporte pas les %s",
 "Vous n'êtes pas autorisé à exécute cette commande dans une transaction",
 "Erreur %d lors du COMMIT",
 "Erreur %d lors du ROLLBACK",
diff --git a/sql/share/german/errmsg.txt b/sql/share/german/errmsg.txt
index 6de6e911cd..a99aea3856 100644
--- a/sql/share/german/errmsg.txt
+++ b/sql/share/german/errmsg.txt
@@ -182,7 +182,7 @@
 "Unter Verwendung des Sicheren Updatemodes wurde versucht eine Tabelle zu updaten ohne eine KEY-Spalte in der WHERE-Klausel",
 "Schlüssel '%-.64s' existiert nicht in der Tabelle '%-.64s'",
 "Kann Tabelle nicht öffnen",
-"Der Tabellen-Handler für diese Tabelle unterstützt kein check/repair",
+"Der Tabellen-Handler für diese Tabelle unterstützt kein %s",
 "Keine Berechtigung dieses Kommando in einer Transaktion auszuführen",
 "Fehler %d wärend COMMIT",
 "Fehler %d wärend ROLLBACK",
diff --git a/sql/share/greek/errmsg.txt b/sql/share/greek/errmsg.txt
index 6a58bfb6ea..554176e340 100644
--- a/sql/share/greek/errmsg.txt
+++ b/sql/share/greek/errmsg.txt
@@ -179,7 +179,7 @@
 "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column",
 "Key '%-.64s' doesn't exist in table '%-.64s'",
 "Can't open table",
-"The handler for the table doesn't support check/repair",
+"The handler for the table doesn't support %s",
 "You are not allowed to execute this command in a transaction",
 "Got error %d during COMMIT",
 "Got error %d during ROLLBACK",
diff --git a/sql/share/hungarian/errmsg.txt b/sql/share/hungarian/errmsg.txt
index 8da5eb6d8d..32333ce443 100644
--- a/sql/share/hungarian/errmsg.txt
+++ b/sql/share/hungarian/errmsg.txt
@@ -181,7 +181,7 @@
 "On a biztonsagos update modot hasznalja, es        WHERE that uses a KEY column",
 "A '%-.64s' kulcs nem letezik a '%-.64s' tablaban",
 "Nem tudom megnyitni a tablat",
-"A tabla kezeloje (handler) nem tamogatja az ellenorzest/helyreallitast",
+"A tabla kezeloje (handler) nem tamogatja az %s",
 "Az On szamara nem engedelyezett a parancs vegrehajtasa a tranzakcioban",
 "%d hiba a COMMIT vegrehajtasa soran",
 "%d hiba a ROLLBACK vegrehajtasa soran",
diff --git a/sql/share/italian/errmsg.txt b/sql/share/italian/errmsg.txt
index 0aa2ce0754..4dd7b02de4 100644
--- a/sql/share/italian/errmsg.txt
+++ b/sql/share/italian/errmsg.txt
@@ -179,7 +179,7 @@
 "In modalita` 'safe update' si e` cercato di aggiornare una tabella senza clausola WHERE su una chiave",
 "La chiave '%-.64s' non esiste nella tabella '%-.64s'",
 "Impossibile aprire la tabella",
-"Il gestore per la tabella non supporta il controllo/riparazione",
+"Il gestore per la tabella non supporta il %s",
 "Non puoi eseguire questo comando in una transazione",
 "Rilevato l'errore %d durante il COMMIT",
 "Rilevato l'errore %d durante il ROLLBACK",
diff --git a/sql/share/japanese/errmsg.txt b/sql/share/japanese/errmsg.txt
index e81feded9d..663676e0cf 100644
--- a/sql/share/japanese/errmsg.txt
+++ b/sql/share/japanese/errmsg.txt
@@ -181,7 +181,7 @@
 "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column",
 "Key '%-.64s' doesn't exist in table '%-.64s'",
 "Can't open table",
-"The handler for the table doesn't support check/repair",
+"The handler for the table doesn't support %s",
 "You are not allowed to execute this command in a transaction",
 "Got error %d during COMMIT",
 "Got error %d during ROLLBACK",
diff --git a/sql/share/korean/errmsg.txt b/sql/share/korean/errmsg.txt
index 45d049e254..da1ee97f6b 100644
--- a/sql/share/korean/errmsg.txt
+++ b/sql/share/korean/errmsg.txt
@@ -179,7 +179,7 @@
 "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column",
 "Key '%-.64s' doesn't exist in table '%-.64s'",
 "Can't open table",
-"The handler for the table doesn't support check/repair",
+"The handler for the table doesn't support %s",
 "You are not allowed to execute this command in a transaction",
 "Got error %d during COMMIT",
 "Got error %d during ROLLBACK",
diff --git a/sql/share/norwegian-ny/errmsg.txt b/sql/share/norwegian-ny/errmsg.txt
index 6fd054fa5f..bc334ace9f 100644
--- a/sql/share/norwegian-ny/errmsg.txt
+++ b/sql/share/norwegian-ny/errmsg.txt
@@ -181,7 +181,7 @@
 "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column",
 "Key '%-.64s' doesn't exist in table '%-.64s'",
 "Can't open table",
-"The handler for the table doesn't support check/repair",
+"The handler for the table doesn't support %s",
 "You are not allowed to execute this command in a transaction",
 "Got error %d during COMMIT",
 "Got error %d during ROLLBACK",
diff --git a/sql/share/norwegian/errmsg.txt b/sql/share/norwegian/errmsg.txt
index a241a99b17..e7f5454946 100644
--- a/sql/share/norwegian/errmsg.txt
+++ b/sql/share/norwegian/errmsg.txt
@@ -181,7 +181,7 @@
 "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column",
 "Key '%-.64s' doesn't exist in table '%-.64s'",
 "Can't open table",
-"The handler for the table doesn't support check/repair",
+"The handler for the table doesn't support %s",
 "You are not allowed to execute this command in a transaction",
 "Got error %d during COMMIT",
 "Got error %d during ROLLBACK",
diff --git a/sql/share/polish/errmsg.txt b/sql/share/polish/errmsg.txt
index 7184acf249..0e92bf2f9b 100644
--- a/sql/share/polish/errmsg.txt
+++ b/sql/share/polish/errmsg.txt
@@ -183,7 +183,7 @@
 "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column",
 "Key '%-.64s' doesn't exist in table '%-.64s'",
 "Can't open table",
-"The handler for the table doesn't support check/repair",
+"The handler for the table doesn't support %s",
 "You are not allowed to execute this command in a transaction",
 "Got error %d during COMMIT",
 "Got error %d during ROLLBACK",
diff --git a/sql/share/portuguese/errmsg.txt b/sql/share/portuguese/errmsg.txt
index e5de0d85b0..6f4f86f902 100644
--- a/sql/share/portuguese/errmsg.txt
+++ b/sql/share/portuguese/errmsg.txt
@@ -179,7 +179,7 @@
 "Você está usando modo de atualização seguro e tentou atualizar uma tabela sem uma cláusula WHERE que use uma coluna chave",
 "Chave '%-.64s' não existe na tabela '%-.64s'",
 "Não pode abrir a tabela",
-"O manipulador de tabela não suporta checagem/reparação (check/repair)",
+"O manipulador de tabela não suporta %s",
 "Não lhe é permitido executar este comando em uma transação",
 "Obteve erro %d durante COMMIT",
 "Obteve erro %d durante ROLLBACK",
diff --git a/sql/share/romanian/errmsg.txt b/sql/share/romanian/errmsg.txt
index 406c1ba3c7..b888a2bc8c 100644
--- a/sql/share/romanian/errmsg.txt
+++ b/sql/share/romanian/errmsg.txt
@@ -183,7 +183,7 @@
 "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column",
 "Key '%-.64s' doesn't exist in table '%-.64s'",
 "Can't open table",
-"The handler for the table doesn't support check/repair",
+"The handler for the table doesn't support %s",
 "You are not allowed to execute this command in a transaction",
 "Got error %d during COMMIT",
 "Got error %d during ROLLBACK",
diff --git a/sql/share/russian/errmsg.txt b/sql/share/russian/errmsg.txt
index ec6f7d2818..0329f760e3 100644
--- a/sql/share/russian/errmsg.txt
+++ b/sql/share/russian/errmsg.txt
@@ -182,7 +182,7 @@
 "MySQL ÒÁÂÏÔÁÅÔ × ÒÅÖÉÍÅ ÚÁÝÉÔÙ ÏÔ ÄÕÒÁËÏ× (safe_mode) - ÎÅ ÍÏÇÕ UPDATE ÂÅÚ WHERE Ó ËÁËÉÍ-ÎÅÂÕÄØ KEY",
 "éÎÄÅËÓ '%-.64s' ÎÅ ÎÁÊÄÅÎ × ÔÁÂÌÉÃÅ '%-.64s'",
 "îÅ ÍÏÇÕ ÏÔËÒÙÔØ ÔÁÂÌÉÃÕ",
-"äÁÎÎÙÊ ÔÉÐ ÔÁÂÌÉà ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ check/repair",
+"äÁÎÎÙÊ ÔÉÐ ÔÁÂÌÉà ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ ËÏÍÁÎÄÕ %s",
 "üÔÁ ËÏÍÁÎÄÁ ×ÎÕÔÒÉ ÔÒÁÎÚÁËÃÉÉ ÚÁÐÒÅÝÅÎÁ",
 "ïÛÉÂËÁ %d ×Ï ×ÒÅÍÑ COMMIT",
 "ïÛÉÂËÁ %d ×Ï ×ÒÅÍÑ ROLLBACK",
diff --git a/sql/share/slovak/errmsg.txt b/sql/share/slovak/errmsg.txt
index 2e14be90bc..1dd696affb 100644
--- a/sql/share/slovak/errmsg.txt
+++ b/sql/share/slovak/errmsg.txt
@@ -187,7 +187,7 @@
 "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column",
 "Key '%-.64s' doesn't exist in table '%-.64s'",
 "Can't open table",
-"The handler for the table doesn't support check/repair",
+"The handler for the table doesn't support %s",
 "You are not allowed to execute this command in a transaction",
 "Got error %d during COMMIT",
 "Got error %d during ROLLBACK",
diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt
index fb1ab3c9b7..c91726a655 100644
--- a/sql/share/spanish/errmsg.txt
+++ b/sql/share/spanish/errmsg.txt
@@ -180,7 +180,7 @@
 "Tu estás usando modo de actualización segura y tentado actualizar una tabla sin un WHERE que usa una KEY columna",
 "Clave '%-.64s' no existe en la tabla '%-.64s'",
 "No puedo abrir tabla",
-"El manipulador de la tabla no permite soporte para check/repair",
+"El manipulador de la tabla no permite soporte para %s",
 "No tienes el permiso para ejecutar este comando en una transición",
 "Obtenido error %d durante COMMIT",
 "Obtenido error %d durante ROLLBACK",
diff --git a/sql/share/swedish/errmsg.txt b/sql/share/swedish/errmsg.txt
index 1a352f1622..5b7ed49903 100644
--- a/sql/share/swedish/errmsg.txt
+++ b/sql/share/swedish/errmsg.txt
@@ -179,7 +179,7 @@
 "Du använder 'säker uppdaterings mod' och försökte uppdatera en table utan en WHERE sats som använder sig av en nyckel",
 "Nyckel '%-.64s' finns inte in tabell '%-.64s'",
 "Kan inte öppna tabellen",
-"Tabellhanteraren för denna tabell kan inte göra check/repair",
+"Tabellhanteraren för denna tabell kan inte göra %s",
 "Du får inte utföra detta kommando i en transaktion",
 "Fick fel %d vid COMMIT",
 "Fick fel %d vid ROLLBACK",
diff --git a/sql/share/ukrainian/errmsg.txt b/sql/share/ukrainian/errmsg.txt
index 3a8a1abc42..6eeefa11ff 100644
--- a/sql/share/ukrainian/errmsg.txt
+++ b/sql/share/ukrainian/errmsg.txt
@@ -184,7 +184,7 @@
 "÷É Õ ÒÅÖÉͦ ÂÅÚÐÅÞÎÏÇÏ ÏÎÏ×ÌÅÎÎÑ ÔÁ ÎÁÍÁÇÁ¤ÔÅÓØ ÏÎÏ×ÉÔÉ ÔÁÂÌÉÃÀ ÂÅÚ ÏÐÅÒÁÔÏÒÁ WHERE, ÝÏ ×ÉËÏÒÉÓÔÏ×Õ¤ KEY ÓÔÏ×ÂÅÃØ",
 "ëÌÀÞ '%-.64s' ÎÅ ¦ÓÎÕ¤ × ÔÁÂÌÉæ '%-.64s'",
 "îÅ ÍÏÖÕ ×¦ÄËÒÉÔÉ ÔÁÂÌÉÃÀ",
-"÷ËÁÚ¦×ÎÉË ÔÁÂÌÉæ ΊЦÄÔÒÉÍÕÅ ÐÅÒÅצÒËÕ/צÄÎÏ×ÌÅÎÎÑ",
+"÷ËÁÚ¦×ÎÉË ÔÁÂÌÉæ ΊЦÄÔÒÉÍÕÅ %s",
 "÷ÁÍ ÎÅ ÄÏÚ×ÏÌÅÎÏ ×ÉËÏÎÕ×ÁÔÉ ÃÀ ËÏÍÁÎÄÕ × ÔÒÁÎÚÁËæ§",
 "ïÔÒÉÍÁÎÏ ÐÏÍÉÌËÕ %d Ð¦Ä ÞÁÓ COMMIT",
 "ïÔÒÉÍÁÎÏ ÐÏÍÉÌËÕ %d Ð¦Ä ÞÁÓ ROLLBACK",
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 36aa31e755..1e7614ccc9 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -1167,8 +1167,13 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
 
     switch (result_code) {
     case HA_ADMIN_NOT_IMPLEMENTED:
-      net_store_data(packet, "error");
-      net_store_data(packet, ER(ER_CHECK_NOT_IMPLEMENTED));
+      {
+        char buf[ERRMSGSIZE+20];
+        my_snprintf(buf, ERRMSGSIZE,
+            ER(ER_CHECK_NOT_IMPLEMENTED), operator_name);
+        net_store_data(packet, "error");
+        net_store_data(packet, buf);
+      }
       break;
 
     case HA_ADMIN_OK:
-- 
2.30.9