| Bug #132 | ORDER BY 0 crash with UNION or with subselect/derived table | ||
|---|---|---|---|
| Submitted: | 7 Mar 2003 13:23 | Modified: | 8 Mar 2003 12:20 |
| Reporter: | jocelyn fournier (Silver Quality Contributor) | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server | Severity: | S1 (Critical) |
| Version: | 4.1 | OS: | Any (all) |
| Assigned to: | CPU Architecture: | Any | |
[7 Mar 2003 13:23]
jocelyn fournier
[8 Mar 2003 12:20]
MySQL Verification Team
===== sql/sql_select.cc 1.209 vs edited =====
*** /tmp/sql_select.cc-1.209-11251 Thu Mar 6 17:15:15 2003
--- edited/sql/sql_select.cc Sat Mar 8 21:51:57 2003
***************
*** 7088,7094 ****
Item *item=0;
uint count= (uint) ((Item_int*)itemptr)->value;
! if (count > fields.elements)
{
my_printf_error(ER_BAD_FIELD_ERROR,ER(ER_BAD_FIELD_ERROR),
MYF(0),itemptr->full_name(),
--- 7088,7094 ----
Item *item=0;
uint count= (uint) ((Item_int*)itemptr)->value;
! if (!count || count > fields.elements)
{
my_printf_error(ER_BAD_FIELD_ERROR,ER(ER_BAD_FIELD_ERROR),
MYF(0),itemptr->full_name(),
