diff options
author | Georgi Kodinov <kgeorge@mysql.com> | 2008-12-09 19:58:50 +0200 |
---|---|---|
committer | Georgi Kodinov <kgeorge@mysql.com> | 2008-12-09 19:58:50 +0200 |
commit | 2d88514de41bb62874f4c8dc805672f6b7131eae (patch) | |
tree | 6d8549d8e695be5327d1ac7d12f166170c386f95 /sql/item_cmpfunc.cc | |
parent | 9ce98dd10181dc3625882b7a674835660f4459ee (diff) | |
parent | 71296ae2e2c3b6f87ad392aa3f45b9c53a41b2f2 (diff) | |
download | mariadb-git-2d88514de41bb62874f4c8dc805672f6b7131eae.tar.gz |
merged 37936 to 5.1-bugteam
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r-- | sql/item_cmpfunc.cc | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index c5de0b3df08..c6b70440b41 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -394,19 +394,16 @@ static bool convert_constant_item(THD *thd, Item_field *field_item, TABLE *table= field->table; ulong orig_sql_mode= thd->variables.sql_mode; enum_check_fields orig_count_cuted_fields= thd->count_cuted_fields; - my_bitmap_map *old_write_map; - my_bitmap_map *old_read_map; + my_bitmap_map *old_maps[2]; ulonglong orig_field_val; /* original field value if valid */ - LINT_INIT(old_write_map); - LINT_INIT(old_read_map); + LINT_INIT(old_maps[0]); + LINT_INIT(old_maps[1]); LINT_INIT(orig_field_val); if (table) - { - old_write_map= dbug_tmp_use_all_columns(table, table->write_set); - old_read_map= dbug_tmp_use_all_columns(table, table->read_set); - } + dbug_tmp_use_all_columns(table, old_maps, + table->read_set, table->write_set); /* For comparison purposes allow invalid dates like 2000-01-32 */ thd->variables.sql_mode= (orig_sql_mode & ~MODE_NO_ZERO_DATE) | MODE_INVALID_DATES; @@ -441,10 +438,7 @@ static bool convert_constant_item(THD *thd, Item_field *field_item, thd->variables.sql_mode= orig_sql_mode; thd->count_cuted_fields= orig_count_cuted_fields; if (table) - { - dbug_tmp_restore_column_map(table->write_set, old_write_map); - dbug_tmp_restore_column_map(table->read_set, old_read_map); - } + dbug_tmp_restore_column_maps(table->read_set, table->write_set, old_maps); } return result; } |