summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorgkodinov/kgeorge@magare.gmz <>2007-10-11 11:29:26 +0300
committergkodinov/kgeorge@magare.gmz <>2007-10-11 11:29:26 +0300
commit99f1606e942985d4a803c2914eb25fe4fc61c338 (patch)
tree3c786386773c8465351e10e77dc4b52bce6578e0 /sql/item_cmpfunc.cc
parent20ec6605d349c3cfa5c062a9818612616bbe3baa (diff)
downloadmariadb-git-99f1606e942985d4a803c2914eb25fe4fc61c338.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.
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;