Joinutility seperatorLogin utility separator Infobright.com
   
 
Need help with InfoBright crash on Union with Order by
Posted: 11 March 2010 08:06 PM   Ignore ]  
Newbie
Avatar
Rank
Total Posts:  4
Joined  2010-02-18

Problem: InfoBright v3.3.1 and v3.3.2beta crash and disconnect with the following setup/query on Windows XP Pro:

1) create a new table
CREATE TABLE `MYTABLE` (
  `ID` VARCHAR(100) NOT NULL
);

2) populate table with the following six rows of data:
100
100
200
300
300
300

3) run this query

(select distinct ID, count(ID) as aaa from MYTABLE where ID=‘100’ or ID=‘300’ group by ID)
union
(select distinct ID, 0 as aaa from MYTABLE where ID not in (select ID from MYTABLE where ID=‘100’ or ID=‘300’))
order by ID

4)
crash

5) desired output
ID   aaa
100 2
200 0
300 3


Also, any suggestions on a more elegant way to write that query are appreciated :^)

[ Edited: 11 March 2010 08:19 PM by brighthousefan]
Profile
 
Posted: 12 March 2010 01:54 AM   Ignore ]   [ # 1 ]  
Sr. Member
Avatar
RankRankRankRank
Total Posts:  578
Joined  2008-08-18

Hi,

If I understand the problem well, it may be rewrited as follows:

COUNT(ID)  ->  COUNT(*)
DISTINCT is not needed
subquery  
->  NOT IN ('100''300'

Regards,

[ Edited: 12 March 2010 01:57 AM by Jakub Wroblewski]
Signature 
Profile
 
Posted: 12 March 2010 04:14 AM   Ignore ]   [ # 2 ]  
Member
Avatar
RankRankRank
Total Posts:  181
Joined  2008-08-18

Hi,

It is great to have brighthouse fans wink
You hit a bug. Thanks for pointing it out. We will look into it.

Regards,
Piotr

Profile
 
Posted: 15 March 2010 08:46 AM   Ignore ]   [ # 3 ]  
Administrator
RankRankRank
Total Posts:  173
Joined  2008-08-18

Hello Brighthouse Fan,

Just following up that this issue has been logged and is now fixed. It will be QA verified and appear in the next ICE release. Thanks for your help!

Kind regards,
Andrew

Signature 
Profile
 
Posted: 18 March 2010 05:20 AM   Ignore ]   [ # 4 ]  
Jr. Member
RankRank
Total Posts:  59
Joined  2008-08-18

Hi,
You can follow this bug here:

http://bugs.infobright.org/ticket/1820


Thanks,
Marcin Perkowski

Profile