summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.h
diff options
context:
space:
mode:
authorRamil Kalimullin <ramil@mysql.com>2008-09-05 13:30:01 +0500
committerRamil Kalimullin <ramil@mysql.com>2008-09-05 13:30:01 +0500
commit788be2aebdb0bce63b45b1fecf2f2d8a12a5cfc7 (patch)
tree0520cf1f8caad29cba53bc9eecd64adf894dd404 /sql/item_cmpfunc.h
parentbcbff0b93bfca0c5b199cde184f1127b39d80bc5 (diff)
downloadmariadb-git-788be2aebdb0bce63b45b1fecf2f2d8a12a5cfc7.tar.gz
Fix for bug #39021: SELECT REGEXP BINARY NULL never returns
Problem: SELECT ... REGEXP BINARY NULL may lead to server crash/hang. Fix: properly handle NULL regular expressions. mysql-test/r/func_regexp.result: Fix for bug #39021: SELECT REGEXP BINARY NULL never returns - test result. mysql-test/t/func_regexp.test: Fix for bug #39021: SELECT REGEXP BINARY NULL never returns - test case. sql/item_cmpfunc.cc: Fix for bug #39021: SELECT REGEXP BINARY NULL never returns - checking regular expressions' null_value we tested it without a val_xxx() call before, which is wrong. Now Item_func_regex::regcomp() returns -1 in the case and allows to handle NULL expessions properly. sql/item_cmpfunc.h: Fix for bug #39021: SELECT REGEXP BINARY NULL never returns - checking regular expressions' null_value we tested it without a val_xxx() call before, which is wrong. Now Item_func_regex::regcomp() returns -1 in the case and allows to handle NULL expessions properly.
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r--sql/item_cmpfunc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index d250e1b366a..1bd60ff37d9 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -1323,7 +1323,7 @@ class Item_func_regex :public Item_bool_func
CHARSET_INFO *regex_lib_charset;
int regex_lib_flags;
String conv;
- bool regcomp(bool send_error);
+ int regcomp(bool send_error);
public:
Item_func_regex(Item *a,Item *b) :Item_bool_func(a,b),
regex_compiled(0),regex_is_const(0) {}