-
unknown authored
Port the Facebook patch for releasing InnoDB row locks early to the MWL#116 framework. A new --innodb-release-locks-early option (off by default) enables a prepare_ordered() handlerton method which will release row locks and commit a transaction to memory immediately after successful prepare. If the server subsequently tries to rollback (ie. due to binlog error), crashes the server to prevent corrupting the InnoDB state. mysql-test/r/innodb_release_row_locks_early.result: Test case. mysql-test/t/innodb_release_row_locks_early-master.opt: Test case. mysql-test/t/innodb_release_row_locks_early.test: Test case. sql/log.cc: Add DEBUG_SYNC points for testing. storage/xtradb/handler/ha_innodb.cc: Release locks during prepare phase if --innodb-release-locks-early. Crash the server if we are asked to rollback after releasing locks and committing the transaction to memory. storage/xtradb/include/srv0srv.h: Add variable for --innodb-release-locks-early option. storage/xtradb/include/trx0sys.ic: If --innodb-release-locks-early, treat a transaction as committed to memory as soon as it enters the TRX_PREPARED state. storage/xtradb/srv/srv0srv.c: Add variable for --innodb-release-locks-early option.
d4fa9ef0