diff options
author | tnurnberg@mysql.com/white.intern.koehntopp.de <> | 2008-02-28 14:23:22 +0100 |
---|---|---|
committer | tnurnberg@mysql.com/white.intern.koehntopp.de <> | 2008-02-28 14:23:22 +0100 |
commit | c6b4d7a7c41a2469a69e0d2a8a883c83cbff3ea9 (patch) | |
tree | d7fe47965f56b028624438c1549357c09d710ab1 /sql/item.h | |
parent | 140ca5953815ac1f773ae518cb021783e3334e20 (diff) | |
download | mariadb-git-c6b4d7a7c41a2469a69e0d2a8a883c83cbff3ea9.tar.gz |
Bug#34749: Server crash when using NAME_CONST() with an aggregate function
NAME_CONST('whatever', -1) * MAX(whatever) bombed since -1 was
not seen as constant, but as FUNCTION_UNARY_MINUS(constant)
while we are at the same time pretending it was a basic const
item. This confused the aggregate handlers in exciting ways.
We now make NAME_CONST() behave more consistently.
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sql/item.h b/sql/item.h index 5f511557f47..9af98e0efdb 100644 --- a/sql/item.h +++ b/sql/item.h @@ -1113,14 +1113,7 @@ class Item_name_const : public Item Item *name_item; bool valid_args; public: - Item_name_const(Item *name_arg, Item *val): - value_item(val), name_item(name_arg) - { - if (!(valid_args= name_item->basic_const_item() & - value_item->basic_const_item())) - my_error(ER_WRONG_ARGUMENTS, MYF(0), "NAME_CONST"); - Item::maybe_null= TRUE; - } + Item_name_const(Item *name_arg, Item *val); bool fix_fields(THD *, Item **); |