mariadb/sql/ha_heap.h
unknown 7032486889 Fixes for valgrind
Added optimzation for clustered index
Fixed bug in UPDATE ... ORDER BY
Fixed handling of UPDATE ... LIMIT


BitKeeper/deleted/.del-.cvsignore~7e29af89a3559f4c:
  Delete: Images/.cvsignore
BitKeeper/deleted/.del-README~d5a4e7ca3a2e87a9:
  Delete: repl-tests/README
BitKeeper/deleted/.del-run-all-tests~4deb6479a13e4568:
  Delete: repl-tests/run-all-tests
BitKeeper/deleted/.del-run.test~3dc5b9bd1e9feea5:
  Delete: repl-tests/test-repl-alter/run.test
BitKeeper/deleted/.del-run.test~4020771cff278f14:
  Delete: repl-tests/test-bad-query/run.test
BitKeeper/deleted/.del-run.test~452f2b66537404a8:
  Delete: repl-tests/test-dump/run.test
BitKeeper/deleted/.del-run.test~b1f0c1f96554df8:
  Delete: repl-tests/test-auto-inc/run.test
BitKeeper/deleted/.del-table-dump-check.master~e13afeb8c79264b5:
  Delete: repl-tests/test-dump/table-dump-check.master
BitKeeper/deleted/.del-table-dump-select.master~744acb955e33f3db:
  Delete: repl-tests/test-dump/table-dump-select.master
BitKeeper/deleted/.del-x.master~29a93ed7956c8693:
  Delete: repl-tests/test-auto-inc/x.master
BitKeeper/deleted/.del-x.master~3b248cbac9abda2b:
  Delete: repl-tests/test-bad-query/x.master
BitKeeper/deleted/.del-foo-dump-master.master~b49ae6bec1e918ee:
  Delete: repl-tests/test-repl/foo-dump-master.master
BitKeeper/deleted/.del-foo-dump-slave.master~f16ed20457d59be9:
  Delete: repl-tests/test-repl/foo-dump-slave.master
BitKeeper/deleted/.del-repl-timestamp.master.reject~3492d2b74b413771:
  Delete: repl-tests/test-repl-ts/repl-timestamp.master.reject
BitKeeper/deleted/.del-repl-timestamp.master~4b7782da5cc13161:
  Delete: repl-tests/test-repl-ts/repl-timestamp.master
BitKeeper/deleted/.del-run.test~a1e32ea1e4253af4:
  Delete: repl-tests/test-repl/run.test
BitKeeper/deleted/.del-run.test~ce5e626c91b760ec:
  Delete: repl-tests/test-repl-ts/run.test
BitKeeper/deleted/.del-sum-wlen-master.master~1a5ea625c79e978:
  Delete: repl-tests/test-repl/sum-wlen-master.master
BitKeeper/deleted/.del-sum-wlen-slave.master~f016d98833433084:
  Delete: repl-tests/test-repl/sum-wlen-slave.master
BitKeeper/deleted/.del-test.master~5829e7b3770179db:
  Delete: repl-tests/test-repl-alter/test.master
BitKeeper/deleted/.del-master-slave.inc~6775f6ae10137c39:
  Delete: repl-tests/include/master-slave.inc
include/my_global.h:
  Fix for purify/valgrind
myisam/mi_info.c:
  Updated comment
mysql-test/r/group_by.result:
  New test results
mysql-test/r/innodb.result:
  New test results
mysql-test/r/join_outer.result:
  New test results
mysql-test/r/multi_update.result:
  New test results
mysql-test/r/null_key.result:
  New test results
mysql-test/r/update.result:
  New test results
mysql-test/t/group_by.test:
  Added extra explain to 'suspicious' test.
mysql-test/t/innodb.test:
  Added test for UPDATE ... ORDER BY
mysql-test/t/join_outer.test:
  Changed test to be repeatable
mysql-test/t/multi_update.test:
  Slight change of test to catch more bugs
mysql-test/t/update.test:
  Better test for UPDATE ... ORDER BY
sql/field.cc:
  Simple optimization
sql/ha_heap.h:
  Added optimzation for clustered index
sql/ha_innodb.cc:
  Added optimzation for clustered index
sql/ha_innodb.h:
  Added optimzation for clustered index
sql/handler.h:
  Added optimzation for clustered index
sql/item_sum.cc:
  Removed some usage of current_thd
sql/mysqld.cc:
  Fix bug when compiling for purify/valgrind
sql/opt_range.cc:
  Added optimzation for clustered index
sql/records.cc:
  Fixed comment
sql/sql_list.h:
  Fixed comment
sql/sql_select.cc:
  Removed some usage of current_thd
sql/sql_select.h:
  Removed some usage of current_thd
sql/sql_union.cc:
  Removed some usage of current_thd
sql/sql_update.cc:
  Fixed bug in UPDATE ... ORDER BY
  Fixed handling of UPDATE ... LIMIT
support-files/my-huge.cnf.sh:
  Added default size for query cache
support-files/my-large.cnf.sh:
  Added default size for query cache
2003-04-23 21:52:16 +03:00

95 lines
3.4 KiB
C++

/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifdef __GNUC__
#pragma interface /* gcc class implementation */
#endif
/* class for the the heap handler */
#include <heap.h>
class ha_heap: public handler
{
HP_INFO *file;
public:
ha_heap(TABLE *table): handler(table), file(0) {}
~ha_heap() {}
const char *table_type() const { return "HEAP"; }
const char *index_type(uint inx)
{
return ((table->key_info[inx].algorithm == HA_KEY_ALG_BTREE) ? "BTREE" :
"HASH");
}
const char **bas_ext() const;
ulong table_flags() const
{
return (HA_READ_RND_SAME | HA_NO_INDEX | HA_KEYPOS_TO_RNDPOS |
HA_NO_BLOBS | HA_NULL_KEY | HA_REC_NOT_IN_SEQ |
HA_NO_AUTO_INCREMENT);
}
ulong index_flags(uint inx) const
{
return ((table->key_info[inx].algorithm == HA_KEY_ALG_BTREE) ?
(HA_READ_NEXT | HA_READ_PREV | HA_READ_ORDER) :
(HA_ONLY_WHOLE_INDEX | HA_WRONG_ASCII_ORDER |
HA_NOT_READ_PREFIX_LAST));
}
uint max_record_length() const { return HA_MAX_REC_LENGTH; }
uint max_keys() const { return MAX_KEY; }
uint max_key_parts() const { return MAX_REF_PARTS; }
uint max_key_length() const { return HA_MAX_REC_LENGTH; }
double scan_time() { return (double) (records+deleted) / 20.0+10; }
double read_time(uint index, uint ranges, ha_rows rows)
{ return (double) rows / 20.0+1; }
virtual bool fast_key_read() { return 1;}
int open(const char *name, int mode, uint test_if_locked);
int close(void);
int write_row(byte * buf);
int update_row(const byte * old_data, byte * new_data);
int delete_row(const byte * buf);
int index_read(byte * buf, const byte * key,
uint key_len, enum ha_rkey_function find_flag);
int index_read_idx(byte * buf, uint idx, const byte * key,
uint key_len, enum ha_rkey_function find_flag);
int index_next(byte * buf);
int index_prev(byte * buf);
int index_first(byte * buf);
int index_last(byte * buf);
int rnd_init(bool scan=1);
int rnd_next(byte *buf);
int rnd_pos(byte * buf, byte *pos);
void position(const byte *record);
void info(uint);
int extra(enum ha_extra_function operation);
int reset(void);
int external_lock(THD *thd, int lock_type);
int delete_all_rows(void);
ha_rows records_in_range(int inx, const byte *start_key,uint start_key_len,
enum ha_rkey_function start_search_flag,
const byte *end_key,uint end_key_len,
enum ha_rkey_function end_search_flag);
int delete_table(const char *from);
int rename_table(const char * from, const char * to);
int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info);
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
enum thr_lock_type lock_type);
};