summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2007-10-11 11:29:26 +0300
committerunknown <gkodinov/kgeorge@magare.gmz>2007-10-11 11:29:26 +0300
commit76af571717dcf38e3fcc6919ce668f938c1fc93d (patch)
tree3c786386773c8465351e10e77dc4b52bce6578e0 /sql/item_cmpfunc.cc
parent6146c0c75d013b15ea2c6656ee0d774498734fd2 (diff)
downloadmariadb-git-76af571717dcf38e3fcc6919ce668f938c1fc93d.tar.gz
Bug #31440: 'select 1 regex null' asserts debug server
The special case with NULL as a regular expression was handled at prepare time. But in this special case the item was not marked as fixed. This caused an assertion at execution time. Fixed my marking the item as fixed even when known to return NULL at prepare time. mysql-test/r/func_regexp.result: Bug #31440: test case mysql-test/t/func_regexp.test: Bug #31440: test case sql/item_cmpfunc.cc: Bug #31440: mark the item as fixed even when known to return NULL.
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 1599bcc1571..a5ede9e757c 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -4285,6 +4285,7 @@ Item_func_regex::fix_fields(THD *thd, Item **ref)
if (args[1]->null_value)
{ // Will always return NULL
maybe_null=1;
+ fixed= 1;
return FALSE;
}
int error;