Rename send_ok to my_ok. Similarly to my_error, it only records the status,
does not send it to the client.
This commit is contained in:
parent
ead02981ea
commit
14021c96c4
@ -112,8 +112,6 @@ void net_send_error(THD *thd, uint sql_errno, const char *err)
|
|||||||
- message : Stored as packed length (1-9 bytes) + message.
|
- message : Stored as packed length (1-9 bytes) + message.
|
||||||
Is not stored if no message.
|
Is not stored if no message.
|
||||||
|
|
||||||
If net->no_send_ok return without sending packet.
|
|
||||||
|
|
||||||
@param thd Thread handler
|
@param thd Thread handler
|
||||||
@param affected_rows Number of rows changed by statement
|
@param affected_rows Number of rows changed by statement
|
||||||
@param id Auto_increment id for first row (if used)
|
@param id Auto_increment id for first row (if used)
|
||||||
@ -128,7 +126,7 @@ net_send_ok(THD *thd,
|
|||||||
{
|
{
|
||||||
NET *net= &thd->net;
|
NET *net= &thd->net;
|
||||||
uchar buff[MYSQL_ERRMSG_SIZE+10],*pos;
|
uchar buff[MYSQL_ERRMSG_SIZE+10],*pos;
|
||||||
DBUG_ENTER("send_ok");
|
DBUG_ENTER("my_ok");
|
||||||
|
|
||||||
if (! net->vio) // hack for re-parsing queries
|
if (! net->vio) // hack for re-parsing queries
|
||||||
{
|
{
|
||||||
@ -425,8 +423,8 @@ void net_end_statement(THD *thd)
|
|||||||
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Functions used by the protocol functions (like send_ok) to store strings
|
Functions used by the protocol functions (like net_send_ok) to store
|
||||||
and numbers in the header result packet.
|
strings and numbers in the header result packet.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* The following will only be used for short strings < 65K */
|
/* The following will only be used for short strings < 65K */
|
||||||
|
@ -1011,7 +1011,7 @@ err:
|
|||||||
|
|
||||||
mysql_close(&mysql); // safe to call since we always do mysql_init()
|
mysql_close(&mysql); // safe to call since we always do mysql_init()
|
||||||
if (!error)
|
if (!error)
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
@ -3176,7 +3176,7 @@ bool mysql_table_grant(THD *thd, TABLE_LIST *table_list,
|
|||||||
rw_unlock(&LOCK_grant);
|
rw_unlock(&LOCK_grant);
|
||||||
|
|
||||||
if (!result) /* success */
|
if (!result) /* success */
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
|
|
||||||
/* Tables are automatically closed */
|
/* Tables are automatically closed */
|
||||||
thd->lex->restore_backup_query_tables_list(&backup);
|
thd->lex->restore_backup_query_tables_list(&backup);
|
||||||
@ -3344,7 +3344,7 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list, bool is_proc,
|
|||||||
rw_unlock(&LOCK_grant);
|
rw_unlock(&LOCK_grant);
|
||||||
|
|
||||||
if (!result && !no_error)
|
if (!result && !no_error)
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
|
|
||||||
/* Tables are automatically closed */
|
/* Tables are automatically closed */
|
||||||
DBUG_RETURN(result);
|
DBUG_RETURN(result);
|
||||||
@ -3460,7 +3460,7 @@ bool mysql_grant(THD *thd, const char *db, List <LEX_USER> &list,
|
|||||||
close_thread_tables(thd);
|
close_thread_tables(thd);
|
||||||
|
|
||||||
if (!result)
|
if (!result)
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
|
|
||||||
DBUG_RETURN(result);
|
DBUG_RETURN(result);
|
||||||
}
|
}
|
||||||
|
@ -231,7 +231,7 @@ void mysql_client_binlog_statement(THD* thd)
|
|||||||
|
|
||||||
|
|
||||||
DBUG_PRINT("info",("binlog base64 execution finished successfully"));
|
DBUG_PRINT("info",("binlog base64 execution finished successfully"));
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
|
|
||||||
end:
|
end:
|
||||||
thd->rli_fake->clear_tables_to_lock();
|
thd->rli_fake->clear_tables_to_lock();
|
||||||
|
@ -1583,7 +1583,7 @@ bool select_to_file::send_eof()
|
|||||||
function, SELECT INTO has to have an own SQLCOM.
|
function, SELECT INTO has to have an own SQLCOM.
|
||||||
TODO: split from SQLCOM_SELECT
|
TODO: split from SQLCOM_SELECT
|
||||||
*/
|
*/
|
||||||
::send_ok(thd,row_count);
|
::my_ok(thd,row_count);
|
||||||
}
|
}
|
||||||
file= -1;
|
file= -1;
|
||||||
return error;
|
return error;
|
||||||
@ -2533,7 +2533,7 @@ bool select_dumpvar::send_eof()
|
|||||||
function, SELECT INTO has to have an own SQLCOM.
|
function, SELECT INTO has to have an own SQLCOM.
|
||||||
TODO: split from SQLCOM_SELECT
|
TODO: split from SQLCOM_SELECT
|
||||||
*/
|
*/
|
||||||
::send_ok(thd,row_count);
|
::my_ok(thd,row_count);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -993,7 +993,7 @@ public:
|
|||||||
{
|
{
|
||||||
/** The area is cleared at start of a statement. */
|
/** The area is cleared at start of a statement. */
|
||||||
DA_EMPTY= 0,
|
DA_EMPTY= 0,
|
||||||
/** Set whenever one calls send_ok(). */
|
/** Set whenever one calls my_ok(). */
|
||||||
DA_OK,
|
DA_OK,
|
||||||
/** Set whenever one calls send_eof(). */
|
/** Set whenever one calls send_eof(). */
|
||||||
DA_EOF,
|
DA_EOF,
|
||||||
@ -2141,7 +2141,7 @@ private:
|
|||||||
/** A short cut for thd->main_da.set_ok_status(). */
|
/** A short cut for thd->main_da.set_ok_status(). */
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
send_ok(THD *thd, ha_rows affected_rows= 0, ulonglong id= 0,
|
my_ok(THD *thd, ha_rows affected_rows= 0, ulonglong id= 0,
|
||||||
const char *message= NULL)
|
const char *message= NULL)
|
||||||
{
|
{
|
||||||
thd->main_da.set_ok_status(thd, affected_rows, id, message);
|
thd->main_da.set_ok_status(thd, affected_rows, id, message);
|
||||||
|
@ -334,7 +334,7 @@ check_user(THD *thd, enum enum_server_command command,
|
|||||||
if (mysql_change_db(thd, &db_str, FALSE))
|
if (mysql_change_db(thd, &db_str, FALSE))
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@ -483,7 +483,7 @@ check_user(THD *thd, enum enum_server_command command,
|
|||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
thd->password= test(passwd_len); // remember for error messages
|
thd->password= test(passwd_len); // remember for error messages
|
||||||
/* Ready to handle queries */
|
/* Ready to handle queries */
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
|
@ -595,7 +595,7 @@ CHARSET_INFO *get_default_db_collation(THD *thd, const char *db_name)
|
|||||||
In this case the entry should not be logged.
|
In this case the entry should not be logged.
|
||||||
|
|
||||||
SIDE-EFFECTS
|
SIDE-EFFECTS
|
||||||
1. Report back to client that command succeeded (send_ok)
|
1. Report back to client that command succeeded (my_ok)
|
||||||
2. Report errors to client
|
2. Report errors to client
|
||||||
3. Log event to binary log
|
3. Log event to binary log
|
||||||
(The 'silent' flags turns off 1 and 3.)
|
(The 'silent' flags turns off 1 and 3.)
|
||||||
@ -660,7 +660,7 @@ bool mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info,
|
|||||||
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
|
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
|
||||||
ER_DB_CREATE_EXISTS, ER(ER_DB_CREATE_EXISTS), db);
|
ER_DB_CREATE_EXISTS, ER(ER_DB_CREATE_EXISTS), db);
|
||||||
if (!silent)
|
if (!silent)
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
error= 0;
|
error= 0;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
@ -749,7 +749,7 @@ bool mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info,
|
|||||||
/* These DDL methods and logging protected with LOCK_mysql_create_db */
|
/* These DDL methods and logging protected with LOCK_mysql_create_db */
|
||||||
mysql_bin_log.write(&qinfo);
|
mysql_bin_log.write(&qinfo);
|
||||||
}
|
}
|
||||||
send_ok(thd, result);
|
my_ok(thd, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
@ -826,7 +826,7 @@ bool mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create_info)
|
|||||||
/* These DDL methods and logging protected with LOCK_mysql_create_db */
|
/* These DDL methods and logging protected with LOCK_mysql_create_db */
|
||||||
mysql_bin_log.write(&qinfo);
|
mysql_bin_log.write(&qinfo);
|
||||||
}
|
}
|
||||||
send_ok(thd, result);
|
my_ok(thd, result);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
VOID(pthread_mutex_unlock(&LOCK_mysql_create_db));
|
VOID(pthread_mutex_unlock(&LOCK_mysql_create_db));
|
||||||
@ -960,7 +960,7 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
|
|||||||
}
|
}
|
||||||
thd->clear_error();
|
thd->clear_error();
|
||||||
thd->server_status|= SERVER_STATUS_DB_DROPPED;
|
thd->server_status|= SERVER_STATUS_DB_DROPPED;
|
||||||
send_ok(thd, (ulong) deleted);
|
my_ok(thd, (ulong) deleted);
|
||||||
thd->server_status&= ~SERVER_STATUS_DB_DROPPED;
|
thd->server_status&= ~SERVER_STATUS_DB_DROPPED;
|
||||||
}
|
}
|
||||||
else if (mysql_bin_log.is_open())
|
else if (mysql_bin_log.is_open())
|
||||||
|
@ -158,7 +158,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
|
|||||||
{
|
{
|
||||||
free_underlaid_joins(thd, select_lex);
|
free_underlaid_joins(thd, select_lex);
|
||||||
thd->row_count_func= 0;
|
thd->row_count_func= 0;
|
||||||
send_ok(thd, (ha_rows) thd->row_count_func); // No matching records
|
my_ok(thd, (ha_rows) thd->row_count_func); // No matching records
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -175,7 +175,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
|
|||||||
delete select;
|
delete select;
|
||||||
free_underlaid_joins(thd, select_lex);
|
free_underlaid_joins(thd, select_lex);
|
||||||
thd->row_count_func= 0;
|
thd->row_count_func= 0;
|
||||||
send_ok(thd, (ha_rows) thd->row_count_func);
|
my_ok(thd, (ha_rows) thd->row_count_func);
|
||||||
/*
|
/*
|
||||||
We don't need to call reset_auto_increment in this case, because
|
We don't need to call reset_auto_increment in this case, because
|
||||||
mysql_truncate always gives a NULL conds argument, hence we never
|
mysql_truncate always gives a NULL conds argument, hence we never
|
||||||
@ -391,7 +391,7 @@ cleanup:
|
|||||||
if (error < 0 || (thd->lex->ignore && !thd->is_fatal_error))
|
if (error < 0 || (thd->lex->ignore && !thd->is_fatal_error))
|
||||||
{
|
{
|
||||||
thd->row_count_func= deleted;
|
thd->row_count_func= deleted;
|
||||||
send_ok(thd, (ha_rows) thd->row_count_func);
|
my_ok(thd, (ha_rows) thd->row_count_func);
|
||||||
DBUG_PRINT("info",("%ld records deleted",(long) deleted));
|
DBUG_PRINT("info",("%ld records deleted",(long) deleted));
|
||||||
}
|
}
|
||||||
DBUG_RETURN(error >= 0 || thd->is_error());
|
DBUG_RETURN(error >= 0 || thd->is_error());
|
||||||
@ -919,7 +919,7 @@ bool multi_delete::send_eof()
|
|||||||
if (!local_error)
|
if (!local_error)
|
||||||
{
|
{
|
||||||
thd->row_count_func= deleted;
|
thd->row_count_func= deleted;
|
||||||
::send_ok(thd, (ha_rows) thd->row_count_func);
|
::my_ok(thd, (ha_rows) thd->row_count_func);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -973,7 +973,7 @@ bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
|
|||||||
my_free((char*) table,MYF(0));
|
my_free((char*) table,MYF(0));
|
||||||
/*
|
/*
|
||||||
If we return here we will not have logged the truncation to the bin log
|
If we return here we will not have logged the truncation to the bin log
|
||||||
and we will not send_ok() to the client.
|
and we will not my_ok() to the client.
|
||||||
*/
|
*/
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
@ -1019,7 +1019,7 @@ end:
|
|||||||
we don't test current_stmt_binlog_row_based.
|
we don't test current_stmt_binlog_row_based.
|
||||||
*/
|
*/
|
||||||
write_bin_log(thd, TRUE, thd->query, thd->query_length);
|
write_bin_log(thd, TRUE, thd->query, thd->query_length);
|
||||||
send_ok(thd); // This should return record count
|
my_ok(thd); // This should return record count
|
||||||
}
|
}
|
||||||
VOID(pthread_mutex_lock(&LOCK_open));
|
VOID(pthread_mutex_lock(&LOCK_open));
|
||||||
unlock_table_name(thd, table_list);
|
unlock_table_name(thd, table_list);
|
||||||
|
@ -39,6 +39,6 @@ bool mysql_do(THD *thd, List<Item> &values)
|
|||||||
ha_autocommit_or_rollback(thd, thd->is_error());
|
ha_autocommit_or_rollback(thd, thd->is_error());
|
||||||
thd->clear_error(); // DO always is OK
|
thd->clear_error(); // DO always is OK
|
||||||
}
|
}
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
DBUG_RETURN(FALSE);
|
DBUG_RETURN(FALSE);
|
||||||
}
|
}
|
||||||
|
@ -298,7 +298,7 @@ bool mysql_ha_open(THD *thd, TABLE_LIST *tables, bool reopen)
|
|||||||
tables->table->open_by_handler= 1;
|
tables->table->open_by_handler= 1;
|
||||||
|
|
||||||
if (! reopen)
|
if (! reopen)
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
DBUG_PRINT("exit",("OK"));
|
DBUG_PRINT("exit",("OK"));
|
||||||
DBUG_RETURN(FALSE);
|
DBUG_RETURN(FALSE);
|
||||||
|
|
||||||
@ -350,7 +350,7 @@ bool mysql_ha_close(THD *thd, TABLE_LIST *tables)
|
|||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
DBUG_PRINT("exit", ("OK"));
|
DBUG_PRINT("exit", ("OK"));
|
||||||
DBUG_RETURN(FALSE);
|
DBUG_RETURN(FALSE);
|
||||||
}
|
}
|
||||||
|
@ -946,7 +946,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
|
|||||||
thd->row_count_func= info.copied + info.deleted +
|
thd->row_count_func= info.copied + info.deleted +
|
||||||
((thd->client_capabilities & CLIENT_FOUND_ROWS) ?
|
((thd->client_capabilities & CLIENT_FOUND_ROWS) ?
|
||||||
info.touched : info.updated);
|
info.touched : info.updated);
|
||||||
send_ok(thd, (ulong) thd->row_count_func, id);
|
my_ok(thd, (ulong) thd->row_count_func, id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -961,7 +961,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
|
|||||||
sprintf(buff, ER(ER_INSERT_INFO), (ulong) info.records,
|
sprintf(buff, ER(ER_INSERT_INFO), (ulong) info.records,
|
||||||
(ulong) (info.deleted + updated), (ulong) thd->cuted_fields);
|
(ulong) (info.deleted + updated), (ulong) thd->cuted_fields);
|
||||||
thd->row_count_func= info.copied + info.deleted + updated;
|
thd->row_count_func= info.copied + info.deleted + updated;
|
||||||
::send_ok(thd, (ulong) thd->row_count_func, id, buff);
|
::my_ok(thd, (ulong) thd->row_count_func, id, buff);
|
||||||
}
|
}
|
||||||
thd->abort_on_warning= 0;
|
thd->abort_on_warning= 0;
|
||||||
DBUG_RETURN(FALSE);
|
DBUG_RETURN(FALSE);
|
||||||
@ -3162,7 +3162,7 @@ bool select_insert::send_eof()
|
|||||||
(thd->arg_of_last_insert_id_function ?
|
(thd->arg_of_last_insert_id_function ?
|
||||||
thd->first_successful_insert_id_in_prev_stmt :
|
thd->first_successful_insert_id_in_prev_stmt :
|
||||||
(info.copied ? autoinc_value_of_last_inserted_row : 0));
|
(info.copied ? autoinc_value_of_last_inserted_row : 0));
|
||||||
::send_ok(thd, (ulong) thd->row_count_func, id, buff);
|
::my_ok(thd, (ulong) thd->row_count_func, id, buff);
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -509,7 +509,7 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
|
|||||||
#endif /*!EMBEDDED_LIBRARY*/
|
#endif /*!EMBEDDED_LIBRARY*/
|
||||||
|
|
||||||
/* ok to client sent only after binlog write and engine commit */
|
/* ok to client sent only after binlog write and engine commit */
|
||||||
send_ok(thd, info.copied + info.deleted, 0L, name);
|
my_ok(thd, info.copied + info.deleted, 0L, name);
|
||||||
err:
|
err:
|
||||||
DBUG_ASSERT(transactional_table || !(info.copied || info.deleted) ||
|
DBUG_ASSERT(transactional_table || !(info.copied || info.deleted) ||
|
||||||
thd->transaction.stmt.modified_non_trans_table);
|
thd->transaction.stmt.modified_non_trans_table);
|
||||||
|
108
sql/sql_parse.cc
108
sql/sql_parse.cc
@ -913,7 +913,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||||||
if (!mysql_change_db(thd, &tmp, FALSE))
|
if (!mysql_change_db(thd, &tmp, FALSE))
|
||||||
{
|
{
|
||||||
general_log_write(thd, command, thd->db, thd->db_length);
|
general_log_write(thd, command, thd->db, thd->db_length);
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -921,7 +921,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||||||
case COM_REGISTER_SLAVE:
|
case COM_REGISTER_SLAVE:
|
||||||
{
|
{
|
||||||
if (!register_slave(thd, (uchar*)packet, packet_length))
|
if (!register_slave(thd, (uchar*)packet, packet_length))
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -1322,7 +1322,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||||||
break;
|
break;
|
||||||
general_log_print(thd, command, NullS);
|
general_log_print(thd, command, NullS);
|
||||||
if (!reload_acl_and_cache(thd, options, (TABLE_LIST*) 0, ¬_used))
|
if (!reload_acl_and_cache(thd, options, (TABLE_LIST*) 0, ¬_used))
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifndef EMBEDDED_LIBRARY
|
#ifndef EMBEDDED_LIBRARY
|
||||||
@ -1386,7 +1386,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||||||
(uint) (queries_per_second1000 % 1000));
|
(uint) (queries_per_second1000 % 1000));
|
||||||
#ifdef EMBEDDED_LIBRARY
|
#ifdef EMBEDDED_LIBRARY
|
||||||
/* Store the buffer in permanent memory */
|
/* Store the buffer in permanent memory */
|
||||||
send_ok(thd, 0, 0, buff);
|
my_ok(thd, 0, 0, buff);
|
||||||
#endif
|
#endif
|
||||||
#ifdef SAFEMALLOC
|
#ifdef SAFEMALLOC
|
||||||
if (sf_malloc_cur_memory) // Using SAFEMALLOC
|
if (sf_malloc_cur_memory) // Using SAFEMALLOC
|
||||||
@ -1407,7 +1407,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||||||
}
|
}
|
||||||
case COM_PING:
|
case COM_PING:
|
||||||
status_var_increment(thd->status_var.com_other);
|
status_var_increment(thd->status_var.com_other);
|
||||||
send_ok(thd); // Tell client we are alive
|
my_ok(thd); // Tell client we are alive
|
||||||
break;
|
break;
|
||||||
case COM_PROCESS_INFO:
|
case COM_PROCESS_INFO:
|
||||||
status_var_increment(thd->status_var.com_stat[SQLCOM_SHOW_PROCESSLIST]);
|
status_var_increment(thd->status_var.com_stat[SQLCOM_SHOW_PROCESSLIST]);
|
||||||
@ -2075,7 +2075,7 @@ mysql_execute_command(THD *thd)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SQLCOM_EMPTY_QUERY:
|
case SQLCOM_EMPTY_QUERY:
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SQLCOM_HELP:
|
case SQLCOM_HELP:
|
||||||
@ -2242,7 +2242,7 @@ mysql_execute_command(THD *thd)
|
|||||||
{
|
{
|
||||||
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
|
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
|
||||||
"the master info structure does not exist");
|
"the master info structure does not exist");
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
}
|
}
|
||||||
pthread_mutex_unlock(&LOCK_active_mi);
|
pthread_mutex_unlock(&LOCK_active_mi);
|
||||||
break;
|
break;
|
||||||
@ -2300,7 +2300,7 @@ mysql_execute_command(THD *thd)
|
|||||||
if (!fetch_master_table(thd, first_table->db, first_table->table_name,
|
if (!fetch_master_table(thd, first_table->db, first_table->table_name,
|
||||||
active_mi, 0, 0))
|
active_mi, 0, 0))
|
||||||
{
|
{
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
}
|
}
|
||||||
pthread_mutex_unlock(&LOCK_active_mi);
|
pthread_mutex_unlock(&LOCK_active_mi);
|
||||||
break;
|
break;
|
||||||
@ -2511,7 +2511,7 @@ mysql_execute_command(THD *thd)
|
|||||||
&alter_info, 0, 0);
|
&alter_info, 0, 0);
|
||||||
}
|
}
|
||||||
if (!res)
|
if (!res)
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* put tables back for PS rexecuting */
|
/* put tables back for PS rexecuting */
|
||||||
@ -3194,7 +3194,7 @@ end_with_restore_list:
|
|||||||
LEX_STRING db_str= { (char *) select_lex->db, strlen(select_lex->db) };
|
LEX_STRING db_str= { (char *) select_lex->db, strlen(select_lex->db) };
|
||||||
|
|
||||||
if (!mysql_change_db(thd, &db_str, FALSE))
|
if (!mysql_change_db(thd, &db_str, FALSE))
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -3247,7 +3247,7 @@ end_with_restore_list:
|
|||||||
about the ONE_SHOT property of that SET. So we use a |= instead of = .
|
about the ONE_SHOT property of that SET. So we use a |= instead of = .
|
||||||
*/
|
*/
|
||||||
thd->one_shot_set|= lex->one_shot_set;
|
thd->one_shot_set|= lex->one_shot_set;
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -3267,7 +3267,7 @@ end_with_restore_list:
|
|||||||
}
|
}
|
||||||
if (thd->global_read_lock)
|
if (thd->global_read_lock)
|
||||||
unlock_global_read_lock(thd);
|
unlock_global_read_lock(thd);
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
case SQLCOM_LOCK_TABLES:
|
case SQLCOM_LOCK_TABLES:
|
||||||
unlock_locked_tables(thd);
|
unlock_locked_tables(thd);
|
||||||
@ -3288,7 +3288,7 @@ end_with_restore_list:
|
|||||||
#endif /*HAVE_QUERY_CACHE*/
|
#endif /*HAVE_QUERY_CACHE*/
|
||||||
thd->locked_tables=thd->lock;
|
thd->locked_tables=thd->lock;
|
||||||
thd->lock=0;
|
thd->lock=0;
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3425,7 +3425,7 @@ end_with_restore_list:
|
|||||||
|
|
||||||
res= mysql_upgrade_db(thd, db);
|
res= mysql_upgrade_db(thd, db);
|
||||||
if (!res)
|
if (!res)
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SQLCOM_ALTER_DB:
|
case SQLCOM_ALTER_DB:
|
||||||
@ -3510,7 +3510,7 @@ end_with_restore_list:
|
|||||||
}
|
}
|
||||||
DBUG_PRINT("info",("DDL error code=%d", res));
|
DBUG_PRINT("info",("DDL error code=%d", res));
|
||||||
if (!res)
|
if (!res)
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
|
|
||||||
} while (0);
|
} while (0);
|
||||||
/* Don't do it, if we are inside a SP */
|
/* Don't do it, if we are inside a SP */
|
||||||
@ -3529,7 +3529,7 @@ end_with_restore_list:
|
|||||||
if (!(res= Events::drop_event(thd,
|
if (!(res= Events::drop_event(thd,
|
||||||
lex->spname->m_db, lex->spname->m_name,
|
lex->spname->m_db, lex->spname->m_name,
|
||||||
lex->drop_if_exists)))
|
lex->drop_if_exists)))
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
case SQLCOM_CREATE_FUNCTION: // UDF function
|
case SQLCOM_CREATE_FUNCTION: // UDF function
|
||||||
{
|
{
|
||||||
@ -3537,7 +3537,7 @@ end_with_restore_list:
|
|||||||
break;
|
break;
|
||||||
#ifdef HAVE_DLOPEN
|
#ifdef HAVE_DLOPEN
|
||||||
if (!(res = mysql_create_function(thd, &lex->udf)))
|
if (!(res = mysql_create_function(thd, &lex->udf)))
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
#else
|
#else
|
||||||
my_error(ER_CANT_OPEN_LIBRARY, MYF(0), lex->udf.dl, 0, "feature disabled");
|
my_error(ER_CANT_OPEN_LIBRARY, MYF(0), lex->udf.dl, 0, "feature disabled");
|
||||||
res= TRUE;
|
res= TRUE;
|
||||||
@ -3554,7 +3554,7 @@ end_with_restore_list:
|
|||||||
goto error;
|
goto error;
|
||||||
/* Conditionally writes to binlog */
|
/* Conditionally writes to binlog */
|
||||||
if (!(res= mysql_create_user(thd, lex->users_list)))
|
if (!(res= mysql_create_user(thd, lex->users_list)))
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SQLCOM_DROP_USER:
|
case SQLCOM_DROP_USER:
|
||||||
@ -3566,7 +3566,7 @@ end_with_restore_list:
|
|||||||
goto error;
|
goto error;
|
||||||
/* Conditionally writes to binlog */
|
/* Conditionally writes to binlog */
|
||||||
if (!(res= mysql_drop_user(thd, lex->users_list)))
|
if (!(res= mysql_drop_user(thd, lex->users_list)))
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SQLCOM_RENAME_USER:
|
case SQLCOM_RENAME_USER:
|
||||||
@ -3578,7 +3578,7 @@ end_with_restore_list:
|
|||||||
goto error;
|
goto error;
|
||||||
/* Conditionally writes to binlog */
|
/* Conditionally writes to binlog */
|
||||||
if (!(res= mysql_rename_user(thd, lex->users_list)))
|
if (!(res= mysql_rename_user(thd, lex->users_list)))
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SQLCOM_REVOKE_ALL:
|
case SQLCOM_REVOKE_ALL:
|
||||||
@ -3590,7 +3590,7 @@ end_with_restore_list:
|
|||||||
break;
|
break;
|
||||||
/* Conditionally writes to binlog */
|
/* Conditionally writes to binlog */
|
||||||
if (!(res = mysql_revoke_all(thd, lex->users_list)))
|
if (!(res = mysql_revoke_all(thd, lex->users_list)))
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SQLCOM_REVOKE:
|
case SQLCOM_REVOKE:
|
||||||
@ -3727,7 +3727,7 @@ end_with_restore_list:
|
|||||||
{
|
{
|
||||||
write_bin_log(thd, FALSE, thd->query, thd->query_length);
|
write_bin_log(thd, FALSE, thd->query, thd->query_length);
|
||||||
}
|
}
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -3799,19 +3799,19 @@ end_with_restore_list:
|
|||||||
}
|
}
|
||||||
if (begin_trans(thd))
|
if (begin_trans(thd))
|
||||||
goto error;
|
goto error;
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
case SQLCOM_COMMIT:
|
case SQLCOM_COMMIT:
|
||||||
if (end_trans(thd, lex->tx_release ? COMMIT_RELEASE :
|
if (end_trans(thd, lex->tx_release ? COMMIT_RELEASE :
|
||||||
lex->tx_chain ? COMMIT_AND_CHAIN : COMMIT))
|
lex->tx_chain ? COMMIT_AND_CHAIN : COMMIT))
|
||||||
goto error;
|
goto error;
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
case SQLCOM_ROLLBACK:
|
case SQLCOM_ROLLBACK:
|
||||||
if (end_trans(thd, lex->tx_release ? ROLLBACK_RELEASE :
|
if (end_trans(thd, lex->tx_release ? ROLLBACK_RELEASE :
|
||||||
lex->tx_chain ? ROLLBACK_AND_CHAIN : ROLLBACK))
|
lex->tx_chain ? ROLLBACK_AND_CHAIN : ROLLBACK))
|
||||||
goto error;
|
goto error;
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
case SQLCOM_RELEASE_SAVEPOINT:
|
case SQLCOM_RELEASE_SAVEPOINT:
|
||||||
{
|
{
|
||||||
@ -3828,7 +3828,7 @@ end_with_restore_list:
|
|||||||
if (ha_release_savepoint(thd, sv))
|
if (ha_release_savepoint(thd, sv))
|
||||||
res= TRUE; // cannot happen
|
res= TRUE; // cannot happen
|
||||||
else
|
else
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
thd->transaction.savepoints=sv->prev;
|
thd->transaction.savepoints=sv->prev;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -3857,7 +3857,7 @@ end_with_restore_list:
|
|||||||
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||||
ER_WARNING_NOT_COMPLETE_ROLLBACK,
|
ER_WARNING_NOT_COMPLETE_ROLLBACK,
|
||||||
ER(ER_WARNING_NOT_COMPLETE_ROLLBACK));
|
ER(ER_WARNING_NOT_COMPLETE_ROLLBACK));
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
}
|
}
|
||||||
thd->transaction.savepoints=sv;
|
thd->transaction.savepoints=sv;
|
||||||
}
|
}
|
||||||
@ -3868,7 +3868,7 @@ end_with_restore_list:
|
|||||||
case SQLCOM_SAVEPOINT:
|
case SQLCOM_SAVEPOINT:
|
||||||
if (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN) ||
|
if (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN) ||
|
||||||
thd->in_sub_stmt) || !opt_using_transactions)
|
thd->in_sub_stmt) || !opt_using_transactions)
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SAVEPOINT **sv, *newsv;
|
SAVEPOINT **sv, *newsv;
|
||||||
@ -3905,7 +3905,7 @@ end_with_restore_list:
|
|||||||
{
|
{
|
||||||
newsv->prev=thd->transaction.savepoints;
|
newsv->prev=thd->transaction.savepoints;
|
||||||
thd->transaction.savepoints=newsv;
|
thd->transaction.savepoints=newsv;
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -4005,7 +4005,7 @@ end_with_restore_list:
|
|||||||
create_sp_error:
|
create_sp_error:
|
||||||
if (sp_result != SP_OK )
|
if (sp_result != SP_OK )
|
||||||
goto error;
|
goto error;
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break; /* break super switch */
|
break; /* break super switch */
|
||||||
} /* end case group bracket */
|
} /* end case group bracket */
|
||||||
case SQLCOM_CALL:
|
case SQLCOM_CALL:
|
||||||
@ -4098,8 +4098,8 @@ create_sp_error:
|
|||||||
thd->server_status&= ~bits_to_be_cleared;
|
thd->server_status&= ~bits_to_be_cleared;
|
||||||
|
|
||||||
if (!res)
|
if (!res)
|
||||||
send_ok(thd, (ulong) (thd->row_count_func < 0 ? 0 :
|
my_ok(thd, (ulong) (thd->row_count_func < 0 ? 0 :
|
||||||
thd->row_count_func));
|
thd->row_count_func));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DBUG_ASSERT(thd->is_error() || thd->killed);
|
DBUG_ASSERT(thd->is_error() || thd->killed);
|
||||||
@ -4176,7 +4176,7 @@ create_sp_error:
|
|||||||
switch (sp_result)
|
switch (sp_result)
|
||||||
{
|
{
|
||||||
case SP_OK:
|
case SP_OK:
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
case SP_KEY_NOT_FOUND:
|
case SP_KEY_NOT_FOUND:
|
||||||
my_error(ER_SP_DOES_NOT_EXIST, MYF(0),
|
my_error(ER_SP_DOES_NOT_EXIST, MYF(0),
|
||||||
@ -4241,7 +4241,7 @@ create_sp_error:
|
|||||||
|
|
||||||
if (!(res = mysql_drop_function(thd, &lex->spname->m_name)))
|
if (!(res = mysql_drop_function(thd, &lex->spname->m_name)))
|
||||||
{
|
{
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4258,7 +4258,7 @@ create_sp_error:
|
|||||||
res= sp_result;
|
res= sp_result;
|
||||||
switch (sp_result) {
|
switch (sp_result) {
|
||||||
case SP_OK:
|
case SP_OK:
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
case SP_KEY_NOT_FOUND:
|
case SP_KEY_NOT_FOUND:
|
||||||
if (lex->drop_if_exists)
|
if (lex->drop_if_exists)
|
||||||
@ -4267,7 +4267,7 @@ create_sp_error:
|
|||||||
ER_SP_DOES_NOT_EXIST, ER(ER_SP_DOES_NOT_EXIST),
|
ER_SP_DOES_NOT_EXIST, ER(ER_SP_DOES_NOT_EXIST),
|
||||||
SP_COM_STRING(lex), lex->spname->m_name.str);
|
SP_COM_STRING(lex), lex->spname->m_name.str);
|
||||||
res= FALSE;
|
res= FALSE;
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
my_error(ER_SP_DOES_NOT_EXIST, MYF(0),
|
my_error(ER_SP_DOES_NOT_EXIST, MYF(0),
|
||||||
@ -4399,7 +4399,7 @@ create_sp_error:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
thd->transaction.xid_state.xa_state=XA_ACTIVE;
|
thd->transaction.xid_state.xa_state=XA_ACTIVE;
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (thd->lex->xa_opt != XA_NONE)
|
if (thd->lex->xa_opt != XA_NONE)
|
||||||
@ -4430,7 +4430,7 @@ create_sp_error:
|
|||||||
thd->transaction.all.modified_non_trans_table= FALSE;
|
thd->transaction.all.modified_non_trans_table= FALSE;
|
||||||
thd->options= ((thd->options & ~(OPTION_KEEP_LOG)) | OPTION_BEGIN);
|
thd->options= ((thd->options & ~(OPTION_KEEP_LOG)) | OPTION_BEGIN);
|
||||||
thd->server_status|= SERVER_STATUS_IN_TRANS;
|
thd->server_status|= SERVER_STATUS_IN_TRANS;
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
case SQLCOM_XA_END:
|
case SQLCOM_XA_END:
|
||||||
/* fake it */
|
/* fake it */
|
||||||
@ -4451,7 +4451,7 @@ create_sp_error:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
thd->transaction.xid_state.xa_state=XA_IDLE;
|
thd->transaction.xid_state.xa_state=XA_IDLE;
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
case SQLCOM_XA_PREPARE:
|
case SQLCOM_XA_PREPARE:
|
||||||
if (thd->transaction.xid_state.xa_state != XA_IDLE)
|
if (thd->transaction.xid_state.xa_state != XA_IDLE)
|
||||||
@ -4473,7 +4473,7 @@ create_sp_error:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
thd->transaction.xid_state.xa_state=XA_PREPARED;
|
thd->transaction.xid_state.xa_state=XA_PREPARED;
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
case SQLCOM_XA_COMMIT:
|
case SQLCOM_XA_COMMIT:
|
||||||
if (!thd->transaction.xid_state.xid.eq(thd->lex->xid))
|
if (!thd->transaction.xid_state.xid.eq(thd->lex->xid))
|
||||||
@ -4485,7 +4485,7 @@ create_sp_error:
|
|||||||
{
|
{
|
||||||
ha_commit_or_rollback_by_xid(thd->lex->xid, 1);
|
ha_commit_or_rollback_by_xid(thd->lex->xid, 1);
|
||||||
xid_cache_delete(xs);
|
xid_cache_delete(xs);
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -4496,7 +4496,7 @@ create_sp_error:
|
|||||||
if ((r= ha_commit(thd)))
|
if ((r= ha_commit(thd)))
|
||||||
my_error(r == 1 ? ER_XA_RBROLLBACK : ER_XAER_RMERR, MYF(0));
|
my_error(r == 1 ? ER_XA_RBROLLBACK : ER_XAER_RMERR, MYF(0));
|
||||||
else
|
else
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
}
|
}
|
||||||
else if (thd->transaction.xid_state.xa_state == XA_PREPARED &&
|
else if (thd->transaction.xid_state.xa_state == XA_PREPARED &&
|
||||||
thd->lex->xa_opt == XA_NONE)
|
thd->lex->xa_opt == XA_NONE)
|
||||||
@ -4511,7 +4511,7 @@ create_sp_error:
|
|||||||
if (ha_commit_one_phase(thd, 1))
|
if (ha_commit_one_phase(thd, 1))
|
||||||
my_error(ER_XAER_RMERR, MYF(0));
|
my_error(ER_XAER_RMERR, MYF(0));
|
||||||
else
|
else
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
start_waiting_global_read_lock(thd);
|
start_waiting_global_read_lock(thd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4537,7 +4537,7 @@ create_sp_error:
|
|||||||
{
|
{
|
||||||
ha_commit_or_rollback_by_xid(thd->lex->xid, 0);
|
ha_commit_or_rollback_by_xid(thd->lex->xid, 0);
|
||||||
xid_cache_delete(xs);
|
xid_cache_delete(xs);
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -4551,7 +4551,7 @@ create_sp_error:
|
|||||||
if (ha_rollback(thd))
|
if (ha_rollback(thd))
|
||||||
my_error(ER_XAER_RMERR, MYF(0));
|
my_error(ER_XAER_RMERR, MYF(0));
|
||||||
else
|
else
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
thd->options&= ~(OPTION_BEGIN | OPTION_KEEP_LOG);
|
thd->options&= ~(OPTION_BEGIN | OPTION_KEEP_LOG);
|
||||||
thd->transaction.all.modified_non_trans_table= FALSE;
|
thd->transaction.all.modified_non_trans_table= FALSE;
|
||||||
thd->server_status&= ~SERVER_STATUS_IN_TRANS;
|
thd->server_status&= ~SERVER_STATUS_IN_TRANS;
|
||||||
@ -4565,16 +4565,16 @@ create_sp_error:
|
|||||||
if (check_access(thd, ALTER_ACL, thd->db, 0, 1, 0, thd->db ? is_schema_db(thd->db) : 0))
|
if (check_access(thd, ALTER_ACL, thd->db, 0, 1, 0, thd->db ? is_schema_db(thd->db) : 0))
|
||||||
break;
|
break;
|
||||||
if (!(res= mysql_alter_tablespace(thd, lex->alter_tablespace_info)))
|
if (!(res= mysql_alter_tablespace(thd, lex->alter_tablespace_info)))
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
case SQLCOM_INSTALL_PLUGIN:
|
case SQLCOM_INSTALL_PLUGIN:
|
||||||
if (! (res= mysql_install_plugin(thd, &thd->lex->comment,
|
if (! (res= mysql_install_plugin(thd, &thd->lex->comment,
|
||||||
&thd->lex->ident)))
|
&thd->lex->ident)))
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
case SQLCOM_UNINSTALL_PLUGIN:
|
case SQLCOM_UNINSTALL_PLUGIN:
|
||||||
if (! (res= mysql_uninstall_plugin(thd, &thd->lex->comment)))
|
if (! (res= mysql_uninstall_plugin(thd, &thd->lex->comment)))
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
case SQLCOM_BINLOG_BASE64_EVENT:
|
case SQLCOM_BINLOG_BASE64_EVENT:
|
||||||
{
|
{
|
||||||
@ -4601,7 +4601,7 @@ create_sp_error:
|
|||||||
my_error(error, MYF(0), lex->server_options.server_name);
|
my_error(error, MYF(0), lex->server_options.server_name);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
send_ok(thd, 1);
|
my_ok(thd, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SQLCOM_ALTER_SERVER:
|
case SQLCOM_ALTER_SERVER:
|
||||||
@ -4620,7 +4620,7 @@ create_sp_error:
|
|||||||
my_error(error, MYF(0), lex->server_options.server_name);
|
my_error(error, MYF(0), lex->server_options.server_name);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
send_ok(thd, 1);
|
my_ok(thd, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SQLCOM_DROP_SERVER:
|
case SQLCOM_DROP_SERVER:
|
||||||
@ -4642,18 +4642,18 @@ create_sp_error:
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
send_ok(thd, 0);
|
my_ok(thd, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
send_ok(thd, 1);
|
my_ok(thd, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
#ifndef EMBEDDED_LIBRARY
|
#ifndef EMBEDDED_LIBRARY
|
||||||
DBUG_ASSERT(0); /* Impossible */
|
DBUG_ASSERT(0); /* Impossible */
|
||||||
#endif
|
#endif
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
thd_proc_info(thd, "query end");
|
thd_proc_info(thd, "query end");
|
||||||
@ -6660,7 +6660,7 @@ void sql_kill(THD *thd, ulong id, bool only_kill_query)
|
|||||||
{
|
{
|
||||||
uint error;
|
uint error;
|
||||||
if (!(error= kill_one_thread(thd, id, only_kill_query)))
|
if (!(error= kill_one_thread(thd, id, only_kill_query)))
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
else
|
else
|
||||||
my_error(error, MYF(0), id);
|
my_error(error, MYF(0), id);
|
||||||
}
|
}
|
||||||
|
@ -3995,7 +3995,7 @@ static int fast_end_partition(THD *thd, ulonglong copied,
|
|||||||
(ulong) (copied + deleted),
|
(ulong) (copied + deleted),
|
||||||
(ulong) deleted,
|
(ulong) deleted,
|
||||||
(ulong) 0);
|
(ulong) 0);
|
||||||
send_ok(thd, (ha_rows) (copied+deleted),0L, tmp_name);
|
my_ok(thd, (ha_rows) (copied+deleted),0L, tmp_name);
|
||||||
DBUG_RETURN(FALSE);
|
DBUG_RETURN(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2111,7 +2111,7 @@ void mysql_sql_stmt_prepare(THD *thd)
|
|||||||
thd->stmt_map.erase(stmt);
|
thd->stmt_map.erase(stmt);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
send_ok(thd, 0L, 0L, "Statement prepared");
|
my_ok(thd, 0L, 0L, "Statement prepared");
|
||||||
|
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
@ -2494,7 +2494,7 @@ void mysql_stmt_reset(THD *thd, char *packet)
|
|||||||
|
|
||||||
stmt->state= Query_arena::PREPARED;
|
stmt->state= Query_arena::PREPARED;
|
||||||
|
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
|
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
@ -2557,7 +2557,7 @@ void mysql_sql_stmt_close(THD *thd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (stmt->deallocate() == 0)
|
if (stmt->deallocate() == 0)
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -178,7 +178,7 @@ bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list, bool silent)
|
|||||||
if (!silent && !error)
|
if (!silent && !error)
|
||||||
{
|
{
|
||||||
write_bin_log(thd, TRUE, thd->query, thd->query_length);
|
write_bin_log(thd, TRUE, thd->query, thd->query_length);
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!error)
|
if (!error)
|
||||||
|
@ -252,7 +252,7 @@ bool purge_error_message(THD* thd, int res)
|
|||||||
my_message(errmsg, ER(errmsg), MYF(0));
|
my_message(errmsg, ER(errmsg), MYF(0));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -262,7 +262,7 @@ bool purge_master_logs(THD* thd, const char* to_log)
|
|||||||
char search_file_name[FN_REFLEN];
|
char search_file_name[FN_REFLEN];
|
||||||
if (!mysql_bin_log.is_open())
|
if (!mysql_bin_log.is_open())
|
||||||
{
|
{
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -277,7 +277,7 @@ bool purge_master_logs_before_date(THD* thd, time_t purge_time)
|
|||||||
{
|
{
|
||||||
if (!mysql_bin_log.is_open())
|
if (!mysql_bin_log.is_open())
|
||||||
{
|
{
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return purge_error_message(thd,
|
return purge_error_message(thd,
|
||||||
@ -884,7 +884,7 @@ int start_slave(THD* thd , Master_info* mi, bool net_report)
|
|||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
else if (net_report)
|
else if (net_report)
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
|
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
@ -936,7 +936,7 @@ int stop_slave(THD* thd, Master_info* mi, bool net_report )
|
|||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
else if (net_report)
|
else if (net_report)
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
|
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
@ -1279,7 +1279,7 @@ bool change_master(THD* thd, Master_info* mi)
|
|||||||
|
|
||||||
unlock_slave_threads(mi);
|
unlock_slave_threads(mi);
|
||||||
thd_proc_info(thd, 0);
|
thd_proc_info(thd, 0);
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
DBUG_RETURN(FALSE);
|
DBUG_RETURN(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1497,7 +1497,7 @@ bool mysql_rm_table(THD *thd,TABLE_LIST *tables, my_bool if_exists,
|
|||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
DBUG_RETURN(FALSE);
|
DBUG_RETURN(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5042,7 +5042,7 @@ err:
|
|||||||
|
|
||||||
if (error == 0)
|
if (error == 0)
|
||||||
{
|
{
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6006,7 +6006,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
|||||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
||||||
mysql_bin_log.write(&qinfo);
|
mysql_bin_log.write(&qinfo);
|
||||||
}
|
}
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
}
|
}
|
||||||
|
|
||||||
unlock_table_names(thd, table_list, (TABLE_LIST*) 0);
|
unlock_table_names(thd, table_list, (TABLE_LIST*) 0);
|
||||||
@ -6244,7 +6244,7 @@ view_err:
|
|||||||
if (!error)
|
if (!error)
|
||||||
{
|
{
|
||||||
write_bin_log(thd, TRUE, thd->query, thd->query_length);
|
write_bin_log(thd, TRUE, thd->query, thd->query_length);
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
}
|
}
|
||||||
else if (error > 0)
|
else if (error > 0)
|
||||||
{
|
{
|
||||||
@ -6880,7 +6880,7 @@ end_temporary:
|
|||||||
my_snprintf(tmp_name, sizeof(tmp_name), ER(ER_INSERT_INFO),
|
my_snprintf(tmp_name, sizeof(tmp_name), ER(ER_INSERT_INFO),
|
||||||
(ulong) (copied + deleted), (ulong) deleted,
|
(ulong) (copied + deleted), (ulong) deleted,
|
||||||
(ulong) thd->cuted_fields);
|
(ulong) thd->cuted_fields);
|
||||||
send_ok(thd, copied + deleted, 0L, tmp_name);
|
my_ok(thd, copied + deleted, 0L, tmp_name);
|
||||||
thd->some_tables_deleted=0;
|
thd->some_tables_deleted=0;
|
||||||
DBUG_RETURN(FALSE);
|
DBUG_RETURN(FALSE);
|
||||||
|
|
||||||
|
@ -516,7 +516,7 @@ end:
|
|||||||
start_waiting_global_read_lock(thd);
|
start_waiting_global_read_lock(thd);
|
||||||
|
|
||||||
if (!result)
|
if (!result)
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
|
|
||||||
DBUG_RETURN(result);
|
DBUG_RETURN(result);
|
||||||
}
|
}
|
||||||
|
@ -319,7 +319,7 @@ int mysql_update(THD *thd,
|
|||||||
if (prune_partitions(thd, table, conds))
|
if (prune_partitions(thd, table, conds))
|
||||||
{
|
{
|
||||||
free_underlaid_joins(thd, select_lex);
|
free_underlaid_joins(thd, select_lex);
|
||||||
send_ok(thd); // No matching records
|
my_ok(thd); // No matching records
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -336,7 +336,7 @@ int mysql_update(THD *thd,
|
|||||||
{
|
{
|
||||||
DBUG_RETURN(1); // Error in where
|
DBUG_RETURN(1); // Error in where
|
||||||
}
|
}
|
||||||
send_ok(thd); // No matching records
|
my_ok(thd); // No matching records
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
if (!select && limit != HA_POS_ERROR)
|
if (!select && limit != HA_POS_ERROR)
|
||||||
@ -815,7 +815,7 @@ int mysql_update(THD *thd,
|
|||||||
(ulong) thd->cuted_fields);
|
(ulong) thd->cuted_fields);
|
||||||
thd->row_count_func=
|
thd->row_count_func=
|
||||||
(thd->client_capabilities & CLIENT_FOUND_ROWS) ? found : updated;
|
(thd->client_capabilities & CLIENT_FOUND_ROWS) ? found : updated;
|
||||||
send_ok(thd, (ulong) thd->row_count_func, id, buff);
|
my_ok(thd, (ulong) thd->row_count_func, id, buff);
|
||||||
DBUG_PRINT("info",("%ld records updated", (long) updated));
|
DBUG_PRINT("info",("%ld records updated", (long) updated));
|
||||||
}
|
}
|
||||||
thd->count_cuted_fields= CHECK_FIELD_IGNORE; /* calc cuted fields */
|
thd->count_cuted_fields= CHECK_FIELD_IGNORE; /* calc cuted fields */
|
||||||
@ -1989,6 +1989,6 @@ bool multi_update::send_eof()
|
|||||||
(ulong) thd->cuted_fields);
|
(ulong) thd->cuted_fields);
|
||||||
thd->row_count_func=
|
thd->row_count_func=
|
||||||
(thd->client_capabilities & CLIENT_FOUND_ROWS) ? found : updated;
|
(thd->client_capabilities & CLIENT_FOUND_ROWS) ? found : updated;
|
||||||
::send_ok(thd, (ulong) thd->row_count_func, id, buff);
|
::my_ok(thd, (ulong) thd->row_count_func, id, buff);
|
||||||
DBUG_RETURN(FALSE);
|
DBUG_RETURN(FALSE);
|
||||||
}
|
}
|
||||||
|
@ -599,7 +599,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
|
|||||||
if (res)
|
if (res)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
lex->link_first_table_back(view, link_to_local);
|
lex->link_first_table_back(view, link_to_local);
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
|
|
||||||
@ -1552,7 +1552,7 @@ bool mysql_drop_view(THD *thd, TABLE_LIST *views, enum_drop_mode drop_mode)
|
|||||||
{
|
{
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
}
|
}
|
||||||
send_ok(thd);
|
my_ok(thd);
|
||||||
DBUG_RETURN(FALSE);
|
DBUG_RETURN(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user