diff options
author | unknown <monty@donna.mysql.fi> | 2001-03-10 17:05:10 +0200 |
---|---|---|
committer | unknown <monty@donna.mysql.fi> | 2001-03-10 17:05:10 +0200 |
commit | 74ea7333032ebc1d396f1939fd5a84c7a6ecc50c (patch) | |
tree | cc1b41b3c722e4793c0fc03a04d720d88cfa332d /sql/ha_berkeley.cc | |
parent | 7957ec7e339177d246a34491ccdda9851fc00956 (diff) | |
download | mariadb-git-74ea7333032ebc1d396f1939fd5a84c7a6ecc50c.tar.gz |
Fixed bug in MAX() optimizing for BDB tables
Docs/manual.texi:
Updated changelog
mysql-test/README:
Added reference to manual
mysql-test/r/bdb.result:
Added test for MAX() bug
mysql-test/r/innobase.result:
Added test for MAX() bug
mysql-test/t/bdb.test:
Added test for MAX() bug
mysql-test/t/innobase.test:
Added test for MAX() bug
sql-bench/server-cfg.sh:
Don't create big blobs with innobase
sql/ha_berkeley.cc:
Fixed bug in MAX() optimizing
BitKeeper/etc/ignore:
Added sql/.gdbinit to the ignore list
sql/ha_innobase.h:
Fixed bug in MAX() optimizing
sql/handler.h:
Fixed bug in MAX() optimizing
sql/opt_sum.cc:
Fixed bug in MAX() optimizing
Diffstat (limited to 'sql/ha_berkeley.cc')
-rw-r--r-- | sql/ha_berkeley.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc index 3f6b2629e16..10ff4dcc260 100644 --- a/sql/ha_berkeley.cc +++ b/sql/ha_berkeley.cc @@ -1429,7 +1429,12 @@ int ha_berkeley::index_read(byte * buf, const byte * key, pack_key(&last_key, active_index, key_buff, key, key_len); /* Store for compare */ memcpy(key_buff2, key_buff, (key_len=last_key.size)); - key_info->handler.bdb_return_if_eq= -1; + /* + If HA_READ_AFTER_KEY is set, return next key, else return first + matching key. + */ + key_info->handler.bdb_return_if_eq= (find_flag == HA_READ_AFTER_KEY ? + 1 : -1); error=read_row(cursor->c_get(cursor, &last_key, &row, DB_SET_RANGE), (char*) buf, active_index, &row, (DBT*) 0, 0); key_info->handler.bdb_return_if_eq= 0; |