Bug #3615 | Error using the COUNT function in a stored procedure | ||
---|---|---|---|
Submitted: | 30 Apr 2004 19:03 | Modified: | 21 Jul 2004 15:33 |
Reporter: | Miguel Solorzano | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 5.0.0/5.0.1 | OS: | Windows (Windows) |
Assigned to: | Bugs System | CPU Architecture: | Any |
[30 Apr 2004 19:03]
Miguel Solorzano
[13 Jul 2004 3:25]
Peter Gulutzan
"Me too!" Well, it might be related. I too have encountered inconsistent results with an aggregate function use in a stored procedure. How to repeat: mysql> create table t (s1 int); Query OK, 0 rows affected (0.32 sec) mysql> insert into t values (1),(1); Query OK, 2 rows affected (0.00 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql> delimiter // mysql> create procedure p () select 'x' from t having count(*) = 2; -> // Query OK, 0 rows affected (0.00 sec) mysql> call p()// +---+ | x | +---+ | x | +---+ 1 row in set (0.00 sec) Query OK, 0 rows affected (0.00 sec) mysql> call p()// +---+ | x | +---+ | x | | x | +---+ 2 rows in set (0.00 sec) Query OK, 0 rows affected (0.00 sec)
[21 Jul 2004 15:33]
Per-Erik Martin
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bugfix, yourself. More information about accessing the source trees is available at http://www.mysql.com/doc/en/Installing_source_tree.html