diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2016-05-09 15:26:18 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2016-05-17 13:31:33 +0200 |
commit | 50a17de1ce375f888cc239cd3c0bb8e1b92a95ab (patch) | |
tree | 766bbacaa4fade90b8c98a831c2e4c8e6cf63e38 /sql/protocol.cc | |
parent | e7ff281d2e954f9ab7f08a3e1a425a3c59e8f796 (diff) | |
download | mariadb-git-50a17de1ce375f888cc239cd3c0bb8e1b92a95ab.tar.gz |
MDEV-9947: COM_MULTI united response
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r-- | sql/protocol.cc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc index 9e528708823..6469581b482 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -35,7 +35,7 @@ static const unsigned int PACKET_BUFFER_EXTRA_ALLOC= 1024; /* Declared non-static only because of the embedded library. */ bool net_send_error_packet(THD *, uint, const char *, const char *); /* 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); /* Declared non-static only because of the embedded library. */ bool net_send_eof(THD *thd, uint server_status, uint statement_warn_count); #ifndef EMBEDDED_LIBRARY @@ -208,7 +208,8 @@ bool net_send_error(THD *thd, uint sql_errno, const char *err, bool net_send_ok(THD *thd, uint server_status, uint statement_warn_count, - ulonglong affected_rows, ulonglong id, const char *message) + ulonglong affected_rows, ulonglong id, const char *message, + bool skip_flush) { NET *net= &thd->net; uchar buff[MYSQL_ERRMSG_SIZE+10],*pos; @@ -250,7 +251,7 @@ net_send_ok(THD *thd, if (message && message[0]) pos= net_store_data(pos, (uchar*) message, strlen(message)); error= my_net_write(net, buff, (size_t) (pos-buff)); - if (!error) + if (!error && !skip_flush) error= net_flush(net); @@ -514,14 +515,16 @@ void Protocol::end_statement() thd->get_stmt_da()->statement_warn_count(), thd->get_stmt_da()->affected_rows(), thd->get_stmt_da()->last_insert_id(), - thd->get_stmt_da()->message()); + thd->get_stmt_da()->message(), + thd->get_stmt_da()->skip_flush()); break; case Diagnostics_area::DA_DISABLED: break; case Diagnostics_area::DA_EMPTY: default: 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; } if (!error) @@ -540,12 +543,12 @@ void Protocol::end_statement() bool Protocol::send_ok(uint server_status, uint statement_warn_count, ulonglong affected_rows, ulonglong last_insert_id, - const char *message) + const char *message, bool skip_flush) { DBUG_ENTER("Protocol::send_ok"); const bool retval= net_send_ok(thd, server_status, statement_warn_count, - affected_rows, last_insert_id, message); + affected_rows, last_insert_id, message, skip_flush); DBUG_RETURN(retval); } |