188
188
extern ulong my_file_opened,my_stream_opened, my_tmp_file_created;
189
189
extern ulong my_file_total_opened;
190
190
extern uint mysys_usage_id;
191
extern my_bool my_init_done;
191
extern bool my_init_done;
193
193
/* Point to current my_message() */
194
194
extern void (*my_sigtstp_cleanup)(void),
201
201
my_recived_signals, /* Signals we have got */
202
202
my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */
203
203
my_dont_interrupt; /* call remember_intr when set */
204
extern my_bool mysys_uses_curses, my_use_symdir;
204
extern bool mysys_uses_curses, my_use_symdir;
205
205
extern ulong sf_malloc_cur_memory, sf_malloc_max_memory;
207
207
extern ulong my_default_record_cache_size;
208
extern my_bool my_disable_locking, my_disable_async_io,
208
extern bool my_disable_locking, my_disable_async_io,
209
209
my_disable_flush_key_blocks, my_disable_symlinks;
210
210
extern char wild_many, wild_one, wild_prefix;
211
211
extern const char *charsets_dir;
577
577
extern const char **my_error_unregister(int first, int last);
578
578
extern void my_message(uint my_err, const char *str,myf MyFlags);
579
579
extern void my_message_no_curses(uint my_err, const char *str,myf MyFlags);
580
extern my_bool my_init(void);
580
extern bool my_init(void);
581
581
extern void my_end(int infoflag);
582
582
extern int my_redel(const char *from, const char *to, int MyFlags);
583
583
extern int my_copystat(const char *from, const char *to, int MyFlags);
589
589
#define my_print_open_files()
592
extern my_bool init_tmpdir(MY_TMPDIR *tmpdir, const char *pathlist);
592
extern bool init_tmpdir(MY_TMPDIR *tmpdir, const char *pathlist);
593
593
extern char *my_tmpdir(MY_TMPDIR *tmpdir);
594
594
extern void free_tmpdir(MY_TMPDIR *tmpdir);
598
598
extern size_t dirname_length(const char *name);
599
599
#define base_name(A) (A+dirname_length(A))
600
600
extern int test_if_hard_path(const char *dir_name);
601
extern my_bool has_path(const char *name);
601
extern bool has_path(const char *name);
602
602
extern char *convert_dirname(char *to, const char *from, const char *from_end);
603
603
extern void to_unix_path(char * name);
604
604
extern char * fn_ext(const char *name);
624
624
extern int wf_test(struct wild_file_pack *wf_pack,const char *name);
625
625
extern void wf_end(struct wild_file_pack *buffer);
626
626
extern size_t strip_sp(char * str);
627
extern my_bool array_append_string_unique(const char *str,
627
extern bool array_append_string_unique(const char *str,
628
628
const char **array, size_t size);
629
629
extern void get_date(char * to,int timeflag,time_t use_time);
630
630
extern void soundex(CHARSET_INFO *, char * out_pntr, char * in_pntr,
655
655
extern int init_io_cache(IO_CACHE *info,File file,size_t cachesize,
656
656
enum cache_type type,my_off_t seek_offset,
657
657
pbool use_async_io, myf cache_myflags);
658
extern my_bool reinit_io_cache(IO_CACHE *info,enum cache_type type,
658
extern bool reinit_io_cache(IO_CACHE *info,enum cache_type type,
659
659
my_off_t seek_offset,pbool use_async_io,
660
660
pbool clear_cache);
661
661
extern void setup_io_cache(IO_CACHE* info);
685
685
extern my_off_t my_b_filelength(IO_CACHE *info);
686
686
extern size_t my_b_printf(IO_CACHE *info, const char* fmt, ...);
687
687
extern size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list ap);
688
extern my_bool open_cached_file(IO_CACHE *cache,const char *dir,
688
extern bool open_cached_file(IO_CACHE *cache,const char *dir,
689
689
const char *prefix, size_t cache_size,
690
690
myf cache_myflags);
691
extern my_bool real_open_cached_file(IO_CACHE *cache);
691
extern bool real_open_cached_file(IO_CACHE *cache);
692
692
extern void close_cached_file(IO_CACHE *cache);
693
693
File create_temp_file(char *to, const char *dir, const char *pfx,
694
694
int mode, myf MyFlags);
696
696
#define my_init_dynamic_array_ci(A,B,C,D) init_dynamic_array2(A,B,NULL,C,D ORIG_CALLER_INFO)
697
697
#define my_init_dynamic_array2(A,B,C,D,E) init_dynamic_array2(A,B,C,D,E CALLER_INFO)
698
698
#define my_init_dynamic_array2_ci(A,B,C,D,E) init_dynamic_array2(A,B,C,D,E ORIG_CALLER_INFO)
699
extern my_bool init_dynamic_array2(DYNAMIC_ARRAY *array,uint element_size,
699
extern bool init_dynamic_array2(DYNAMIC_ARRAY *array,uint element_size,
700
700
void *init_buffer, uint init_alloc,
701
701
uint alloc_increment
702
702
CALLER_INFO_PROTO);
703
703
/* init_dynamic_array() function is deprecated */
704
extern my_bool init_dynamic_array(DYNAMIC_ARRAY *array,uint element_size,
704
extern bool init_dynamic_array(DYNAMIC_ARRAY *array,uint element_size,
705
705
uint init_alloc,uint alloc_increment
706
706
CALLER_INFO_PROTO);
707
extern my_bool insert_dynamic(DYNAMIC_ARRAY *array,uchar * element);
707
extern bool insert_dynamic(DYNAMIC_ARRAY *array,uchar * element);
708
708
extern uchar *alloc_dynamic(DYNAMIC_ARRAY *array);
709
709
extern uchar *pop_dynamic(DYNAMIC_ARRAY*);
710
extern my_bool set_dynamic(DYNAMIC_ARRAY *array,uchar * element,uint array_index);
711
extern my_bool allocate_dynamic(DYNAMIC_ARRAY *array, uint max_elements);
710
extern bool set_dynamic(DYNAMIC_ARRAY *array,uchar * element,uint array_index);
711
extern bool allocate_dynamic(DYNAMIC_ARRAY *array, uint max_elements);
712
712
extern void get_dynamic(DYNAMIC_ARRAY *array,uchar * element,uint array_index);
713
713
extern void delete_dynamic(DYNAMIC_ARRAY *array);
714
714
extern void delete_dynamic_element(DYNAMIC_ARRAY *array, uint array_index);
720
720
#define reset_dynamic(array) ((array)->elements= 0)
721
721
#define sort_dynamic(A,cmp) my_qsort((A)->buffer, (A)->elements, (A)->size_of_element, (cmp))
723
extern my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str,
723
extern bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str,
724
724
size_t init_alloc,size_t alloc_increment);
725
extern my_bool dynstr_append(DYNAMIC_STRING *str, const char *append);
726
my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append,
725
extern bool dynstr_append(DYNAMIC_STRING *str, const char *append);
726
bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append,
728
extern my_bool dynstr_append_os_quoted(DYNAMIC_STRING *str, const char *append,
728
extern bool dynstr_append_os_quoted(DYNAMIC_STRING *str, const char *append,
730
extern my_bool dynstr_set(DYNAMIC_STRING *str, const char *init_str);
731
extern my_bool dynstr_realloc(DYNAMIC_STRING *str, size_t additional_size);
732
extern my_bool dynstr_trunc(DYNAMIC_STRING *str, size_t n);
730
extern bool dynstr_set(DYNAMIC_STRING *str, const char *init_str);
731
extern bool dynstr_realloc(DYNAMIC_STRING *str, size_t additional_size);
732
extern bool dynstr_trunc(DYNAMIC_STRING *str, size_t n);
733
733
extern void dynstr_free(DYNAMIC_STRING *str);
734
734
#ifdef HAVE_MLOCK
735
735
extern void *my_malloc_lock(size_t length,myf flags);
766
766
extern void free_defaults(char **argv);
767
767
extern void my_print_default_files(const char *conf_file);
768
768
extern void print_defaults(const char *conf_file, const char **groups);
769
extern my_bool my_compress(uchar *, size_t *, size_t *);
770
extern my_bool my_uncompress(uchar *, size_t , size_t *);
769
extern bool my_compress(uchar *, size_t *, size_t *);
770
extern bool my_uncompress(uchar *, size_t , size_t *);
771
771
extern uchar *my_compress_alloc(const uchar *packet, size_t *len,
772
772
size_t *complen);
773
773
extern ha_checksum my_checksum(ha_checksum crc, const uchar *mem,
781
781
extern ulonglong my_micro_time(void);
782
782
extern ulonglong my_micro_time_and_time(time_t *time_arg);
783
783
time_t my_time_possible_from_micro(ulonglong microtime);
784
extern my_bool my_gethwaddr(uchar *to);
784
extern bool my_gethwaddr(uchar *to);
785
785
extern int my_getncpus(void);
787
787
#ifdef HAVE_SYS_MMAN_H
837
837
extern CHARSET_INFO *get_charset_by_csname(const char *cs_name,
838
838
uint cs_flags, myf my_flags);
840
extern my_bool resolve_charset(const char *cs_name,
840
extern bool resolve_charset(const char *cs_name,
841
841
CHARSET_INFO *default_cs,
842
842
CHARSET_INFO **cs);
843
extern my_bool resolve_collation(const char *cl_name,
843
extern bool resolve_collation(const char *cl_name,
844
844
CHARSET_INFO *default_cl,
845
845
CHARSET_INFO **cl);
847
847
extern void free_charsets(void);
848
848
extern char *get_charsets_dir(char *buf);
849
extern my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2);
850
extern my_bool init_compiled_charsets(myf flags);
849
extern bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2);
850
extern bool init_compiled_charsets(myf flags);
851
851
extern void add_compiled_collation(CHARSET_INFO *cs);
852
852
extern size_t escape_string_for_mysql(CHARSET_INFO *charset_info,
853
853
char *to, size_t to_length,