diff options
author | unknown <monty@donna.mysql.fi> | 2001-03-07 23:50:44 +0200 |
---|---|---|
committer | unknown <monty@donna.mysql.fi> | 2001-03-07 23:50:44 +0200 |
commit | 5151b5520edafd3374093a73635ef52d4044f10e (patch) | |
tree | 5185e82a23f37f9c337833e5c194164d9eaf8804 /sql/ha_berkeley.cc | |
parent | e3dc55a839a23d6f1b63f05238d0b33454b7a5ab (diff) | |
download | mariadb-git-5151b5520edafd3374093a73635ef52d4044f10e.tar.gz |
Fixed test cases for innobase
Fixed bug introduced with last ORDER BY optimization
Changed log position to longlong to avoid warnings.
Docs/manual.texi:
Update for innobase
mysql-test/r/innobase.result:
Fixed test cases
mysql-test/t/bdb.test:
Removed not used tables
mysql-test/t/innobase.test:
Fixed test cases
sql/field.h:
Fixed bug introduced with last ORDER BY optimization
sql/ha_berkeley.cc:
Fixed bug when index_init() was called twice.
sql/mysql_priv.h:
Added option to not get stack trace (when using gdb)
sql/mysqld.cc:
Added option to not get stack trace (when using gdb)
sql/slave.cc:
Changed log position to longlong to avoid warnings.
sql/slave.h:
Changed log position to longlong to avoid warnings.
sql/sql_parse.cc:
Removed warnings
sql/sql_select.cc:
Cleanups
Diffstat (limited to 'sql/ha_berkeley.cc')
-rw-r--r-- | sql/ha_berkeley.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc index 9a0300b4fcb..3f6b2629e16 100644 --- a/sql/ha_berkeley.cc +++ b/sql/ha_berkeley.cc @@ -1307,13 +1307,19 @@ int ha_berkeley::index_init(uint keynr) int error; DBUG_ENTER("index_init"); DBUG_PRINT("enter",("table: '%s' key: %d", table->real_name, keynr)); + + /* + Under some very rare conditions (like full joins) we may already have + an active cursor at this point + */ + if (cursor) + cursor->c_close(cursor); active_index=keynr; - dbug_assert(cursor == 0); if ((error=key_file[keynr]->cursor(key_file[keynr], transaction, &cursor, table->reginfo.lock_type > TL_WRITE_ALLOW_READ ? 0 : 0))) - cursor=0; // Safety /* purecov: inspected */ + cursor=0; // Safety /* purecov: inspected */ bzero((char*) &last_key,sizeof(last_key)); DBUG_RETURN(error); } |