From e69d8fb32a97cd7269f01ecc60b74f710e4a7c6b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 19 Apr 2001 20:41:19 +0300 Subject: Fix for BDB and LOCK TABLES BitKeeper/deleted/.del-ib_config.h.in~9e57db8504e55b7: Delete: innobase/ib_config.h.in BitKeeper/deleted/.del-ib_config.h~7539e26ffc614439: Delete: innobase/ib_config.h Docs/manual.texi: Changelog myisam/mi_locking.c: Cleanup mysql-test/r/bdb.result: Test for LOCK TABLES mysql-test/r/innodb.result: Test for LOCK TABLES mysql-test/t/bdb.test: Test for LOCK TABLES mysql-test/t/innodb.test: Test for LOCK TABLES sql-bench/test-insert.sh: Allow loop to be small sql/ha_berkeley.cc: Fixed bug when using LOCK TABLES with BDB sql/ha_berkeley.h: Fixed bug when using LOCK TABLES with BDB sql/handler.h: Fixed bug when using LOCK TABLES with BDB sql/sql_base.cc: Fixed bug when using LOCK TABLES with BDB sql/sql_parse.cc: UNLOCK TABLES ends transaction sql/sql_select.cc: Fix to not call index_end() twice --- sql/sql_select.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sql/sql_select.cc') diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 77cf20f813a..00a41a851b5 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -2525,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) @@ -2533,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; } -- cgit v1.2.1