diff options
author | Davi Arnaut <davi.arnaut@oracle.com> | 2010-07-23 22:36:21 -0300 |
---|---|---|
committer | Davi Arnaut <davi.arnaut@oracle.com> | 2010-07-23 22:36:21 -0300 |
commit | d6415dc8cd013b636bff3a69a903abd2da16886b (patch) | |
tree | 1b0b99de278ce9cb5a458afc12e6cc2280a885b6 /sql/protocol.cc | |
parent | a66465a09123b2b43637202c3e44b8bfc283e9d8 (diff) | |
parent | 25c849dbd3617d2c2b1ae84a2086d3067e95fd09 (diff) | |
download | mariadb-git-d6415dc8cd013b636bff3a69a903abd2da16886b.tar.gz |
Merge of mysql-5.1-bugteam into mysql-trunk-merge.
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r-- | sql/protocol.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc index 3f957dcc2de..6b7ab87aa62 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -658,7 +658,11 @@ void Protocol::end_partial_result_set(THD *thd_arg) bool Protocol::flush() { #ifndef EMBEDDED_LIBRARY - return net_flush(&thd->net); + bool error; + thd->stmt_da->can_overwrite_status= TRUE; + error= net_flush(&thd->net); + thd->stmt_da->can_overwrite_status= FALSE; + return error; #else return 0; #endif @@ -698,7 +702,8 @@ bool Protocol::send_result_set_metadata(List<Item> *list, uint flags) if (flags & SEND_NUM_ROWS) { // Packet with number of elements uchar *pos= net_store_length(buff, list->elements); - (void) my_net_write(&thd->net, buff, (size_t) (pos-buff)); + if (my_net_write(&thd->net, buff, (size_t) (pos-buff))) + DBUG_RETURN(1); } #ifndef DBUG_OFF @@ -820,7 +825,7 @@ bool Protocol::send_result_set_metadata(List<Item> *list, uint flags) if (flags & SEND_DEFAULTS) item->send(&prot, &tmp); // Send default value if (prot.write()) - break; /* purecov: inspected */ + DBUG_RETURN(1); #ifndef DBUG_OFF field_types[count++]= field.type; #endif @@ -833,8 +838,9 @@ bool Protocol::send_result_set_metadata(List<Item> *list, uint flags) to show that there is no cursor. Send no warning information, as it will be sent at statement end. */ - write_eof_packet(thd, &thd->net, thd->server_status, - thd->warning_info->statement_warn_count()); + if (write_eof_packet(thd, &thd->net, thd->server_status, + thd->warning_info->statement_warn_count())) + DBUG_RETURN(1); } DBUG_RETURN(prepare_for_send(list->elements)); |