Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../usr/include/mysql
File: mariadb_com.h
/************************************************************************************
[0] Fix | Delete
Copyright (C) 2000, 2012 MySQL AB & MySQL Finland AB & TCX DataKonsult AB,
[1] Fix | Delete
Monty Program AB
[2] Fix | Delete
[3] Fix | Delete
This library is free software; you can redistribute it and/or
[4] Fix | Delete
modify it under the terms of the GNU Library General Public
[5] Fix | Delete
License as published by the Free Software Foundation; either
[6] Fix | Delete
version 2 of the License, or (at your option) any later version.
[7] Fix | Delete
[8] Fix | Delete
This library is distributed in the hope that it will be useful,
[9] Fix | Delete
but WITHOUT ANY WARRANTY; without even the implied warranty of
[10] Fix | Delete
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
[11] Fix | Delete
Library General Public License for more details.
[12] Fix | Delete
[13] Fix | Delete
You should have received a copy of the GNU Library General Public
[14] Fix | Delete
License along with this library; if not see <http://www.gnu.org/licenses>
[15] Fix | Delete
or write to the Free Software Foundation, Inc.,
[16] Fix | Delete
51 Franklin St., Fifth Floor, Boston, MA 02110, USA
[17] Fix | Delete
[18] Fix | Delete
Part of this code includes code from the PHP project which
[19] Fix | Delete
is freely available from http://www.php.net
[20] Fix | Delete
*************************************************************************************/
[21] Fix | Delete
[22] Fix | Delete
/*
[23] Fix | Delete
** Common definition between mysql server & client
[24] Fix | Delete
*/
[25] Fix | Delete
[26] Fix | Delete
#ifndef _mysql_com_h
[27] Fix | Delete
#define _mysql_com_h
[28] Fix | Delete
[29] Fix | Delete
[30] Fix | Delete
#define NAME_CHAR_LEN 64
[31] Fix | Delete
#define NAME_LEN 256 /* Field/table name length */
[32] Fix | Delete
#define HOSTNAME_LENGTH 255
[33] Fix | Delete
#define SYSTEM_MB_MAX_CHAR_LENGTH 4
[34] Fix | Delete
#define USERNAME_CHAR_LENGTH 128
[35] Fix | Delete
#define USERNAME_LENGTH (USERNAME_CHAR_LENGTH * SYSTEM_MB_MAX_CHAR_LENGTH)
[36] Fix | Delete
#define SERVER_VERSION_LENGTH 60
[37] Fix | Delete
#define SQLSTATE_LENGTH 5
[38] Fix | Delete
#define SCRAMBLE_LENGTH 20
[39] Fix | Delete
#define SCRAMBLE_LENGTH_323 8
[40] Fix | Delete
[41] Fix | Delete
#define LOCAL_HOST "localhost"
[42] Fix | Delete
#define LOCAL_HOST_NAMEDPIPE "."
[43] Fix | Delete
[44] Fix | Delete
#if defined(_WIN32) && !defined( _CUSTOMCONFIG_)
[45] Fix | Delete
#define MARIADB_NAMEDPIPE "MySQL"
[46] Fix | Delete
#define MYSQL_SERVICENAME "MySql"
[47] Fix | Delete
#endif /* _WIN32 */
[48] Fix | Delete
[49] Fix | Delete
/* for use in mysql client tools only */
[50] Fix | Delete
#define MYSQL_AUTODETECT_CHARSET_NAME "auto"
[51] Fix | Delete
#define BINCMP_FLAG 131072
[52] Fix | Delete
[53] Fix | Delete
enum mysql_enum_shutdown_level
[54] Fix | Delete
{
[55] Fix | Delete
SHUTDOWN_DEFAULT = 0,
[56] Fix | Delete
KILL_QUERY= 254,
[57] Fix | Delete
KILL_CONNECTION= 255
[58] Fix | Delete
};
[59] Fix | Delete
[60] Fix | Delete
enum enum_server_command
[61] Fix | Delete
{
[62] Fix | Delete
COM_SLEEP = 0,
[63] Fix | Delete
COM_QUIT,
[64] Fix | Delete
COM_INIT_DB,
[65] Fix | Delete
COM_QUERY,
[66] Fix | Delete
COM_FIELD_LIST,
[67] Fix | Delete
COM_CREATE_DB,
[68] Fix | Delete
COM_DROP_DB,
[69] Fix | Delete
COM_REFRESH,
[70] Fix | Delete
COM_SHUTDOWN,
[71] Fix | Delete
COM_STATISTICS,
[72] Fix | Delete
COM_PROCESS_INFO,
[73] Fix | Delete
COM_CONNECT,
[74] Fix | Delete
COM_PROCESS_KILL,
[75] Fix | Delete
COM_DEBUG,
[76] Fix | Delete
COM_PING,
[77] Fix | Delete
COM_TIME = 15,
[78] Fix | Delete
COM_DELAYED_INSERT,
[79] Fix | Delete
COM_CHANGE_USER,
[80] Fix | Delete
COM_BINLOG_DUMP,
[81] Fix | Delete
COM_TABLE_DUMP,
[82] Fix | Delete
COM_CONNECT_OUT = 20,
[83] Fix | Delete
COM_REGISTER_SLAVE,
[84] Fix | Delete
COM_STMT_PREPARE = 22,
[85] Fix | Delete
COM_STMT_EXECUTE = 23,
[86] Fix | Delete
COM_STMT_SEND_LONG_DATA = 24,
[87] Fix | Delete
COM_STMT_CLOSE = 25,
[88] Fix | Delete
COM_STMT_RESET = 26,
[89] Fix | Delete
COM_SET_OPTION = 27,
[90] Fix | Delete
COM_STMT_FETCH = 28,
[91] Fix | Delete
COM_DAEMON= 29,
[92] Fix | Delete
COM_UNSUPPORTED= 30,
[93] Fix | Delete
COM_RESET_CONNECTION = 31,
[94] Fix | Delete
COM_STMT_BULK_EXECUTE = 250,
[95] Fix | Delete
COM_RESERVED_1 = 254, /* former COM_MULTI, now removed */
[96] Fix | Delete
COM_END
[97] Fix | Delete
};
[98] Fix | Delete
[99] Fix | Delete
[100] Fix | Delete
#define NOT_NULL_FLAG 1 /* Field can't be NULL */
[101] Fix | Delete
#define PRI_KEY_FLAG 2 /* Field is part of a primary key */
[102] Fix | Delete
#define UNIQUE_KEY_FLAG 4 /* Field is part of a unique key */
[103] Fix | Delete
#define MULTIPLE_KEY_FLAG 8 /* Field is part of a key */
[104] Fix | Delete
#define BLOB_FLAG 16 /* Field is a blob */
[105] Fix | Delete
#define UNSIGNED_FLAG 32 /* Field is unsigned */
[106] Fix | Delete
#define ZEROFILL_FLAG 64 /* Field is zerofill */
[107] Fix | Delete
#define BINARY_FLAG 128
[108] Fix | Delete
/* The following are only sent to new clients */
[109] Fix | Delete
#define ENUM_FLAG 256 /* field is an enum */
[110] Fix | Delete
#define AUTO_INCREMENT_FLAG 512 /* field is a autoincrement field */
[111] Fix | Delete
#define TIMESTAMP_FLAG 1024 /* Field is a timestamp */
[112] Fix | Delete
#define SET_FLAG 2048 /* field is a set */
[113] Fix | Delete
/* new since 3.23.58 */
[114] Fix | Delete
#define NO_DEFAULT_VALUE_FLAG 4096 /* Field doesn't have default value */
[115] Fix | Delete
#define ON_UPDATE_NOW_FLAG 8192 /* Field is set to NOW on UPDATE */
[116] Fix | Delete
/* end new */
[117] Fix | Delete
#define NUM_FLAG 32768 /* Field is num (for clients) */
[118] Fix | Delete
#define PART_KEY_FLAG 16384 /* Intern; Part of some key */
[119] Fix | Delete
#define GROUP_FLAG 32768 /* Intern: Group field */
[120] Fix | Delete
#define UNIQUE_FLAG 65536 /* Intern: Used by sql_yacc */
[121] Fix | Delete
[122] Fix | Delete
#define REFRESH_GRANT 1 /* Refresh grant tables */
[123] Fix | Delete
#define REFRESH_LOG 2 /* Start on new log file */
[124] Fix | Delete
#define REFRESH_TABLES 4 /* close all tables */
[125] Fix | Delete
#define REFRESH_HOSTS 8 /* Flush host cache */
[126] Fix | Delete
#define REFRESH_STATUS 16 /* Flush status variables */
[127] Fix | Delete
#define REFRESH_THREADS 32 /* Flush thread cache */
[128] Fix | Delete
#define REFRESH_SLAVE 64 /* Reset master info and restart slave
[129] Fix | Delete
thread */
[130] Fix | Delete
#define REFRESH_MASTER 128 /* Remove all bin logs in the index
[131] Fix | Delete
and truncate the index */
[132] Fix | Delete
[133] Fix | Delete
/* The following can't be set with mysql_refresh() */
[134] Fix | Delete
#define REFRESH_READ_LOCK 16384 /* Lock tables for read */
[135] Fix | Delete
#define REFRESH_FAST 32768 /* Intern flag */
[136] Fix | Delete
[137] Fix | Delete
#define CLIENT_MYSQL 1
[138] Fix | Delete
#define CLIENT_FOUND_ROWS 2 /* Found instead of affected rows */
[139] Fix | Delete
#define CLIENT_LONG_FLAG 4 /* Get all column flags */
[140] Fix | Delete
#define CLIENT_CONNECT_WITH_DB 8 /* One can specify db on connect */
[141] Fix | Delete
#define CLIENT_NO_SCHEMA 16 /* Don't allow database.table.column */
[142] Fix | Delete
#define CLIENT_COMPRESS 32 /* Can use compression protocol */
[143] Fix | Delete
#define CLIENT_ODBC 64 /* Odbc client */
[144] Fix | Delete
#define CLIENT_LOCAL_FILES 128 /* Can use LOAD DATA LOCAL */
[145] Fix | Delete
#define CLIENT_IGNORE_SPACE 256 /* Ignore spaces before '(' */
[146] Fix | Delete
#define CLIENT_INTERACTIVE 1024 /* This is an interactive client */
[147] Fix | Delete
#define CLIENT_SSL 2048 /* Switch to SSL after handshake */
[148] Fix | Delete
#define CLIENT_IGNORE_SIGPIPE 4096 /* IGNORE sigpipes */
[149] Fix | Delete
#define CLIENT_TRANSACTIONS 8192 /* Client knows about transactions */
[150] Fix | Delete
/* added in 4.x */
[151] Fix | Delete
#define CLIENT_PROTOCOL_41 512
[152] Fix | Delete
#define CLIENT_RESERVED 16384
[153] Fix | Delete
#define CLIENT_SECURE_CONNECTION 32768
[154] Fix | Delete
#define CLIENT_MULTI_STATEMENTS (1UL << 16)
[155] Fix | Delete
#define CLIENT_MULTI_RESULTS (1UL << 17)
[156] Fix | Delete
#define CLIENT_PS_MULTI_RESULTS (1UL << 18)
[157] Fix | Delete
#define CLIENT_PLUGIN_AUTH (1UL << 19)
[158] Fix | Delete
#define CLIENT_CONNECT_ATTRS (1UL << 20)
[159] Fix | Delete
#define CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA (1UL << 21)
[160] Fix | Delete
#define CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS (1UL << 22)
[161] Fix | Delete
#define CLIENT_SESSION_TRACKING (1UL << 23)
[162] Fix | Delete
#define CLIENT_ZSTD_COMPRESSION (1UL << 26)
[163] Fix | Delete
#define CLIENT_PROGRESS (1UL << 29) /* client supports progress indicator */
[164] Fix | Delete
#define CLIENT_PROGRESS_OBSOLETE CLIENT_PROGRESS
[165] Fix | Delete
#define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30)
[166] Fix | Delete
#define CLIENT_SSL_VERIFY_SERVER_CERT_OBSOLETE CLIENT_SSL_VERIFY_SERVER_CERT
[167] Fix | Delete
#define CLIENT_REMEMBER_OPTIONS (1UL << 31)
[168] Fix | Delete
[169] Fix | Delete
/* MariaDB specific capabilities */
[170] Fix | Delete
#define MARIADB_CLIENT_FLAGS 0xFFFFFFFF00000000ULL
[171] Fix | Delete
#define MARIADB_CLIENT_PROGRESS (1ULL << 32)
[172] Fix | Delete
#define MARIADB_CLIENT_RESERVED_1 (1ULL << 33) /* Former COM_MULTI, don't use */
[173] Fix | Delete
#define MARIADB_CLIENT_STMT_BULK_OPERATIONS (1ULL << 34)
[174] Fix | Delete
/* support of extended data type/format information, since 10.5.0 */
[175] Fix | Delete
#define MARIADB_CLIENT_EXTENDED_METADATA (1ULL << 35)
[176] Fix | Delete
/* Do not resend metadata for prepared statements, since 10.6*/
[177] Fix | Delete
#define MARIADB_CLIENT_CACHE_METADATA (1ULL << 36)
[178] Fix | Delete
[179] Fix | Delete
#define IS_MARIADB_EXTENDED_SERVER(mysql)\
[180] Fix | Delete
(!(mysql->server_capabilities & CLIENT_MYSQL))
[181] Fix | Delete
[182] Fix | Delete
#define MARIADB_CLIENT_SUPPORTED_FLAGS (MARIADB_CLIENT_PROGRESS |\
[183] Fix | Delete
MARIADB_CLIENT_STMT_BULK_OPERATIONS|\
[184] Fix | Delete
MARIADB_CLIENT_EXTENDED_METADATA|\
[185] Fix | Delete
MARIADB_CLIENT_CACHE_METADATA)
[186] Fix | Delete
[187] Fix | Delete
#define CLIENT_SUPPORTED_FLAGS (CLIENT_MYSQL |\
[188] Fix | Delete
CLIENT_FOUND_ROWS |\
[189] Fix | Delete
CLIENT_LONG_FLAG |\
[190] Fix | Delete
CLIENT_CONNECT_WITH_DB |\
[191] Fix | Delete
CLIENT_NO_SCHEMA |\
[192] Fix | Delete
CLIENT_COMPRESS |\
[193] Fix | Delete
CLIENT_ODBC |\
[194] Fix | Delete
CLIENT_LOCAL_FILES |\
[195] Fix | Delete
CLIENT_IGNORE_SPACE |\
[196] Fix | Delete
CLIENT_INTERACTIVE |\
[197] Fix | Delete
CLIENT_SSL |\
[198] Fix | Delete
CLIENT_IGNORE_SIGPIPE |\
[199] Fix | Delete
CLIENT_TRANSACTIONS |\
[200] Fix | Delete
CLIENT_PROTOCOL_41 |\
[201] Fix | Delete
CLIENT_RESERVED |\
[202] Fix | Delete
CLIENT_SECURE_CONNECTION |\
[203] Fix | Delete
CLIENT_MULTI_STATEMENTS |\
[204] Fix | Delete
CLIENT_MULTI_RESULTS |\
[205] Fix | Delete
CLIENT_PROGRESS |\
[206] Fix | Delete
CLIENT_SSL_VERIFY_SERVER_CERT |\
[207] Fix | Delete
CLIENT_REMEMBER_OPTIONS |\
[208] Fix | Delete
CLIENT_PLUGIN_AUTH |\
[209] Fix | Delete
CLIENT_SESSION_TRACKING |\
[210] Fix | Delete
CLIENT_CONNECT_ATTRS)
[211] Fix | Delete
#define CLIENT_ALLOWED_FLAGS (CLIENT_SUPPORTED_FLAGS |\
[212] Fix | Delete
CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA |\
[213] Fix | Delete
CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS |\
[214] Fix | Delete
CLIENT_ZSTD_COMPRESSION |\
[215] Fix | Delete
CLIENT_PS_MULTI_RESULTS |\
[216] Fix | Delete
CLIENT_REMEMBER_OPTIONS)
[217] Fix | Delete
#define CLIENT_CAPABILITIES (CLIENT_MYSQL | \
[218] Fix | Delete
CLIENT_LONG_FLAG |\
[219] Fix | Delete
CLIENT_TRANSACTIONS |\
[220] Fix | Delete
CLIENT_SECURE_CONNECTION |\
[221] Fix | Delete
CLIENT_MULTI_RESULTS | \
[222] Fix | Delete
CLIENT_PS_MULTI_RESULTS |\
[223] Fix | Delete
CLIENT_PROTOCOL_41 |\
[224] Fix | Delete
CLIENT_PLUGIN_AUTH |\
[225] Fix | Delete
CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA | \
[226] Fix | Delete
CLIENT_SESSION_TRACKING |\
[227] Fix | Delete
CLIENT_CONNECT_ATTRS)
[228] Fix | Delete
[229] Fix | Delete
#define CLIENT_DEFAULT_FLAGS ((CLIENT_SUPPORTED_FLAGS & ~CLIENT_COMPRESS)\
[230] Fix | Delete
& ~CLIENT_SSL)
[231] Fix | Delete
[232] Fix | Delete
#define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */
[233] Fix | Delete
#define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */
[234] Fix | Delete
#define SERVER_MORE_RESULTS_EXIST 8
[235] Fix | Delete
#define SERVER_QUERY_NO_GOOD_INDEX_USED 16
[236] Fix | Delete
#define SERVER_QUERY_NO_INDEX_USED 32
[237] Fix | Delete
#define SERVER_STATUS_CURSOR_EXISTS 64
[238] Fix | Delete
#define SERVER_STATUS_LAST_ROW_SENT 128
[239] Fix | Delete
#define SERVER_STATUS_DB_DROPPED 256
[240] Fix | Delete
#define SERVER_STATUS_NO_BACKSLASH_ESCAPES 512
[241] Fix | Delete
#define SERVER_STATUS_METADATA_CHANGED 1024
[242] Fix | Delete
#define SERVER_QUERY_WAS_SLOW 2048
[243] Fix | Delete
#define SERVER_PS_OUT_PARAMS 4096
[244] Fix | Delete
#define SERVER_STATUS_IN_TRANS_READONLY 8192
[245] Fix | Delete
#define SERVER_SESSION_STATE_CHANGED 16384
[246] Fix | Delete
#define SERVER_STATUS_ANSI_QUOTES 32768
[247] Fix | Delete
[248] Fix | Delete
#define MYSQL_ERRMSG_SIZE 512
[249] Fix | Delete
#define NET_READ_TIMEOUT 30 /* Timeout on read */
[250] Fix | Delete
#define NET_WRITE_TIMEOUT 60 /* Timeout on write */
[251] Fix | Delete
#define NET_WAIT_TIMEOUT (8*60*60) /* Wait for new query */
[252] Fix | Delete
[253] Fix | Delete
/* for server integration (mysqlbinlog) */
[254] Fix | Delete
#define LIST_PROCESS_HOST_LEN 64
[255] Fix | Delete
#define MYSQL50_TABLE_NAME_PREFIX "#mysql50#"
[256] Fix | Delete
#define MYSQL50_TABLE_NAME_PREFIX_LENGTH (sizeof(MYSQL50_TABLE_NAME_PREFIX)-1)
[257] Fix | Delete
#define SAFE_NAME_LEN (NAME_LEN + MYSQL50_TABLE_NAME_PREFIX_LENGTH)
[258] Fix | Delete
[259] Fix | Delete
struct st_ma_pvio;
[260] Fix | Delete
typedef struct st_ma_pvio MARIADB_PVIO;
[261] Fix | Delete
[262] Fix | Delete
#define MAX_CHAR_WIDTH 255 /* Max length for a CHAR column */
[263] Fix | Delete
#define MAX_BLOB_WIDTH 8192 /* Default width for blob */
[264] Fix | Delete
[265] Fix | Delete
/* the following defines were added for PHP's mysqli and pdo extensions:
[266] Fix | Delete
see: CONC-56
[267] Fix | Delete
*/
[268] Fix | Delete
#define MAX_TINYINT_WIDTH 3
[269] Fix | Delete
#define MAX_SMALLINT_WIDTH 5
[270] Fix | Delete
#define MAX_MEDIUMINT_WIDTH 8
[271] Fix | Delete
#define MAX_INT_WIDTH 10
[272] Fix | Delete
#define MAX_BIGINT_WIDTH 20
[273] Fix | Delete
[274] Fix | Delete
struct st_ma_connection_plugin;
[275] Fix | Delete
[276] Fix | Delete
[277] Fix | Delete
typedef struct st_net {
[278] Fix | Delete
MARIADB_PVIO *pvio;
[279] Fix | Delete
unsigned char *buff;
[280] Fix | Delete
unsigned char *buff_end,*write_pos,*read_pos;
[281] Fix | Delete
my_socket fd; /* For Perl DBI/dbd */
[282] Fix | Delete
unsigned long remain_in_buf,length;
[283] Fix | Delete
unsigned long buf_length, where_b;
[284] Fix | Delete
unsigned long max_packet, max_packet_size;
[285] Fix | Delete
unsigned int pkt_nr, compress_pkt_nr;
[286] Fix | Delete
unsigned int write_timeout, read_timeout, retry_count;
[287] Fix | Delete
int fcntl;
[288] Fix | Delete
unsigned int *return_status;
[289] Fix | Delete
unsigned char reading_or_writing;
[290] Fix | Delete
char save_char;
[291] Fix | Delete
char unused_1;
[292] Fix | Delete
my_bool unused_2;
[293] Fix | Delete
my_bool compress;
[294] Fix | Delete
my_bool unused_3;
[295] Fix | Delete
void *unused_4;
[296] Fix | Delete
unsigned int last_errno;
[297] Fix | Delete
unsigned char error;
[298] Fix | Delete
my_bool unused_5;
[299] Fix | Delete
my_bool unused_6;
[300] Fix | Delete
char last_error[MYSQL_ERRMSG_SIZE];
[301] Fix | Delete
char sqlstate[SQLSTATE_LENGTH+1];
[302] Fix | Delete
struct st_mariadb_net_extension *extension;
[303] Fix | Delete
} NET;
[304] Fix | Delete
[305] Fix | Delete
#define packet_error ((unsigned int) -1)
[306] Fix | Delete
[307] Fix | Delete
/* used by mysql_set_server_option */
[308] Fix | Delete
enum enum_mysql_set_option
[309] Fix | Delete
{
[310] Fix | Delete
MYSQL_OPTION_MULTI_STATEMENTS_ON,
[311] Fix | Delete
MYSQL_OPTION_MULTI_STATEMENTS_OFF
[312] Fix | Delete
};
[313] Fix | Delete
[314] Fix | Delete
/* for status callback function */
[315] Fix | Delete
enum enum_mariadb_status_info
[316] Fix | Delete
{
[317] Fix | Delete
STATUS_TYPE= 0,
[318] Fix | Delete
SESSION_TRACK_TYPE
[319] Fix | Delete
};
[320] Fix | Delete
[321] Fix | Delete
enum enum_session_state_type
[322] Fix | Delete
{
[323] Fix | Delete
SESSION_TRACK_SYSTEM_VARIABLES= 0,
[324] Fix | Delete
SESSION_TRACK_SCHEMA,
[325] Fix | Delete
SESSION_TRACK_STATE_CHANGE,
[326] Fix | Delete
/* currently not supported by MariaDB Server */
[327] Fix | Delete
SESSION_TRACK_GTIDS,
[328] Fix | Delete
SESSION_TRACK_TRANSACTION_CHARACTERISTICS,
[329] Fix | Delete
SESSION_TRACK_TRANSACTION_STATE /* make sure that SESSION_TRACK_END always points
[330] Fix | Delete
to last element of enum !! */
[331] Fix | Delete
};
[332] Fix | Delete
[333] Fix | Delete
#define SESSION_TRACK_BEGIN 0
[334] Fix | Delete
#define SESSION_TRACK_END SESSION_TRACK_TRANSACTION_STATE
[335] Fix | Delete
#define SESSION_TRACK_TYPES (SESSION_TRACK_END + 1)
[336] Fix | Delete
[337] Fix | Delete
/* SESSION_TRACK_TRANSACTION_TYPE was renamed to SESSION_TRACK_TRANSACTION_STATE
[338] Fix | Delete
in 3e699a1738cdfb0a2c5b8eabfa8301b8d11cf711.
[339] Fix | Delete
This is a workaround to prevent breaking of travis and buildbot tests.
[340] Fix | Delete
TODO: Remove this after server fixes */
[341] Fix | Delete
#define SESSION_TRACK_TRANSACTION_TYPE SESSION_TRACK_TRANSACTION_STATE
[342] Fix | Delete
[343] Fix | Delete
enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
[344] Fix | Delete
MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG,
[345] Fix | Delete
MYSQL_TYPE_FLOAT, MYSQL_TYPE_DOUBLE,
[346] Fix | Delete
MYSQL_TYPE_NULL, MYSQL_TYPE_TIMESTAMP,
[347] Fix | Delete
MYSQL_TYPE_LONGLONG,MYSQL_TYPE_INT24,
[348] Fix | Delete
MYSQL_TYPE_DATE, MYSQL_TYPE_TIME,
[349] Fix | Delete
MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR,
[350] Fix | Delete
MYSQL_TYPE_NEWDATE, MYSQL_TYPE_VARCHAR,
[351] Fix | Delete
MYSQL_TYPE_BIT,
[352] Fix | Delete
/*
[353] Fix | Delete
the following types are not used by client,
[354] Fix | Delete
only for mysqlbinlog!!
[355] Fix | Delete
*/
[356] Fix | Delete
MYSQL_TYPE_TIMESTAMP2,
[357] Fix | Delete
MYSQL_TYPE_DATETIME2,
[358] Fix | Delete
MYSQL_TYPE_TIME2,
[359] Fix | Delete
/* --------------------------------------------- */
[360] Fix | Delete
MYSQL_TYPE_JSON=245,
[361] Fix | Delete
MYSQL_TYPE_NEWDECIMAL=246,
[362] Fix | Delete
MYSQL_TYPE_ENUM=247,
[363] Fix | Delete
MYSQL_TYPE_SET=248,
[364] Fix | Delete
MYSQL_TYPE_TINY_BLOB=249,
[365] Fix | Delete
MYSQL_TYPE_MEDIUM_BLOB=250,
[366] Fix | Delete
MYSQL_TYPE_LONG_BLOB=251,
[367] Fix | Delete
MYSQL_TYPE_BLOB=252,
[368] Fix | Delete
MYSQL_TYPE_VAR_STRING=253,
[369] Fix | Delete
MYSQL_TYPE_STRING=254,
[370] Fix | Delete
MYSQL_TYPE_GEOMETRY=255,
[371] Fix | Delete
MAX_NO_FIELD_TYPES };
[372] Fix | Delete
[373] Fix | Delete
#define FIELD_TYPE_CHAR FIELD_TYPE_TINY /* For compatibility */
[374] Fix | Delete
#define FIELD_TYPE_INTERVAL FIELD_TYPE_ENUM /* For compatibility */
[375] Fix | Delete
#define FIELD_TYPE_DECIMAL MYSQL_TYPE_DECIMAL
[376] Fix | Delete
#define FIELD_TYPE_NEWDECIMAL MYSQL_TYPE_NEWDECIMAL
[377] Fix | Delete
#define FIELD_TYPE_TINY MYSQL_TYPE_TINY
[378] Fix | Delete
#define FIELD_TYPE_SHORT MYSQL_TYPE_SHORT
[379] Fix | Delete
#define FIELD_TYPE_LONG MYSQL_TYPE_LONG
[380] Fix | Delete
#define FIELD_TYPE_FLOAT MYSQL_TYPE_FLOAT
[381] Fix | Delete
#define FIELD_TYPE_DOUBLE MYSQL_TYPE_DOUBLE
[382] Fix | Delete
#define FIELD_TYPE_NULL MYSQL_TYPE_NULL
[383] Fix | Delete
#define FIELD_TYPE_TIMESTAMP MYSQL_TYPE_TIMESTAMP
[384] Fix | Delete
#define FIELD_TYPE_LONGLONG MYSQL_TYPE_LONGLONG
[385] Fix | Delete
#define FIELD_TYPE_INT24 MYSQL_TYPE_INT24
[386] Fix | Delete
#define FIELD_TYPE_DATE MYSQL_TYPE_DATE
[387] Fix | Delete
#define FIELD_TYPE_TIME MYSQL_TYPE_TIME
[388] Fix | Delete
#define FIELD_TYPE_DATETIME MYSQL_TYPE_DATETIME
[389] Fix | Delete
#define FIELD_TYPE_YEAR MYSQL_TYPE_YEAR
[390] Fix | Delete
#define FIELD_TYPE_NEWDATE MYSQL_TYPE_NEWDATE
[391] Fix | Delete
#define FIELD_TYPE_ENUM MYSQL_TYPE_ENUM
[392] Fix | Delete
#define FIELD_TYPE_SET MYSQL_TYPE_SET
[393] Fix | Delete
#define FIELD_TYPE_TINY_BLOB MYSQL_TYPE_TINY_BLOB
[394] Fix | Delete
#define FIELD_TYPE_MEDIUM_BLOB MYSQL_TYPE_MEDIUM_BLOB
[395] Fix | Delete
#define FIELD_TYPE_LONG_BLOB MYSQL_TYPE_LONG_BLOB
[396] Fix | Delete
#define FIELD_TYPE_BLOB MYSQL_TYPE_BLOB
[397] Fix | Delete
#define FIELD_TYPE_VAR_STRING MYSQL_TYPE_VAR_STRING
[398] Fix | Delete
#define FIELD_TYPE_STRING MYSQL_TYPE_STRING
[399] Fix | Delete
#define FIELD_TYPE_GEOMETRY MYSQL_TYPE_GEOMETRY
[400] Fix | Delete
#define FIELD_TYPE_BIT MYSQL_TYPE_BIT
[401] Fix | Delete
[402] Fix | Delete
extern unsigned long max_allowed_packet;
[403] Fix | Delete
extern unsigned long net_buffer_length;
[404] Fix | Delete
[405] Fix | Delete
#define net_new_transaction(net) ((net)->pkt_nr=0)
[406] Fix | Delete
[407] Fix | Delete
int ma_net_init(NET *net, MARIADB_PVIO *pvio);
[408] Fix | Delete
void ma_net_end(NET *net);
[409] Fix | Delete
void ma_net_clear(NET *net);
[410] Fix | Delete
int ma_net_flush(NET *net);
[411] Fix | Delete
int ma_net_write(NET *net,const unsigned char *packet, size_t len);
[412] Fix | Delete
int ma_net_write_command(NET *net,unsigned char command,const char *packet,
[413] Fix | Delete
size_t len, my_bool disable_flush);
[414] Fix | Delete
int ma_net_real_write(NET *net,const char *packet, size_t len);
[415] Fix | Delete
extern unsigned long ma_net_read(NET *net);
[416] Fix | Delete
[417] Fix | Delete
struct rand_struct {
[418] Fix | Delete
unsigned long seed1,seed2,max_value;
[419] Fix | Delete
double max_value_dbl;
[420] Fix | Delete
};
[421] Fix | Delete
[422] Fix | Delete
/* The following is for user defined functions */
[423] Fix | Delete
[424] Fix | Delete
enum Item_result {STRING_RESULT,REAL_RESULT,INT_RESULT,ROW_RESULT,DECIMAL_RESULT};
[425] Fix | Delete
[426] Fix | Delete
typedef struct st_udf_args
[427] Fix | Delete
{
[428] Fix | Delete
unsigned int arg_count; /* Number of arguments */
[429] Fix | Delete
enum Item_result *arg_type; /* Pointer to item_results */
[430] Fix | Delete
char **args; /* Pointer to argument */
[431] Fix | Delete
unsigned long *lengths; /* Length of string arguments */
[432] Fix | Delete
char *maybe_null; /* Set to 1 for all maybe_null args */
[433] Fix | Delete
} UDF_ARGS;
[434] Fix | Delete
[435] Fix | Delete
/* This holds information about the result */
[436] Fix | Delete
[437] Fix | Delete
typedef struct st_udf_init
[438] Fix | Delete
{
[439] Fix | Delete
my_bool maybe_null; /* 1 if function can return NULL */
[440] Fix | Delete
unsigned int decimals; /* for real functions */
[441] Fix | Delete
unsigned int max_length; /* For string functions */
[442] Fix | Delete
char *ptr; /* free pointer for function data */
[443] Fix | Delete
my_bool const_item; /* 0 if result is independent of arguments */
[444] Fix | Delete
} UDF_INIT;
[445] Fix | Delete
[446] Fix | Delete
/* Connection types */
[447] Fix | Delete
#define MARIADB_CONNECTION_UNIXSOCKET 0
[448] Fix | Delete
#define MARIADB_CONNECTION_TCP 1
[449] Fix | Delete
#define MARIADB_CONNECTION_NAMEDPIPE 2
[450] Fix | Delete
#define MARIADB_CONNECTION_SHAREDMEM 3
[451] Fix | Delete
[452] Fix | Delete
/* Constants when using compression */
[453] Fix | Delete
#define NET_HEADER_SIZE 4 /* standard header size */
[454] Fix | Delete
#define COMP_HEADER_SIZE 3 /* compression header extra size */
[455] Fix | Delete
[456] Fix | Delete
/* Prototypes to password functions */
[457] Fix | Delete
#define native_password_plugin_name "mysql_native_password"
[458] Fix | Delete
#define old_password_plugin_name "mysql_old_password"
[459] Fix | Delete
[460] Fix | Delete
#ifdef __cplusplus
[461] Fix | Delete
extern "C" {
[462] Fix | Delete
#endif
[463] Fix | Delete
[464] Fix | Delete
char *ma_scramble_323(char *to,const char *message,const char *password);
[465] Fix | Delete
void ma_scramble_41(const unsigned char *buffer, const char *scramble, const char *password);
[466] Fix | Delete
void ma_hash_password(unsigned long *result, const char *password, size_t len);
[467] Fix | Delete
void ma_make_scrambled_password(char *to,const char *password);
[468] Fix | Delete
[469] Fix | Delete
/* Some other useful functions */
[470] Fix | Delete
[471] Fix | Delete
void mariadb_load_defaults(const char *conf_file, const char **groups,
[472] Fix | Delete
int *argc, char ***argv);
[473] Fix | Delete
my_bool ma_thread_init(void);
[474] Fix | Delete
void ma_thread_end(void);
[475] Fix | Delete
[476] Fix | Delete
#ifdef __cplusplus
[477] Fix | Delete
}
[478] Fix | Delete
#endif
[479] Fix | Delete
[480] Fix | Delete
#define NULL_LENGTH ((unsigned long) ~0) /* For net_store_length */
[481] Fix | Delete
[482] Fix | Delete
#endif
[483] Fix | Delete
[484] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function