pingcap / tidb

TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/
https://pingcap.com
Apache License 2.0
36.92k stars 5.81k forks source link

support mysql8.0 create table with start transaction feature #52477

Open lyonzhi opened 5 months ago

lyonzhi commented 5 months ago

MySQL introduced create table with start transaction in MySQL 8.0.21. But tidb's parser dose not support this feature. Would you please support this feature? MySQL Ducument is below: https://dev.mysql.com/doc/refman/8.0/en/create-table.html

dveeden commented 5 months ago

In MySQL 8.3.0:

CREATE TABLE t (id SERIAL) START TRANSACTION;

However https://dev.mysql.com/doc/refman/8.0/en/create-table.html says: "This is an internal-use table option. It was introduced in MySQL 8.0.21 to ...". So this probably shouldn't be used by end-users. Maybe there is a compatibility issue here with DM? Or is there some other reason for wanting this?