diff options
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r-- | sql/item_strfunc.h | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index b601491060c..e0566b1d8c9 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -357,7 +357,7 @@ public: String *val_str(String *); void fix_length_and_dec() { - set_persist_maybe_null(1); + maybe_null=1; /* 9 = MAX ((8- (arg_len % 8)) + 1) */ max_length = args[0]->max_length + 9; } @@ -373,7 +373,7 @@ public: String *val_str(String *); void fix_length_and_dec() { - set_persist_maybe_null(1); + maybe_null=1; /* 9 = MAX ((8- (arg_len % 8)) + 1) */ max_length= args[0]->max_length; if (max_length >= 9U) @@ -401,7 +401,7 @@ public: constructor_helper(); } String *val_str(String *); - void fix_length_and_dec() { set_persist_maybe_null(1); max_length = 13; } + void fix_length_and_dec() { maybe_null=1; max_length = 13; } const char *func_name() const { return "encrypt"; } bool check_vcol_func_processor(uchar *int_arg) { @@ -471,7 +471,7 @@ public: void fix_length_and_dec() { max_length= MAX_FIELD_NAME * system_charset_info->mbmaxlen; - set_persist_maybe_null(1); + maybe_null=1; } const char *func_name() const { return "database"; } const char *fully_qualified_func_name() const { return "database()"; } @@ -634,7 +634,7 @@ public: { collation.set(default_charset()); max_length=64; - set_persist_maybe_null(1); + maybe_null= 1; } }; @@ -661,7 +661,7 @@ public: Item_func_unhex(Item *a) :Item_str_func(a) { /* there can be bad hex strings */ - set_persist_maybe_null(1); + maybe_null= 1; } const char *func_name() const { return "unhex"; } String *val_str(String *); @@ -747,7 +747,7 @@ public: void fix_length_and_dec() { collation.set(&my_charset_bin, DERIVATION_COERCIBLE); - set_persist_maybe_null(1); + maybe_null=1; max_length=MAX_BLOB_WIDTH; } bool check_vcol_func_processor(uchar *int_arg) @@ -780,7 +780,7 @@ public: { decimals= 0; fix_length_and_charset(3 * 8 + 7, default_charset()); - set_persist_maybe_null(1); + maybe_null= 1; } }; @@ -907,7 +907,7 @@ public: { collation.set(system_charset_info); max_length= 64 * collation.collation->mbmaxlen; // should be enough - set_persist_maybe_null(0); + maybe_null= 0; }; table_map not_null_tables() const { return 0; } }; @@ -922,7 +922,7 @@ public: { collation.set(system_charset_info); max_length= 64 * collation.collation->mbmaxlen; // should be enough - set_persist_maybe_null(0); + maybe_null= 0; }; table_map not_null_tables() const { return 0; } }; @@ -968,8 +968,7 @@ class Item_func_uncompress: public Item_str_func String buffer; public: Item_func_uncompress(Item *a): Item_str_func(a){} - void fix_length_and_dec() - { set_persist_maybe_null(1); max_length= MAX_BLOB_WIDTH; } + void fix_length_and_dec(){ maybe_null= 1; max_length= MAX_BLOB_WIDTH; } const char *func_name() const{return "uncompress";} String *val_str(String *) ZLIB_DEPENDED_FUNCTION }; @@ -1038,7 +1037,7 @@ public: max_length= MAX_DYNAMIC_COLUMN_LENGTH; } void fix_length_and_dec() - { set_persist_maybe_null(1); } + { maybe_null= 1; } /* Mark that collation can change between calls */ bool dynamic_result() { return 1; } @@ -1057,8 +1056,7 @@ class Item_func_dyncol_list: public Item_str_func { public: Item_func_dyncol_list(Item *str) :Item_str_func(str) {}; - void fix_length_and_dec() - { set_persist_maybe_null(1); max_length= MAX_BLOB_WIDTH; }; + void fix_length_and_dec() { maybe_null= 1; max_length= MAX_BLOB_WIDTH; }; const char *func_name() const{ return "column_list"; } String *val_str(String *); }; |