diff options
author | Sergei Golubchik <sergii@pisem.net> | 2010-09-11 20:43:48 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2010-09-11 20:43:48 +0200 |
commit | a3d80d952d7b99680ca4a3a89e128ecc0d490c10 (patch) | |
tree | 0d72ee69e037cdd09618ddb53652dd1b220890dc /sql/sql_cursor.cc | |
parent | ec06ba24553d2d83b3a6a6bc4d8150910b01ee7c (diff) | |
parent | 966661c8cc75dd7d540a5fe40b4d893c40e91d26 (diff) | |
download | mariadb-git-a3d80d952d7b99680ca4a3a89e128ecc0d490c10.tar.gz |
merge with 5.1
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 e9ef5ef0cf3..77be6eaff34 100644 --- a/sql/sql_cursor.cc +++ b/sql/sql_cursor.cc @@ -658,7 +658,12 @@ void Materialized_cursor::fetch(ulong num_rows) if ((res= table->file->ha_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) { |