diff options
author | Galina Shalygina <galashalygina@gmail.com> | 2016-05-25 00:34:13 +0300 |
---|---|---|
committer | Galina Shalygina <galashalygina@gmail.com> | 2016-05-25 00:34:13 +0300 |
commit | 6c6c3af6aac428df8a934beeba15cc4ce77cbe01 (patch) | |
tree | 2f8241944db8952e6a54a417414773dd0b5b0b4e /sql/protocol.cc | |
parent | b4f1f42062d108230b62ad49fedd93ee6e38e168 (diff) | |
parent | c7c2f8d4a0dedd52795b7f8a6971c35ea46cc016 (diff) | |
download | mariadb-git-10.2-test1234.tar.gz |
Merge branch '10.2' into 10.2-mdev986410.2-test1234
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); } |