diff options
author | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2010-07-13 10:39:24 +0200 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2010-07-13 10:39:24 +0200 |
commit | a5d72c498cd4a76f3237a2d8f2ef6d74dc011cb5 (patch) | |
tree | 74d63cef81d432cda2315d47976755590872f3bd /sql/sql_db.cc | |
parent | 5050cd7c895fbb749b19495ef6f9dd4098fd474c (diff) | |
parent | 465e4025f7f2e1ed1bd1854333b972dc5378bd10 (diff) | |
download | mariadb-git-a5d72c498cd4a76f3237a2d8f2ef6d74dc011cb5.tar.gz |
merge from mysql-trunk-bugfixing
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r-- | sql/sql_db.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc index fe4b112196c..517cb9139e9 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -107,7 +107,7 @@ extern "C" void free_dbopt(void *dbopt); void free_dbopt(void *dbopt) { - my_free((uchar*) dbopt, MYF(0)); + my_free(dbopt); } #ifdef HAVE_PSI_INTERFACE @@ -264,7 +264,7 @@ static my_bool put_dbopt(const char *dbname, HA_CREATE_INFO *create) if ((error= my_hash_insert(&dboptions, (uchar*) opt))) { - my_free(opt, MYF(0)); + my_free(opt); goto end; } } @@ -1290,8 +1290,7 @@ static void mysql_change_db_impl(THD *thd, we just call THD::reset_db(). Since THD::reset_db() does not releases the previous database name, we should do it explicitly. */ - - x_free(thd->db); + my_free(thd->db); thd->reset_db(new_db_name->str, new_db_name->length); } @@ -1504,7 +1503,7 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch) if (check_db_name(&new_db_file_name)) { my_error(ER_WRONG_DB_NAME, MYF(0), new_db_file_name.str); - my_free(new_db_file_name.str, MYF(0)); + my_free(new_db_file_name.str); if (force_switch) mysql_change_db_impl(thd, NULL, 0, thd->variables.collation_server); @@ -1534,7 +1533,7 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch) new_db_file_name.str); general_log_print(thd, COM_INIT_DB, ER(ER_DBACCESS_DENIED_ERROR), sctx->priv_user, sctx->priv_host, new_db_file_name.str); - my_free(new_db_file_name.str, MYF(0)); + my_free(new_db_file_name.str); DBUG_RETURN(TRUE); } #endif @@ -1549,7 +1548,7 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch) ER_BAD_DB_ERROR, ER(ER_BAD_DB_ERROR), new_db_file_name.str); - my_free(new_db_file_name.str, MYF(0)); + my_free(new_db_file_name.str); /* Change db to NULL. */ @@ -1564,7 +1563,7 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch) /* Report an error and free new_db_file_name. */ my_error(ER_BAD_DB_ERROR, MYF(0), new_db_file_name.str); - my_free(new_db_file_name.str, MYF(0)); + my_free(new_db_file_name.str); /* The operation failed. */ |