From f574cd4e8f7f9794385cf5b9f6ddfc8530245005 Mon Sep 17 00:00:00 2001 From: "monty@mysql.com" <> Date: Sat, 28 Aug 2004 00:49:54 +0300 Subject: Code style fixes. Initialize LOG_error_log before get_options to not use an uninitalized mutex in case of an error from handle_options() --- sql/sql_base.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'sql/sql_base.cc') diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 26ce394ec37..8fd7273fd78 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -2066,13 +2066,16 @@ insert_fields(THD *thd,TABLE_LIST *tables, const char *db_name, uint found; DBUG_ENTER("insert_fields"); - if (db_name && lower_case_table_names) { - /* convert database to lower case for comparison */ - strmake( name_buff, db_name, sizeof(name_buff)-1 ); - casedn_str( name_buff ); - db_name = name_buff; + /* + convert database to lower case for comparison + We can't do this in Item_field as this would change the + 'name' of the item which may be used in the select list + */ + strmake(name_buff, db_name, sizeof(name_buff)-1); + casedn_str(name_buff); + db_name= name_buff; } -- cgit v1.2.1