1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Post review fixes for BUG#16474: SP crashed MySQL.

mysql-test/r/ps.result:
  Added test coverage for "order by" in prepared statements (related to BUG#16474).
mysql-test/r/sp.result:
  Added reference to test case for BUG#16474.
mysql-test/t/ps.test:
  Added test coverage for "order by" in prepared statements (related to BUG#16474).
mysql-test/t/sp.test:
  Added reference to test case for BUG#16474.
sql/sql_select.cc:
  Fixed comment and test for basic_const_item() instead of is_splocal().
This commit is contained in:
unknown
2006-03-28 14:16:21 +02:00
parent fb36d923ce
commit 537ec1e6df
5 changed files with 94 additions and 2 deletions

View File

@ -12327,9 +12327,10 @@ find_order_in_list(THD *thd, Item **ref_pointer_array, TABLE_LIST *tables,
/*
Local SP variables may be int but are expressions, not positions.
(And they must be fixed.)
(And they can't be used before fix_fields is called for them).
*/
if (order_item->type() == Item::INT_ITEM && !order_item->is_splocal())
// if (order_item->type() == Item::INT_ITEM && !order_item->is_splocal())
if (order_item->type() == Item::INT_ITEM && order_item->basic_const_item())
{ /* Order by position */
uint count= (uint) order_item->val_int();
if (!count || count > fields.elements)