summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorunknown <gni/root@dev3-221.dev.cn.tlan>2007-04-03 18:44:29 +0800
committerunknown <gni/root@dev3-221.dev.cn.tlan>2007-04-03 18:44:29 +0800
commit5203ea6ccb349aae5e53e3f0247256a9fc60208e (patch)
treef54056d12cacaac1d0a887906fd01c6d9ab2c9b9 /sql/handler.cc
parent1f7b3e569df0212219c0741aa70f240f09e02772 (diff)
downloadmariadb-git-5203ea6ccb349aae5e53e3f0247256a9fc60208e.tar.gz
BUG#18676 when cluster storage engine is down, misleading error message on create table with 4009.
mysql-test/r/ndb_autodiscover.result: changes ndbd error code to mysqld error code when no cluster connection sql/ha_ndbcluster.cc: map 4009 error code to mysql not connected error sql/handler.cc: define return codes to ha_table_exists_in_engine to something useful NOTE: in 5.1 this should call a handlerton method, not horrible ifdef ndb stuff sql/sql_table.cc: clearly define what happens on create table if exits/not exists/not connected to engine
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 5a27e470d70..62f765f0d22 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -2442,14 +2442,14 @@ ha_find_files(THD *thd,const char *db,const char *path,
Ask handler if the table exists in engine
RETURN
- 0 Table does not exist
- 1 Table exists
- # Error code
+ HA_ERR_NO_SUCH_TABLE Table does not exist
+ HA_ERR_TABLE_EXIST Table exists
+ # Error code
*/
int ha_table_exists_in_engine(THD* thd, const char* db, const char* name)
{
- int error= 0;
+ int error= HA_ERR_NO_SUCH_TABLE;
DBUG_ENTER("ha_table_exists_in_engine");
DBUG_PRINT("enter", ("db: %s, name: %s", db, name));
#ifdef HAVE_NDBCLUSTER_DB