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

Fixed optimizer bug in ORDER BY where some ORDER BY parts where ignored.

Extended default arguments to be up to 4095 characters
This commit is contained in:
monty@tik.mysql.fi
2001-07-30 22:49:39 +03:00
parent 1ebd29ac6e
commit 1731161ff4
5 changed files with 136 additions and 1042 deletions

View File

@@ -2649,12 +2649,12 @@ static void update_depend_map(JOIN *join)
for (i=0 ; i < ref->key_parts ; i++,item++)
depend_map|=(*item)->used_tables();
ref->depend_map=depend_map;
for (JOIN_TAB *join_tab2=join->join_tab;
for (JOIN_TAB **tab=join->map2table;
depend_map ;
join_tab2++,depend_map>>=1 )
tab++,depend_map>>=1 )
{
if (depend_map & 1)
ref->depend_map|=join_tab2->ref.depend_map;
ref->depend_map|=(*tab)->ref.depend_map;
}
}
}
@@ -2671,12 +2671,12 @@ static void update_depend_map(JOIN *join, ORDER *order)
order->depend_map=depend_map=order->item[0]->used_tables();
if (!(order->depend_map & RAND_TABLE_BIT)) // Not item_sum() or RAND()
{
for (JOIN_TAB *join_tab=join->join_tab;
for (JOIN_TAB **tab=join->map2table;
depend_map ;
join_tab++, depend_map>>=1)
tab++, depend_map>>=1)
{
if (depend_map & 1)
order->depend_map|=join_tab->ref.depend_map;
order->depend_map|=(*tab)->ref.depend_map;
}
}
}