From ac4b66236342910ebfb8aed19ae46113df3465c6 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Sep 2006 17:48:00 +0400 Subject: [PATCH] Remove unused error messages (no release contains them at the moment, so we can safely do that). Update an error mesage to make it translateable. mysql-test/r/log_tables.result: update result file sql/share/errmsg.txt: remove unused error messages sql/sql_table.cc: Use name of the statements rather then English words. This way error message is translateable. --- mysql-test/r/log_tables.result | 10 +++++----- sql/share/errmsg.txt | 9 ++------- sql/sql_table.cc | 4 ++-- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/mysql-test/r/log_tables.result b/mysql-test/r/log_tables.result index 59cef29dc8f..33f6c0c7af2 100644 --- a/mysql-test/r/log_tables.result +++ b/mysql-test/r/log_tables.result @@ -73,16 +73,16 @@ select * from mysql.slow_log; start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text TIMESTAMP USER_HOST QUERY_TIME 00:00:00 1 0 test 0 0 1 select sleep(2) alter table mysql.general_log engine=myisam; -ERROR HY000: You cannot alter a log table if logging is enabled +ERROR HY000: You cannot 'ALTER' a log table if logging is enabled alter table mysql.slow_log engine=myisam; -ERROR HY000: You cannot alter a log table if logging is enabled +ERROR HY000: You cannot 'ALTER' a log table if logging is enabled drop table mysql.general_log; -ERROR HY000: You cannot drop a log table if logging is enabled +ERROR HY000: You cannot 'DROP' a log table if logging is enabled drop table mysql.slow_log; -ERROR HY000: You cannot drop a log table if logging is enabled +ERROR HY000: You cannot 'DROP' a log table if logging is enabled set global general_log='OFF'; alter table mysql.slow_log engine=myisam; -ERROR HY000: You cannot alter a log table if logging is enabled +ERROR HY000: You cannot 'ALTER' a log table if logging is enabled set global slow_query_log='OFF'; show create table mysql.general_log; Table Create Table diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index 2b382317253..d53cb477615 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -5972,12 +5972,6 @@ ER_RBR_NOT_AVAILABLE ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA eng "Triggers can not be created on system tables" ger "Trigger können nicht auf Systemtabellen erzeugt werden" -ER_CANT_ALTER_LOG_TABLE - eng "You can't alter a log table if logging is enabled" -ER_BAD_LOG_ENGINE - eng "One can use only CSV and MyISAM engines for the log tables" -ER_CANT_DROP_LOG_TABLE - eng "Cannot drop log table if log is enabled" ER_EVENT_RECURSIVITY_FORBIDDEN eng "Recursivity of EVENT DDL statements is forbidden when body is present" ER_EVENTS_DB_ERROR @@ -5993,4 +5987,5 @@ ER_WRONG_STRING_LENGTH ER_UNSUPORTED_LOG_ENGINE eng "This storage engine cannot be used for log tables"" ER_BAD_LOG_STATEMENT - eng "You cannot %s a log table if logging is enabled" + eng "You cannot '%s' a log table if logging is enabled" + diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 25de19b20b2..78a67eddf9e 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1628,7 +1628,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, (!my_strcasecmp(system_charset_info, table->table_name, "slow_log") && opt_slow_log && logger.is_slow_log_table_enabled()))) { - my_error(ER_BAD_LOG_STATEMENT, MYF(0), "drop"); + my_error(ER_BAD_LOG_STATEMENT, MYF(0), "DROP"); DBUG_RETURN(1); } } @@ -5179,7 +5179,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name, (table_kind == SLOW_LOG && opt_slow_log && logger.is_slow_log_table_enabled())) { - my_error(ER_BAD_LOG_STATEMENT, MYF(0), "alter"); + my_error(ER_BAD_LOG_STATEMENT, MYF(0), "ALTER"); DBUG_RETURN(TRUE); }