List:General Discussion« Previous MessageNext Message »
From:Richard G. Harman Jr Date:April 10 1999 1:44pm
Subject:BUG: query with 'group by' fails to find matching row[s] (fwd)
View as plain text  
(sorry this isn't posted correctly, mysqlbug was terminated due to X
crashing..)

I hope the following helps!

Richard Harman
------------------------------snip------------------------------------------
From: warewolf@stripped
To: mysql@stripped
Subject: query with 'group by' fails to find matching row[s]

>Submitter-Id:	warewolf@stripped
>Originator:	Richard G. Harman Jr
>MySQL support: none
>Synopsis:	a query with 'group by' fails to find a matching row
>Severity:      serious
>Priority:	medium
>Category:	mysql
>Class:		sw-bug
>Release:	mysql-3.21.23-beta

>Environment:
	<machine, os, target, libraries (multiple lines)>
System: Linux linux 2.2.1 #3 Tue Feb 9 13:46:37 EST 1999 i586 unknown
Architecture: i586

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/specs
gcc version 2.7.2.3
Perl: This is perl, version 5.004_04 built for i386-linux

>Description:

I do 

select artist,filename from mp3 where full_path like '%mary%' group by 
artist;

and it only returns 2 rows.

I then do, 
select artist,filename from mp3 where full_path like '%mary%';
and it returns all three.

>How-To-Repeat:
CREATE TABLE mp3 (
  id mediumint(100) unsigned DEFAULT '0' NOT NULL auto_increment,
  filename varchar(100) DEFAULT '' NOT NULL,
  full_path varchar(130) DEFAULT '' NOT NULL,
  album varchar(30) DEFAULT '' NOT NULL,
  artist varchar(30) DEFAULT '' NOT NULL,
  title varchar(70) DEFAULT '' NOT NULL,
  comment varchar(100),
  layer smallint(1) unsigned DEFAULT '0' NOT NULL,
  style
set('good','bad','rock','soft','classical','orchestral','medium','upbeat','dance','theme','other','Unknown','soundtrack','Sound
FX','Audio Clip','80s','90s','60s','70s') DEFAULT 'Unknown' NOT NULL,
  bitrate smallint(4) unsigned DEFAULT '0' NOT NULL,
  rate smallint(5) unsigned DEFAULT '0' NOT NULL,
  mode varchar(10) DEFAULT '' NOT NULL,
  channels enum('1','2') DEFAULT '1' NOT NULL,
  size mediumint(10) unsigned DEFAULT '0' NOT NULL,
  hash varchar(32) DEFAULT '' NOT NULL,
  seconds smallint(3) unsigned DEFAULT '0' NOT NULL,
  PRIMARY KEY (hash,size),
  KEY id (id)
);

INSERT INTO mp3 VALUES (338,'7_Mary_3-Cumbersome.mp3','/phat/mp3/7_Mary_3/7_Mary
_3-Cumbersome.mp3','','7 Mary 3','Cumbersome',NULL,3,'Unknown',128,44100,'j-ster
eo','2',3825997,'fd727b9eae9af280322f9511f3a03151',239);
INSERT INTO mp3 VALUES (339,'7_Mary_3-Waters_Edge.mp3','/phat/mp3/7_Mary_3/7_Mar
y_3-Waters_Edge.mp3','','7 Mary 3','Waters Edge',NULL,3,'Unknown',128,44100,'j-s
tereo','2',3717327,'92b259fe689bec6bcb832cd84c202427',232);
INSERT INTO mp3 VALUES (576,'Jethro_Tull_Vol_2-Cross_Eyed_Mary.mp3','/phat/mp3/J
ethro_Tull_Vol_2/Jethro_Tull_Vol_2-Cross_Eyed_Mary.mp3','','Jethro Tull Vol 2','
Cross Eyed Mary',NULL,3,'Unknown',112,44100,'j-stereo','2',3514276,'dae26ea6415a
70c0a7c8f833625da40a',251);



Thread
BUG: query with 'group by' fails to find matching row[s] (fwd)Richard G. Harman Jr10 Apr
  • Re: BUG: query with 'group by' fails to find matching row[s] (fwd)kalle volkov10 Apr
  • Re: BUG: query with 'group by' fails to find matching row[s] (fwd)Shaun Batterton11 Apr
    • Re: BUG: query with 'group by' fails to find matching row[s] (fwd)Richard G. Harman Jr12 Apr