Loading mysql-test/r/func_regexp.result +18 −0 Original line number Diff line number Diff line Loading @@ -115,3 +115,21 @@ SELECT 1 REGEXP NULL; 1 REGEXP NULL NULL End of 5.0 tests CREATE TABLE t1(a INT, b CHAR(4)); INSERT INTO t1 VALUES (1, '6.1'), (1, '7.0'), (1, '8.0'); PREPARE stmt1 FROM "SELECT a FROM t1 WHERE a=1 AND '7.0' REGEXP b LIMIT 1"; EXECUTE stmt1; a 1 EXECUTE stmt1; a 1 EXECUTE stmt1; a 1 EXECUTE stmt1; a 1 DEALLOCATE PREPARE stmt1; DROP TABLE t1; End of 5.1 tests mysql-test/t/func_regexp.test +17 −0 Original line number Diff line number Diff line Loading @@ -65,3 +65,20 @@ drop table t1; SELECT 1 REGEXP NULL; --echo End of 5.0 tests # # Bug #37337: Function returns different results # CREATE TABLE t1(a INT, b CHAR(4)); INSERT INTO t1 VALUES (1, '6.1'), (1, '7.0'), (1, '8.0'); PREPARE stmt1 FROM "SELECT a FROM t1 WHERE a=1 AND '7.0' REGEXP b LIMIT 1"; EXECUTE stmt1; EXECUTE stmt1; EXECUTE stmt1; EXECUTE stmt1; DEALLOCATE PREPARE stmt1; DROP TABLE t1; --echo End of 5.1 tests sql/item_cmpfunc.cc +1 −0 Original line number Diff line number Diff line Loading @@ -4592,6 +4592,7 @@ void Item_func_regex::cleanup() { my_regfree(&preg); regex_compiled=0; prev_regexp.length(0); } DBUG_VOID_RETURN; } Loading Loading
mysql-test/r/func_regexp.result +18 −0 Original line number Diff line number Diff line Loading @@ -115,3 +115,21 @@ SELECT 1 REGEXP NULL; 1 REGEXP NULL NULL End of 5.0 tests CREATE TABLE t1(a INT, b CHAR(4)); INSERT INTO t1 VALUES (1, '6.1'), (1, '7.0'), (1, '8.0'); PREPARE stmt1 FROM "SELECT a FROM t1 WHERE a=1 AND '7.0' REGEXP b LIMIT 1"; EXECUTE stmt1; a 1 EXECUTE stmt1; a 1 EXECUTE stmt1; a 1 EXECUTE stmt1; a 1 DEALLOCATE PREPARE stmt1; DROP TABLE t1; End of 5.1 tests
mysql-test/t/func_regexp.test +17 −0 Original line number Diff line number Diff line Loading @@ -65,3 +65,20 @@ drop table t1; SELECT 1 REGEXP NULL; --echo End of 5.0 tests # # Bug #37337: Function returns different results # CREATE TABLE t1(a INT, b CHAR(4)); INSERT INTO t1 VALUES (1, '6.1'), (1, '7.0'), (1, '8.0'); PREPARE stmt1 FROM "SELECT a FROM t1 WHERE a=1 AND '7.0' REGEXP b LIMIT 1"; EXECUTE stmt1; EXECUTE stmt1; EXECUTE stmt1; EXECUTE stmt1; DEALLOCATE PREPARE stmt1; DROP TABLE t1; --echo End of 5.1 tests
sql/item_cmpfunc.cc +1 −0 Original line number Diff line number Diff line Loading @@ -4592,6 +4592,7 @@ void Item_func_regex::cleanup() { my_regfree(&preg); regex_compiled=0; prev_regexp.length(0); } DBUG_VOID_RETURN; } Loading