summaryrefslogtreecommitdiffstats
path: root/include/my_sys.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/my_sys.h')
-rw-r--r--include/my_sys.h42
1 files changed, 41 insertions, 1 deletions
diff --git a/include/my_sys.h b/include/my_sys.h
index e4ab497a..f0ed1160 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -341,6 +341,14 @@ typedef struct st_dynamic_array
myf malloc_flags;
} DYNAMIC_ARRAY;
+
+typedef struct st_dynamic_array_append
+{
+ DYNAMIC_ARRAY *array;
+ uchar *pos, *end;
+} DYNAMIC_ARRAY_APPEND;
+
+
typedef struct st_my_tmpdir
{
DYNAMIC_ARRAY full_list;
@@ -600,6 +608,8 @@ static inline size_t my_b_bytes_in_cache(const IO_CACHE *info)
int my_b_copy_to_file (IO_CACHE *cache, FILE *file, size_t count);
int my_b_copy_all_to_file(IO_CACHE *cache, FILE *file);
+int my_b_copy_to_cache(IO_CACHE *from_cache, IO_CACHE *to_cache, size_t count);
+int my_b_copy_all_to_cache(IO_CACHE *from_cache, IO_CACHE *to_cache);
my_off_t my_b_append_tell(IO_CACHE* info);
my_off_t my_b_safe_tell(IO_CACHE* info); /* picks the correct tell() */
@@ -771,7 +781,7 @@ extern int flush_write_cache(RECORD_CACHE *info);
extern void handle_recived_signals(void);
extern sig_handler my_set_alarm_variable(int signo);
-extern my_bool radixsort_is_appliccable(uint n_items, size_t size_of_element);
+extern my_bool radixsort_is_applicable(uint n_items, size_t size_of_element);
extern void my_string_ptr_sort(uchar *base,uint items,size_t size);
extern void radixsort_for_str_ptr(uchar* base[], uint number_of_elements,
size_t size_of_element,uchar *buffer[]);
@@ -845,6 +855,10 @@ extern void freeze_size(DYNAMIC_ARRAY *array);
#define push_dynamic(A,B) insert_dynamic((A),(B))
#define reset_dynamic(array) ((array)->elements= 0)
#define sort_dynamic(A,cmp) my_qsort((A)->buffer, (A)->elements, (A)->size_of_element, (cmp))
+extern void init_append_dynamic(DYNAMIC_ARRAY_APPEND *append,
+ DYNAMIC_ARRAY *array);
+extern my_bool append_dynamic(DYNAMIC_ARRAY_APPEND *append,
+ const void * element);
extern my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str,
size_t init_alloc,size_t alloc_increment);
@@ -901,6 +915,20 @@ extern char *strmake_root(MEM_ROOT *root,const char *str,size_t len);
extern void *memdup_root(MEM_ROOT *root,const void *str, size_t len);
extern LEX_CSTRING safe_lexcstrdup_root(MEM_ROOT *root, const LEX_CSTRING str);
+
+static inline LEX_STRING lex_string_strmake_root(MEM_ROOT *mem_root,
+ const char *str, size_t length)
+{
+ LEX_STRING tmp;
+ tmp.str= strmake_root(mem_root, str, length);
+ tmp.length= tmp.str ? length : 0;
+ return tmp;
+}
+
+extern LEX_STRING lex_string_casedn_root(MEM_ROOT *root,
+ CHARSET_INFO *cs,
+ const char *str, size_t length);
+
extern my_bool my_compress(uchar *, size_t *, size_t *);
extern my_bool my_uncompress(uchar *, size_t , size_t *);
extern uchar *my_compress_alloc(const uchar *packet, size_t *len,
@@ -1050,6 +1078,18 @@ static inline void my_uuid2str(const uchar *guid, char *s, int with_separators)
const char *my_dlerror(const char *dlpath);
+
+/* System timezone handling*/
+void my_tzset();
+void my_tzname(char *sys_timezone, size_t size);
+
+struct my_tz
+{
+ long seconds_offset;
+ char abbreviation[64];
+};
+void my_tzinfo(time_t t, struct my_tz*);
+
/* character sets */
extern void my_charset_loader_init_mysys(MY_CHARSET_LOADER *loader);
extern uint get_charset_number(const char *cs_name, uint cs_flags, myf flags);