From: Date: February 22 2006 4:07pm Subject: bk commit into 5.0 tree (aelkin:1.2059) BUG#17265 List-Archive: http://lists.mysql.com/commits/3025 X-Bug: 17265 Message-Id: <200602221507.k1MF7Ofj012599@dsl-hkigw8-feb0de00-199.dhcp.inet.fi> Below is the list of changes that have just been committed into a local 5.0 repository of elkin. When elkin 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.2059 06/02/22 17:07:18 aelkin@stripped +1 -0 BUG#17265 Assertion failure in rpl_row_view01. To quote Timour review lines: The actual cause of the bug is that sql_base.cc:setup_wild() sets "select_lex->with_wild = 0" (in the end of the function) once it expands all wild-cards, and wild-card expansion is done during the prepare phase. During this phase we replace all "*" with the corresponding items, which for views happen to be references to references. When we do execute, select_lex->with_wild = 0, and all "*" are already replaced by the corresponding items, which in the case of views need to be dereferenced first. Fixed by refining the assert. Regression test for the bug is rpl_row_view01, as was reported. sql/item.cc 1.206 06/02/22 17:07:12 aelkin@stripped +3 -3 Refined asssert, suggested by Evgen, due to BUG#17265 prepared statement for select with ps-protocol does not hold the former. # 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: aelkin # Host: dsl-hkigw8-feb0de00-199.dhcp.inet.fi # Root: /usr_rh9/home/elkin.rh9/MySQL/FIXES/5.0-bug17265 --- 1.205/sql/item.cc 2006-02-16 19:54:42 +02:00 +++ 1.206/sql/item.cc 2006-02-22 17:07:12 +02:00 @@ -5116,9 +5116,9 @@ if (item_ref->ref_type() == VIEW_REF) { Item *item_ref_ref= *(item_ref->ref); - DBUG_ASSERT((*ref)->type() == FIELD_ITEM && - (item_ref_ref->type() == FIELD_ITEM)); - return (*ref == item_ref_ref); + DBUG_ASSERT((*ref)->real_item()->type() == FIELD_ITEM && + (item_ref_ref->real_item()->type() == FIELD_ITEM)); + return ((*ref)->real_item() == item_ref_ref->real_item()); } } return FALSE;