1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

BUG10365 Cluster handler uses non-standard error code

- Updated after review


sql/ha_ndbcluster.cc:
  Return -1 if table does not exists
sql/handler.cc:
  Return -1 if table does not exists
  Return 0 if table exists and it could be created
  Return >0 if table existed but it could not be created.
sql/sql_base.cc:
  Only need to call ha_create_table_from_engine and check if result is > 0. If that is the case, print error message
This commit is contained in:
unknown
2005-06-16 15:17:47 +02:00
parent 09944efd71
commit d18e5622eb
3 changed files with 12 additions and 11 deletions

View File

@ -1376,8 +1376,7 @@ static int open_unireg_entry(THD *thd, TABLE *entry, const char *db,
*/
if (discover_retry_count++ != 0)
goto err;
if (ha_table_exists_in_engine(thd, db, name) &&
ha_create_table_from_engine(thd, db, name))
if (ha_create_table_from_engine(thd, db, name) > 0)
{
/* Give right error message */
thd->clear_error();