MDEV-21612 - remove COM_MULTI from server and C/C
The COM_MULTI did not take off. No connector is using it. Remove related code from server, and client. If anything it is a step simplification of already-bloated dispatch_command(), and related code.
This commit is contained in:
parent
1a2b494100
commit
b0d2a59d9a
@ -18,7 +18,7 @@ enum enum_server_command
|
|||||||
COM_SLAVE_WORKER=251,
|
COM_SLAVE_WORKER=251,
|
||||||
COM_SLAVE_IO=252,
|
COM_SLAVE_IO=252,
|
||||||
COM_SLAVE_SQL=253,
|
COM_SLAVE_SQL=253,
|
||||||
COM_MULTI=254,
|
COM_RESERVED_1=254,
|
||||||
COM_END=255
|
COM_END=255
|
||||||
};
|
};
|
||||||
enum enum_indicator_type
|
enum enum_indicator_type
|
||||||
|
@ -123,7 +123,7 @@ enum enum_server_command
|
|||||||
COM_SLAVE_WORKER=251,
|
COM_SLAVE_WORKER=251,
|
||||||
COM_SLAVE_IO=252,
|
COM_SLAVE_IO=252,
|
||||||
COM_SLAVE_SQL=253,
|
COM_SLAVE_SQL=253,
|
||||||
COM_MULTI=254,
|
COM_RESERVED_1=254, /* Old COM_MULTI, now removed */
|
||||||
/* Must be last */
|
/* Must be last */
|
||||||
COM_END=255
|
COM_END=255
|
||||||
};
|
};
|
||||||
@ -296,8 +296,10 @@ enum enum_indicator_type
|
|||||||
#define MARIADB_CLIENT_FLAGS_MASK 0xffffffff00000000ULL
|
#define MARIADB_CLIENT_FLAGS_MASK 0xffffffff00000000ULL
|
||||||
/* Client support progress indicator */
|
/* Client support progress indicator */
|
||||||
#define MARIADB_CLIENT_PROGRESS (1ULL << 32)
|
#define MARIADB_CLIENT_PROGRESS (1ULL << 32)
|
||||||
/* support COM_MULTI */
|
|
||||||
#define MARIADB_CLIENT_COM_MULTI (1ULL << 33)
|
/* Old COM_MULTI experiment (functionality removed).*/
|
||||||
|
#define MARIADB_CLIENT_RESERVED_1 (1ULL << 33)
|
||||||
|
|
||||||
/* support of array binding */
|
/* support of array binding */
|
||||||
#define MARIADB_CLIENT_STMT_BULK_OPERATIONS (1ULL << 34)
|
#define MARIADB_CLIENT_STMT_BULK_OPERATIONS (1ULL << 34)
|
||||||
/* support of extended metadata (e.g. type/format information) */
|
/* support of extended metadata (e.g. type/format information) */
|
||||||
@ -341,7 +343,6 @@ enum enum_indicator_type
|
|||||||
CLIENT_SESSION_TRACK |\
|
CLIENT_SESSION_TRACK |\
|
||||||
CLIENT_DEPRECATE_EOF |\
|
CLIENT_DEPRECATE_EOF |\
|
||||||
CLIENT_CONNECT_ATTRS |\
|
CLIENT_CONNECT_ATTRS |\
|
||||||
MARIADB_CLIENT_COM_MULTI |\
|
|
||||||
MARIADB_CLIENT_STMT_BULK_OPERATIONS |\
|
MARIADB_CLIENT_STMT_BULK_OPERATIONS |\
|
||||||
MARIADB_CLIENT_EXTENDED_METADATA|\
|
MARIADB_CLIENT_EXTENDED_METADATA|\
|
||||||
CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS)
|
CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS)
|
||||||
|
@ -168,8 +168,7 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
|
|||||||
arg_length= header_length;
|
arg_length= header_length;
|
||||||
}
|
}
|
||||||
|
|
||||||
result= dispatch_command(command, thd, (char *) arg, arg_length, FALSE,
|
result= dispatch_command(command, thd, (char *) arg, arg_length);
|
||||||
FALSE);
|
|
||||||
thd->cur_data= 0;
|
thd->cur_data= 0;
|
||||||
thd->mysys_var= NULL;
|
thd->mysys_var= NULL;
|
||||||
|
|
||||||
@ -1258,7 +1257,7 @@ bool
|
|||||||
net_send_ok(THD *thd,
|
net_send_ok(THD *thd,
|
||||||
uint server_status, uint statement_warn_count,
|
uint server_status, uint statement_warn_count,
|
||||||
ulonglong affected_rows, ulonglong id, const char *message,
|
ulonglong affected_rows, ulonglong id, const char *message,
|
||||||
bool, bool)
|
bool)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("emb_net_send_ok");
|
DBUG_ENTER("emb_net_send_ok");
|
||||||
MYSQL_DATA *data;
|
MYSQL_DATA *data;
|
||||||
|
@ -1900,8 +1900,7 @@ int Query_log_event::do_apply_event(rpl_group_info *rgi,
|
|||||||
thd->variables.sql_log_slow= !MY_TEST(global_system_variables.log_slow_disabled_statements & LOG_SLOW_DISABLE_SLAVE);
|
thd->variables.sql_log_slow= !MY_TEST(global_system_variables.log_slow_disabled_statements & LOG_SLOW_DISABLE_SLAVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
mysql_parse(thd, thd->query(), thd->query_length(), &parser_state,
|
mysql_parse(thd, thd->query(), thd->query_length(), &parser_state);
|
||||||
FALSE, FALSE);
|
|
||||||
/* Finalize server status flags after executing a statement. */
|
/* Finalize server status flags after executing a statement. */
|
||||||
thd->update_server_status();
|
thd->update_server_status();
|
||||||
log_slow_statement(thd);
|
log_slow_statement(thd);
|
||||||
|
@ -3330,7 +3330,6 @@ SHOW_VAR com_status_vars[]= {
|
|||||||
{"kill", STMT_STATUS(SQLCOM_KILL)},
|
{"kill", STMT_STATUS(SQLCOM_KILL)},
|
||||||
{"load", STMT_STATUS(SQLCOM_LOAD)},
|
{"load", STMT_STATUS(SQLCOM_LOAD)},
|
||||||
{"lock_tables", STMT_STATUS(SQLCOM_LOCK_TABLES)},
|
{"lock_tables", STMT_STATUS(SQLCOM_LOCK_TABLES)},
|
||||||
{"multi", COM_STATUS(com_multi)},
|
|
||||||
{"optimize", STMT_STATUS(SQLCOM_OPTIMIZE)},
|
{"optimize", STMT_STATUS(SQLCOM_OPTIMIZE)},
|
||||||
{"preload_keys", STMT_STATUS(SQLCOM_PRELOAD_KEYS)},
|
{"preload_keys", STMT_STATUS(SQLCOM_PRELOAD_KEYS)},
|
||||||
{"prepare_sql", STMT_STATUS(SQLCOM_PREPARE)},
|
{"prepare_sql", STMT_STATUS(SQLCOM_PREPARE)},
|
||||||
@ -3842,7 +3841,7 @@ static int init_common_variables()
|
|||||||
of SQLCOM_ constants.
|
of SQLCOM_ constants.
|
||||||
*/
|
*/
|
||||||
compile_time_assert(sizeof(com_status_vars)/sizeof(com_status_vars[0]) - 1 ==
|
compile_time_assert(sizeof(com_status_vars)/sizeof(com_status_vars[0]) - 1 ==
|
||||||
SQLCOM_END + 11);
|
SQLCOM_END + 10);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (get_options(&remaining_argc, &remaining_argv))
|
if (get_options(&remaining_argc, &remaining_argv))
|
||||||
|
@ -36,7 +36,7 @@ static const unsigned int PACKET_BUFFER_EXTRA_ALLOC= 1024;
|
|||||||
bool net_send_error_packet(THD *, uint, const char *, const char *);
|
bool net_send_error_packet(THD *, uint, const char *, const char *);
|
||||||
/* Declared non-static only because of the embedded library. */
|
/* Declared non-static only because of the embedded library. */
|
||||||
bool net_send_ok(THD *, uint, uint, ulonglong, ulonglong, const char *,
|
bool net_send_ok(THD *, uint, uint, ulonglong, ulonglong, const char *,
|
||||||
bool, bool);
|
bool);
|
||||||
/* Declared non-static only because of the embedded library. */
|
/* Declared non-static only because of the embedded library. */
|
||||||
bool net_send_eof(THD *thd, uint server_status, uint statement_warn_count);
|
bool net_send_eof(THD *thd, uint server_status, uint statement_warn_count);
|
||||||
#ifndef EMBEDDED_LIBRARY
|
#ifndef EMBEDDED_LIBRARY
|
||||||
@ -211,8 +211,7 @@ bool
|
|||||||
net_send_ok(THD *thd,
|
net_send_ok(THD *thd,
|
||||||
uint server_status, uint statement_warn_count,
|
uint server_status, uint statement_warn_count,
|
||||||
ulonglong affected_rows, ulonglong id, const char *message,
|
ulonglong affected_rows, ulonglong id, const char *message,
|
||||||
bool is_eof,
|
bool is_eof)
|
||||||
bool skip_flush)
|
|
||||||
{
|
{
|
||||||
NET *net= &thd->net;
|
NET *net= &thd->net;
|
||||||
StringBuffer<MYSQL_ERRMSG_SIZE + 10> store;
|
StringBuffer<MYSQL_ERRMSG_SIZE + 10> store;
|
||||||
@ -285,7 +284,7 @@ net_send_ok(THD *thd,
|
|||||||
DBUG_ASSERT(store.length() <= MAX_PACKET_LENGTH);
|
DBUG_ASSERT(store.length() <= MAX_PACKET_LENGTH);
|
||||||
|
|
||||||
error= my_net_write(net, (const unsigned char*)store.ptr(), store.length());
|
error= my_net_write(net, (const unsigned char*)store.ptr(), store.length());
|
||||||
if (likely(!error) && (!skip_flush || is_eof))
|
if (likely(!error))
|
||||||
error= net_flush(net);
|
error= net_flush(net);
|
||||||
|
|
||||||
thd->server_status&= ~SERVER_SESSION_STATE_CHANGED;
|
thd->server_status&= ~SERVER_SESSION_STATE_CHANGED;
|
||||||
@ -340,7 +339,7 @@ net_send_eof(THD *thd, uint server_status, uint statement_warn_count)
|
|||||||
(thd->get_command() != COM_BINLOG_DUMP ))
|
(thd->get_command() != COM_BINLOG_DUMP ))
|
||||||
{
|
{
|
||||||
error= net_send_ok(thd, server_status, statement_warn_count, 0, 0, NULL,
|
error= net_send_ok(thd, server_status, statement_warn_count, 0, 0, NULL,
|
||||||
true, false);
|
true);
|
||||||
DBUG_RETURN(error);
|
DBUG_RETURN(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -607,16 +606,14 @@ void Protocol::end_statement()
|
|||||||
thd->get_stmt_da()->statement_warn_count(),
|
thd->get_stmt_da()->statement_warn_count(),
|
||||||
thd->get_stmt_da()->affected_rows(),
|
thd->get_stmt_da()->affected_rows(),
|
||||||
thd->get_stmt_da()->last_insert_id(),
|
thd->get_stmt_da()->last_insert_id(),
|
||||||
thd->get_stmt_da()->message(),
|
thd->get_stmt_da()->message());
|
||||||
thd->get_stmt_da()->skip_flush());
|
|
||||||
break;
|
break;
|
||||||
case Diagnostics_area::DA_DISABLED:
|
case Diagnostics_area::DA_DISABLED:
|
||||||
break;
|
break;
|
||||||
case Diagnostics_area::DA_EMPTY:
|
case Diagnostics_area::DA_EMPTY:
|
||||||
default:
|
default:
|
||||||
DBUG_ASSERT(0);
|
DBUG_ASSERT(0);
|
||||||
error= send_ok(thd->server_status, 0, 0, 0, NULL,
|
error= send_ok(thd->server_status, 0, 0, 0, NULL);
|
||||||
thd->get_stmt_da()->skip_flush());
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (likely(!error))
|
if (likely(!error))
|
||||||
@ -635,12 +632,12 @@ void Protocol::end_statement()
|
|||||||
|
|
||||||
bool Protocol::send_ok(uint server_status, uint statement_warn_count,
|
bool Protocol::send_ok(uint server_status, uint statement_warn_count,
|
||||||
ulonglong affected_rows, ulonglong last_insert_id,
|
ulonglong affected_rows, ulonglong last_insert_id,
|
||||||
const char *message, bool skip_flush)
|
const char *message)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Protocol::send_ok");
|
DBUG_ENTER("Protocol::send_ok");
|
||||||
const bool retval=
|
const bool retval=
|
||||||
net_send_ok(thd, server_status, statement_warn_count,
|
net_send_ok(thd, server_status, statement_warn_count,
|
||||||
affected_rows, last_insert_id, message, false, skip_flush);
|
affected_rows, last_insert_id, message, false);
|
||||||
DBUG_RETURN(retval);
|
DBUG_RETURN(retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ protected:
|
|||||||
|
|
||||||
virtual bool send_ok(uint server_status, uint statement_warn_count,
|
virtual bool send_ok(uint server_status, uint statement_warn_count,
|
||||||
ulonglong affected_rows, ulonglong last_insert_id,
|
ulonglong affected_rows, ulonglong last_insert_id,
|
||||||
const char *message, bool skip_flush);
|
const char *message);
|
||||||
|
|
||||||
virtual bool send_eof(uint server_status, uint statement_warn_count);
|
virtual bool send_eof(uint server_status, uint statement_warn_count);
|
||||||
|
|
||||||
|
@ -7537,13 +7537,10 @@ ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_GIS
|
|||||||
# MariaDB extra error numbers starts from 4000
|
# MariaDB extra error numbers starts from 4000
|
||||||
skip-to-error-number 4000
|
skip-to-error-number 4000
|
||||||
|
|
||||||
ER_COMMULTI_BADCONTEXT 0A000
|
ER_UNUSED_26 0A000
|
||||||
eng "COM_MULTI can't return a result set in the given context"
|
eng "This error never happens"
|
||||||
ger "COM_MULTI kann im gegebenen Kontext keine Ergebnismenge zurückgeben"
|
ER_UNUSED_27
|
||||||
ukr "COM_MULTI не може повернути результати у цьому контексті"
|
eng "This error never happens"
|
||||||
ER_BAD_COMMAND_IN_MULTI
|
|
||||||
eng "Command '%s' is not allowed for COM_MULTI"
|
|
||||||
ukr "Команда '%s' не дозволена для COM_MULTI"
|
|
||||||
ER_WITH_COL_WRONG_LIST
|
ER_WITH_COL_WRONG_LIST
|
||||||
eng "WITH column list and SELECT field list have different column counts"
|
eng "WITH column list and SELECT field list have different column counts"
|
||||||
ER_TOO_MANY_DEFINITIONS_IN_WITH_CLAUSE
|
ER_TOO_MANY_DEFINITIONS_IN_WITH_CLAUSE
|
||||||
|
@ -347,8 +347,7 @@ gtid_pos_table_creation(THD *thd, plugin_ref engine, LEX_CSTRING *table_name)
|
|||||||
err= parser_state.init(thd, thd->query(), thd->query_length());
|
err= parser_state.init(thd, thd->query(), thd->query_length());
|
||||||
if (err)
|
if (err)
|
||||||
goto end;
|
goto end;
|
||||||
mysql_parse(thd, thd->query(), thd->query_length(), &parser_state,
|
mysql_parse(thd, thd->query(), thd->query_length(), &parser_state);
|
||||||
FALSE, FALSE);
|
|
||||||
if (unlikely(thd->is_error()))
|
if (unlikely(thd->is_error()))
|
||||||
err= 1;
|
err= 1;
|
||||||
/* The warning is relevant to 10.3 and earlier. */
|
/* The warning is relevant to 10.3 and earlier. */
|
||||||
|
@ -826,7 +826,6 @@ typedef struct system_status_var
|
|||||||
ulong com_create_tmp_table;
|
ulong com_create_tmp_table;
|
||||||
ulong com_drop_tmp_table;
|
ulong com_drop_tmp_table;
|
||||||
ulong com_other;
|
ulong com_other;
|
||||||
ulong com_multi;
|
|
||||||
|
|
||||||
ulong com_stmt_prepare;
|
ulong com_stmt_prepare;
|
||||||
ulong com_stmt_reprepare;
|
ulong com_stmt_reprepare;
|
||||||
@ -6902,10 +6901,6 @@ public:
|
|||||||
#define CF_SKIP_WSREP_CHECK 0
|
#define CF_SKIP_WSREP_CHECK 0
|
||||||
#endif /* WITH_WSREP */
|
#endif /* WITH_WSREP */
|
||||||
|
|
||||||
/**
|
|
||||||
Do not allow it for COM_MULTI batch
|
|
||||||
*/
|
|
||||||
#define CF_NO_COM_MULTI (1U << 3)
|
|
||||||
|
|
||||||
/* Inline functions */
|
/* Inline functions */
|
||||||
|
|
||||||
|
@ -302,7 +302,6 @@ void
|
|||||||
Diagnostics_area::reset_diagnostics_area()
|
Diagnostics_area::reset_diagnostics_area()
|
||||||
{
|
{
|
||||||
DBUG_ENTER("reset_diagnostics_area");
|
DBUG_ENTER("reset_diagnostics_area");
|
||||||
m_skip_flush= FALSE;
|
|
||||||
#ifdef DBUG_OFF
|
#ifdef DBUG_OFF
|
||||||
m_can_overwrite_status= FALSE;
|
m_can_overwrite_status= FALSE;
|
||||||
/** Don't take chances in production */
|
/** Don't take chances in production */
|
||||||
|
@ -1022,14 +1022,6 @@ public:
|
|||||||
{ DBUG_ASSERT(m_status == DA_ERROR || m_status == DA_OK ||
|
{ DBUG_ASSERT(m_status == DA_ERROR || m_status == DA_OK ||
|
||||||
m_status == DA_OK_BULK); return m_message; }
|
m_status == DA_OK_BULK); return m_message; }
|
||||||
|
|
||||||
bool skip_flush() const
|
|
||||||
{
|
|
||||||
DBUG_ASSERT(m_status == DA_OK || m_status == DA_OK_BULK);
|
|
||||||
return m_skip_flush;
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_skip_flush()
|
|
||||||
{ m_skip_flush= TRUE; }
|
|
||||||
|
|
||||||
uint sql_errno() const
|
uint sql_errno() const
|
||||||
{
|
{
|
||||||
@ -1215,9 +1207,6 @@ private:
|
|||||||
/** Set to make set_error_status after set_{ok,eof}_status possible. */
|
/** Set to make set_error_status after set_{ok,eof}_status possible. */
|
||||||
bool m_can_overwrite_status;
|
bool m_can_overwrite_status;
|
||||||
|
|
||||||
/** Skip flushing network buffer after writing OK (for COM_MULTI) */
|
|
||||||
bool m_skip_flush;
|
|
||||||
|
|
||||||
/** Message buffer. Can be used by OK or ERROR status. */
|
/** Message buffer. Can be used by OK or ERROR status. */
|
||||||
char m_message[MYSQL_ERRMSG_SIZE];
|
char m_message[MYSQL_ERRMSG_SIZE];
|
||||||
|
|
||||||
|
187
sql/sql_parse.cc
187
sql/sql_parse.cc
@ -111,9 +111,7 @@
|
|||||||
#include "wsrep_trans_observer.h" /* wsrep transaction hooks */
|
#include "wsrep_trans_observer.h" /* wsrep transaction hooks */
|
||||||
|
|
||||||
static bool wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
|
static bool wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
|
||||||
Parser_state *parser_state,
|
Parser_state *parser_state);
|
||||||
bool is_com_multi,
|
|
||||||
bool is_next_command);
|
|
||||||
|
|
||||||
#endif /* WITH_WSREP */
|
#endif /* WITH_WSREP */
|
||||||
/**
|
/**
|
||||||
@ -389,7 +387,7 @@ const LEX_CSTRING command_name[257]={
|
|||||||
{ STRING_WITH_LEN("Slave_worker") }, //251
|
{ STRING_WITH_LEN("Slave_worker") }, //251
|
||||||
{ STRING_WITH_LEN("Slave_IO") }, //252
|
{ STRING_WITH_LEN("Slave_IO") }, //252
|
||||||
{ STRING_WITH_LEN("Slave_SQL") }, //253
|
{ STRING_WITH_LEN("Slave_SQL") }, //253
|
||||||
{ STRING_WITH_LEN("Com_multi") }, //254
|
{ 0, 0},
|
||||||
{ STRING_WITH_LEN("Error") } // Last command number 255
|
{ STRING_WITH_LEN("Error") } // Last command number 255
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -488,7 +486,7 @@ void init_update_queries(void)
|
|||||||
memset(server_command_flags, 0, sizeof(server_command_flags));
|
memset(server_command_flags, 0, sizeof(server_command_flags));
|
||||||
|
|
||||||
server_command_flags[COM_STATISTICS]= CF_SKIP_QUERY_ID | CF_SKIP_QUESTIONS | CF_SKIP_WSREP_CHECK;
|
server_command_flags[COM_STATISTICS]= CF_SKIP_QUERY_ID | CF_SKIP_QUESTIONS | CF_SKIP_WSREP_CHECK;
|
||||||
server_command_flags[COM_PING]= CF_SKIP_QUERY_ID | CF_SKIP_QUESTIONS | CF_SKIP_WSREP_CHECK | CF_NO_COM_MULTI;
|
server_command_flags[COM_PING]= CF_SKIP_QUERY_ID | CF_SKIP_QUESTIONS | CF_SKIP_WSREP_CHECK;
|
||||||
|
|
||||||
server_command_flags[COM_QUIT]= CF_SKIP_WSREP_CHECK;
|
server_command_flags[COM_QUIT]= CF_SKIP_WSREP_CHECK;
|
||||||
server_command_flags[COM_PROCESS_INFO]= CF_SKIP_WSREP_CHECK;
|
server_command_flags[COM_PROCESS_INFO]= CF_SKIP_WSREP_CHECK;
|
||||||
@ -517,7 +515,6 @@ void init_update_queries(void)
|
|||||||
server_command_flags[COM_STMT_EXECUTE]= CF_SKIP_WSREP_CHECK;
|
server_command_flags[COM_STMT_EXECUTE]= CF_SKIP_WSREP_CHECK;
|
||||||
server_command_flags[COM_STMT_SEND_LONG_DATA]= CF_SKIP_WSREP_CHECK;
|
server_command_flags[COM_STMT_SEND_LONG_DATA]= CF_SKIP_WSREP_CHECK;
|
||||||
server_command_flags[COM_REGISTER_SLAVE]= CF_SKIP_WSREP_CHECK;
|
server_command_flags[COM_REGISTER_SLAVE]= CF_SKIP_WSREP_CHECK;
|
||||||
server_command_flags[COM_MULTI]= CF_SKIP_WSREP_CHECK | CF_NO_COM_MULTI;
|
|
||||||
|
|
||||||
/* Initialize the sql command flags array. */
|
/* Initialize the sql command flags array. */
|
||||||
memset(sql_command_flags, 0, sizeof(sql_command_flags));
|
memset(sql_command_flags, 0, sizeof(sql_command_flags));
|
||||||
@ -952,7 +949,7 @@ void execute_init_command(THD *thd, LEX_STRING *init_command,
|
|||||||
save_vio= thd->net.vio;
|
save_vio= thd->net.vio;
|
||||||
thd->net.vio= 0;
|
thd->net.vio= 0;
|
||||||
thd->clear_error(1);
|
thd->clear_error(1);
|
||||||
dispatch_command(COM_QUERY, thd, buf, (uint)len, FALSE, FALSE);
|
dispatch_command(COM_QUERY, thd, buf, (uint)len);
|
||||||
thd->client_capabilities= save_client_capabilities;
|
thd->client_capabilities= save_client_capabilities;
|
||||||
thd->net.vio= save_vio;
|
thd->net.vio= save_vio;
|
||||||
|
|
||||||
@ -1078,7 +1075,7 @@ int bootstrap(MYSQL_FILE *file)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
mysql_parse(thd, thd->query(), length, &parser_state, FALSE, FALSE);
|
mysql_parse(thd, thd->query(), length, &parser_state);
|
||||||
|
|
||||||
bootstrap_error= thd->is_error();
|
bootstrap_error= thd->is_error();
|
||||||
thd->protocol->end_statement();
|
thd->protocol->end_statement();
|
||||||
@ -1345,7 +1342,7 @@ bool do_command(THD *thd)
|
|||||||
DBUG_ASSERT(packet_length);
|
DBUG_ASSERT(packet_length);
|
||||||
DBUG_ASSERT(!thd->apc_target.is_enabled());
|
DBUG_ASSERT(!thd->apc_target.is_enabled());
|
||||||
return_value= dispatch_command(command, thd, packet+1,
|
return_value= dispatch_command(command, thd, packet+1,
|
||||||
(uint) (packet_length-1), FALSE, FALSE);
|
(uint) (packet_length-1));
|
||||||
DBUG_ASSERT(!thd->apc_target.is_enabled());
|
DBUG_ASSERT(!thd->apc_target.is_enabled());
|
||||||
|
|
||||||
out:
|
out:
|
||||||
@ -1456,45 +1453,6 @@ static void wsrep_copy_query(THD *thd)
|
|||||||
}
|
}
|
||||||
#endif /* WITH_WSREP */
|
#endif /* WITH_WSREP */
|
||||||
|
|
||||||
/**
|
|
||||||
check COM_MULTI packet
|
|
||||||
|
|
||||||
@param thd thread handle
|
|
||||||
@param packet pointer on the packet of commands
|
|
||||||
@param packet_length length of this packet
|
|
||||||
|
|
||||||
@retval 0 - Error
|
|
||||||
@retval # - Number of commands in the batch
|
|
||||||
*/
|
|
||||||
|
|
||||||
uint maria_multi_check(THD *thd, char *packet, size_t packet_length)
|
|
||||||
{
|
|
||||||
uint counter= 0;
|
|
||||||
DBUG_ENTER("maria_multi_check");
|
|
||||||
while (packet_length)
|
|
||||||
{
|
|
||||||
char *packet_start= packet;
|
|
||||||
size_t subpacket_length= net_field_length((uchar **)&packet_start);
|
|
||||||
size_t length_length= packet_start - packet;
|
|
||||||
// length of command + 3 bytes where that length was stored
|
|
||||||
DBUG_PRINT("info", ("sub-packet length: %zu + %zu command: %x",
|
|
||||||
subpacket_length, length_length,
|
|
||||||
packet_start[3]));
|
|
||||||
|
|
||||||
if (subpacket_length == 0 ||
|
|
||||||
(subpacket_length + length_length) > packet_length)
|
|
||||||
{
|
|
||||||
my_message(ER_UNKNOWN_COM_ERROR, ER_THD(thd, ER_UNKNOWN_COM_ERROR),
|
|
||||||
MYF(0));
|
|
||||||
DBUG_RETURN(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
counter++;
|
|
||||||
packet= packet_start + subpacket_length;
|
|
||||||
packet_length-= (subpacket_length + length_length);
|
|
||||||
}
|
|
||||||
DBUG_RETURN(counter);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(WITH_ARIA_STORAGE_ENGINE)
|
#if defined(WITH_ARIA_STORAGE_ENGINE)
|
||||||
@ -1531,8 +1489,6 @@ public:
|
|||||||
@param packet_length length of packet + 1 (to show that data is
|
@param packet_length length of packet + 1 (to show that data is
|
||||||
null-terminated) except for COM_SLEEP, where it
|
null-terminated) except for COM_SLEEP, where it
|
||||||
can be zero.
|
can be zero.
|
||||||
@param is_com_multi recursive call from COM_MULTI
|
|
||||||
@param is_next_command there will be more command in the COM_MULTI batch
|
|
||||||
|
|
||||||
@todo
|
@todo
|
||||||
set thd->lex->sql_command to SQLCOM_END here.
|
set thd->lex->sql_command to SQLCOM_END here.
|
||||||
@ -1546,8 +1502,7 @@ public:
|
|||||||
COM_QUIT/COM_SHUTDOWN
|
COM_QUIT/COM_SHUTDOWN
|
||||||
*/
|
*/
|
||||||
bool dispatch_command(enum enum_server_command command, THD *thd,
|
bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||||
char* packet, uint packet_length, bool is_com_multi,
|
char* packet, uint packet_length)
|
||||||
bool is_next_command)
|
|
||||||
{
|
{
|
||||||
NET *net= &thd->net;
|
NET *net= &thd->net;
|
||||||
bool error= 0;
|
bool error= 0;
|
||||||
@ -1628,14 +1583,6 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||||||
beginning of each command.
|
beginning of each command.
|
||||||
*/
|
*/
|
||||||
thd->server_status&= ~SERVER_STATUS_CLEAR_SET;
|
thd->server_status&= ~SERVER_STATUS_CLEAR_SET;
|
||||||
if (is_next_command)
|
|
||||||
{
|
|
||||||
drop_more_results= !MY_TEST(thd->server_status &
|
|
||||||
SERVER_MORE_RESULTS_EXISTS);
|
|
||||||
thd->server_status|= SERVER_MORE_RESULTS_EXISTS;
|
|
||||||
if (is_com_multi)
|
|
||||||
thd->get_stmt_da()->set_skip_flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (unlikely(thd->security_ctx->password_expired &&
|
if (unlikely(thd->security_ctx->password_expired &&
|
||||||
command != COM_QUERY &&
|
command != COM_QUERY &&
|
||||||
@ -1850,8 +1797,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||||||
if (WSREP(thd))
|
if (WSREP(thd))
|
||||||
{
|
{
|
||||||
if (wsrep_mysql_parse(thd, thd->query(), thd->query_length(),
|
if (wsrep_mysql_parse(thd, thd->query(), thd->query_length(),
|
||||||
&parser_state,
|
&parser_state))
|
||||||
is_com_multi, is_next_command))
|
|
||||||
{
|
{
|
||||||
WSREP_DEBUG("Deadlock error for: %s", thd->query());
|
WSREP_DEBUG("Deadlock error for: %s", thd->query());
|
||||||
mysql_mutex_lock(&thd->LOCK_thd_data);
|
mysql_mutex_lock(&thd->LOCK_thd_data);
|
||||||
@ -1863,8 +1809,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif /* WITH_WSREP */
|
#endif /* WITH_WSREP */
|
||||||
mysql_parse(thd, thd->query(), thd->query_length(), &parser_state,
|
mysql_parse(thd, thd->query(), thd->query_length(), &parser_state);
|
||||||
is_com_multi, is_next_command);
|
|
||||||
|
|
||||||
while (!thd->killed && (parser_state.m_lip.found_semicolon != NULL) &&
|
while (!thd->killed && (parser_state.m_lip.found_semicolon != NULL) &&
|
||||||
! thd->is_error())
|
! thd->is_error())
|
||||||
@ -1948,8 +1893,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||||||
if (WSREP(thd))
|
if (WSREP(thd))
|
||||||
{
|
{
|
||||||
if (wsrep_mysql_parse(thd, beginning_of_next_stmt,
|
if (wsrep_mysql_parse(thd, beginning_of_next_stmt,
|
||||||
length, &parser_state,
|
length, &parser_state))
|
||||||
is_com_multi, is_next_command))
|
|
||||||
{
|
{
|
||||||
WSREP_DEBUG("Deadlock error for: %s", thd->query());
|
WSREP_DEBUG("Deadlock error for: %s", thd->query());
|
||||||
mysql_mutex_lock(&thd->LOCK_thd_data);
|
mysql_mutex_lock(&thd->LOCK_thd_data);
|
||||||
@ -1962,8 +1906,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif /* WITH_WSREP */
|
#endif /* WITH_WSREP */
|
||||||
mysql_parse(thd, beginning_of_next_stmt, length, &parser_state,
|
mysql_parse(thd, beginning_of_next_stmt, length, &parser_state);
|
||||||
is_com_multi, is_next_command);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2014,13 +1957,6 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
packet= arg_end + 1;
|
packet= arg_end + 1;
|
||||||
// thd->reset_for_next_command reset state => restore it
|
|
||||||
if (is_next_command)
|
|
||||||
{
|
|
||||||
thd->server_status|= SERVER_MORE_RESULTS_EXISTS;
|
|
||||||
if (is_com_multi)
|
|
||||||
thd->get_stmt_da()->set_skip_flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
lex_start(thd);
|
lex_start(thd);
|
||||||
/* Must be before we init the table list. */
|
/* Must be before we init the table list. */
|
||||||
@ -2308,84 +2244,6 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||||||
general_log_print(thd, command, NullS);
|
general_log_print(thd, command, NullS);
|
||||||
my_eof(thd);
|
my_eof(thd);
|
||||||
break;
|
break;
|
||||||
case COM_MULTI:
|
|
||||||
{
|
|
||||||
uint counter;
|
|
||||||
uint current_com= 0;
|
|
||||||
DBUG_ASSERT(!is_com_multi);
|
|
||||||
if (!(thd->client_capabilities & CLIENT_MULTI_RESULTS))
|
|
||||||
{
|
|
||||||
/* The client does not support multiple result sets being sent back */
|
|
||||||
my_error(ER_COMMULTI_BADCONTEXT, MYF(0));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(counter= maria_multi_check(thd, packet, packet_length)))
|
|
||||||
break;
|
|
||||||
|
|
||||||
{
|
|
||||||
char *packet_start= packet;
|
|
||||||
/* We have to store next length because it will be destroyed by '\0' */
|
|
||||||
size_t next_subpacket_length= net_field_length((uchar **)&packet_start);
|
|
||||||
size_t next_length_length= packet_start - packet;
|
|
||||||
unsigned char *readbuff= net->buff;
|
|
||||||
|
|
||||||
if (net_allocate_new_packet(net, thd, MYF(0)))
|
|
||||||
break;
|
|
||||||
|
|
||||||
PSI_statement_locker *save_locker= thd->m_statement_psi;
|
|
||||||
sql_digest_state *save_digest= thd->m_digest;
|
|
||||||
thd->m_statement_psi= NULL;
|
|
||||||
thd->m_digest= NULL;
|
|
||||||
|
|
||||||
while (packet_length)
|
|
||||||
{
|
|
||||||
current_com++;
|
|
||||||
size_t subpacket_length= next_subpacket_length + next_length_length;
|
|
||||||
size_t length_length= next_length_length;
|
|
||||||
if (subpacket_length < packet_length)
|
|
||||||
{
|
|
||||||
packet_start= packet + subpacket_length;
|
|
||||||
next_subpacket_length= net_field_length((uchar**)&packet_start);
|
|
||||||
next_length_length= packet_start - (packet + subpacket_length);
|
|
||||||
}
|
|
||||||
/* safety like in do_command() */
|
|
||||||
packet[subpacket_length]= '\0';
|
|
||||||
|
|
||||||
enum enum_server_command subcommand=
|
|
||||||
fetch_command(thd, (packet + length_length));
|
|
||||||
|
|
||||||
if (server_command_flags[subcommand] & CF_NO_COM_MULTI)
|
|
||||||
{
|
|
||||||
my_error(ER_BAD_COMMAND_IN_MULTI, MYF(0),
|
|
||||||
command_name[subcommand].str);
|
|
||||||
goto com_multi_end;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dispatch_command(subcommand, thd, packet + (1 + length_length),
|
|
||||||
(uint)(subpacket_length - (1 + length_length)), TRUE,
|
|
||||||
(current_com != counter)))
|
|
||||||
{
|
|
||||||
DBUG_ASSERT(thd->is_error());
|
|
||||||
goto com_multi_end;
|
|
||||||
}
|
|
||||||
|
|
||||||
DBUG_ASSERT(subpacket_length <= packet_length);
|
|
||||||
packet+= subpacket_length;
|
|
||||||
packet_length-= (uint)subpacket_length;
|
|
||||||
}
|
|
||||||
|
|
||||||
com_multi_end:
|
|
||||||
thd->m_statement_psi= save_locker;
|
|
||||||
thd->m_digest= save_digest;
|
|
||||||
|
|
||||||
/* release old buffer */
|
|
||||||
net_flush(net);
|
|
||||||
DBUG_ASSERT(net->buff == net->write_pos); // nothing to send
|
|
||||||
my_free(readbuff);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case COM_SLEEP:
|
case COM_SLEEP:
|
||||||
case COM_CONNECT: // Impossible here
|
case COM_CONNECT: // Impossible here
|
||||||
case COM_TIME: // Impossible from client
|
case COM_TIME: // Impossible from client
|
||||||
@ -2454,12 +2312,9 @@ dispatch_end:
|
|||||||
thd_proc_info(thd, "Updating status");
|
thd_proc_info(thd, "Updating status");
|
||||||
/* Finalize server status flags after executing a command. */
|
/* Finalize server status flags after executing a command. */
|
||||||
thd->update_server_status();
|
thd->update_server_status();
|
||||||
if (command != COM_MULTI)
|
|
||||||
{
|
|
||||||
thd->protocol->end_statement();
|
thd->protocol->end_statement();
|
||||||
query_cache_end_of_result(thd);
|
query_cache_end_of_result(thd);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (drop_more_results)
|
if (drop_more_results)
|
||||||
thd->server_status&= ~SERVER_MORE_RESULTS_EXISTS;
|
thd->server_status&= ~SERVER_MORE_RESULTS_EXISTS;
|
||||||
|
|
||||||
@ -2486,7 +2341,6 @@ dispatch_end:
|
|||||||
thd->m_statement_psi= NULL;
|
thd->m_statement_psi= NULL;
|
||||||
thd->m_digest= NULL;
|
thd->m_digest= NULL;
|
||||||
|
|
||||||
if (!is_com_multi)
|
|
||||||
thd->packet.shrink(thd->variables.net_buffer_length); // Reclaim some memory
|
thd->packet.shrink(thd->variables.net_buffer_length); // Reclaim some memory
|
||||||
|
|
||||||
thd->reset_kill_query(); /* Ensure that killed_errmsg is released */
|
thd->reset_kill_query(); /* Ensure that killed_errmsg is released */
|
||||||
@ -7782,9 +7636,7 @@ static void wsrep_prepare_for_autocommit_retry(THD* thd,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
|
static bool wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
|
||||||
Parser_state *parser_state,
|
Parser_state *parser_state)
|
||||||
bool is_com_multi,
|
|
||||||
bool is_next_command)
|
|
||||||
{
|
{
|
||||||
bool is_autocommit=
|
bool is_autocommit=
|
||||||
!thd->in_multi_stmt_transaction_mode() &&
|
!thd->in_multi_stmt_transaction_mode() &&
|
||||||
@ -7793,7 +7645,7 @@ static bool wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
retry_autocommit= false;
|
retry_autocommit= false;
|
||||||
mysql_parse(thd, rawbuf, length, parser_state, is_com_multi, is_next_command);
|
mysql_parse(thd, rawbuf, length, parser_state);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Convert all ER_QUERY_INTERRUPTED errors to ER_LOCK_DEADLOCK
|
Convert all ER_QUERY_INTERRUPTED errors to ER_LOCK_DEADLOCK
|
||||||
@ -7899,15 +7751,10 @@ static bool wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
|
|||||||
@param thd Current thread
|
@param thd Current thread
|
||||||
@param rawbuf Begining of the query text
|
@param rawbuf Begining of the query text
|
||||||
@param length Length of the query text
|
@param length Length of the query text
|
||||||
@param[out] found_semicolon For multi queries, position of the character of
|
|
||||||
the next query in the query text.
|
|
||||||
@param is_next_command there will be more command in the COM_MULTI batch
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void mysql_parse(THD *thd, char *rawbuf, uint length,
|
void mysql_parse(THD *thd, char *rawbuf, uint length,
|
||||||
Parser_state *parser_state,
|
Parser_state *parser_state)
|
||||||
bool is_com_multi,
|
|
||||||
bool is_next_command)
|
|
||||||
{
|
{
|
||||||
int error __attribute__((unused));
|
int error __attribute__((unused));
|
||||||
DBUG_ENTER("mysql_parse");
|
DBUG_ENTER("mysql_parse");
|
||||||
@ -7932,12 +7779,6 @@ void mysql_parse(THD *thd, char *rawbuf, uint length,
|
|||||||
*/
|
*/
|
||||||
lex_start(thd);
|
lex_start(thd);
|
||||||
thd->reset_for_next_command();
|
thd->reset_for_next_command();
|
||||||
if (is_next_command)
|
|
||||||
{
|
|
||||||
thd->server_status|= SERVER_MORE_RESULTS_EXISTS;
|
|
||||||
if (is_com_multi)
|
|
||||||
thd->get_stmt_da()->set_skip_flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (query_cache_send_result_to_client(thd, rawbuf, length) <= 0)
|
if (query_cache_send_result_to_client(thd, rawbuf, length) <= 0)
|
||||||
{
|
{
|
||||||
|
@ -91,8 +91,7 @@ bool is_log_table_write_query(enum enum_sql_command command);
|
|||||||
bool alloc_query(THD *thd, const char *packet, size_t packet_length);
|
bool alloc_query(THD *thd, const char *packet, size_t packet_length);
|
||||||
void mysql_init_select(LEX *lex);
|
void mysql_init_select(LEX *lex);
|
||||||
void mysql_parse(THD *thd, char *rawbuf, uint length,
|
void mysql_parse(THD *thd, char *rawbuf, uint length,
|
||||||
Parser_state *parser_state, bool is_com_multi,
|
Parser_state *parser_state);
|
||||||
bool is_next_command);
|
|
||||||
bool mysql_new_select(LEX *lex, bool move_down, SELECT_LEX *sel);
|
bool mysql_new_select(LEX *lex, bool move_down, SELECT_LEX *sel);
|
||||||
void create_select_for_variable(THD *thd, LEX_CSTRING *var_name);
|
void create_select_for_variable(THD *thd, LEX_CSTRING *var_name);
|
||||||
void create_table_set_open_action_and_adjust_tables(LEX *lex);
|
void create_table_set_open_action_and_adjust_tables(LEX *lex);
|
||||||
@ -103,8 +102,7 @@ int bootstrap(MYSQL_FILE *file);
|
|||||||
int mysql_execute_command(THD *thd);
|
int mysql_execute_command(THD *thd);
|
||||||
bool do_command(THD *thd);
|
bool do_command(THD *thd);
|
||||||
bool dispatch_command(enum enum_server_command command, THD *thd,
|
bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||||
char* packet, uint packet_length,
|
char* packet, uint packet_length);
|
||||||
bool is_com_multi, bool is_next_command);
|
|
||||||
void log_slow_statement(THD *thd);
|
void log_slow_statement(THD *thd);
|
||||||
bool append_file_to_dir(THD *thd, const char **filename_ptr,
|
bool append_file_to_dir(THD *thd, const char **filename_ptr,
|
||||||
const LEX_CSTRING *table_name);
|
const LEX_CSTRING *table_name);
|
||||||
|
@ -281,7 +281,7 @@ protected:
|
|||||||
|
|
||||||
virtual bool send_ok(uint server_status, uint statement_warn_count,
|
virtual bool send_ok(uint server_status, uint statement_warn_count,
|
||||||
ulonglong affected_rows, ulonglong last_insert_id,
|
ulonglong affected_rows, ulonglong last_insert_id,
|
||||||
const char *message, bool skip_flush);
|
const char *message);
|
||||||
|
|
||||||
virtual bool send_eof(uint server_status, uint statement_warn_count);
|
virtual bool send_eof(uint server_status, uint statement_warn_count);
|
||||||
virtual bool send_error(uint sql_errno, const char *err_msg, const char* sqlstate);
|
virtual bool send_error(uint sql_errno, const char *err_msg, const char* sqlstate);
|
||||||
@ -5444,7 +5444,7 @@ bool Protocol_local::send_out_parameters(List<Item_param> *sp_params)
|
|||||||
bool
|
bool
|
||||||
Protocol_local::send_ok(uint server_status, uint statement_warn_count,
|
Protocol_local::send_ok(uint server_status, uint statement_warn_count,
|
||||||
ulonglong affected_rows, ulonglong last_insert_id,
|
ulonglong affected_rows, ulonglong last_insert_id,
|
||||||
const char *message, bool skip_flush)
|
const char *message)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
Just make sure nothing is sent to the client, we have grabbed
|
Just make sure nothing is sent to the client, we have grabbed
|
||||||
|
@ -196,7 +196,7 @@ static int execute_SQL(THD* thd, const char* sql, uint length) {
|
|||||||
thd->set_query((char*)sql, length);
|
thd->set_query((char*)sql, length);
|
||||||
thd->set_query_id(next_query_id());
|
thd->set_query_id(next_query_id());
|
||||||
|
|
||||||
mysql_parse(thd, (char*)sql, length, & parser_state, FALSE, FALSE);
|
mysql_parse(thd, (char*)sql, length, & parser_state);
|
||||||
|
|
||||||
if (thd->is_error()) {
|
if (thd->is_error()) {
|
||||||
WSREP_WARN("Wsrep_schema::execute_sql() failed, %d %s\nSQL: %s",
|
WSREP_WARN("Wsrep_schema::execute_sql() failed, %d %s\nSQL: %s",
|
||||||
|
@ -1460,7 +1460,7 @@ static int run_sql_command(THD *thd, const char *query)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
mysql_parse(thd, thd->query(), thd->query_length(), &ps, FALSE, FALSE);
|
mysql_parse(thd, thd->query(), thd->query_length(), &ps);
|
||||||
if (thd->is_error())
|
if (thd->is_error())
|
||||||
{
|
{
|
||||||
int const err= thd->get_stmt_da()->sql_errno();
|
int const err= thd->get_stmt_da()->sql_errno();
|
||||||
|
@ -10342,7 +10342,7 @@ void *spider_table_bg_sts_action(
|
|||||||
while (spider_init_queries[i].length && !thd->killed && !thread->killed)
|
while (spider_init_queries[i].length && !thd->killed && !thread->killed)
|
||||||
{
|
{
|
||||||
dispatch_command(COM_QUERY, thd, spider_init_queries[i].str,
|
dispatch_command(COM_QUERY, thd, spider_init_queries[i].str,
|
||||||
(uint) spider_init_queries[i].length, FALSE, FALSE);
|
(uint) spider_init_queries[i].length);
|
||||||
if (unlikely(thd->is_error()))
|
if (unlikely(thd->is_error()))
|
||||||
{
|
{
|
||||||
fprintf(stderr, "[ERROR] %s\n", spider_stmt_da_message(thd));
|
fprintf(stderr, "[ERROR] %s\n", spider_stmt_da_message(thd));
|
||||||
|
@ -20986,6 +20986,16 @@ static void test_mdev20261()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void test_execute_direct()
|
||||||
|
{
|
||||||
|
#ifndef EMBEDDED_LIBRARY
|
||||||
|
MYSQL_STMT* stmt= mysql_stmt_init(mysql);
|
||||||
|
int rc= mariadb_stmt_execute_direct(stmt,"do 1",-1);
|
||||||
|
myquery(rc);
|
||||||
|
mysql_stmt_close(stmt);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static struct my_tests_st my_tests[]= {
|
static struct my_tests_st my_tests[]= {
|
||||||
{ "disable_query_logs", disable_query_logs },
|
{ "disable_query_logs", disable_query_logs },
|
||||||
{ "test_view_sp_list_fields", test_view_sp_list_fields },
|
{ "test_view_sp_list_fields", test_view_sp_list_fields },
|
||||||
@ -21281,6 +21291,7 @@ static struct my_tests_st my_tests[]= {
|
|||||||
{ "test_explain_meta", test_explain_meta },
|
{ "test_explain_meta", test_explain_meta },
|
||||||
{ "test_mdev18408", test_mdev18408 },
|
{ "test_mdev18408", test_mdev18408 },
|
||||||
{ "test_mdev20261", test_mdev20261 },
|
{ "test_mdev20261", test_mdev20261 },
|
||||||
|
{ "test_execute_direct", test_execute_direct },
|
||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user