diff options
author | unknown <sergefp@mysql.com> | 2003-12-20 00:54:38 +0300 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2003-12-20 00:54:38 +0300 |
commit | c0d9d43739df0bf92b83a6b328485c1f357ea253 (patch) | |
tree | 6f1ee123b4c43806a2d62ab70bfdc1402e51dff9 /sql/sql_table.cc | |
parent | 28ad1273ddf3d42a4ec9f9fdfdd150f39fa4772e (diff) | |
parent | b41e6294ca97aaeb403972feb19ecc6d177096ca (diff) | |
download | mariadb-git-c0d9d43739df0bf92b83a6b328485c1f357ea253.tar.gz |
Merge mysql.com:/home/psergey/mysql-5.0-latest-pull
into mysql.com:/dbdata/psergey/mysql-5.0-imerge-unique
BitKeeper/etc/logging_ok:
auto-union
include/my_global.h:
Auto merged
sql/filesort.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item_create.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/records.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_union.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/uniques.cc:
Auto merged
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 9405004abbd..fe2cfcf2b41 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -257,6 +257,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, query_cache_invalidate3(thd, tables, 0); if (!dont_log_query && mysql_bin_log.is_open()) { + thd->clear_error(); Query_log_event qinfo(thd, thd->query, thd->query_length, tmp_table_deleted && !some_tables_deleted); mysql_bin_log.write(&qinfo); @@ -306,10 +307,10 @@ static int sort_keys(KEY *a, KEY *b) { if (!(b->flags & HA_NOSAME)) return -1; - if ((a->flags ^ b->flags) & HA_NULL_PART_KEY) + if ((a->flags ^ b->flags) & (HA_NULL_PART_KEY | HA_END_SPACE_KEY)) { /* Sort NOT NULL keys before other keys */ - return (a->flags & HA_NULL_PART_KEY) ? 1 : -1; + return (a->flags & (HA_NULL_PART_KEY | HA_END_SPACE_KEY)) ? 1 : -1; } if (a->name == primary_key_name) return -1; @@ -400,7 +401,7 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_USING_OTHER_HANDLER, ER(ER_WARN_USING_OTHER_HANDLER), - ha_get_table_type(new_db_type), + ha_get_storage_engine(new_db_type), table_name); } db_options=create_info->table_options; @@ -984,8 +985,8 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, thd->tmp_table_used= 1; } if (!tmp_table && !no_log && mysql_bin_log.is_open()) - // Must be written before unlock { + thd->clear_error(); Query_log_event qinfo(thd, thd->query, thd->query_length, test(create_info->options & HA_LEX_CREATE_TMP_TABLE)); @@ -1236,7 +1237,7 @@ static int prepare_for_restore(THD* thd, TABLE_LIST* table, } else { - char* backup_dir = thd->lex->backup_dir; + char* backup_dir= thd->lex->backup_dir; char src_path[FN_REFLEN], dst_path[FN_REFLEN]; char* table_name = table->real_name; char* db = thd->db ? thd->db : table->db; @@ -2007,7 +2008,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_USING_OTHER_HANDLER, ER(ER_WARN_USING_OTHER_HANDLER), - ha_get_table_type(new_db_type), + ha_get_storage_engine(new_db_type), new_name); } if (create_info->row_type == ROW_TYPE_NOT_USED) @@ -2072,6 +2073,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, { if (mysql_bin_log.is_open()) { + thd->clear_error(); Query_log_event qinfo(thd, thd->query, thd->query_length, 0); mysql_bin_log.write(&qinfo); } @@ -2454,6 +2456,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, } if (mysql_bin_log.is_open()) { + thd->clear_error(); Query_log_event qinfo(thd, thd->query, thd->query_length, 0); mysql_bin_log.write(&qinfo); } @@ -2584,6 +2587,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, thd->proc_info="end"; if (mysql_bin_log.is_open()) { + thd->clear_error(); Query_log_event qinfo(thd, thd->query, thd->query_length, 0); mysql_bin_log.write(&qinfo); } |