1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge 5.2->5.3

- Re-commit Monty's merge, partially fixed by Igor and SergeyP, 
  but still broken
This commit is contained in:
Sergey Petrunya
2010-10-10 17:18:11 +03:00
1531 changed files with 62652 additions and 27991 deletions

View File

@@ -608,7 +608,7 @@ int Materialized_cursor::open(JOIN *join __attribute__((unused)))
thd->set_n_backup_active_arena(this, &backup_arena);
/* Create a list of fields and start sequential scan */
rc= result->prepare(item_list, &fake_unit);
if (!rc && !(rc= table->file->ha_rnd_init(TRUE)))
if (!rc && !(rc= table->file->ha_rnd_init_with_error(TRUE)))
is_rnd_inited= 1;
thd->restore_active_arena(this, &backup_arena);
@@ -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) {