From: Date: April 20 2005 10:10am Subject: bk commit into 5.0 tree (sergefp:1.1860) BUG#9103 List-Archive: http://lists.mysql.com/internals/24161 X-Bug: 9103 Message-Id: <20050420081001.DF1A837AC8@newbox.mylan> Below is the list of changes that have just been committed into a local 5.0 repository of psergey. When psergey does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.1860 05/04/20 12:09:56 sergefp@stripped +3 -0 BUG#9103 merge to 5.0 sql/sql_select.cc 1.317 05/04/20 12:09:53 sergefp@stripped +0 -0 BUG#9103 merge to 5.0 sql/opt_range.cc 1.152 05/04/20 12:09:53 sergefp@stripped +1 -2 BUG#9103 merge to 5.0 sql/sql_select.h 1.82 05/04/20 12:07:19 sergefp@stripped +0 -0 Auto merged # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: sergefp # Host: newbox.mylan # Root: /home/psergey/mysql-5.0-bug9103-merge/RESYNC --- 1.151/sql/opt_range.cc 2005-04-17 02:09:14 +04:00 +++ 1.152/sql/opt_range.cc 2005-04-20 12:09:53 +04:00 @@ -5532,7 +5532,7 @@ goto err; } - if (cp_buffer_from_ref(ref) && thd->is_fatal_error || + if (cp_buffer_from_ref(thd,ref) && thd->is_fatal_error || !(range= new QUICK_RANGE())) goto err; // out of memory --- 1.316/sql/sql_select.cc 2005-04-16 09:35:22 +04:00 +++ 1.317/sql/sql_select.cc 2005-04-20 12:09:53 +04:00 @@ -9583,7 +9583,7 @@ if (table->status & STATUS_GARBAGE) // If first read { table->status= 0; - if (cp_buffer_from_ref(&tab->ref)) + if (cp_buffer_from_ref(tab->join->thd, &tab->ref)) error=HA_ERR_KEY_NOT_FOUND; else { @@ -9647,7 +9647,7 @@ if (!table->file->inited) table->file->ha_index_init(tab->ref.key); - if (cp_buffer_from_ref(&tab->ref)) + if (cp_buffer_from_ref(tab->join->thd, &tab->ref)) return -1; if ((error=table->file->index_read(table->record[0], tab->ref.key_buff, @@ -9674,7 +9674,7 @@ if (!table->file->inited) table->file->ha_index_init(tab->ref.key); - if (cp_buffer_from_ref(&tab->ref)) + if (cp_buffer_from_ref(tab->join->thd, &tab->ref)) return -1; if ((error=table->file->index_read_last(table->record[0], tab->ref.key_buff, @@ -9848,7 +9848,7 @@ if (!table->file->inited) table->file->ha_index_init(tab->ref.key); #if NOT_USED_YET - if (cp_buffer_from_ref(&tab->ref)) // as ft-key doesn't use store_key's + if (cp_buffer_from_ref(tab->join->thd, &tab->ref)) // as ft-key doesn't use store_key's return -1; // see also FT_SELECT::init() #endif table->file->ft_init(); @@ -11609,7 +11609,8 @@ { memcpy(tab->ref.key_buff2, tab->ref.key_buff, tab->ref.key_length); } - if ((tab->ref.key_err=cp_buffer_from_ref(&tab->ref)) || diff) + if ((tab->ref.key_err= cp_buffer_from_ref(tab->join->thd, &tab->ref)) || + diff) return 1; return memcmp(tab->ref.key_buff2, tab->ref.key_buff, tab->ref.key_length) != 0; @@ -11617,11 +11618,17 @@ bool -cp_buffer_from_ref(TABLE_REF *ref) +cp_buffer_from_ref(THD *thd, TABLE_REF *ref) { + enum enum_check_fields save_count_cuted_fields= thd->count_cuted_fields; + thd->count_cuted_fields= CHECK_FIELD_IGNORE; for (store_key **copy=ref->key_copy ; *copy ; copy++) if ((*copy)->copy()) + { + thd->count_cuted_fields= save_count_cuted_fields; return 1; // Something went wrong + } + thd->count_cuted_fields= save_count_cuted_fields; return 0; } --- 1.81/sql/sql_select.h 2005-04-05 03:00:42 +04:00 +++ 1.82/sql/sql_select.h 2005-04-20 12:07:19 +04:00 @@ -520,7 +520,7 @@ const char *name() const { return "const"; } }; -bool cp_buffer_from_ref(TABLE_REF *ref); +bool cp_buffer_from_ref(THD *thd, TABLE_REF *ref); bool error_if_full_join(JOIN *join); int report_error(TABLE *table, int error); int safe_index_read(JOIN_TAB *tab);