Bug #259 | DELETE with. ORDER BY and LIMIT crash | ||
---|---|---|---|
Submitted: | 9 Apr 2003 5:31 | Modified: | 9 Apr 2003 8:18 |
Reporter: | Alexander Keremidarski | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.1 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[9 Apr 2003 5:31]
Alexander Keremidarski
[9 Apr 2003 8:18]
MySQL Verification Team
Thank you for your bug report, which helped us fix a crashing bug. This is a patch: ===== sql/sql_delete.cc 1.100 vs edited ===== *** /tmp/sql_delete.cc-1.100-13318 Thu Apr 3 13:47:38 2003 --- edited/sql/sql_delete.cc Wed Apr 9 18:10:40 2003 *************** *** 126,137 **** table->io_cache = (IO_CACHE *) my_malloc(sizeof(IO_CACHE), MYF(MY_FAE | MY_ZEROFILL)); ! if (setup_order(thd, 0, &tables, fields, all_fields, order) || ! !(sortorder=make_unireg_sortorder(order, &length)) || ! (table->found_records = filesort(thd, table, sortorder, length, ! (SQL_SELECT *) 0, HA_POS_ERROR, ! &examined_rows)) ! == HA_POS_ERROR) { delete select; free_underlaid_joins(thd, &thd->lex.select_lex); --- 126,140 ---- table->io_cache = (IO_CACHE *) my_malloc(sizeof(IO_CACHE), MYF(MY_FAE | MY_ZEROFILL)); ! if (setup_ref_array(thd, &thd->lex.select_lex.ref_pointer_array, ! all_fields.elements)|| ! setup_order(thd, thd->lex.select_lex.ref_pointer_array, &tables, ! fields, all_fields, order) || ! !(sortorder=make_unireg_sortorder(order, &length)) || ! (table->found_records = filesort(thd, table, sortorder, length, ! (SQL_SELECT *) 0, HA_POS_ERROR, ! &examined_rows)) ! == HA_POS_ERROR) { delete select; free_underlaid_joins(thd, &thd->lex.select_lex);