summaryrefslogtreecommitdiff
path: root/myisam/myisamdef.h
diff options
context:
space:
mode:
authorunknown <wax@mysql.com>2002-11-17 05:41:42 +0500
committerunknown <wax@mysql.com>2002-11-17 05:41:42 +0500
commitb9a431c41ca843805ac630d0cf521d2c19083e01 (patch)
tree9ace2798eeec1a47cbc808686c02c37cf285e5ec /myisam/myisamdef.h
parentc4964caf0f902c46b22074d7427a607de61ebf6a (diff)
downloadmariadb-git-b9a431c41ca843805ac630d0cf521d2c19083e01.tar.gz
Move MI_SORT_PARAM and BUFFPEK to myisamdef.h, delete KEY_STORE, change functions
of store keys to temp. file include/myisam.h: move MI_SORT_PARAM to myisamdef.h myisam/myisamdef.h: Move MI_SORT_PARAM and BUFFPEK. Change MI_SORT_PARAM myisam/sort.c: Delete KEY_STORE, change functions of store keys to temp. file
Diffstat (limited to 'myisam/myisamdef.h')
-rw-r--r--myisam/myisamdef.h39
1 files changed, 38 insertions, 1 deletions
diff --git a/myisam/myisamdef.h b/myisam/myisamdef.h
index 6499021861e..5bd63fd8cf6 100644
--- a/myisam/myisamdef.h
+++ b/myisam/myisamdef.h
@@ -275,7 +275,41 @@ struct st_myisam_info {
int rtree_recursion_depth;
};
-
+typedef struct st_buffpek {
+ my_off_t file_pos; /* Where we are in the sort file */
+ uchar *base,*key; /* Key pointers */
+ ha_rows count; /* Number of rows in table */
+ ulong mem_count; /* numbers of keys in memory */
+ ulong max_keys; /* Max keys in buffert */
+} BUFFPEK;
+
+typedef struct st_mi_sort_param
+{
+ pthread_t thr;
+ IO_CACHE read_cache, tempfile, tempfile_for_exceptions;
+ DYNAMIC_ARRAY buffpek;
+ ulonglong unique[MI_MAX_KEY_SEG+1];
+ my_off_t pos,max_pos,filepos,start_recpos;
+ uint key, key_length,real_key_length,sortbuff_size;
+ uint maxbuffers, keys, find_length, sort_keys_length;
+ my_bool fix_datafile, master;
+ MI_KEYDEF *keyinfo;
+ SORT_INFO *sort_info;
+ uchar **sort_keys;
+ byte *rec_buff;
+ void *wordlist, *wordptr;
+ char *record;
+ MY_TMPDIR *tmpdir;
+ int (*key_cmp)(struct st_mi_sort_param *, const void *, const void *);
+ int (*key_read)(struct st_mi_sort_param *,void *);
+ int (*key_write)(struct st_mi_sort_param *, const void *);
+ void (*lock_in_memory)(MI_CHECK *);
+ NEAR int (*write_keys)(struct st_mi_sort_param *, register uchar **,
+ uint , struct st_buffpek *, IO_CACHE *);
+ NEAR uint (*read_to_buffer)(IO_CACHE *,struct st_buffpek *, uint);
+ NEAR int (*write_key)(struct st_mi_sort_param *, IO_CACHE *,char *,
+ uint, uint);
+} MI_SORT_PARAM;
/* Some defines used by isam-funktions */
#define USE_WHOLE_KEY MI_MAX_KEY_BUFF*2 /* Use whole key in _mi_search() */
@@ -658,6 +692,9 @@ int thr_write_keys(MI_SORT_PARAM *sort_param);
pthread_handler_decl(thr_find_all_keys,arg);
#endif
+int sort_write_record(MI_SORT_PARAM *sort_param);
+int _create_index_by_sort(MI_SORT_PARAM *info,my_bool no_messages, ulong);
+
#ifdef __cplusplus
}
#endif