1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fix for bug#37337: Function returns different results

Problem: REGEXP in functions/PSs may return wrong results
due to improper initialization.

Fix: initialize required REGEXP params.
This commit is contained in:
Ramil Kalimullin
2008-08-15 10:53:25 +05:00
parent 494c0e6d7c
commit fb79a269c4
3 changed files with 36 additions and 0 deletions

View File

@ -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