diff options
author | unknown <dlenev@mysql.com> | 2004-12-09 14:14:03 +0300 |
---|---|---|
committer | unknown <dlenev@mysql.com> | 2004-12-09 14:14:03 +0300 |
commit | e539f5bd3f4e94ea27f6ea35c3502b67c22597f2 (patch) | |
tree | 6d767e9897cc43309fc4d8bb61abe93fc3ea7ed6 /sql/sql_db.cc | |
parent | af07ef79d40175cff51a3740208bc531c7168d44 (diff) | |
parent | 3e221a83f4cfb4955b85f9c38bfc98c46713ca08 (diff) | |
download | mariadb-git-e539f5bd3f4e94ea27f6ea35c3502b67c22597f2.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-bg6765
sql/set_var.cc:
Auto merged
sql/sql_db.cc:
Auto merged
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r-- | sql/sql_db.cc | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc index ccf3b55d2fb..39c3f8586ed 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -389,7 +389,7 @@ int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info, VOID(pthread_mutex_lock(&LOCK_mysql_create_db)); - // do not create database if another thread is holding read lock + /* do not create database if another thread is holding read lock */ if (wait_if_global_read_lock(thd, 0, 1)) { error= -1; @@ -513,7 +513,7 @@ 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 + /* do not alter database if another thread is holding read lock */ if ((error=wait_if_global_read_lock(thd,0,1))) goto exit2; @@ -541,9 +541,11 @@ int mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create_info) Query_log_event qinfo(thd, thd->query, thd->query_length, 0, /* suppress_use */ TRUE); - // Write should use the database being created as the "current - // database" and not the threads current database, which is the - // default. + /* + Write should use the database being created as the "current + database" and not the threads current database, which is the + default. + */ qinfo.db = db; qinfo.db_len = strlen(db); @@ -576,7 +578,6 @@ exit2: -1 Error generated */ - int mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) { long deleted=0; @@ -588,7 +589,7 @@ int mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) VOID(pthread_mutex_lock(&LOCK_mysql_create_db)); - // do not drop database if another thread is holding read lock + /* do not drop database if another thread is holding read lock */ if (wait_if_global_read_lock(thd, 0, 1)) { error= -1; @@ -656,10 +657,11 @@ int mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) { Query_log_event qinfo(thd, query, query_length, 0, /* suppress_use */ TRUE); - - // Write should use the database being created as the "current - // database" and not the threads current database, which is the - // default. + /* + Write should use the database being created as the "current + database" and not the threads current database, which is the + default. + */ qinfo.db = db; qinfo.db_len = strlen(db); @@ -773,7 +775,7 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db, found_other_files++; continue; } - // just for safety we use files_charset_info + /* just for safety we use files_charset_info */ if (db && !my_strcasecmp(files_charset_info, extension, reg_ext)) { @@ -908,7 +910,7 @@ bool mysql_change_db(THD *thd, const char *name) if (!dbname || !(db_length= strlen(dbname))) { x_free(dbname); /* purecov: inspected */ - send_error(thd,ER_NO_DB_ERROR); /* purecov: inspected */ + send_error(thd,ER_NO_DB_ERROR); /* purecov: inspected */ DBUG_RETURN(1); /* purecov: inspected */ } if (check_db_name(dbname)) |