diff options
Diffstat (limited to 'include/myisammrg.h')
-rw-r--r-- | include/myisammrg.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/include/myisammrg.h b/include/myisammrg.h index a797c954614..1ae825b4b94 100644 --- a/include/myisammrg.h +++ b/include/myisammrg.h @@ -34,6 +34,13 @@ extern "C" { #define MYRG_NAME_EXT ".MRG" +/* In which table to INSERT rows */ +#define MERGE_INSERT_DISABLED 0 +#define MERGE_INSERT_TO_FIRST 1 +#define MERGE_INSERT_TO_LAST 2 + +extern TYPELIB merge_insert_method; + /* Param to/from myrg_info */ typedef struct st_mymerge_info /* Struct from h_info */ @@ -44,7 +51,7 @@ typedef struct st_mymerge_info /* Struct from h_info */ ulonglong data_file_length; uint reclength; /* Recordlength */ int errkey; /* With key was dupplicated on err */ - uint options; /* HA_OPTIONS_... used */ + uint options; /* HA_OPTION_... used */ } MYMERGE_INFO; typedef struct st_myrg_table_info @@ -56,6 +63,7 @@ typedef struct st_myrg_table_info typedef struct st_myrg_info { MYRG_TABLE *open_tables,*current_table,*end_table,*last_used_table; + uint merge_insert_method; ulonglong records; /* records in tables */ ulonglong del; /* Removed records */ ulonglong data_file_length; @@ -81,10 +89,11 @@ extern int myrg_rkey(MYRG_INFO *file,byte *buf,int inx,const byte *key, extern int myrg_rrnd(MYRG_INFO *file,byte *buf,ulonglong pos); extern int myrg_rsame(MYRG_INFO *file,byte *record,int inx); extern int myrg_update(MYRG_INFO *file,const byte *old,byte *new_rec); +extern int myrg_write(MYRG_INFO *info,byte *rec); extern int myrg_status(MYRG_INFO *file,MYMERGE_INFO *x,int flag); extern int myrg_lock_database(MYRG_INFO *file,int lock_type); -extern int myrg_create(const char *name,const char **table_names, - my_bool fix_names); +extern int myrg_create(const char *name, const char **table_names, + uint insert_method, my_bool fix_names); extern int myrg_extra(MYRG_INFO *file,enum ha_extra_function function); extern ha_rows myrg_records_in_range(MYRG_INFO *info,int inx, const byte *start_key,uint start_key_len, |