Below is the list of changes that have just been committed into a local
5.0 repository of kgeorge. When kgeorge does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-10-11 11:29:26+03:00, gkodinov@stripped +3 -0
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@stripped, 2007-10-11 11:29:24+03:00, gkodinov@stripped +5 -0
Bug #31440: test case
mysql-test/t/func_regexp.test@stripped, 2007-10-11 11:29:24+03:00, gkodinov@stripped +10 -1
Bug #31440: test case
sql/item_cmpfunc.cc@stripped, 2007-10-11 11:29:24+03:00, gkodinov@stripped +1 -0
Bug #31440: mark the item as fixed even when
known to return NULL.
diff -Nrup a/mysql-test/r/func_regexp.result b/mysql-test/r/func_regexp.result
--- a/mysql-test/r/func_regexp.result 2007-03-09 23:18:43 +02:00
+++ b/mysql-test/r/func_regexp.result 2007-10-11 11:29:24 +03:00
@@ -98,3 +98,8 @@ R2
R3
deallocate prepare stmt1;
drop table t1;
+End of 4.1 tests
+SELECT 1 REGEXP NULL;
+1 REGEXP NULL
+NULL
+End of 5.0 tests
diff -Nrup a/mysql-test/t/func_regexp.test b/mysql-test/t/func_regexp.test
--- a/mysql-test/t/func_regexp.test 2005-07-28 03:21:42 +03:00
+++ b/mysql-test/t/func_regexp.test 2007-10-11 11:29:24 +03:00
@@ -74,4 +74,13 @@ execute stmt1 using @a;
deallocate prepare stmt1;
drop table t1;
-# End of 4.1 tests
+--echo End of 4.1 tests
+
+
+#
+# Bug #31440: 'select 1 regex null' asserts debug server
+#
+
+SELECT 1 REGEXP NULL;
+
+--echo End of 5.0 tests
diff -Nrup a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
--- a/sql/item_cmpfunc.cc 2007-09-22 10:45:40 +03:00
+++ b/sql/item_cmpfunc.cc 2007-10-11 11:29:24 +03:00
@@ -4285,6 +4285,7 @@ Item_func_regex::fix_fields(THD *thd, It
if (args[1]->null_value)
{ // Will always return NULL
maybe_null=1;
+ fixed= 1;
return FALSE;
}
int error;
Thread |
---|
• bk commit into 5.0 tree (gkodinov:1.2537) BUG#31440 | kgeorge | 11 Oct |