diff options
author | unknown <tim@threads.polyesthetic.msg> | 2001-04-19 15:15:34 -0400 |
---|---|---|
committer | unknown <tim@threads.polyesthetic.msg> | 2001-04-19 15:15:34 -0400 |
commit | 1115a79126c7031c8ebedae237b02b56af95f1ed (patch) | |
tree | 6db002fd617c1617675cabfeaae47bd4fa0b977e /sql/sql_select.cc | |
parent | b0e8ab193130e7f13902c6f53b131391626d9759 (diff) | |
parent | b61b56b2939eb45b89fa9de98f16bf4a6a158f51 (diff) | |
download | mariadb-git-1115a79126c7031c8ebedae237b02b56af95f1ed.tar.gz |
Merge work.mysql.com:/home/bk/mysql
into threads.polyesthetic.msg:/usr/local/src/my/work
BitKeeper/etc/logging_ok:
auto-union
sql/sql_select.cc:
Auto merged
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 8921d8e3b20..74a36ab6723 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -528,9 +528,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds, if (order && (join.const_tables == join.tables || test_if_skip_sort_order(&join.join_tab[join.const_tables], order, - (having || group || - join.const_tables != join.tables - 1) ? - HA_POS_ERROR : thd->select_limit))) + (group ? HA_POS_ERROR : thd->select_limit)))) order=0; select_describe(&join,need_tmp, (order != 0 && @@ -2527,7 +2525,6 @@ join_free(JOIN *join) delete tab->select; delete tab->quick; x_free(tab->cache.buff); - end_read_record(&tab->read_record); if (tab->table) { if (tab->table->key_read) @@ -2535,8 +2532,11 @@ join_free(JOIN *join) tab->table->key_read=0; tab->table->file->extra(HA_EXTRA_NO_KEYREAD); } - tab->table->file->index_end(); + /* Don't free index if we are using read_record */ + if (!tab->read_record.table) + tab->table->file->index_end(); } + end_read_record(&tab->read_record); } join->table=0; } |