Comment 2 for bug 660779

Revision history for this message
Joe Daly (skinny.moey) wrote :

the error is thrown in dispatch_command()

  switch (session->main_da.status())
  {
  case Diagnostics_area::DA_ERROR:
    /* The query failed, send error to log and abort bootstrap. */
    session->client->sendError(session->main_da.sql_errno(),
                               session->main_da.message());

nothing is done to remove the failed statement from the session after this failure. I think a fix for this may be similar to what was done with rollback to a savepoint essentially make a copy of the statement before a new statement is added to it, if it fails reset the statement to the copy that was made. There is no remove last statement function in the GPB api to my knowledge.