Commit 4cbf1e51 authored by guilhem@mysql.com's avatar guilhem@mysql.com

Merge gbichot@213.136.52.20:/home/bk/mysql-4.1

into mysql.com:/home/mysql_src/mysql-4.1
parents 6fd6a9a7 0b16ef24
......@@ -270,11 +270,8 @@ int mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create_info)
VOID(pthread_mutex_lock(&LOCK_mysql_create_db));
// do not alter database if another thread is holding read lock
if (wait_if_global_read_lock(thd,0))
{
error= -1;
if ((error=wait_if_global_read_lock(thd,0)))
goto exit2;
}
/* Check directory */
(void)sprintf(path,"%s/%s/%s", mysql_data_home, db, MY_DB_OPT_FILE);
......@@ -307,7 +304,7 @@ exit:
start_waiting_global_read_lock(thd);
exit2:
VOID(pthread_mutex_unlock(&LOCK_mysql_create_db));
DBUG_RETURN(error);
DBUG_RETURN(error ? -1 : 0); /* -1 to delegate send_error() */
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment