At file:///home/tsk/mprog/src/5.3/ ------------------------------------------------------------ revno: 2801 revision-id: timour@askmonty.org-20100715135910-y1gvcc3d63sod6xt parent: sanja@askmonty.org-20100710103730-ayy6a61pdibspf4o committer: timour@askmonty.org branch nick: 5.3 timestamp: Thu 2010-07-15 16:59:10 +0300 message: Fixed an error in the creation of REF access method for materialized subquery execution, where the the REF buffer format was mistaken to be in record format instead of key format. The error was that the null byte for all fields of the record was in the front of the buffer, and not before each field data. === modified file 'sql/item_subselect.cc' --- a/sql/item_subselect.cc 2010-07-10 10:37:30 +0000 +++ b/sql/item_subselect.cc 2010-07-15 13:59:10 +0000 @@ -3957,8 +3957,6 @@ Item_iterator_row it(item_in->left_expr); /* The only index on the temporary table. */ KEY *tmp_key= tmp_table->key_info; - /* Number of keyparts in tmp_key. */ - uint tmp_key_parts= tmp_key->key_parts; JOIN_TAB *tab; DBUG_ENTER("subselect_hash_sj_engine::make_unique_engine"); === modified file 'sql/sql_select.cc' --- a/sql/sql_select.cc 2010-07-10 10:37:30 +0000 +++ b/sql/sql_select.cc 2010-07-15 13:59:10 +0000 @@ -7925,7 +7925,7 @@ use that information instead. */ cur_ref_buff + null_count, - null_count ? key_buff : 0, + null_count ? cur_ref_buff : 0, cur_key_part->length, items[i], value); cur_ref_buff+= cur_key_part->store_length; }