1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

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

This commit is contained in:
pem@mysql.com
2006-03-28 14:16:21 +02:00
parent 61f2dc713b
commit b310d4fb4d
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)