Commit 42d5ea8e authored by unknown's avatar unknown

added an optimization in mysql_create_db (sql_db.cc)

as after effect of fix for Bug #4378 
'"create database IF NOT EXISTS thing" returns an error' 

(avoided an unpack_dirname and 
 changed strcat into strmake)


sql/sql_db.cc:
  added an optimization in mysql_create_db 
  (avoided an unpack_dirname and 
   changed strcat into strmake)
parent 7a30ad71
...@@ -213,8 +213,8 @@ int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info, ...@@ -213,8 +213,8 @@ int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info,
} }
} }
unpack_dirname(path, path); path[path_len-1]= FN_LIBCHAR;
strcat(path,MY_DB_OPT_FILE); strmake(path+path_len, MY_DB_OPT_FILE, sizeof(path)-path_len-1);
if (write_db_opt(thd, path, create_info)) if (write_db_opt(thd, path, create_info))
{ {
/* /*
......
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