diff options
author | unknown <monty@mysql.com> | 2005-02-21 14:47:57 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2005-02-21 14:47:57 +0200 |
commit | d50af8aece334add754acc08b0231dd7ef9503f5 (patch) | |
tree | a17a3f036e3a27e1c193e1d849ad788042a32f8c /sql/sql_base.cc | |
parent | da4604f9e8fa42c8e7c5627b692e0ac6d5409802 (diff) | |
download | mariadb-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_base.cc')
-rw-r--r-- | sql/sql_base.cc | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 8628e412d86..68a43f71e55 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -3592,23 +3592,20 @@ static void mysql_rm_tmp_tables(void) *****************************************************************************/ /* -** Invalidate any cache entries that are for some DB -** We can't use hash_delete when looping hash_elements. We mark them first -** and afterwards delete those marked unused. + Invalidate any cache entries that are for some DB + + SYNOPSIS + remove_db_from_cache() + db Database name. This will be in lower case if + lower_case_table_name is set + + NOTE: + We can't use hash_delete when looping hash_elements. We mark them first + and afterwards delete those marked unused. */ void remove_db_from_cache(const char *db) { - char name_buff[NAME_LEN+1]; - if (db && lower_case_table_names) - { - /* - convert database to lower case for comparision. - */ - strmake(name_buff, db, sizeof(name_buff)-1); - my_casedn_str(files_charset_info, name_buff); - db= name_buff; - } for (uint idx=0 ; idx < open_cache.records ; idx++) { TABLE *table=(TABLE*) hash_element(&open_cache,idx); |