MySQL system library. Low level routines for file access and so on.
There are 125 *.c programs in this directory:
array.c --- Dynamic array handling
charset.c --- Using dynamic character sets, set default character set, ...
charset-def.c --- Include character sets in the client using
checksum.c --- Calculate checksum for a memory block, used for pack_isam
default.c --- Find defaults from *.cnf or *.ini files
default_modify.c --- edit option file
errors.c --- English text of global errors
hash.c --- Hash search/compare/free functions "for saving keys"
list.c --- Double-linked lists
make-conf.c --- "Make a charset .conf file out of a ctype-charset.c file"
md5.c --- MD5 ("Message Digest 5") algorithm from RSA Data Security
mf_brkhant.c --- Prevent user from doing a Break during critical execution (not used in MySQL; can be used by standalone
MyISAM
applications)mf_cache.c --- "Open a temporary file and cache it with io_cache"
mf_dirname.c --- Parse/convert directory names
mf_fn_ext.c --- Get filename extension
mf_format.c --- Format a filename
mf_getdate.c --- Get date, return in yyyy-mm-dd hh:mm:ss format
mf_iocache.c --- Cached read/write of files in fixed-size units
mf_iocache2.c --- Continuation of mf_iocache.c
mf_keycache.c --- Key block caching for certain file types
mf_keycaches.c --- Handling of multiple key caches
mf_loadpath.c --- Return full path name (no ..\ stuff)
mf_pack.c --- Packing/unpacking directory names for create purposes
mf_path.c --- Determine where a program can find its files
mf_qsort.c --- Quicksort
mf_qsort2.c --- Quicksort, part 2 (allows the passing of an extra argument to the sort-compare routine)
mf_radix.c --- Radix sort
mf_same.c --- Determine whether filenames are the same
mf_sort.c --- Sort with choice of Quicksort or Radix sort
mf_soundex.c --- Soundex algorithm derived from EDN Nov. 14, 1985 (pg. 36)
mf_strip.c --- Strip trail spaces from a string
mf_tempdir.c --- Initialize/find/free temporary directory
mf_tempfile.c --- Create a temporary file
mf_unixpath.c --- Convert filename to UNIX-style filename
mf_util.c --- Routines, #ifdef'd, which may be missing on some machines
mf_wcomp.c --- Comparisons with wildcards
mf_wfile.c --- Finding files with wildcards
mulalloc.c --- Malloc many pointers at the same time
my_access.c --- Check if file or path is accessible
my_aes.c --- AES encryption
my_alarm.c --- Set a variable value when an alarm is received
my_alloc.c --- malloc of results which will be freed simultaneously
my_append.c --- one file to another
my_bit.c --- smallest X where 2^X ≥ value, maybe useful for divisions
my_bitmap.c --- Handle uchar arrays as large bitmaps
my_chsize.c --- Truncate file if shorter, else fill with a filler character
my_clock.c --- Time-of-day ("clock()") function, with OS-dependent #ifdef's
my_compress.c --- Compress packet (see also description of \zlib directory)
my_copy.c --- Copy files
my_crc32.c --- Include \zlib\crc32.c
my_create.c --- Create file
my_delete.c --- Delete file
my_div.c --- Get file's name
my_dup.c --- Open a duplicated file
my_error.c --- Return formatted error to user
my_file.c --- See how many open files we want
my_fopen.c --- File open
my_fstream.c --- Streaming file read/write
my_gethostbyname.c --- Thread-safe version of standard net gethostbyname() func
my_gethwaddr.c --- Get hardware address for an interface
my_getopt.c --- Find out what options are in effect
my_getsystime.c --- Time-of-day functions, portably
my_getwd.c --- Get working directory
my_handler.c --- Compare two keys in various possible formats
my_init.c --- Initialize variables and functions in the mysys library
my_largepage.c --- Gets the size of large pages from the OS
my_lib.c --- Compare/convert directory names and file names
my_lock.c --- Lock part of a file
my_lockmem.c --- "Allocate a block of locked memory"
my_lread.c --- Read a specified number of bytes from a file into memory
my_lwrite.c --- Write a specified number of bytes from memory into a file
my_malloc.c --- Malloc (memory allocate) and dup functions
my_messnc.c --- Put out a message on stderr with "no curses"
my_mkdir.c --- Make directory
my_mmap.c --- Memory mapping
my_net.c --- Thread-safe version of net inet_ntoa function
my_netware.c --- Functions used only with the Novell Netware version of MySQL
my_once.c --- Allocation / duplication for "things we don't need to free"
my_open.c --- Open a file
my_os2cond.c --- OS2-specific: "A simple implementation of posix conditions"
my_os2dirsrch.c --- OS2-specific: Emulate a Win32 directory search
my_os2dlfcn.c --- OS2-specific: Emulate UNIX dynamic loading
my_os2file64.c --- OS2-specific: For File64bit setting
my_os2mutex.c --- OS2-specific: For mutex handling
my_os2thread.c --- OS2-specific: For thread handling
my_os2tls.c --- OS2-specific: For thread-local storage
my_port.c --- OS/machine-dependent porting functions, for example, AIX-specific my_ulonglong2double()
my_pread.c --- Read a specified number of bytes from a file
my_pthread.c --- A wrapper for thread-handling functions in different OSs
my_quick.c --- Read/write (labeled a "quicker" interface, perhaps obsolete)
my_read.c --- Read a specified number of bytes from a file, possibly retry
my_realloc.c --- Reallocate memory allocated with my_alloc.c (probably)
my_redel.c --- Rename and delete file
my_rename.c --- Rename without delete
my_seek.c --- Seek, that is, point to a spot within a file
my_semaphore.c --- Semaphore routines, for use on OS that doesn't support them
my_sleep.c --- Wait n microseconds
my_static.c --- Static variables used by the mysys library
my_symlink.c --- Read a symbolic link (symlinks are a UNIX thing, I guess)
my_symlink2.c --- Part 2 of my_symlink.c
my_sync.c --- Sync data in file to disk
my_thr_init.c --- initialize/allocate "all mysys & debug thread variables"
my_wincond.c --- Windows-specific: emulate Posix conditions
my_windac.c --- Windows NT/2000 discretionary access control functions
my_winsem.c --- Windows-specific: emulate Posix threads
my_winthread.c --- Windows-specific: emulate Posix threads
my_write.c --- Write a specified number of bytes to a file
ptr_cmp.c --- Point to an optimal byte-comparison function
queues.c --- Handle priority queues as in Robert Sedgewick's book
raid2.c --- RAID support (the true implementation is in raid.cc)
rijndael.c --- "Optimized ANSI C code for the Rijndael cipher (now AES")
safemalloc.c --- A version of the standard malloc() with safety checking
sha1.c --- Implementation of Secure Hashing Algorithm 1
string.c --- Initialize/append/free dynamically-sized strings; see also sql_string.cc in the /sql directory
testhash.c --- Standalone program: test the hash library routines
test_charset.c --- Standalone program: display character set information
test_dir.c --- Standalone program: placeholder for "test all functions" idea
test_fn.c --- Standalone program: apparently tests a function
test_xml.c --- Standalone program: test XML routines
thr_alarm.c --- Thread alarms and signal handling
thr_lock.c --- "Read and write locks for Posix threads"
thr_mutex.c --- A wrapper for mutex functions
thr_rwlock.c --- Synchronizes the readers' thread locks with the writer's lock
tree.c --- Initialize/search/free binary trees
typelib.c --- Find a string in a set of strings; returns the offset to the string found
You can find documentation for the main functions in these files
elsewhere in this document. For example, the main functions in
my_getwd.c
are described thus:
"int my_getwd _A((string buf, uint size, myf MyFlags));
int my_setwd _A((const char *dir, myf MyFlags));
Get and set working directory."