Hi!
>>>>> "Sinisa" == Sinisa Milivojevic <[EMAIL PROTECTED]> writes: Sinisa> Victoria Reznichenko writes: >> Hi! >> Sinisa, i tested the following example on 4.0.1 and got the same >> result. If I don't use ORDER BY in the SELECT statement all worked >> fine: <cut> mysql> SELECT u.gender AS gender, count(DISTINCT u.id) AS dist_count, (count(DISTINCT u.id)/5*100) AS percentage from users_table u, log_table l where l.user_id = u.id GROUP BY u.gender order by percentage; >> +--------+------------+------------+ >> | gender | dist_count | percentage | >> +--------+------------+------------+ >> | NULL | 1 | 20.00 | >> | NULL | 3 | 60.00 | >> +--------+------------+------------+ >> 2 rows in set (0.01 sec) >> Sinisa> Thank you for your bug report which helped us fix a bug. A fix will Sinisa> appear in 4.0.2. Sinisa> This is a temporary fix patch : <cut> And here is the final one (I will push this in the 4.0 tree later today): ===== sql/sql_select.cc 1.170 vs edited ===== *** /tmp/sql_select.cc-1.170-8799 Sat Jun 8 20:02:47 2002 --- edited/sql/sql_select.cc Sun Jun 9 15:13:44 2002 *************** *** 3676,3682 **** if (blob_count == 0) { /* We need to ensure that first byte is not 0 for the delete link */ ! if (hidden_null_count) hidden_null_count++; else null_count++; --- 3676,3682 ---- if (blob_count == 0) { /* We need to ensure that first byte is not 0 for the delete link */ ! if (param->hidden_field_count) hidden_null_count++; else null_count++; Regards, Monty -- For technical support contracts, goto https://order.mysql.com/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Mr. Michael Widenius <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, CTO /_/ /_/\_, /___/\___\_\___/ Helsinki, Finland <___/ www.mysql.com --------------------------------------------------------------------- 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