summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.h
diff options
context:
space:
mode:
authorunknown <jimw@rama.(none)>2006-07-10 19:50:40 -0700
committerunknown <jimw@rama.(none)>2006-07-10 19:50:40 -0700
commit8dc1fa1cf1aa8f04d2b52db26512f142bb1156ad (patch)
tree071591d27875662133e93f5967d673f319ab92fe /sql/item_strfunc.h
parent66fc547d1bd6f267e47ac170f3038f5dd6559691 (diff)
downloadmariadb-git-8dc1fa1cf1aa8f04d2b52db26512f142bb1156ad.tar.gz
Bug #18539: uncompress(d) is null: impossible?
The UNCOMPRESS() function was not marked as maybe_null, even though it returns NULL on invalid data. This confused the optimizer. mysql-test/r/func_compress.result: Add new results mysql-test/t/func_compress.test: Add new regression test sql/item_strfunc.h: Set maybe_null within Item_func_uncompress::fix_length_and_dec()
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r--sql/item_strfunc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index af59b8d740b..d685bd63467 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -784,7 +784,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(){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
};