The world's most popular open source database
#include <m_ctype.h>#include <stdarg.h>#include <typelib.h>#include <my_alloc.h>Include dependency graph for my_sys.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Classes | |
| struct | wild_file_pack |
| struct | st_record_cache |
| struct | st_my_file_info |
| struct | st_my_tmpdir |
| struct | st_dynamic_array |
| struct | st_dynamic_string |
| struct | st_io_cache |
Defines | |
| #define | MYSYS_PROGRAM_USES_CURSES() { error_handler_hook = my_message_curses; mysys_uses_curses=1; } |
| #define | MYSYS_PROGRAM_DONT_USE_CURSES() { error_handler_hook = my_message_no_curses; mysys_uses_curses=0;} |
| #define | MY_INIT(name) ; { my_progname= name; my_init(); } |
| #define | ERRMSGSIZE (SC_MAXWIDTH) |
| #define | NRERRBUFFS (2) |
| #define | MY_FILE_ERROR ((uint) ~0) |
| #define | MY_FFNF 1 |
| #define | MY_FNABP 2 |
| #define | MY_NABP 4 |
| #define | MY_FAE 8 |
| #define | MY_WME 16 |
| #define | MY_WAIT_IF_FULL 32 |
| #define | MY_IGNORE_BADFD 32 |
| #define | MY_RAID 64 |
| #define | MY_FULL_IO 512 |
| #define | MY_DONT_CHECK_FILESIZE 128 |
| #define | MY_LINK_WARNING 32 |
| #define | MY_COPYTIME 64 |
| #define | MY_DELETE_OLD 256 |
| #define | MY_RESOLVE_LINK 128 |
| #define | MY_HOLD_ORIGINAL_MODES 128 |
| #define | MY_REDEL_MAKE_BACKUP 256 |
| #define | MY_SEEK_NOT_DONE 32 |
| #define | MY_DONT_WAIT 64 |
| #define | MY_ZEROFILL 32 |
| #define | MY_ALLOW_ZERO_PTR 64 |
| #define | MY_FREE_ON_ERROR 128 |
| #define | MY_HOLD_ON_ERROR 256 |
| #define | MY_THREADSAFE 128 |
| #define | MY_DONT_OVERWRITE_FILE 1024 |
| #define | MY_CHECK_ERROR 1 |
| #define | MY_GIVE_INFO 2 |
| #define | MY_DONT_FREE_DBUG 4 |
| #define | MY_REMOVE_NONE 0 |
| #define | MY_REMOVE_OPTION 1 |
| #define | MY_REMOVE_SECTION 2 |
| #define | ME_HIGHBYTE 8 |
| #define | ME_NOCUR 1 |
| #define | ME_OLDWIN 2 |
| #define | ME_BELL 4 |
| #define | ME_HOLDTANG 8 |
| #define | ME_WAITTOT 16 |
| #define | ME_WAITTANG 32 |
| #define | ME_NOREFRESH 64 |
| #define | ME_NOINPUT 128 |
| #define | ME_COLOUR1 ((1 << ME_HIGHBYTE)) |
| #define | ME_COLOUR2 ((2 << ME_HIGHBYTE)) |
| #define | ME_COLOUR3 ((3 << ME_HIGHBYTE)) |
| #define | MY_REPLACE_DIR 1 |
| #define | MY_REPLACE_EXT 2 |
| #define | MY_UNPACK_FILENAME 4 |
| #define | MY_PACK_FILENAME 8 |
| #define | MY_RESOLVE_SYMLINKS 16 |
| #define | MY_RETURN_REAL_PATH 32 |
| #define | MY_SAFE_PATH 64 |
| #define | MY_RELATIVE_PATH 128 |
| #define | MY_APPEND_EXT 256 |
| #define | MY_SEEK_SET 0 |
| #define | MY_SEEK_CUR 1 |
| #define | MY_SEEK_END 2 |
| #define | MY_WAIT_FOR_USER_TO_FIX_PANIC 60 |
| #define | MY_WAIT_GIVE_USER_A_MESSAGE 10 |
| #define | MIN_COMPRESS_LENGTH 50 |
| #define | DFLT_INIT_HITS 3 |
| #define | MY_KEEP_PREALLOC 1 |
| #define | MY_MARK_BLOCKS_FREE 2 |
| #define | MY_ERRNO_EDOM 33 |
| #define | MY_ERRNO_ERANGE 34 |
| #define | GETDATE_DATE_TIME 1 |
| #define | GETDATE_SHORT_DATE 2 |
| #define | GETDATE_HHMMSSTIME 4 |
| #define | GETDATE_GMT 8 |
| #define | GETDATE_FIXEDLENGTH 16 |
| #define | my_checkmalloc() |
| #define | TERMINATE(A) {} |
| #define | QUICK_SAFEMALLOC |
| #define | NORMAL_SAFEMALLOC |
| #define | my_malloc_ci(SZ, FLAG) my_malloc( SZ, FLAG ) |
| #define | my_free(PTR, FG) ((void)FG,my_no_flags_free(PTR)) |
| #define | CALLER_INFO_PROTO |
| #define | CALLER_INFO |
| #define | ORIG_CALLER_INFO |
| #define | TRASH(A, B) |
| #define | my_get_large_page_size() (0) |
| #define | my_large_malloc(A, B) my_malloc_lock((A),(B)) |
| #define | my_large_free(A, B) my_free_lock((A),(B)) |
| #define | my_alloca(SZ) my_malloc(SZ,MYF(0)) |
| #define | my_afree(PTR) my_free(PTR,MYF(MY_WME)) |
| #define | my_b_clear(info) (info)->buffer=0 |
| #define | my_b_inited(info) (info)->buffer |
| #define | my_b_EOF INT_MIN |
| #define | my_b_read(info, Buffer, Count) |
| #define | my_b_write(info, Buffer, Count) |
| #define | my_b_get(info) |
| #define | my_b_write_byte(info, chr) |
| #define | my_b_fill_cache(info) (((info)->read_end=(info)->read_pos),(*(info)->read_function)(info,0,0)) |
| #define | my_b_tell(info) |
| #define | my_b_bytes_in_cache(info) |
| #define | my_access access |
| #define | my_delete_allow_opened(fname, flags) my_delete((fname),(flags)) |
| #define | my_print_open_files() |
| #define | base_name(A) (A+dirname_length(A)) |
| #define | flush_io_cache(info) my_b_flush_io_cache((info),1) |
| #define | my_init_dynamic_array(A, B, C, D) init_dynamic_array(A,B,C,D CALLER_INFO) |
| #define | my_init_dynamic_array_ci(A, B, C, D) init_dynamic_array(A,B,C,D ORIG_CALLER_INFO) |
| #define | dynamic_array_ptr(array, array_index) ((array)->buffer+(array_index)*(array)->size_of_element) |
| #define | dynamic_element(array, array_index, type) ((type)((array)->buffer) +(array_index)) |
| #define | push_dynamic(A, B) insert_dynamic((A),(B)) |
| #define | reset_dynamic(array) ((array)->elements= 0) |
| #define | sort_dynamic(A, cmp) qsort((A)->buffer, (A)->elements, (A)->size_of_element, (cmp)) |
| #define | my_malloc_lock(A, B) my_malloc((A),(B)) |
| #define | my_free_lock(A, B) my_free((A),(B)) |
| #define | alloc_root_inited(A) ((A)->min_malloc != 0) |
| #define | ALLOC_ROOT_MIN_BLOCK_SIZE (MALLOC_OVERHEAD + sizeof(USED_MEM) + 8) |
| #define | clear_alloc_root(A) do { (A)->free= (A)->used= (A)->pre_alloc= 0; (A)->min_malloc=0;} while(0) |
| #define | PROT_READ 1 |
| #define | PROT_WRITE 2 |
| #define | MAP_NORESERVE 0 |
| #define | MAP_SHARED 0x0001 |
| #define | MAP_PRIVATE 0x0002 |
| #define | MAP_NOSYNC 0x0800 |
| #define | MAP_FAILED ((void *)-1) |
| #define | MS_SYNC 0x0000 |
| #define | HAVE_MMAP |
Typedefs | |
| typedef wild_file_pack | WF_PACK |
| typedef st_record_cache | RECORD_CACHE |
| typedef st_my_tmpdir | MY_TMPDIR |
| typedef st_dynamic_array | DYNAMIC_ARRAY |
| typedef st_dynamic_string | DYNAMIC_STRING |
| typedef int(*) | IO_CACHE_CALLBACK (struct st_io_cache *) |
| typedef st_io_cache | IO_CACHE |
| typedef int(*) | qsort2_cmp (const void *, const void *, const void *) |
| typedef uint32 | ha_checksum |
| typedef int(*) | Process_option_func (void *ctx, const char *group_name, const char *option) |
Enumerations | |
| enum | loglevel { ERROR_LEVEL, WARNING_LEVEL, INFORMATION_LEVEL } |
| enum | cache_type { TYPE_NOT_SET = 0, READ_CACHE, WRITE_CACHE, SEQ_READ_APPEND, READ_FIFO, READ_NET, WRITE_NET } |
| enum | flush_type { FLUSH_KEEP, FLUSH_RELEASE, FLUSH_IGNORE_CHANGED, FLUSH_FORCE_WRITE } |
| enum | file_type { UNOPEN = 0, FILE_BY_OPEN, FILE_BY_CREATE, STREAM_BY_FOPEN, STREAM_BY_FDOPEN, FILE_BY_MKSTEMP, FILE_BY_DUP } |
Functions | |
| gptr | my_malloc (uint Size, myf MyFlags) |
| gptr | my_realloc (gptr oldpoint, uint Size, myf MyFlags) |
| void | my_no_flags_free (gptr ptr) |
| gptr | my_memdup (const byte *from, uint length, myf MyFlags) |
| char * | my_strdup (const char *from, myf MyFlags) |
| char * | my_strndup (const char *from, uint length, myf MyFlags) |
| void(*)(*) | my_sigtstp_restart (void) |
| my_off_t | my_b_append_tell (IO_CACHE *info) |
| my_off_t | my_b_safe_tell (IO_CACHE *info) |
| int | my_copy (const char *from, const char *to, myf MyFlags) |
| int | my_append (const char *from, const char *to, myf MyFlags) |
| int | my_delete (const char *name, myf MyFlags) |
| int | my_getwd (my_string buf, uint size, myf MyFlags) |
| int | my_setwd (const char *dir, myf MyFlags) |
| int | my_lock (File fd, int op, my_off_t start, my_off_t length, myf MyFlags) |
| gptr | my_once_alloc (uint Size, myf MyFlags) |
| void | my_once_free (void) |
| char * | my_once_strdup (const char *src, myf myflags) |
| char * | my_once_memdup (const char *src, uint len, myf myflags) |
| File | my_open (const char *FileName, int Flags, myf MyFlags) |
| File | my_register_filename (File fd, const char *FileName, enum file_type type_of_file, uint error_message_number, myf MyFlags) |
| File | my_create (const char *FileName, int CreateFlags, int AccessFlags, myf MyFlags) |
| int | my_close (File Filedes, myf MyFlags) |
| File | my_dup (File file, myf MyFlags) |
| int | my_mkdir (const char *dir, int Flags, myf MyFlags) |
| int | my_readlink (char *to, const char *filename, myf MyFlags) |
| int | my_realpath (char *to, const char *filename, myf MyFlags) |
| File | my_create_with_symlink (const char *linkname, const char *filename, int createflags, int access_flags, myf MyFlags) |
| int | my_delete_with_symlink (const char *name, myf MyFlags) |
| int | my_rename_with_symlink (const char *from, const char *to, myf MyFlags) |
| int | my_symlink (const char *content, const char *linkname, myf MyFlags) |
| uint | my_read (File Filedes, byte *Buffer, uint Count, myf MyFlags) |
| uint | my_pread (File Filedes, byte *Buffer, uint Count, my_off_t offset, myf MyFlags) |
| int | my_rename (const char *from, const char *to, myf MyFlags) |
| my_off_t | my_seek (File fd, my_off_t pos, int whence, myf MyFlags) |
| my_off_t | my_tell (File fd, myf MyFlags) |
| uint | my_write (File Filedes, const byte *Buffer, uint Count, myf MyFlags) |
| uint | my_pwrite (File Filedes, const byte *Buffer, uint Count, my_off_t offset, myf MyFlags) |
| uint | my_fread (FILE *stream, byte *Buffer, uint Count, myf MyFlags) |
| uint | my_fwrite (FILE *stream, const byte *Buffer, uint Count, myf MyFlags) |
| my_off_t | my_fseek (FILE *stream, my_off_t pos, int whence, myf MyFlags) |
| my_off_t | my_ftell (FILE *stream, myf MyFlags) |
| gptr | _mymalloc (uint uSize, const char *sFile, uint uLine, myf MyFlag) |
| gptr | _myrealloc (gptr pPtr, uint uSize, const char *sFile, uint uLine, myf MyFlag) |
| gptr my_multi_malloc | _VARARGS ((myf MyFlags,...)) |
| void | _myfree (gptr pPtr, const char *sFile, uint uLine, myf MyFlag) |
| int | _sanity (const char *sFile, unsigned int uLine) |
| gptr | _my_memdup (const byte *from, uint length, const char *sFile, uint uLine, myf MyFlag) |
| my_string | _my_strdup (const char *from, const char *sFile, uint uLine, myf MyFlag) |
| char * | _my_strndup (const char *from, uint length, const char *sFile, uint uLine, myf MyFlag) |
| void * | my_memmem (const void *haystack, size_t haystacklen, const void *needle, size_t needlelen) |
| int | check_if_legal_filename (const char *path) |
| int | check_if_legal_tablename (const char *path) |
| void | init_glob_errs (void) |
| FILE * | my_fopen (const char *FileName, int Flags, myf MyFlags) |
| FILE * | my_fdopen (File Filedes, const char *name, int Flags, myf MyFlags) |
| int | my_fclose (FILE *fd, myf MyFlags) |
| int | my_chsize (File fd, my_off_t newlength, int filler, myf MyFlags) |
| int | my_sync (File fd, myf my_flags) |
| int my_error | _VARARGS ((int nr, myf MyFlags,...)) |
| int my_printf_error | _VARARGS ((uint my_err, const char *format, myf MyFlags,...) __attribute__((format(printf, 2, 4)))) |
| int | my_error_register (const char **errmsgs, int first, int last) |
| const char ** | my_error_unregister (int first, int last) |
| int | my_message (uint my_err, const char *str, myf MyFlags) |
| int | my_message_no_curses (uint my_err, const char *str, myf MyFlags) |
| int | my_message_curses (uint my_err, const char *str, myf MyFlags) |
| my_bool | my_init (void) |
| void | my_end (int infoflag) |
| int | my_redel (const char *from, const char *to, int MyFlags) |
| int | my_copystat (const char *from, const char *to, int MyFlags) |
| my_string | my_filename (File fd) |
| void | dont_break (void) |
| void | allow_break (void) |
| my_bool | init_tmpdir (MY_TMPDIR *tmpdir, const char *pathlist) |
| char * | my_tmpdir (MY_TMPDIR *tmpdir) |
| void | free_tmpdir (MY_TMPDIR *tmpdir) |
| void | my_remember_signal (int signal_number, sig_handler(*func)(int)) |
| uint | dirname_part (my_string to, const char *name) |
| uint | dirname_length (const char *name) |
| int | test_if_hard_path (const char *dir_name) |
| my_bool | has_path (const char *name) |
| char * | convert_dirname (char *to, const char *from, const char *from_end) |
| void | to_unix_path (my_string name) |
| my_string | fn_ext (const char *name) |
| my_string | fn_same (my_string toname, const char *name, int flag) |
| my_string | fn_format (my_string to, const char *name, const char *dir, const char *form, uint flag) |
| size_s | strlength (const char *str) |
| void | pack_dirname (my_string to, const char *from) |
| uint | unpack_dirname (my_string to, const char *from) |
| uint | cleanup_dirname (my_string to, const char *from) |
| uint | system_filename (my_string to, const char *from) |
| uint | unpack_filename (my_string to, const char *from) |
| my_string | intern_filename (my_string to, const char *from) |
| my_string | directory_file_name (my_string dst, const char *src) |
| int | pack_filename (my_string to, const char *name, size_s max_length) |
| my_string | my_path (my_string to, const char *progname, const char *own_pathname_part) |
| my_string | my_load_path (my_string to, const char *path, const char *own_path_prefix) |
| int | wild_compare (const char *str, const char *wildstr, pbool str_is_pattern) |
| WF_PACK * | wf_comp (my_string str) |
| int | wf_test (struct wild_file_pack *wf_pack, const char *name) |
| void | wf_end (struct wild_file_pack *buffer) |
| size_s | strip_sp (my_string str) |
| void | get_date (my_string to, int timeflag, time_t use_time) |
| void | soundex (CHARSET_INFO *, my_string out_pntr, my_string in_pntr, pbool remove_garbage) |
| int | init_record_cache (RECORD_CACHE *info, uint cachesize, File file, uint reclength, enum cache_type type, pbool use_async_io) |
| int | read_cache_record (RECORD_CACHE *info, byte *to) |
| int | end_record_cache (RECORD_CACHE *info) |
| int | write_cache_record (RECORD_CACHE *info, my_off_t filepos, const byte *record, uint length) |
| int | flush_write_cache (RECORD_CACHE *info) |
| long | my_clock (void) |
| sig_handler | sigtstp_handler (int signal_number) |
| void | handle_recived_signals (void) |
| sig_handler | my_set_alarm_variable (int signo) |
| void | my_string_ptr_sort (void *base, uint items, size_s size) |
| void | radixsort_for_str_ptr (uchar *base[], uint number_of_elements, size_s size_of_element, uchar *buffer[]) |
| qsort_t | qsort2 (void *base_ptr, size_t total_elems, size_t size, qsort2_cmp cmp, void *cmp_argument) |
| qsort2_cmp | get_ptr_compare (uint) |
| void | my_store_ptr (byte *buff, uint pack_length, my_off_t pos) |
| my_off_t | my_get_ptr (byte *ptr, uint pack_length) |
| int | init_io_cache (IO_CACHE *info, File file, uint cachesize, enum cache_type type, my_off_t seek_offset, pbool use_async_io, myf cache_myflags) |
| my_bool | reinit_io_cache (IO_CACHE *info, enum cache_type type, my_off_t seek_offset, pbool use_async_io, pbool clear_cache) |
| void | setup_io_cache (IO_CACHE *info) |
| int | _my_b_read (IO_CACHE *info, byte *Buffer, uint Count) |
| int | _my_b_seq_read (IO_CACHE *info, byte *Buffer, uint Count) |
| int | _my_b_net_read (IO_CACHE *info, byte *Buffer, uint Count) |
| int | _my_b_get (IO_CACHE *info) |
| int | _my_b_async_read (IO_CACHE *info, byte *Buffer, uint Count) |
| int | _my_b_write (IO_CACHE *info, const byte *Buffer, uint Count) |
| int | my_b_append (IO_CACHE *info, const byte *Buffer, uint Count) |
| int | my_b_safe_write (IO_CACHE *info, const byte *Buffer, uint Count) |
| int | my_block_write (IO_CACHE *info, const byte *Buffer, uint Count, my_off_t pos) |
| int | my_b_flush_io_cache (IO_CACHE *info, int need_append_buffer_lock) |
| int | end_io_cache (IO_CACHE *info) |
| uint | my_b_fill (IO_CACHE *info) |
| void | my_b_seek (IO_CACHE *info, my_off_t pos) |
| uint | my_b_gets (IO_CACHE *info, char *to, uint max_length) |
| my_off_t | my_b_filelength (IO_CACHE *info) |
| uint | my_b_printf (IO_CACHE *info, const char *fmt,...) |
| uint | my_b_vprintf (IO_CACHE *info, const char *fmt, va_list ap) |
| my_bool | open_cached_file (IO_CACHE *cache, const char *dir, const char *prefix, uint cache_size, myf cache_myflags) |
| my_bool | real_open_cached_file (IO_CACHE *cache) |
| void | close_cached_file (IO_CACHE *cache) |
| File | create_temp_file (char *to, const char *dir, const char *pfx, int mode, myf MyFlags) |
| my_bool | init_dynamic_array (DYNAMIC_ARRAY *array, uint element_size, uint init_alloc, uint alloc_increment CALLER_INFO_PROTO) |
| my_bool | insert_dynamic (DYNAMIC_ARRAY *array, gptr element) |
| byte * | alloc_dynamic (DYNAMIC_ARRAY *array) |
| byte * | pop_dynamic (DYNAMIC_ARRAY *) |
| my_bool | set_dynamic (DYNAMIC_ARRAY *array, gptr element, uint array_index) |
| void | get_dynamic (DYNAMIC_ARRAY *array, gptr element, uint array_index) |

