diff options
author | Alexander Barkov <bar@mariadb.org> | 2018-03-15 13:39:26 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2018-03-15 13:39:26 +0400 |
commit | d5099814980aca9f1517e2b7aea57ea825d87db3 (patch) | |
tree | c4bb589f4aa9cff41dec1f9f34a6a219e132c455 /sql/item_strfunc.h | |
parent | 1a0b573b2b099c170efa2eb803e5221724fa2244 (diff) | |
parent | 42433a2dbcc740dd27d6bb0c93ce0f93122febe7 (diff) | |
download | mariadb-git-d5099814980aca9f1517e2b7aea57ea825d87db3.tar.gz |
Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r-- | sql/item_strfunc.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 08601b9d9d4..4efc15338e0 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -35,7 +35,7 @@ protected: character set. No memory is allocated. @retval A pointer to the str_value member. */ - String *make_empty_result() + virtual String *make_empty_result() { /* Reset string length to an empty string. We don't use str_value.set() as @@ -500,11 +500,18 @@ class Item_func_substr_oracle :public Item_func_substr protected: longlong get_position() { longlong pos= args[1]->val_int(); return pos == 0 ? 1 : pos; } + String *make_empty_result() + { null_value= 1; return NULL; } public: Item_func_substr_oracle(THD *thd, Item *a, Item *b): Item_func_substr(thd, a, b) {} Item_func_substr_oracle(THD *thd, Item *a, Item *b, Item *c): Item_func_substr(thd, a, b, c) {} + void fix_length_and_dec() + { + Item_func_substr::fix_length_and_dec(); + maybe_null= true; + } const char *func_name() const { return "substr_oracle"; } Item *get_copy(THD *thd) { return get_item_copy<Item_func_substr_oracle>(thd, this); } |