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

treat parameter as constant in ORDER BY check of fields in SELECT list(Bug #3686)

This commit is contained in:
bell@sanja.is.com.ua
2004-05-10 13:29:02 +03:00
parent c745ae9503
commit a00117902f
2 changed files with 49 additions and 2 deletions

View File

@ -367,7 +367,8 @@ JOIN::prepare(Item ***rref_pointer_array,
{
if (item->with_sum_func)
flag|=1;
else if (!(flag & 2) && !item->const_item())
else if (!(flag & 2) &&
test(item->used_tables() & ~PARAM_TABLE_BIT))
flag|=2;
}
if (flag == 3)