diff options
author | unknown <petr/cps@owlet.local> | 2006-09-15 17:24:13 +0400 |
---|---|---|
committer | unknown <petr/cps@owlet.local> | 2006-09-15 17:24:13 +0400 |
commit | 372d1c8c5a82ade48a98ca9c724241ef348eff7b (patch) | |
tree | 941901b73008934003e348da1eb5233732e53c0b /sql | |
parent | bba4e89a514b7d61ef04ce012514538ee59dff35 (diff) | |
parent | abbb201661144f2a75d70c32da49dcb1692be412 (diff) | |
download | mariadb-git-372d1c8c5a82ade48a98ca9c724241ef348eff7b.tar.gz |
Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into mysql.com:/home/cps/mysql/trees/5.1-runtime-new
sql/handler.h:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/sql_table.cc:
Auto merged
storage/csv/ha_tina.cc:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/handler.h | 1 | ||||
-rw-r--r-- | sql/share/errmsg.txt | 4 | ||||
-rw-r--r-- | sql/sql_table.cc | 9 |
3 files changed, 9 insertions, 5 deletions
diff --git a/sql/handler.h b/sql/handler.h index abc3e18d7a0..92a3ad69138 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -690,6 +690,7 @@ struct handlerton #define HTON_FLUSH_AFTER_RENAME (1 << 4) #define HTON_NOT_USER_SELECTABLE (1 << 5) #define HTON_TEMPORARY_NOT_SUPPORTED (1 << 6) //Having temporary tables not supported +#define HTON_SUPPORT_LOG_TABLES (1 << 7) //Engine supports log tables typedef struct st_thd_trans { diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index 37f54899615..2b382317253 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -5990,3 +5990,7 @@ ER_HOSTNAME eng "host name" ER_WRONG_STRING_LENGTH eng "String '%-.70s' is too long for %s (should be no longer than %d)" +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" diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 02de7abb674..25de19b20b2 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_CANT_DROP_LOG_TABLE, MYF(0)); + 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_CANT_ALTER_LOG_TABLE, MYF(0)); + my_error(ER_BAD_LOG_STATEMENT, MYF(0), "alter"); DBUG_RETURN(TRUE); } @@ -5187,10 +5187,9 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name, if ((table_kind == GENERAL_LOG || table_kind == SLOW_LOG) && (lex_create_info->used_fields & HA_CREATE_USED_ENGINE) && (!lex_create_info->db_type || /* unknown engine */ - !(lex_create_info->db_type->db_type == DB_TYPE_MYISAM || - lex_create_info->db_type->db_type == DB_TYPE_CSV_DB))) + !(lex_create_info->db_type->flags & HTON_SUPPORT_LOG_TABLES))) { - my_error(ER_BAD_LOG_ENGINE, MYF(0)); + my_error(ER_UNSUPORTED_LOG_ENGINE, MYF(0)); DBUG_RETURN(TRUE); } } |