summaryrefslogtreecommitdiff
path: root/sql/sql_cursor.cc
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2010-07-29 16:32:11 +0400
committerAlexander Nozdrin <alik@sun.com>2010-07-29 16:32:11 +0400
commit32f3ab7933240277e52f05e39e4d45f19f7ac3d7 (patch)
tree16a66be92ba2603896b1b010600df021911be256 /sql/sql_cursor.cc
parentd85c6281802c8f6ef7187518f9f4357d96134b3e (diff)
parent6bd182e9f22e02f29e7f14e6dd8bf14eaeee084e (diff)
downloadmariadb-git-32f3ab7933240277e52f05e39e4d45f19f7ac3d7.tar.gz
Auto-merge from mysql-trunk-merge.
Diffstat (limited to 'sql/sql_cursor.cc')
-rw-r--r--sql/sql_cursor.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_cursor.cc b/sql/sql_cursor.cc
index 9a3eb6ff526..7a9834b4cde 100644
--- a/sql/sql_cursor.cc
+++ b/sql/sql_cursor.cc
@@ -306,7 +306,12 @@ void Materialized_cursor::fetch(ulong num_rows)
if ((res= table->file->rnd_next(table->record[0])))
break;
/* Send data only if the read was successful. */
- result->send_data(item_list);
+ /*
+ If network write failed (i.e. due to a closed socked),
+ the error has already been set. Just return.
+ */
+ if (result->send_data(item_list))
+ return;
}
switch (res) {