diff options
author | unknown <ram@mysql.r18.ru> | 2002-10-07 17:49:03 +0500 |
---|---|---|
committer | unknown <ram@mysql.r18.ru> | 2002-10-07 17:49:03 +0500 |
commit | 9195963f56122b3ca7fa480607b8da9ae969a364 (patch) | |
tree | ebf4b60cc6d75288281e8c8da41994ba6bc7d89f /include/heap.h | |
parent | 9e5a4be4605cf71c5e3d6c07283c95fc4f29db70 (diff) | |
download | mariadb-git-9195963f56122b3ca7fa480607b8da9ae969a364.tar.gz |
auto_increment for heap tables
test case
heap/hp_create.c:
auto_increment for heap tables
heap/hp_hash.c:
auto_increment for heap tables
heap/hp_info.c:
auto_increment for heap tables
heap/hp_test1.c:
auto_increment for heap tables
heap/hp_test2.c:
auto_increment for heap tables
heap/hp_update.c:
auto_increment for heap tables
heap/hp_write.c:
auto_increment for heap tables
include/heap.h:
auto_increment for heap tables
mysql-test/r/create.result:
auto_increment for heap tables
mysql-test/t/create.test:
auto_increment for heap tables
sql/ha_heap.cc:
auto_increment for heap tables
sql/ha_heap.h:
auto_increment for heap tables
Diffstat (limited to 'include/heap.h')
-rw-r--r-- | include/heap.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/include/heap.h b/include/heap.h index 359c4346a5d..3702d88ac70 100644 --- a/include/heap.h +++ b/include/heap.h @@ -50,6 +50,7 @@ typedef struct st_heapinfo /* Struct from heap_info */ ulong index_length; uint reclength; /* Length of one record */ int errkey; + ulonglong auto_increment; } HEAPINFO; @@ -115,6 +116,9 @@ typedef struct st_heap_share #endif my_bool delete_on_close; LIST open_list; + uint auto_key; + uint auto_key_type; /* real type of the auto key segment */ + ulonglong auto_increment; } HP_SHARE; struct st_hp_hash_info; @@ -140,6 +144,13 @@ typedef struct st_heap_info LIST open_list; } HP_INFO; +typedef struct st_heap_create_info +{ + uint auto_key; + uint auto_key_type; + ulonglong auto_increment; +} HP_CREATE_INFO; + /* Prototypes for heap-functions */ extern HP_INFO *heap_open(const char *name, int mode); @@ -152,7 +163,8 @@ extern int heap_scan(register HP_INFO *info, byte *record); extern int heap_delete(HP_INFO *info,const byte *buff); extern int heap_info(HP_INFO *info,HEAPINFO *x,int flag); extern int heap_create(const char *name, uint keys, HP_KEYDEF *keydef, - uint reclength, ulong max_records, ulong min_records); + uint reclength, ulong max_records, ulong min_records, + HP_CREATE_INFO *create_info); extern int heap_delete_table(const char *name); extern int heap_extra(HP_INFO *info,enum ha_extra_function function); extern int heap_rename(const char *old_name,const char *new_name); @@ -163,7 +175,7 @@ extern int heap_rprev(HP_INFO *info,byte *record); extern int heap_rfirst(HP_INFO *info,byte *record,int inx); extern int heap_rlast(HP_INFO *info,byte *record,int inx); extern void heap_clear(HP_INFO *info); - +extern void heap_update_auto_increment(HP_INFO *info, const byte *record); ha_rows hp_rb_records_in_range(HP_INFO *info, int inx, const byte *start_key, uint start_key_len, enum ha_rkey_function start_search_flag, |