diff options
author | unknown <msvensson@neptunus.(none)> | 2005-06-22 14:10:02 +0200 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2005-06-22 14:10:02 +0200 |
commit | 4db138f91a04619f6c53ece45f3b143e633a7566 (patch) | |
tree | e53068db54e844c159cf1431067a242ef99c4ed2 /sql/sql_table.cc | |
parent | 73ea278f6a44f2840a6784a9c856520090aef159 (diff) | |
parent | 19f51d3fa50e1ffda7e25eabc879b63627920a81 (diff) | |
download | mariadb-git-4db138f91a04619f6c53ece45f3b143e633a7566.tar.gz |
Merged from mysql-4.1 to mysql-5.0
client/mysqltest.c:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/t/ndb_autodiscover.test:
Auto merged
sql/ha_ndbcluster.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
client/mysqldump.c:
Merge from 4.1 to 5.0
mysql-test/r/ndb_autodiscover.result:
Merge
ndb/test/ndbapi/create_tab.cpp:
Merge
sql/ha_ndbcluster.cc:
Merge
sql/handler.cc:
Merge
sql/handler.h:
Merge
sql/sql_base.cc:
Merge
sql/sql_table.cc:
Merge
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 121a89555ce..e03a6c24d42 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -256,16 +256,18 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, 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)) || + (access(path,F_OK) && + ha_create_table_from_engine(thd,db,alias)) || (!drop_view && mysql_frm_type(path) != FRMTYPE_TABLE)) { + // 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->table_name); else - error= 1; + error= 1; + } else { @@ -1604,15 +1606,14 @@ bool 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= FALSE; + create_info->table_existed= 1; // Mark that table existed + error= FALSE; } else my_error(ER_TABLE_EXISTS_ERROR, MYF(0), table_name); |