From 5203ea6ccb349aae5e53e3f0247256a9fc60208e Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Apr 2007 18:44:29 +0800 Subject: 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 --- sql/handler.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sql/handler.cc') 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 -- cgit v1.2.1