Commit c07394c6 authored by unknown's avatar unknown

Merge abarkov@build.mysql.com:/home/bk/mysql-4.1

into bar.mysql.r18.ru:/usr/home/bar/mysql-4.1
parents d0d7186d 91ef4ac7
...@@ -1227,7 +1227,7 @@ JOIN::exec() ...@@ -1227,7 +1227,7 @@ JOIN::exec()
{ {
// Some tables may have been const // Some tables may have been const
curr_join->tmp_having->update_used_tables(); curr_join->tmp_having->update_used_tables();
JOIN_TAB *table= &curr_join->join_tab[const_tables]; JOIN_TAB *table= &curr_join->join_tab[curr_join->const_tables];
table_map used_tables= curr_join->const_table_map | table->table->map; table_map used_tables= curr_join->const_table_map | table->table->map;
Item* sort_table_cond= make_cond_for_table(curr_join->tmp_having, Item* sort_table_cond= make_cond_for_table(curr_join->tmp_having,
...@@ -1263,7 +1263,7 @@ JOIN::exec() ...@@ -1263,7 +1263,7 @@ JOIN::exec()
We can abort sorting after thd->select_limit rows if we there is no We can abort sorting after thd->select_limit rows if we there is no
WHERE clause for any tables after the sorted one. WHERE clause for any tables after the sorted one.
*/ */
JOIN_TAB *table= &curr_join->join_tab[const_tables+1]; JOIN_TAB *table= &curr_join->join_tab[curr_join->const_tables+1];
JOIN_TAB *end_table= &curr_join->join_tab[tables]; JOIN_TAB *end_table= &curr_join->join_tab[tables];
for (; table < end_table ; table++) for (; table < end_table ; table++)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment