Skip to content

Commit

Permalink
MariaRocks port: Make SQL layer allow errors in start_consistent_snap…
Browse files Browse the repository at this point in the history
…shot().

rocksdb.cons_snapshot_read_committed test used to crash.
This happened, because
- MyRocks produces an error when one attempts to do a START TRANSACTION
  WITH CONSISTENT SNAPSHOT with @@tx_isolation=REPEATABLE_READ
- MariaDB's SQL layer didn't assume that errors are possible inside
  hton->start_constistent_snapshot() call.
  • Loading branch information
spetrunia committed Dec 26, 2016
1 parent 8f2d58b commit 4faa9da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sql/sql_parse.cc
Expand Up @@ -5428,7 +5428,9 @@ mysql_execute_command(THD *thd)
(longlong) thd->thread_id);
goto error;
}
my_ok(thd);
/* MyRocks: hton->start_consistent_snapshot call may fail with an error */
if (!thd->is_error())
my_ok(thd);
break;
case SQLCOM_COMMIT:
{
Expand Down

0 comments on commit 4faa9da

Please sign in to comment.