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/sql_cursor.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/sql_cursor.cc')
-rw-r--r-- | sql/sql_cursor.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_cursor.cc b/sql/sql_cursor.cc index ca724ec262f..123b1cd1ec9 100644 --- a/sql/sql_cursor.cc +++ b/sql/sql_cursor.cc @@ -664,7 +664,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) { |