Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../usr/include/mysql
File: ma_pvio.h
#ifndef _ma_pvio_h_
[0] Fix | Delete
#define _ma_pvio_h_
[1] Fix | Delete
#define cio_defined
[2] Fix | Delete
[3] Fix | Delete
#ifdef HAVE_TLS
[4] Fix | Delete
#include <ma_tls.h>
[5] Fix | Delete
#else
[6] Fix | Delete
#define MARIADB_TLS void
[7] Fix | Delete
#endif
[8] Fix | Delete
[9] Fix | Delete
/* CONC-492: Allow to build plugins outside of MariaDB Connector/C
[10] Fix | Delete
source tree wnen ma_global.h was not included. */
[11] Fix | Delete
#if !defined(_global_h) && !defined(MY_GLOBAL_INCLUDED)
[12] Fix | Delete
typedef unsigned char uchar;
[13] Fix | Delete
#endif
[14] Fix | Delete
[15] Fix | Delete
#define PVIO_SET_ERROR if (pvio->set_error) \
[16] Fix | Delete
pvio->set_error
[17] Fix | Delete
[18] Fix | Delete
#define PVIO_READ_AHEAD_CACHE_SIZE 16384
[19] Fix | Delete
#define PVIO_READ_AHEAD_CACHE_MIN_SIZE 2048
[20] Fix | Delete
#define PVIO_EINTR_TRIES 2
[21] Fix | Delete
[22] Fix | Delete
struct st_ma_pvio_methods;
[23] Fix | Delete
typedef struct st_ma_pvio_methods PVIO_METHODS;
[24] Fix | Delete
[25] Fix | Delete
#define IS_PVIO_ASYNC(a) \
[26] Fix | Delete
((a)->mysql && (a)->mysql->options.extension && (a)->mysql->options.extension->async_context)
[27] Fix | Delete
[28] Fix | Delete
#define IS_PVIO_ASYNC_ACTIVE(a) \
[29] Fix | Delete
(IS_PVIO_ASYNC(a)&& (a)->mysql->options.extension->async_context->active)
[30] Fix | Delete
[31] Fix | Delete
#define IS_MYSQL_ASYNC(a) \
[32] Fix | Delete
((a)->options.extension && (a)->options.extension->async_context)
[33] Fix | Delete
[34] Fix | Delete
#define IS_MYSQL_ASYNC_ACTIVE(a) \
[35] Fix | Delete
(IS_MYSQL_ASYNC(a)&& (a)->options.extension->async_context->active)
[36] Fix | Delete
[37] Fix | Delete
enum enum_pvio_timeout {
[38] Fix | Delete
PVIO_CONNECT_TIMEOUT= 0,
[39] Fix | Delete
PVIO_READ_TIMEOUT,
[40] Fix | Delete
PVIO_WRITE_TIMEOUT
[41] Fix | Delete
};
[42] Fix | Delete
[43] Fix | Delete
enum enum_pvio_io_event
[44] Fix | Delete
{
[45] Fix | Delete
VIO_IO_EVENT_READ,
[46] Fix | Delete
VIO_IO_EVENT_WRITE,
[47] Fix | Delete
VIO_IO_EVENT_CONNECT
[48] Fix | Delete
};
[49] Fix | Delete
[50] Fix | Delete
enum enum_pvio_type {
[51] Fix | Delete
PVIO_TYPE_UNIXSOCKET= 0,
[52] Fix | Delete
PVIO_TYPE_SOCKET,
[53] Fix | Delete
PVIO_TYPE_NAMEDPIPE,
[54] Fix | Delete
PVIO_TYPE_SHAREDMEM,
[55] Fix | Delete
};
[56] Fix | Delete
[57] Fix | Delete
enum enum_pvio_operation {
[58] Fix | Delete
PVIO_READ= 0,
[59] Fix | Delete
PVIO_WRITE=1
[60] Fix | Delete
};
[61] Fix | Delete
[62] Fix | Delete
#define SHM_DEFAULT_NAME "MYSQL"
[63] Fix | Delete
[64] Fix | Delete
struct st_pvio_callback;
[65] Fix | Delete
[66] Fix | Delete
typedef struct st_pvio_callback {
[67] Fix | Delete
void (*callback)(MYSQL *mysql, uchar *buffer, size_t size);
[68] Fix | Delete
struct st_pvio_callback *next;
[69] Fix | Delete
} PVIO_CALLBACK;
[70] Fix | Delete
[71] Fix | Delete
struct st_ma_pvio {
[72] Fix | Delete
void *data;
[73] Fix | Delete
/* read ahead cache */
[74] Fix | Delete
uchar *cache;
[75] Fix | Delete
uchar *cache_pos;
[76] Fix | Delete
size_t cache_size;
[77] Fix | Delete
enum enum_pvio_type type;
[78] Fix | Delete
int timeout[3];
[79] Fix | Delete
int ssl_type; /* todo: change to enum (ssl plugins) */
[80] Fix | Delete
MARIADB_TLS *ctls;
[81] Fix | Delete
MYSQL *mysql;
[82] Fix | Delete
PVIO_METHODS *methods;
[83] Fix | Delete
void (*set_error)(MYSQL *mysql, unsigned int error_nr, const char *sqlstate, const char *format, ...);
[84] Fix | Delete
void (*callback)(MARIADB_PVIO *pvio, my_bool is_read, const uchar *buffer, size_t length);
[85] Fix | Delete
size_t bytes_read;
[86] Fix | Delete
size_t bytes_sent;
[87] Fix | Delete
};
[88] Fix | Delete
[89] Fix | Delete
typedef struct st_ma_pvio_cinfo
[90] Fix | Delete
{
[91] Fix | Delete
const char *host;
[92] Fix | Delete
const char *unix_socket;
[93] Fix | Delete
int port;
[94] Fix | Delete
enum enum_pvio_type type;
[95] Fix | Delete
MYSQL *mysql;
[96] Fix | Delete
} MA_PVIO_CINFO;
[97] Fix | Delete
[98] Fix | Delete
struct st_ma_pvio_methods
[99] Fix | Delete
{
[100] Fix | Delete
my_bool (*set_timeout)(MARIADB_PVIO *pvio, enum enum_pvio_timeout type, int timeout);
[101] Fix | Delete
int (*get_timeout)(MARIADB_PVIO *pvio, enum enum_pvio_timeout type);
[102] Fix | Delete
ssize_t (*read)(MARIADB_PVIO *pvio, uchar *buffer, size_t length);
[103] Fix | Delete
ssize_t (*async_read)(MARIADB_PVIO *pvio, uchar *buffer, size_t length);
[104] Fix | Delete
ssize_t (*write)(MARIADB_PVIO *pvio, const uchar *buffer, size_t length);
[105] Fix | Delete
ssize_t (*async_write)(MARIADB_PVIO *pvio, const uchar *buffer, size_t length);
[106] Fix | Delete
int (*wait_io_or_timeout)(MARIADB_PVIO *pvio, my_bool is_read, int timeout);
[107] Fix | Delete
int (*blocking)(MARIADB_PVIO *pvio, my_bool value, my_bool *old_value);
[108] Fix | Delete
my_bool (*connect)(MARIADB_PVIO *pvio, MA_PVIO_CINFO *cinfo);
[109] Fix | Delete
my_bool (*close)(MARIADB_PVIO *pvio);
[110] Fix | Delete
int (*fast_send)(MARIADB_PVIO *pvio);
[111] Fix | Delete
int (*keepalive)(MARIADB_PVIO *pvio);
[112] Fix | Delete
my_bool (*get_handle)(MARIADB_PVIO *pvio, void *handle);
[113] Fix | Delete
my_bool (*is_blocking)(MARIADB_PVIO *pvio);
[114] Fix | Delete
my_bool (*is_alive)(MARIADB_PVIO *pvio);
[115] Fix | Delete
my_bool (*has_data)(MARIADB_PVIO *pvio, ssize_t *data_len);
[116] Fix | Delete
int(*shutdown)(MARIADB_PVIO *pvio);
[117] Fix | Delete
};
[118] Fix | Delete
[119] Fix | Delete
/* Function prototypes */
[120] Fix | Delete
MARIADB_PVIO *ma_pvio_init(MA_PVIO_CINFO *cinfo);
[121] Fix | Delete
void ma_pvio_close(MARIADB_PVIO *pvio);
[122] Fix | Delete
ssize_t ma_pvio_cache_read(MARIADB_PVIO *pvio, uchar *buffer, size_t length);
[123] Fix | Delete
ssize_t ma_pvio_read(MARIADB_PVIO *pvio, uchar *buffer, size_t length);
[124] Fix | Delete
ssize_t ma_pvio_write(MARIADB_PVIO *pvio, const uchar *buffer, size_t length);
[125] Fix | Delete
int ma_pvio_get_timeout(MARIADB_PVIO *pvio, enum enum_pvio_timeout type);
[126] Fix | Delete
my_bool ma_pvio_set_timeout(MARIADB_PVIO *pvio, enum enum_pvio_timeout type, int timeout);
[127] Fix | Delete
int ma_pvio_fast_send(MARIADB_PVIO *pvio);
[128] Fix | Delete
int ma_pvio_keepalive(MARIADB_PVIO *pvio);
[129] Fix | Delete
my_socket ma_pvio_get_socket(MARIADB_PVIO *pvio);
[130] Fix | Delete
my_bool ma_pvio_is_blocking(MARIADB_PVIO *pvio);
[131] Fix | Delete
my_bool ma_pvio_blocking(MARIADB_PVIO *pvio, my_bool block, my_bool *previous_mode);
[132] Fix | Delete
my_bool ma_pvio_is_blocking(MARIADB_PVIO *pvio);
[133] Fix | Delete
int ma_pvio_wait_io_or_timeout(MARIADB_PVIO *pvio, my_bool is_read, int timeout);
[134] Fix | Delete
my_bool ma_pvio_connect(MARIADB_PVIO *pvio, MA_PVIO_CINFO *cinfo);
[135] Fix | Delete
my_bool ma_pvio_is_alive(MARIADB_PVIO *pvio);
[136] Fix | Delete
my_bool ma_pvio_get_handle(MARIADB_PVIO *pvio, void *handle);
[137] Fix | Delete
my_bool ma_pvio_has_data(MARIADB_PVIO *pvio, ssize_t *length);
[138] Fix | Delete
[139] Fix | Delete
#endif /* _ma_pvio_h_ */
[140] Fix | Delete
[141] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function