summaryrefslogtreecommitdiff
path: root/sql/sql_db.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2005-01-24 19:41:42 +0100
committerunknown <serg@serg.mylan>2005-01-24 19:41:42 +0100
commita82fd1eaec9067bbed9cceb9294734a8d09b72da (patch)
tree0c73a61f5c88d003eae464001af7656745e9ba4e /sql/sql_db.cc
parent7eb825a07280dfeb1bae3def25a3bc0add544a74 (diff)
parent7109999b92ec8541a61ca5babc5b06f4315478a8 (diff)
downloadmariadb-git-a82fd1eaec9067bbed9cceb9294734a8d09b72da.tar.gz
merged
BitKeeper/deleted/.del-sort.c~e2e56b5a37ce86f4: Auto merged client/mysql.cc: Auto merged client/mysqlbinlog.cc: Auto merged client/mysqldump.c: Auto merged client/mysqltest.c: Auto merged myisam/ft_boolean_search.c: Auto merged myisam/mi_packrec.c: Auto merged myisam/sort.c: Auto merged mysql-test/r/fulltext.result: Auto merged sql/item_create.cc: Auto merged sql/item_strfunc.cc: Auto merged sql/item_timefunc.cc: Auto merged sql/log.cc: Auto merged sql/set_var.cc: Auto merged sql/slave.cc: Auto merged sql/sql_acl.h: Auto merged sql/sql_analyse.cc: Auto merged sql/sql_cache.cc: Auto merged sql/sql_db.cc: Auto merged sql/tztime.cc: Auto merged tests/client_test.c: Auto merged
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r--sql/sql_db.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index 26929ebc432..cbd4f9049d3 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -227,7 +227,7 @@ void del_dbopt(const char *path)
}
-/*
+/*
Create database options file:
DESCRIPTION
@@ -246,10 +246,10 @@ static bool write_db_opt(THD *thd, const char *path, HA_CREATE_INFO *create)
if (!create->default_table_charset)
create->default_table_charset= thd->variables.collation_server;
-
+
if (put_dbopt(path, create))
return 1;
-
+
if ((file=my_create(path, CREATE_MODE,O_RDWR | O_TRUNC,MYF(MY_WME))) >= 0)
{
ulong length;
@@ -531,21 +531,21 @@ bool mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create_info)
if ((error=write_db_opt(thd, path, create_info)))
goto exit;
- /*
+ /*
Change options if current database is being altered
TODO: Delete this code
*/
if (thd->db && !strcmp(thd->db,db))
{
- thd->db_charset= (create_info && create_info->default_table_charset) ?
- create_info->default_table_charset :
+ thd->db_charset= create_info->default_table_charset ?
+ create_info->default_table_charset :
thd->variables.collation_server;
thd->variables.collation_database= thd->db_charset;
}
if (mysql_bin_log.is_open())
{
- Query_log_event qinfo(thd, thd->query, thd->query_length, 0,
+ Query_log_event qinfo(thd, thd->query, thd->query_length, 0,
/* suppress_use */ TRUE);
/*
@@ -627,12 +627,12 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
pthread_mutex_lock(&LOCK_open);
remove_db_from_cache(db);
pthread_mutex_unlock(&LOCK_open);
-
+
error= -1;
if ((deleted= mysql_rm_known_files(thd, dirp, db, path, 0)) >= 0)
{
ha_drop_database(path);
- query_cache_invalidate1(db);
+ query_cache_invalidate1(db);
error = 0;
}
}
@@ -643,7 +643,7 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
my_casedn_str(files_charset_info, tmp_db);
db= tmp_db;
}
- if (!silent && deleted>=0 && thd)
+ if (!silent && deleted>=0)
{
const char *query;
ulong query_length;
@@ -693,7 +693,7 @@ exit:
have 'if (data_buf) free(data_buf)' data_buf is !=0 so this makes a
DOUBLE free().
Side effects of this double free() are, randomly (depends on the machine),
- when the slave is replicating a DROP DATABASE:
+ when the slave is replicating a DROP DATABASE:
- garbage characters in the error message:
"Error 'Can't drop database 'test2'; database doesn't exist' on query
'h4zI©'"