tencent cloud

MySQL Compatibility
Last updated:2026-02-10 10:54:56
MySQL Compatibility
Last updated: 2026-02-10 10:54:56
TDSQL Boundless is highly compatible with the MySQL 8.0 protocol. This allows you to use your existing ecosystem of MySQL tools, such as phpMyAdmin, Navicat, MySQL Workbench, and DBeaver, without modification.

Unsupported Features

DDL operations on the mysql system database
Generated Columns
Events
Tablespaces (icluding Transportable Tablespace)
Resource Groups
Foreign Keys
Partial updates of LOB data types
Multi-valued indexes on JSON data type
Spatial functions, data types, and indexes (GEOMETRY/GIS)
Full-text Indexes and syntax
Descending Indexes
Savepoint
REPAIR TABLE syntax
Exchanging partitions (ALTER TABLE ... EXCHANGE PARTITION)
SKIP LOCKED syntax
XA-related statements return success but do not take effect.
Group Replication
X Protocol

Differences in Behavior from MySQL

Auto-increment Columns

TDSQL Boundless offers two modes for auto-incrementing IDs:
High-Performance Mode (Default): This mode improves performance by caching a batch of auto-increment values on each node. It guarantees that the auto-increment values are globally unique, but not that they are strictly sequential across the instance. The batch size of the cache is controlled by the tdsql_auto_increment_batch_size, with a default value of 100.
MySQL Compatibility Mode: By setting tdsql_auto_increment_batch_size = 1, you can ensure that auto-increment values are both globally unique and strictly sequential.
Warning:
Risk of Duplicate Values: To prevent duplicate AUTO_INCREMENT values, the auto-increment column must be defined as a standalone primary key or unique index. If it is only part of a composite primary key, manually inserted IDs can conflict with system-generated IDs.
Unlike MySQL, the auto-increment column in TDSQL Boundless may contain duplicate values under specific circumstances. When the auto-increment column is not a primary key or unique index (such as when it is only part of a composite primary key), TDSQL Boundless cannot guarantee the uniqueness of its values. This issue occurs when manually inserted auto-increment values conflict with system-generated values. For example, when a test table t1 is created where the auto-increment column id forms a composite primary key with f1:
CREATE TABLE `t1` (
`id` int NOT NULL AUTO_INCREMENT,
`f1` int NOT NULL,
`f2` int DEFAULT NULL,
PRIMARY KEY (`id`,`f1`)
) ENGINE=ROCKSDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3
At this point, perform the operation to write data on node 1, automatically generating data with id = 1:
-- Using system-generated auto-increment.
insert into t1(f1, f2) values(1,1);
On node 2, manually specify id = 1 and perform the write commit:
-- The user manually specified the auto-increment.
insert into t1(id, f1, f2) values(1, 1,1);
This may result in duplicate id values. Therefore, when an auto-increment column is defined, it is recommended to define it as a standalone primary key/unique index.

Storage Engine

TDSQL Boundless only supports creating and using tables with the RocksDB storage engine, and does not allow modification of the table engine. Any ENGINE clause specified in a CREATE TABLE statement will be automatically converted to ENGINE=ROCKSDB.
Note:
The Blackhole engine is an exception and can be used.

Character Sets and Collations

Note:
Starting from version 8.0.29, the official MySQL changed its default character set from UTF8 to UTF8MB4.
TDSQL Boundless retains the older default of utf8mb3 (aliased as utf8). To ensure maximum compatibility and portability, we strongly recommend explicitly defining the character set when creating tables and database connections.
Item
TDSQL Boundless
MySQL (before 8.0.29)
MySQL (8.0.29+)
Default Character Set
UTF8MB3
UTF8MB3
UTF8MB4
Default Collation
UTF8_GENERAL_CI
UTF8_GENERAL_CI
UTF8MB4_0900_AI_CI

SQL Broadcast

TDSQL Boundless provides a /*# broadcast */ SQL hint to broadcast a query to all nodes in the instance. This is useful for commands that are otherwise node-specific. For example,
SET GLOBAL normally only applies to the current node. Use /*# broadcast */ SET GLOBAL to apply it to all nodes to make it take effect globally.
SHOW PROCESSLIST displays the processlist of the currently connected node. Use /*# broadcast */SHOW PROCESSLIST; or SELECT * FROM information_schema.processlist to view processes from all nodes.

Log Output

The general log (general_log) and slow query log (slow_log) can only be written to files. Setting log_output=TABLE is not supported.

DDL Differences

TDSQL Boundless supports more online DDL operations than standard MySQL, including online changes to column types, character sets, and converting between partitioned and non-partitioned tables. However, unlike MySQL, less commonly used DDL operations—such as adding/dropping primary keys, adding a column with an expression as a default value (ADD COLUMN DEFAULT (a+a)), or altering tables with triggers—are not supported online in TDSQL Boundless. If errors occur during such DDL operations, disable Online DDL mode by executing set tdsql_use_online_copy_ddl = 0 before retrying.
For more detailed differences, please refer to the OnlineDDL documentation.
Note:
If errors occur during operations such as adding/dropping primary keys, adding columns with an expression as a default value (ADD COLUMN DEFAULT (a+a)), or modifying tables involving triggers, disable Online DDL mode by executing set tdsql_use_online_copy_ddl = 0 before retrying. Note that disabling Online DDL mode will lock the table and block writes to it during DDL execution.

Other Differences

SHOW VARIABLES; and SHOW GLOBAL STATUS; display the status information of the currently connected node only. When different nodes are connected to, the information displayed may differ.
LOCK TABLE statements do not actually lock tables or block reads/writes. Tools that rely on LOCK TABLE, such as mysqldumper, may not function as expected.

Experimental Features

The following features are considered experimental. Use them only under specific conditions.
Note:
Each experimental feature has its own independent toggle and default value. To enable/disable a feature, connect to your TDSQL Boundless instance and execute the following SQL statement (using tdsql_enable_trigger as an example): SET PERSIST tdsql_enable_trigger=ON;.
Feature Name
Switch
Default Value
Description
Trigger
tdsql_enable_trigger
OFF
Not recommended for production use.
View
tdsql_enable_view
ON
Avoid UPDATE operations on views.
Avoid ALTER on view definitions.
Stored Procedure
tdsql_enable_procedure
ON
Avoid ALTER on procedure definitions.
Function
tdsql_enable_function
ON
Avoid ALTER on function definitions.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback