mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
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: Refined asssert, suggested by Evgen, due to BUG#17265 prepared statement for select with ps-protocol does not hold the former.
This commit is contained in:
parent
eae6679fd4
commit
0d3cf6b0fd
1 changed files with 3 additions and 3 deletions
|
@ -5116,9 +5116,9 @@ bool Item_direct_view_ref::eq(const Item *item, bool binary_cmp) const
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue