diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2018-08-06 15:50:22 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2018-08-08 19:44:04 +0200 |
commit | 017adbeb3940ac162dcb8dd99478375a37edec02 (patch) | |
tree | 2da9e7ce4d4c02d8106c395ee2b48881101035cf /sql/item_cmpfunc.cc | |
parent | 68ebfb31f215247d2fa08c8ed97a320191afc179 (diff) | |
download | mariadb-git-bb-5.5-MDEV-15475.tar.gz |
MDEV-15475: Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed on EXPLAIN EXTENDED with constant table and viewbb-5.5-MDEV-15475
Print constant ISNULL fireld independent.
Fix of printing of view FRM and CREATE VIEW output
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r-- | sql/item_cmpfunc.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 6fb650b975b..d4a2c767b15 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -4850,6 +4850,19 @@ Item *and_expressions(Item *a, Item *b, Item **org_item) } +void Item_func_isnull::print(String *str, enum_query_type query_type) +{ + str->append(func_name()); + str->append('('); + if (const_item() && !args[0]->maybe_null && + !(query_type & (QT_NO_DATA_EXPANSION | QT_VIEW_INTERNAL))) + str->append("/*always not null*/ 1"); + else + args[0]->print(str, query_type); + str->append(')'); +} + + longlong Item_func_isnull::val_int() { DBUG_ASSERT(fixed == 1); |