Please answer these questions before submitting your issue. Thanks!
START TRANSACTION;
SELECT 1 FROM dual;
SAVEPOINT save1;
SELECT 1 FROM dual;
ROLLBACK TO SAVEPOINT save1;
COMMIT;
All statements succeed.
mysql> START TRANSACTION;
Query OK, 0 rows affected (0.00 sec)
mysql> SELECT 1 FROM dual;
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.00 sec)
mysql> SAVEPOINT save1;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 9 near "SAVEPOINT save1"
mysql> SELECT 1 FROM dual;
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.00 sec)
mysql> ROLLBACK TO SAVEPOINT save1;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 11 near "TO SAVEPOINT save1"
mysql> COMMIT;
Query OK, 0 rows affected (0.00 sec)
tidb-server -V or run select tidb_version(); on TiDB)?@aesirteam
We don't support savepoint, and it isn't on our roadmap now.
Duplicate with https://github.com/pingcap/tidb/issues/3663
Why don't support? I think it's important to implement Sequelize's Callback transaction
@muyu66 yes, savepoint is a very useful feature, it's not on our short-term roadmap, but we maybe try to implement that in future, and welcome to contribute too~
@lysu https://github.com/pingcap/docs/pull/682 this pull just add the compatibility of savepoint,not the function implementation of savepoint,is it right?
@ihipop , yes , savepoint isn't supported until now..
Good to see if savepoint can be supported
Most helpful comment
@muyu66 yes,
savepointis a very useful feature, it's not on our short-term roadmap, but we maybe try to implement that in future, and welcome to contribute too~