List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:December 27 1999 11:29pm
Subject:bug report:[mysqld crashes on statement with IF and ORDER BY]
View as plain text  
Hi!

>>>>> "joek" == joek joek <joekjoek@stripped> writes:

joek> Hope this is the right place to send this report.
>> Description:

joek> I have searched the online documentation about this problem but haven't 
joek> found anything.

joek> The problem is that mysqld doesn't seem to like to execute SELECT statements 
joek> in which two tables are joined, an "IF()" function which returns a TEXT-type 
joek> column if true is used, *AND* an ORDER BY clause is included.  mysqld dies 
joek> if I try to do this.

joek> If I execute a statement like this:

mysql> select P.forum,postid, if((P.forum='soros'),body,"nothing") from 
joek> test2 as P, test1 as T where P.forum=T.forum order by forum;

joek> ...where 'body' is a text column, mysqld dies.

joek> If 'body' is replaced by a non- 'text' column, the query works.
joek> If the 'order by' is removed, the query works.
joek> If you run a similar query without a join, it works, eg

mysql> select forum, if((forum='soros'),body,"nothing") from test1 order by 
joek> forum;

joek> ...works OK.

>> How-To-Repeat:

mysql> create table test1 (forum char(20), body text);
mysql> create table test2(forum char(20), postid char(20));
mysql> select P.forum,postid, if((P.forum='soros'),body,"nothing") from 
joek> test2 as P, test1 as T where P.forum=T.forum order by forum;

joek> (mysqld dies)

<cut>

Hi!

I have now tested this with MySQL 3.23.8 and 3.22.28 and neither
version dies for the above query.

Regards,
Monty

PS: Starting next year we will create a new mailing list:
    bugs@stripped ;  To this list we will only accept bug reports,
    posted with mysqlbug and with a repeatable example. All MySQL
    developers will subscribe and read this list! This will ensure that
    all posted bugs will get solved quickly!
Thread
bug report:[mysqld crashes on statement with IF and ORDER BY]joek joek11 Dec
  • Re: bug report:[mysqld crashes on statement with IF and ORDER BY]sinisa11 Dec
  • bug report:[mysqld crashes on statement with IF and ORDER BY]Michael Widenius28 Dec