Bug #149 count(subselect) should show syntax error
Submitted: 14 Mar 2003 0:53 Modified: 14 Mar 2003 1:39
Reporter: Georg Richter Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1 OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[14 Mar 2003 0:53] Georg Richter
Description:
Count should show syntax error if you try COUNT((subselect)).

(This bug was already reported to Sanja forgot to add it here).

How to repeat:
create table a (a int, b int);
insert into a values (1,2);

select count ((select a from a union select b from a))

-> system hangs
[14 Mar 2003 1:23] Oleksandr Byelkin
thank you for bugreport, but I can't reproduce it on last bk tree version: 
 
+ drop table if exists t1; 
+ Warnings: 
+ Note  1051    Unknown table 't1' 
+ create table t1 (a int, b int); 
+ insert into t1 values (1,2); 
+ select count((select a from t1 union select b from t1)); 
+ count((select a from t1 union select b from t1)) 
+ 0 
+ drop table t1;
[14 Mar 2003 1:39] Georg Richter
Yes, it's fixed now with latest pull. (Mark Matthews was able to reproduce it too yesterday)

-> changing status to closed