summaryrefslogtreecommitdiff
path: root/sql/sql_db.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-02-21 14:47:57 +0200
committerunknown <monty@mysql.com>2005-02-21 14:47:57 +0200
commitd50af8aece334add754acc08b0231dd7ef9503f5 (patch)
treea17a3f036e3a27e1c193e1d849ad788042a32f8c /sql/sql_db.cc
parentda4604f9e8fa42c8e7c5627b692e0ac6d5409802 (diff)
downloadmariadb-git-d50af8aece334add754acc08b0231dd7ef9503f5.tar.gz
Review of new pushed code (XA & other)
Portability fixes and cleanups Fixed setting of 'res' in mysql_execute_command() sql/handler.cc: delete_table() will not return error for not found files if one handler file was found and deleted sql/handler.h: Incremented MAX_HA so that ndb works again Don't convert char pointer to (my_xid*) as we don't know if the address is aligned on 8 sql/log.cc: Indentation fixes Simplified loop to find next log Fixed race condition in reset_logs that caused mix_innodb_myisam_binlog to fail sql/log_event.cc: Don't convert char pointer to (my_xid*) as we don't know if the address is aligned on 8 sql/sql_acl.cc: Convert db name directly to avoid extra strmov sql/sql_base.cc: Added comment Removed not needed code sql/sql_db.cc: Added comment Remove not needed code sql/sql_parse.cc: Always call mysql_rm_db() with lower case db name Ensure that 'res' is set correctly in mysql_execute_command() (One don't have to set res if one calls my_error() and res should be = 0 for correct commands) sql/sql_repl.cc: Indentation fixes use packet->ptr() instead of packet->c_ptr() sql/sql_table.cc: Join similar code when table didn't exist in engine
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r--sql/sql_db.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index cbd4f9049d3..1705a25c124 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -576,7 +576,8 @@ exit2:
mysql_rm_db()
thd Thread handle
db Database name in the case given by user
- It's already validated when we come here
+ It's already validated and set to lower case
+ (if needed) when we come here
if_exists Don't give error if database doesn't exists
silent Don't generate errors
@@ -589,7 +590,7 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
{
long deleted=0;
int error= 0;
- char path[FN_REFLEN+16], tmp_db[NAME_LEN+1];
+ char path[FN_REFLEN+16];
MY_DIR *dirp;
uint length;
DBUG_ENTER("mysql_rm_db");
@@ -636,13 +637,6 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
error = 0;
}
}
- if (lower_case_table_names)
- {
- /* Convert database to lower case */
- strmov(tmp_db, db);
- my_casedn_str(files_charset_info, tmp_db);
- db= tmp_db;
- }
if (!silent && deleted>=0)
{
const char *query;