Overview
ob_compatibility_control specifies the behavior mode when compatibility conflicts occur between MySQL 5.7 and MySQL 8.0. When you set ob_compatibility_control to MYSQL5.7, it does not affect the use of features in MySQL 8.0 that have no behavioral conflicts. The compatibility mode is specified when creating a tenant and cannot be modified after the tenant is created.
Privilege requirements
Query variables
Both the
systenant and all user tenants can use theSHOW VARIABLESstatement or theinformation_schema.GLOBAL_VARIABLESview to view the values of global system variables.Modify variables
After a tenant is created, the value of this variable cannot be modified using SQL statements.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Enum |
| Default Value | MYSQL5.7 |
| Value range | ["MYSQL5.7","MYSQL8.0"] |
| Effective Scope | Global |
| Modifiable | No. This variable can only be specified when creating a tenant. After the tenant is created, it cannot be modified via theSETorALTER SESSION SETstatements. |
| Read-only | Yes |
Usage instructions
For tenants without this variable, it is set to the default value
MYSQL5.7when upgrading to a version controlled by this variable. For new tenants, you can specify the compatibility mode.For features that were implemented in earlier versions according to MySQL 8.0, if
ob_compatibility_version < 4.2.3, compatibility with MySQL 8.0 is enforced regardless of the value ofob_compatibility_control.
Configuration example
Specify the compatibility mode as MySQL 5.7 when creating the tenant.
obclient> create tenant tenant_m57 zone_list=('z1'),primary_zone='z1',resource_pool_list=('pool1') set ob_compatibility_mode='mysql',ob_compatibility_control='MYSQL5.7',ob_tcp_invited_nodes='%';