Hi, I checked it with 3.23.54 on Windows and got the same incorrect results.
Regards, Dmitry -----Original Message----- From: Heikki Tuuri [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:30 PM To: [EMAIL PROTECTED] Subject: Re: Group by problem Dmitry, ----- Original Message ----- From: "Dmitry Kosoy" <[EMAIL PROTECTED]> Newsgroups: mailing.database.mysql Sent: Thursday, December 12, 2002 8:02 PM Subject: Group by problem > Hi, > > The following sql operators caused to incorrect results: > > CREATE TEMPORARY TABLE temp_list ( > CurrID char(42) NOT NULL, > OriginalID char(42) NOT NULL , > DocRevision int(16) unsigned NOT NULL > ) TYPE=InnoDB; > > insert into temp_list > select CurrID, OriginalID, max(DocRevision) > from some_table > where DocRevision in (0,1,2,3) > group by OriginalID > having (sum(deleted) = 0); > > I revealed that temp_list table contains some incorrect values of CurrID > (not matched to found OriginaID and Docrevision). > According to Mysql documentation it should work. The values of CurrID is a > primary key in some_table. > > These are the column definitions in some_table (InnoDB): > > CurrID char(42) NOT NULL, > OriginalID char(42) NOT NULL , > DocRevision int(16) unsigned NOT NULL > . > . > . > > I check this in 3.51 and 3.53 and got the same results. Sinisa fixed 2 weeks ago a bug where HAVING(aggregate_function(...) = ...) did not work. Please test with 3.23.54! > Regards, > Dmitry Best regards, Heikki Tuuri Innobase Oy --- Order technical MySQL/InnoDB support at https://order.mysql.com/ See http://www.innodb.com for the online manual and latest news on InnoDB sql query This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify us immediately and delete this communication. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php