YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense alongwiththisprogram;ifnot,writetotheFreeSoftware
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
if (store_data_in_temp_table)
{
max_limit= join->tmp_table_param.end_write_records;
reset_limit= TRUE;
} else
{
max_limit= join->unit->lim.get_select_limit(); if (join->unit->fake_select_lex)
reset_item= &join->unit->fake_select_lex->limit_params.select_limit;
}
while (!(err= handler->next_row()))
{ if (unlikely(thd->check_killed()))
{
handler->end_scan();
DBUG_RETURN(-1);
}
/* Check if we can accept the row */ if (!having || having->val_bool())
{ if (store_data_in_temp_table)
{ if ((err= table->file->ha_write_tmp_row(table->record[0])))
{ bool is_duplicate; if (likely(!table->file->is_fatal_error(err, HA_CHECK_DUP))) continue; // Distinct elimination
if (create_internal_tmp_table_from_heap(thd, table,
join->tmp_table_param.
start_recinfo,
&join->tmp_table_param.
recinfo,
err, 1, &is_duplicate))
DBUG_RETURN(1); if (is_duplicate) continue;
}
} else
{ if (join->do_send_rows)
{ int error; /* result < 0 if row was not accepted and should not be counted */ if (unlikely((error=
join->result->send_data_with_check(*join->fields,
join->unit,
join->send_records))))
{
handler->end_scan();
DBUG_RETURN(error < 0 ? 0 : -1);
}
}
}
/* limit handling */ if (++join->send_records >= max_limit && join->do_send_rows)
{ if (!(join->select_options & OPTION_FOUND_ROWS)) break; // LIMIT reached
join->do_send_rows= 0; // Calculate FOUND_ROWS() if (reset_limit)
join->unit->lim.set_unlimited(); if (reset_item)
*reset_item= 0;
}
}
} if (err != 0 && err != HA_ERR_END_OF_FILE) goto error;
if ((err= handler->end_scan())) goto error_2; if (!store_data_in_temp_table && join->result->send_eof())
DBUG_RETURN(1); // Don't send error to client
DBUG_RETURN(0);
error:
handler->end_scan();
error_2:
handler->print_error(err, MYF(0));
DBUG_RETURN(-1); // Error not sent to client
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.