Details
Description
We know this is normally not how to order by on a column but because our software generated this query we experienced crashes and could reproduce it.
Reproduction
create table testcrash (id int not null primary key, first_name varchar(255), last_name varchar(255)); |
 |
select testcrash.first_name, testcrash.last_name, |
ifnull((SELECT count(id) from testcrash where id = 0), 0) as data |
from testcrash |
group by id |
order by IFNULL((SELECT count(id) from testcrash where id = 0), 0) |
LIMIT 0,25;
|