WL#1355: Rollback Savepoint in MySQL Cluster
The real HLS is the same HLS as for WL#1193 Rollback Savepoint implemented in NDB Cluster and in its table handler The interest of this is also to handle rollback of SQL statements to make the integration into MySQL smoother. The path ahead is to make use of the execute flag and savepoints introduced by Jonas and Mikael recently. 1) When receiving a TCKEYREQ/TCINDXREQ a flag on apiConnect will be set that says executeFlagSeen = false. When TCKEYREQ or TCINDXREQ is received with executeFlag set it will be set to true. 2) When sending TCKEYCONF to API and lqhkeyconfrec == lqhkeyreqrec and executeFlagSeen = true then it is ok to abort any index operations that should be aborted. 3) TCROLLBACKREQ gets a new word SavePointId that says which savepoints to rollback. 4) Api keeps track of savepoint ids 5) New method to ask for current savepoint in NDB API. 6) New method to rollback to a savepoint. Probably executeRollback with method called before that says what savepoint to rollback to. 7) abort015Lab in Dbtc checks for flag on each operation to deduce whether it is to be aborted or not. Plus other places in the abort code. 8) Code to set these flags for 2) and 3) 9) Code to restart transaction after rolling back the desired operations. Either TCKEYCONF or TCROLLBACKCONF 10) Code in NDB API to ensure that it is possible to continue the transaction even after the rollback to savepoint 11) Use these new features in ha_ndbcluster.cc when performing a rollback.
Copyright (c) 2000, 2021, Oracle Corporation and/or its affiliates. All rights reserved.