Package: mysql-server-4.1
Version: 4.1.11a-4sarge7

I found that when i execute a certain sql query the mysql-server crash.
It happened while I examine the newest trunk of egroupware
(http://www.egroupware.org/other/trunk-snapshot.tar.bz2)
You just need a egroupware database and execute the following sql query:

SELECT SQL_CALC_FOUND_ROWS org_name,COUNT(org_name) AS
org_count,COUNT(DISTINCT CASE WHEN org_unit IS NULL THEN '' ELSE org_unit
END) AS org_unit_count,COUNT(DISTINCT CASE WHEN adr_one_locality IS NULL
THEN '' ELSE adr_one_locality END) AS adr_one_locality_count FROM
egw_addressbook  WHERE contact_tid='n' AND contact_owner=-1 AND
(contact_owner=5 OR contact_private=0 AND contact_owner IN (-1,5,0)) AND
org_name != '' GROUP BY org_name ORDER BY org_name ASC LIMIT 0,15

The important part is:
AND contact_owner = -1 AND (contact_owner =5 OR contact_private =0 AND
contact_owner IN (-1, 5, 0))

If you change that to:
AND contact_owner = -1 AND (contact_private =0 AND contact_owner IN (-1))

it works!

I tried the same query with mysql-4.1.11 on windows xp - the same behaviour.
With mysql-4.1.18 - the query was executed correctly and the server didn't
crash. So I think is a bug in mysql-4.1.11.

I am using Debian GNU/Linux 2.4, kernel 2.4.24-vs1.26 and libc6
2.3.2.ds1-22sarge4.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to