diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2017-05-22 07:09:49 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2017-05-23 11:06:31 +0200 |
commit | b8405c853fa30002d164d5fe2b4f8ea8979c09b8 (patch) | |
tree | 50ad74aeffa1e115416e0f04cba15bf3a2d5a503 /sql/item_func.h | |
parent | 7d57ba6e28f8dd5f6ab48b0b99d110c2363b576d (diff) | |
download | mariadb-git-b8405c853fa30002d164d5fe2b4f8ea8979c09b8.tar.gz |
MDEV-11958: LEFT JOIN with stored routine produces incorrect result
Added forgoten method of Item_func_sp to make it correctly work with LEFT/RIGHT JOIN.
Fixed inconsistency with the null table caches.
Diffstat (limited to 'sql/item_func.h')
-rw-r--r-- | sql/item_func.h | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/sql/item_func.h b/sql/item_func.h index d60801745fe..2157c6b6b6d 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1165,7 +1165,11 @@ public: longlong val_int(); const char *func_name() const { return "coercibility"; } void fix_length_and_dec() { max_length=10; maybe_null= 0; } - table_map not_null_tables() const { return 0; } + bool eval_not_null_tables(uchar *opt_arg) + { + not_null_tables_cache= 0; + return 0; + } }; class Item_func_locate :public Item_int_func @@ -1433,7 +1437,11 @@ public: } void cleanup(); Item_result result_type () const { return udf.result_type(); } - table_map not_null_tables() const { return 0; } + bool eval_not_null_tables(uchar *opt_arg) + { + not_null_tables_cache= 0; + return 0; + } bool is_expensive() { return 1; } virtual void print(String *str, enum_query_type query_type); }; @@ -1889,7 +1897,11 @@ public: bool is_expensive_processor(uchar *arg) { return TRUE; } enum Functype functype() const { return FT_FUNC; } const char *func_name() const { return "match"; } - table_map not_null_tables() const { return 0; } + bool eval_not_null_tables(uchar *opt_arg) + { + not_null_tables_cache= 0; + return 0; + } bool fix_fields(THD *thd, Item **ref); bool eq(const Item *, bool binary_cmp) const; /* The following should be safe, even if we compare doubles */ @@ -2091,6 +2103,11 @@ public: { return TRUE; } + bool eval_not_null_tables(uchar *opt_arg) + { + not_null_tables_cache= 0; + return 0; + } }; @@ -2138,7 +2155,11 @@ public: void fix_length_and_dec(); enum Item_result result_type () const { return last_value->result_type(); } const char *func_name() const { return "last_value"; } - table_map not_null_tables() const { return 0; } + bool eval_not_null_tables(uchar *opt_arg) + { + not_null_tables_cache= 0; + return 0; + } enum_field_types field_type() const { return last_value->field_type(); } bool const_item() const { return 0; } void evaluate_sideeffects(); |