Bug #60221 | Stored FUNCTION with REGEXP in body return wrong result | ||
---|---|---|---|
Submitted: | 23 Feb 2011 12:42 | Modified: | 23 Feb 2011 14:22 |
Reporter: | Roman Kutyrev | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Stored Routines | Severity: | S2 (Serious) |
Version: | 5.0.77 Source distribution | OS: | Linux (CentOS 5.x) |
Assigned to: | CPU Architecture: | Any |
[23 Feb 2011 12:42]
Roman Kutyrev
[23 Feb 2011 12:47]
Roman Kutyrev
Stored PROCEDURE work with same results drop procedure FIND_PEER_PROC; DELIMITER | CREATE procedure FIND_PEER_PROC (in_called VARCHAR(50)) BEGIN select direction_id from codes where in_called regexp code limit 1; END| DELIMITER ; mysql> call FIND_PEER_PROC("9941234"); +--------------+ | direction_id | +--------------+ | 2 | +--------------+ 1 row in set (0.00 sec) Query OK, 0 rows affected (0.00 sec) mysql> call FIND_PEER_PROC("9941234"); Empty set (0.00 sec) Query OK, 0 rows affected (0.00 sec) mysql> call FIND_PEER_PROC("7741234"); +--------------+ | direction_id | +--------------+ | 1 | +--------------+ 1 row in set (0.00 sec) Query OK, 0 rows affected (0.00 sec) mysql> call FIND_PEER_PROC("7741234"); +--------------+ | direction_id | +--------------+ | 1 | +--------------+ 1 row in set (0.00 sec) Query OK, 0 rows affected (0.00 sec)
[23 Feb 2011 13:28]
Roman Kutyrev
On Debian with mysql-server 5.0.51a-24+lenny4 thats work good.
[23 Feb 2011 13:44]
MySQL Verification Team
Could you please try 5.0.91. http://downloads.mysql.com/archives.php?p=mysql-5.0&v=5.0.91 Thanks in advance.
[23 Feb 2011 13:59]
Roman Kutyrev
Update by yum to version mysql-server-5.0.77-4.el5_5.4.x86_64.rpm solve problem. Thanks in advance.
[23 Feb 2011 14:22]
Valeriy Kravchuk
So, the problem was probably related to the way your binaries were built from sources (or building environment). One more reason to use MySQL binaries :)