Description:
I cannot repeat it on 5.1.17, 5.0.50 or 4.1.
5.1.23 and 6.0.3 debug builds crashed like this:
Stack range sanity check OK, backtrace follows:
0x820111b handle_segfault + 541
(nil)
0x826e689 create_tmp_field_from_item(THD*, Item*, st_table*, Item***, bool, unsigned int) + 589
0x826ecd2 create_tmp_field(THD*, st_table*, Item*, Item::Type, Item***, Field**, Field**, bool, bool, bool, bool, unsigned int) + 732
0x826fa05 create_tmp_table(THD*, TMP_TABLE_PARAM*, List<Item>&, st_order*, bool, bool, unsigned long long, unsigned long long, char*) + 3035
0x825ef26 JOIN::optimize() + 7384
0x82617c9 mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order* + 553
0x825c33d handle_select(THD*, st_lex*, select_result*, unsigned long) + 365
0x8215af4 execute_sqlcom_select(THD*, TABLE_LIST*) + 772
0x820e7d5 mysql_execute_command(THD*) + 1701
0x8217550 mysql_parse(THD*, char const*, unsigned int, char const**) + 372
0x820cc00 dispatch_command(enum_server_command, THD*, char*, unsigned int) + 2354
0x820c2c2 do_command(THD*) + 600
0x820acbd handle_one_connection + 255
0x40038aa7 _end + 931807543
0x4017ec2e _end + 933143230
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/refman/5.1/en/resolve-stack-dump.html
and follow instructions on how to resolve the stack trace.
Resolved stack trace is much more helpful in diagnosing the
problem, so please do resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x8dfb0e0 = select 1 from t1 order by (select geomfromtext('point(1 1)') from t1 limit 1)
How to repeat:
drop table if exists t1;
create table `t1` (`a` int)engine=myisam;
insert into t1 values (1),(2);
select 1 from t1 order by (select geomfromtext('point(1 1)') from t1 limit 1);
select 1 from t1 group by (select geomfromtext('point(1 1)') from t1 limit 1);
Suggested fix:
.