diff options
author | unknown <msvensson@neptunus.(none)> | 2005-06-20 13:08:45 +0200 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2005-06-20 13:08:45 +0200 |
commit | 29397de1e01c22f76aedb3feb556fe43c5af155f (patch) | |
tree | 6a1a868c31d4399d1779a220c1d2c10da0007bda /sql/sql_table.cc | |
parent | 5a98e2a0d05fb9c2b626350d80ffe9161e2726c2 (diff) | |
parent | d18e5622ebacbb386b6cc8508dbdaae4216f4fa8 (diff) | |
download | mariadb-git-29397de1e01c22f76aedb3feb556fe43c5af155f.tar.gz |
Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into neptunus.(none):/home/msvensson/mysql/bug10365
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_table.cc:
Auto merged
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index e2e6ee23323..d7a07d17761 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -244,15 +244,18 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, /* remove form file and isam files */ build_table_path(path, sizeof(path), db, alias, reg_ext); } - if (drop_temporary || - (access(path,F_OK) && ha_create_table_from_engine(thd,db,alias,TRUE))) + if (drop_temporary || + (access(path,F_OK) && + ha_create_table_from_engine(thd, db, alias))) { + // Table was not found on disk and table can't be created from engine if (if_exists) push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, ER_BAD_TABLE_ERROR, ER(ER_BAD_TABLE_ERROR), table->real_name); else - error= 1; + error= 1; + } else { @@ -1394,15 +1397,14 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, { bool create_if_not_exists = create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS; - if (!ha_create_table_from_engine(thd, db, table_name, - create_if_not_exists)) + if (ha_table_exists_in_engine(thd, db, table_name)) { - DBUG_PRINT("info", ("Table already existed in handler")); + DBUG_PRINT("info", ("Table with same name already existed in handler")); if (create_if_not_exists) { - create_info->table_existed= 1; // Mark that table existed - error= 0; + create_info->table_existed= 1; // Mark that table existed + error= 0; } else my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name); |