MySQL 9.1.0
Source Code Documentation
|
Common header for many mysys elements. More...
#include "my_config.h"
#include <alloca.h>
#include <limits.h>
#include <unistd.h>
#include <stdarg.h>
#include <stdio.h>
#include <sys/select.h>
#include <sys/types.h>
#include <time.h>
#include <atomic>
#include <cstring>
#include "my_compiler.h"
#include "my_compress.h"
#include "my_inttypes.h"
#include "mysql/my_loglevel.h"
#include "my_psi_config.h"
#include "my_sharedlib.h"
#include "mysql/components/services/bits/my_io_bits.h"
#include "mysql/components/services/bits/mysql_cond_bits.h"
#include "mysql/components/services/bits/mysql_mutex_bits.h"
#include "mysql/components/services/bits/psi_bits.h"
#include "mysql/components/services/bits/psi_file_bits.h"
#include "mysql/components/services/bits/psi_memory_bits.h"
#include "mysql/components/services/bits/psi_metric_bits.h"
#include "mysql/components/services/bits/psi_stage_bits.h"
#include "mysql/components/services/bits/server_telemetry_logs_client_bits.h"
#include "sql/stream_cipher.h"
#include "string_with_len.h"
#include <sys/mman.h>
Go to the source code of this file.
Classes | |
struct | MY_TMPDIR |
struct | DYNAMIC_STRING |
struct | IO_CACHE_SHARE |
struct | IO_CACHE |
struct | ST_FILE_ID |
struct | USED_MEM |
struct for once_alloc (block) More... | |
Macros | |
#define | MY_INIT(name) |
#define | MYSYS_ERRMSG_SIZE (512) |
Max length of an error message generated by mysys utilities. More... | |
#define | MYSYS_STRERROR_SIZE (128) |
#define | MY_FILE_ERROR ((size_t)-1) |
#define | MY_FNABP 2 /* Fatal if not all bytes read/written */ |
#define | MY_NABP 4 /* Error if not all bytes read/written */ |
#define | MY_FAE 8 /* Fatal if any error */ |
#define | MY_WME 16 /* Write message on error */ |
#define | MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */ |
#define | MY_IGNORE_BADFD 32 /* my_sync: ignore 'bad descriptor' errors */ |
#define | MY_REPORT_WAITING_IF_FULL 64 /* my_write: set status as waiting */ |
#define | MY_FULL_IO 512 /* For my_read - loop intil I/O is complete */ |
#define | MY_DONT_CHECK_FILESIZE 128 /* Option to init_io_cache() */ |
#define | MY_LINK_WARNING 32 /* my_redel() gives warning if links */ |
#define | MY_COPYTIME 64 /* my_redel() copies time */ |
#define | MY_DELETE_OLD 256 /* my_create_with_symlink() */ |
#define | MY_RESOLVE_LINK 128 /* my_realpath(); Only resolve links */ |
#define | MY_HOLD_ORIGINAL_MODES 128 /* my_copy() holds to file modes */ |
#define | MY_SEEK_NOT_DONE 32 /* my_lock may have to do a seek */ |
#define | MY_DONT_WAIT 64 /* my_lock() don't wait if can't lock */ |
#define | MY_ZEROFILL 32 /* my_malloc(), fill array with zero */ |
#define | MY_ALLOW_ZERO_PTR 64 /* my_realloc() ; zero ptr -> malloc */ |
#define | MY_FREE_ON_ERROR 128 /* my_realloc() ; Free old ptr on error */ |
#define | MY_HOLD_ON_ERROR 256 /* my_realloc() ; Return old ptr on error */ |
#define | MY_DONT_OVERWRITE_FILE 1024 /* my_copy: Don't overwrite file */ |
#define | MY_SYNC 4096 /* my_copy(): sync dst file */ |
#define | MYF_RW MYF(MY_WME + MY_NABP) /* For my_read & my_write */ |
#define | MY_CHECK_ERROR 1 /* Params to my_end; Check open-close */ |
#define | MY_GIVE_INFO 2 /* Give time info about process*/ |
#define | MY_DONT_FREE_DBUG 4 /* Do not call DBUG_END() in my_end() */ |
#define | ME_BELL 4 /* DEPRECATED: Ring bell then printing message */ |
#define | ME_ERRORLOG 64 /* Write the error message to error log */ |
#define | ME_FATALERROR 1024 /* Fatal statement error */ |
#define | MY_REPLACE_DIR 1 /* replace dir in name with 'dir' */ |
#define | MY_REPLACE_EXT 2 /* replace extension with 'ext' */ |
#define | MY_UNPACK_FILENAME 4 /* Unpack name (~ -> home) */ |
#define | MY_RESOLVE_SYMLINKS 16 /* Resolve all symbolic links */ |
#define | MY_RETURN_REAL_PATH 32 /* return full path for file */ |
#define | MY_SAFE_PATH 64 /* Return NULL if too long path */ |
#define | MY_RELATIVE_PATH 128 /* name is relative to 'dir' */ |
#define | MY_APPEND_EXT 256 /* add 'ext' as additional extension*/ |
#define | MY_SEEK_SET 0 |
#define | MY_SEEK_CUR 1 |
#define | MY_SEEK_END 2 |
#define | MY_WAIT_FOR_USER_TO_FIX_PANIC 60 /* in seconds */ |
#define | MY_WAIT_GIVE_USER_A_MESSAGE 10 /* Every 10 times of prev */ |
#define | MIN_COMPRESS_LENGTH 50 /* Don't compress small bl. */ |
#define | DFLT_INIT_HITS 3 |
#define | MY_ERRNO_EDOM 33 |
#define | MY_ERRNO_ERANGE 34 |
#define | my_safe_alloca(size, max_alloca_sz) |
#define | my_safe_afree(ptr, size, max_alloca_sz) if (size > max_alloca_sz) my_free(ptr) |
#define | DEBUG_SYNC_C(_sync_point_name_) |
#define | my_alloca(SZ) alloca((size_t)(SZ)) |
#define | MY_ALL_CHARSETS_SIZE 2048 |
#define | MALLOC_OVERHEAD 8 |
#define | RECORD_CACHE_SIZE (uint)(64 * 1024 - MALLOC_OVERHEAD) |
#define | MAX_SYSLOG_MESSAGE_SIZE 1024 |
#define | my_access access |
#define | is_filename_allowed(name, length, allow_cwd) (true) |
#define | my_delete_allow_opened(fname, flags) my_delete((fname), (flags)) |
#define | flush_io_cache(info) my_b_flush_io_cache((info), 1) |
#define | alloc_root_inited(A) ((A)->inited()) |
#define | MAP_NOSYNC 0 |
#define | MAP_NORESERVE 0 |
#define | my_mmap(a, b, c, d, e, f) mmap64(a, b, c, d, e, f) |
#define | my_munmap(a, b) munmap((a), (b)) |
Typedefs | |
using | ErrorHandlerFunctionPointer = void(*)(uint, const char *, myf) |
typedef int(* | IO_CACHE_CALLBACK) (IO_CACHE *) |
typedef int(* | qsort2_cmp) (const void *, const void *, const void *) |
typedef void(* | my_error_reporter) (enum loglevel level, uint ecode,...) |
typedef void(* | my_error_vreporter) (enum loglevel level, uint ecode, va_list) |
Enumerations | |
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 | my_syslog_options { MY_SYSLOG_PIDS = 1 } |
enum | UnlinkOrKeepFile { UNLINK_FILE , KEEP_FILE } |
Functions | |
void * | my_multi_malloc (PSI_memory_key key, myf flags,...) |
uint | my_get_large_page_size (void) |
void | my_b_clear (IO_CACHE *info) |
bool | my_b_inited (const IO_CACHE *info) |
int | my_b_read (IO_CACHE *info, uchar *buffer, size_t count) |
int | my_b_write (IO_CACHE *info, const uchar *buffer, size_t count) |
int | _my_b_get (IO_CACHE *info) |
int | my_b_get (IO_CACHE *info) |
my_off_t | my_b_tell (const IO_CACHE *info) |
uchar * | my_b_get_buffer_start (const IO_CACHE *info) |
size_t | my_b_get_bytes_in_buffer (const IO_CACHE *info) |
my_off_t | my_b_get_pos_in_file (const IO_CACHE *info) |
int | my_b_copy_to_file (IO_CACHE *cache, FILE *file) |
size_t | my_b_bytes_in_cache (const IO_CACHE *info) |
size_t | escape_string_for_mysql (const CHARSET_INFO *charset_info, char *to, size_t to_length, const char *from, size_t length) |
int | my_copy (const char *from, const char *to, myf MyFlags) |
int | my_delete (const char *name, myf MyFlags) |
int | my_getwd (char *buf, size_t size, myf MyFlags) |
int | my_setwd (const char *dir, myf MyFlags) |
void * | my_once_alloc (size_t Size, myf MyFlags) |
void | my_once_free (void) |
char * | my_once_strdup (const char *src, myf myflags) |
void * | my_once_memdup (const void *src, size_t len, myf myflags) |
File | my_open (const char *filename, int Flags, myf MyFlags) |
Open a file. More... | |
File | my_create (const char *FileName, int CreateFlags, int AccessFlags, myf MyFlags) |
Create a new file. More... | |
int | my_close (File fd, myf MyFlags) |
Close a file. More... | |
int | my_mkdir (const char *dir, int Flags, myf MyFlags) |
int | my_readlink (char *to, const char *filename, myf MyFlags) |
int | my_is_symlink (const char *filename, ST_FILE_ID *file_id) |
bool | my_rm_dir_w_symlink (const char *directory_path, bool send_error, bool send_intermediate_errors, bool &directory_deletion_failed) |
Deletes the specified directory. More... | |
int | my_realpath (char *to, const char *filename, myf MyFlags) |
int | my_is_same_file (File file, const ST_FILE_ID *file_id) |
Return non-zero if the file descriptor and a previously lstat-ed file identified by file_id point to the same file. More... | |
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) |
size_t | my_read (File Filedes, uchar *Buffer, size_t Count, myf MyFlags) |
Read a chunk of bytes from a file with retry's if needed If flag MY_FULL_IO is set then keep reading until EOF is found. More... | |
size_t | my_pread (File Filedes, uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags) |
Read a chunk of bytes from a file from a given position. More... | |
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) |
Seek to a position in a file. More... | |
my_off_t | my_tell (File fd, myf MyFlags) |
size_t | my_write (File Filedes, const uchar *Buffer, size_t Count, myf MyFlags) |
Write a chunk of bytes to a file. More... | |
size_t | my_pwrite (File Filedes, const uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags) |
Write a chunk of bytes to a file at a given position. More... | |
size_t | my_fread (FILE *stream, uchar *Buffer, size_t Count, myf MyFlags) |
Read a chunk of bytes from a FILE stream. More... | |
size_t | my_fwrite (FILE *stream, const uchar *Buffer, size_t Count, myf MyFlags) |
Write a chunk of bytes to a FILE stream. More... | |
my_off_t | my_fseek (FILE *stream, my_off_t pos, int whence) |
Seek to position in FILE stream. More... | |
my_off_t | my_ftell (FILE *stream) |
Portable ftell() wrapper. More... | |
int | my_openlog (const char *eventSourceName, int option, int facility) |
Opens/Registers a new handle for system logging. More... | |
int | my_closelog () |
Closes/de-registers the system logging handle. More... | |
int | my_syslog (const CHARSET_INFO *cs, enum loglevel level, const char *msg) |
Sends message to the system logger. More... | |
int | check_if_legal_filename (const char *path) |
int | check_if_legal_tablename (const char *path) |
const char * | get_global_errmsg (int nr) |
void | wait_for_free_space (const char *filename, int errors) |
FILE * | my_fopen (const char *filename, int Flags, myf MyFlags) |
Open a file as stream. More... | |
FILE * | my_fdopen (File fd, const char *filename, int Flags, myf MyFlags) |
Make a stream out of a file handle. More... | |
FILE * | my_freopen (const char *filename, const char *mode, FILE *stream) |
Change the file associated with a file stream. More... | |
int | my_fclose (FILE *stream, myf MyFlags) |
Close a stream. More... | |
File | my_fileno (FILE *stream) |
Portable fileno() wrapper. More... | |
int | my_chsize (File fd, my_off_t newlength, int filler, myf MyFlags) |
Change size of file. More... | |
int | my_fallocator (File fd, my_off_t newlength, int filler, myf MyFlags) |
Change size of the specified file. More... | |
void | thr_set_sync_wait_callback (void(*before_sync)(void), void(*after_sync)(void)) |
int | my_sync (File fd, myf my_flags) |
char * | my_strerror (char *buf, size_t len, int errnum) |
Get a string describing a system or handler error. More... | |
const char * | my_get_err_msg (int nr) |
Get an error format string from one of the my_error_register()ed sets. More... | |
void | my_error (int nr, myf MyFlags,...) |
Fill in and print a previously registered error message. More... | |
void | my_printf_error (uint my_err, const char *format, myf MyFlags,...) |
Print an error message. More... | |
void | my_printv_error (uint error, const char *format, myf MyFlags, va_list ap) |
Print an error message. More... | |
int | my_error_register (const char *(*get_errmsg)(int), int first, int last) |
Register error messages for use with my_error(). More... | |
bool | my_error_unregister (int first, int last) |
Unregister formerly registered error messages. More... | |
void | my_message (uint my_err, const char *str, myf MyFlags) |
Print an error message. More... | |
void | my_message_stderr (uint my_err, const char *str, myf MyFlags) |
Print an error message on stderr. More... | |
void | my_message_local_stderr (enum loglevel, uint ecode, va_list args) |
Issue a message locally (i.e. More... | |
void | my_message_local (enum loglevel ll, uint ecode,...) |
Issue a message locally (i.e. More... | |
template<class... Ts> | |
void | MyOsError (int errno_val, Ts... ppck) |
Convenience wrapper for OS error messages which report errno/my_errno with d followed by strerror as s, as the last conversions in the error message. More... | |
bool | my_init (void) |
Initialize my_sys functions, resources and variables. More... | |
void | my_end (int infoflag) |
const char * | my_filename (File fd) |
Get filename of file. More... | |
MY_MODE | get_file_perm (ulong perm_flags) |
bool | my_chmod (const char *filename, ulong perm_flags, myf my_flags) |
bool | init_tmpdir (MY_TMPDIR *tmpdir, const char *pathlist) |
char * | my_tmpdir (MY_TMPDIR *tmpdir) |
void | free_tmpdir (MY_TMPDIR *tmpdir) |
size_t | dirname_part (char *to, const char *name, size_t *to_res_length) |
Gives directory part of filename. More... | |
size_t | dirname_length (const char *name) |
Get the string length of the directory part of name, including the last FN_LIBCHAR. More... | |
ALWAYS_INLINE const char * | base_name (const char *A) |
int | test_if_hard_path (const char *dir_name) |
bool | has_path (const char *name) |
char * | convert_dirname (char *to, const char *from, const char *from_end) |
Convert directory name to use under this system. More... | |
void | to_unix_path (char *name) |
Convert filename to unix style filename. More... | |
char * | fn_ext (char *name) |
const char * | fn_ext (const char *name) |
char * | fn_same (char *toname, const char *name, int flag) |
char * | fn_format (char *to, const char *name, const char *dir, const char *form, uint flag) |
Formats a filename with possible replace of directory of extension Function can handle the case where 'to' == 'name' For a description of the flag values, consult my_sys.h The arguments should be in unix format. More... | |
size_t | strlength (const char *str) |
Calculate the length of str not including any trailing ' '-bytes. More... | |
size_t | normalize_dirname (char *to, const char *from) |
Convert a directory name to a format which can be compared as strings. More... | |
size_t | unpack_dirname (char *to, const char *from) |
Fixes a directory name so that can be used by open(). More... | |
size_t | cleanup_dirname (char *to, const char *from) |
Remove unwanted chars from dirname. More... | |
size_t | system_filename (char *to, const char *from) |
Convert filename (unix standard) to system standard Used before system command's like open(), create() More... | |
size_t | unpack_filename (char *to, const char *from) |
Fix filename so it can be used by open, create. More... | |
char * | intern_filename (char *to, const char *from) |
Fix a filename to intern (UNIX format). More... | |
char * | my_path (char *to, const char *progname, const char *own_pathname_part) |
char * | my_load_path (char *to, const char *path, const char *own_path_prefix) |
Returns full load-path for a file. More... | |
bool | array_append_string_unique (const char *str, const char **array, size_t size) |
Append str to array, or move to the end if it already exists. More... | |
void | my_store_ptr (uchar *buff, size_t pack_length, my_off_t pos) |
my_off_t | my_get_ptr (uchar *ptr, size_t pack_length) |
int | init_io_cache_ext (IO_CACHE *info, File file, size_t cachesize, enum cache_type type, my_off_t seek_offset, bool use_async_io, myf cache_myflags, PSI_file_key file_key) |
int | init_io_cache (IO_CACHE *info, File file, size_t cachesize, enum cache_type type, my_off_t seek_offset, bool use_async_io, myf cache_myflags) |
bool | reinit_io_cache (IO_CACHE *info, enum cache_type type, my_off_t seek_offset, bool use_async_io, bool clear_cache) |
void | setup_io_cache (IO_CACHE *info) |
int | _my_b_read (IO_CACHE *info, uchar *Buffer, size_t Count) |
int | _my_b_read_r (IO_CACHE *info, uchar *Buffer, size_t Count) |
void | init_io_cache_share (IO_CACHE *read_cache, IO_CACHE_SHARE *cshare, IO_CACHE *write_cache, uint num_threads) |
void | remove_io_thread (IO_CACHE *info) |
int | _my_b_seq_read (IO_CACHE *info, uchar *Buffer, size_t Count) |
int | _my_b_net_read (IO_CACHE *info, uchar *Buffer, size_t Count) |
Read buffered from the net. More... | |
int | _my_b_write (IO_CACHE *info, const uchar *Buffer, size_t Count) |
int | my_b_append (IO_CACHE *info, const uchar *Buffer, size_t Count) |
int | my_b_safe_write (IO_CACHE *info, const uchar *Buffer, size_t Count) |
int | my_block_write (IO_CACHE *info, const uchar *Buffer, size_t 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) |
size_t | my_b_fill (IO_CACHE *info) |
void | my_b_seek (IO_CACHE *info, my_off_t pos) |
size_t | my_b_gets (IO_CACHE *info, char *to, size_t max_length) |
my_off_t | my_b_filelength (IO_CACHE *info) |
size_t | my_b_printf (IO_CACHE *info, const char *fmt,...) |
Simple printf version. More... | |
size_t | my_b_vprintf (IO_CACHE *info, const char *fmt, va_list ap) |
Implementation of my_b_printf. More... | |
bool | open_cached_file (IO_CACHE *cache, const char *dir, const char *prefix, size_t cache_size, myf cache_myflags) |
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, UnlinkOrKeepFile unlink_or_keep, myf MyFlags) |
bool | init_dynamic_string (DYNAMIC_STRING *str, const char *init_str, size_t init_alloc) |
bool | dynstr_append (DYNAMIC_STRING *str, const char *append) |
bool | dynstr_append_mem (DYNAMIC_STRING *str, const char *append, size_t length) |
bool | dynstr_append_os_quoted (DYNAMIC_STRING *str, const char *append,...) |
bool | dynstr_append_quoted (DYNAMIC_STRING *str, const char *quote_str, const uint quote_len, const char *append,...) |
bool | dynstr_set (DYNAMIC_STRING *str, const char *init_str) |
bool | dynstr_realloc (DYNAMIC_STRING *str, size_t additional_size) |
bool | dynstr_trunc (DYNAMIC_STRING *str, size_t n) |
void | dynstr_free (DYNAMIC_STRING *str) |
void * | multi_alloc_root (MEM_ROOT *mem_root,...) |
char * | strdup_root (MEM_ROOT *root, const char *str) |
char * | safe_strdup_root (MEM_ROOT *root, const char *str) |
char * | strmake_root (MEM_ROOT *root, const char *str, size_t len) |
void * | memdup_root (MEM_ROOT *root, const void *str, size_t len) |
bool | my_compress (mysql_compress_context *, uchar *, size_t *, size_t *) |
This replaces the packet with a compressed packet. More... | |
bool | my_uncompress (mysql_compress_context *, uchar *, size_t, size_t *) |
Uncompress packet. More... | |
uchar * | my_compress_alloc (mysql_compress_context *comp_ctx, const uchar *packet, size_t *len, size_t *complen) |
uint | my_set_max_open_files (uint files) |
Sets the OS limit on the number of open files (if supported). More... | |
bool | my_gethwaddr (uchar *to) |
static int | my_getpagesize () |
int | my_msync (int, void *, size_t, int) |
uint | get_charset_number (const char *cs_name, uint cs_flags) |
uint | get_collation_number (const char *name) |
const char * | get_collation_name (uint charset_number) |
CHARSET_INFO * | get_charset (uint cs_number, myf flags) |
CHARSET_INFO * | get_charset_by_name (const char *collation_name, myf flags) |
CHARSET_INFO * | my_collation_get_by_name (const char *collation_name, myf flags, MY_CHARSET_ERRMSG *) |
Find collation by name: extended version of get_charset_by_name() to return error messages to the caller. More... | |
CHARSET_INFO * | get_charset_by_csname (const char *cs_name, uint cs_flags, myf my_flags) |
CHARSET_INFO * | my_charset_get_by_name (const char *name, uint cs_flags, myf my_flags, MY_CHARSET_ERRMSG *) |
Find character set by name: extended version of get_charset_by_csname() to return error messages to the caller. More... | |
bool | resolve_charset (const char *cs_name, const CHARSET_INFO *default_cs, const CHARSET_INFO **cs) |
Resolve character set by the character set name (utf8, latin1, ...). More... | |
bool | resolve_collation (const char *cl_name, const CHARSET_INFO *default_cl, const CHARSET_INFO **cl) |
Resolve collation by the collation name (utf8_general_ci, ...). More... | |
char * | get_charsets_dir (char *buf) |
void | charset_uninit () |
void | my_init_mysys_psi_keys (void) |
void | set_psi_cond_service (void *psi) |
void | set_psi_data_lock_service (void *psi) |
void | set_psi_error_service (void *psi) |
void | set_psi_file_service (void *psi) |
void | set_psi_idle_service (void *psi) |
void | set_psi_mdl_service (void *psi) |
void | set_psi_memory_service (void *psi) |
void | set_psi_metric_service (void *psi) |
void | set_psi_logs_client_service (void *psi) |
void | set_psi_mutex_service (void *psi) |
void | set_psi_rwlock_service (void *psi) |
void | set_psi_socket_service (void *psi) |
void | set_psi_stage_service (void *psi) |
void | set_psi_statement_service (void *psi) |
void | set_psi_system_service (void *psi) |
void | set_psi_table_service (void *psi) |
void | set_psi_thread_service (void *psi) |
void | set_psi_transaction_service (void *psi) |
void | set_psi_tls_channel_service (void *psi) |
unsigned long long | my_physical_memory () |
bool | are_versions_clone_compatible (std::string ver1, std::string ver2) |
Compares versions and determine if clone is allowed. More... | |
my_off_t | mysql_encryption_file_seek (IO_CACHE *cache, my_off_t pos, int whence, myf flags) |
This is a wrapper around mysql_file_seek. More... | |
size_t | mysql_encryption_file_read (IO_CACHE *cache, uchar *buffer, size_t count, myf flags) |
This is a wrapper around mysql_file_read. More... | |
size_t | mysql_encryption_file_write (IO_CACHE *cache, const uchar *buffer, size_t count, myf flags) |
This is a wrapper around mysql_file_write. More... | |
Common header for many mysys elements.
This is a wrapper around mysql_file_read.
Read data from the temporary file of a binlog cache, and take care of decrypting the data if binlog_encryption is on.
cache | The handler of a binlog cache to read. | |
[out] | buffer | The memory buffer to write to. |
count | The length of data in the temporary file to be read in bytes. | |
flags | The bitmap of different flags MY_WME | MY_FAE | MY_NABP | MY_FNABP | MY_DONT_CHECK_FILESIZE and so on. |
The | length of bytes to be read, or MY_FILE_ERROR on error. |
This is a wrapper around mysql_file_seek.
Seek to a position in the temporary file of a binlog cache, and set the encryption/decryption stream offset if binlog_encryption is on.
cache | The handler of a binlog cache to seek. |
pos | The expected position (absolute or relative) |
whence | A direction parameter and one of {SEEK_SET, SEEK_CUR, SEEK_END} |
flags | The bitmap of different flags MY_WME | MY_FAE | MY_NABP | MY_FNABP | MY_DONT_CHECK_FILESIZE and so on. |
The | new position in the file, or MY_FILEPOS_ERROR on error. |
size_t mysql_encryption_file_write | ( | IO_CACHE * | cache, |
const uchar * | buffer, | ||
size_t | count, | ||
myf | flags | ||
) |
This is a wrapper around mysql_file_write.
Write data in buffer to the temporary file of a binlog cache, and take care of encrypting the data if binlog_encryption is on.
cache | The handler of a binlog cache to write. |
buffer | The memory buffer to write from. |
count | The length of data in buffer to be written in bytes. |
flags | The bitmap of different flags MY_WME | MY_FAE | MY_NABP | MY_FNABP | MY_DONT_CHECK_FILESIZE and so on |
|
extern |
(end of group MYSYS)