diff options
author | unknown <gni/root@dev3-221.dev.cn.tlan> | 2007-04-04 14:30:12 +0800 |
---|---|---|
committer | unknown <gni/root@dev3-221.dev.cn.tlan> | 2007-04-04 14:30:12 +0800 |
commit | 5ca5d5dee2882ad620feac37c06f291a871cacca (patch) | |
tree | fb820a26e45ca384fbe3ca39a8f6ccb296226ad4 | |
parent | b263f63b26ea0cb4131c683bed733d238c5c619c (diff) | |
parent | 5203ea6ccb349aae5e53e3f0247256a9fc60208e (diff) | |
download | mariadb-git-5ca5d5dee2882ad620feac37c06f291a871cacca.tar.gz |
Merge dev3-221.dev.cn.tlan:/home/ngb/mysql/mysql-5.0/bug18676
into dev3-221.dev.cn.tlan:/home/ngb/mysql/mysql-5.1/bug18676
mysql-test/r/ndb_autodiscover.result:
Auto merged
sql/handler.cc:
Auto merged
storage/ndb/src/common/transporter/TCP_Transporter.cpp:
Auto merged
storage/ndb/src/mgmclient/CommandInterpreter.cpp:
Auto merged
sql/ha_ndbcluster.cc:
merge 5.0-ndb-bj for bug#18676 into 5.1-ndb-bj
sql/sql_table.cc:
merge 5.0-ndb-bj for bug#18676 into 5.1-ndb-bj
-rw-r--r-- | mysql-test/r/ndb_autodiscover.result | 2 | ||||
-rw-r--r-- | sql/ha_ndbcluster.cc | 2 | ||||
-rw-r--r-- | sql/handler.cc | 8 | ||||
-rw-r--r-- | sql/sql_table.cc | 3 |
4 files changed, 8 insertions, 7 deletions
diff --git a/mysql-test/r/ndb_autodiscover.result b/mysql-test/r/ndb_autodiscover.result index cb85c4ac873..487f52f6427 100644 --- a/mysql-test/r/ndb_autodiscover.result +++ b/mysql-test/r/ndb_autodiscover.result @@ -382,7 +382,7 @@ create table t1 (a int primary key) engine=ndb; select * from t1; a select * from t1; -ERROR HY000: Can't lock file (errno: 4009) +ERROR HY000: Can't lock file (errno: 157) use test; drop database test_only_ndb_tables; CREATE TABLE t9 ( diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 4db35cd7377..5ea29265388 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -221,7 +221,6 @@ static int ndb_to_mysql_error(const NdbError *ndberr) { /* read the mysql mapped error code */ int error= ndberr->mysql_code; - switch (error) { /* errors for which we do not add warnings, just return mapped error code @@ -240,7 +239,6 @@ static int ndb_to_mysql_error(const NdbError *ndberr) default: break; } - /* Push the NDB error message as warning - Used to be able to use SHOW WARNINGS toget more info on what the error is diff --git a/sql/handler.cc b/sql/handler.cc index 23c3103493e..751b324165d 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -2865,9 +2865,9 @@ 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 */ struct st_table_exists_in_engine_args @@ -2891,7 +2891,7 @@ static my_bool table_exists_in_engine_handlerton(THD *thd, st_plugin_int *plugin 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)); st_table_exists_in_engine_args args= {db, name}; diff --git a/sql/sql_table.cc b/sql/sql_table.cc index ab833ebe6b9..006ff3d7093 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -3439,6 +3439,7 @@ bool mysql_create_table_internal(THD *thd, error= 0; goto err; } + DBUG_PRINT("info",("1")); my_error(ER_TABLE_EXISTS_ERROR, MYF(0), alias); goto err; } @@ -3450,6 +3451,7 @@ bool mysql_create_table_internal(THD *thd, { if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS) goto warn; + DBUG_PRINT("info",("2")); my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name); goto unlock_and_end; } @@ -3481,6 +3483,7 @@ bool mysql_create_table_internal(THD *thd, { bool create_if_not_exists = create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS; + if (ha_table_exists_in_engine(thd, db, table_name)) { DBUG_PRINT("info", ("Table with same name already existed in handler")); |