summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-01-19 23:51:17 +0100
committerunknown <monty@mysql.com>2004-01-19 23:51:17 +0100
commit43abc597b8854c44465a8a936febe780f223628c (patch)
tree98d19ab1ee2226dc59533f6531cb9b465784e3b3 /mysys
parent21bef0ed8c4fdaea9c9a4beed18749933b339879 (diff)
downloadmariadb-git-43abc597b8854c44465a8a936febe780f223628c.tar.gz
Code cleanup
Fixed bug in optimizer where it didn't choose right table order in some cases myisam/mi_delete.c: Remove not needed include errno.h myisam/mi_delete_table.c: Remove not needed include errno.h myisam/mi_extra.c: Remove not needed include errno.h myisam/mi_locking.c: Remove not needed include errno.h myisam/mi_log.c: Remove not needed include errno.h myisam/mi_page.c: Remove not needed include errno.h myisam/mi_rename.c: Remove not needed include errno.h myisam/mi_update.c: Remove not needed include errno.h myisam/mi_write.c: Remove not needed include errno.h mysql-test/r/subselect.result: Update of test after optimzier fix mysys/charset.c: Code cleanup sql/item_cmpfunc.cc: Removed not needed comment Indentation cleanup sql/item_cmpfunc.h: Indentation cleanup sql/mysqld.cc: Updated comment for expire_logs_days sql/set_var.cc: Remved duplicate code sql/sql_select.cc: Fixed bug in optimizer where it didn't choose right table order in some cases (Bug found and fixed by Igor)
Diffstat (limited to 'mysys')
-rw-r--r--mysys/charset.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/mysys/charset.c b/mysys/charset.c
index f8c8237c88b..fec0778213f 100644
--- a/mysys/charset.c
+++ b/mysys/charset.c
@@ -533,14 +533,15 @@ static CHARSET_INFO *get_internal_charset(uint cs_number, myf flags)
*/
pthread_mutex_lock(&THR_LOCK_charset);
- cs= all_charsets[cs_number];
-
- if (cs && !(cs->state & MY_CS_COMPILED) && !(cs->state & MY_CS_LOADED))
+ if ((cs= all_charsets[cs_number]))
{
- strxmov(get_charsets_dir(buf), cs->csname, ".xml", NullS);
- my_read_charset_file(buf,flags);
+ if (!(cs->state & MY_CS_COMPILED) && !(cs->state & MY_CS_LOADED))
+ {
+ strxmov(get_charsets_dir(buf), cs->csname, ".xml", NullS);
+ my_read_charset_file(buf,flags);
+ }
+ cs= (cs->state & MY_CS_AVAILABLE) ? cs : NULL;
}
- cs= (cs->state & MY_CS_AVAILABLE) ? cs : NULL;
pthread_mutex_unlock(&THR_LOCK_charset);
return cs;
}