Note
- This variable is available starting with V4.3.2 in V4.3.x.
- This variable is available starting with V4.2.3 in V4.2.x.
Description
ob_compatibility_version specifies the OceanBase Database version that is compatible with the product behavior changes.
Privilege requirements
Query variables
You can execute the
SHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (Oracle mode) or theinformation_schema.GLOBAL_VARIABLESview (MySQL mode) to view the value of a global system variable in thesystenant and all user tenants.Modify variables
In the
systenant, you can directly modify the value of a global system variable.In a MySQL user tenant, you must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.In an Oracle user tenant, you must have the
ALTER SYSTEMprivilege to modify the value of a global system variable.
Attributes
| Attribute | Description |
|---|---|
| Type | Varchar |
| Default value | 4.2.1.0 |
| Value range | 4.2.3.0 and other OceanBase Database versions that are released |
| Scope | Global |
| Modifiable | Yes. You can execute the SET or ALTER SESSION SET statement to modify the value. |
Usage notes
If you do not explicitly specify the value of this variable when you create a tenant, the value is automatically set to the current
cluster_version.This variable applies only to new product behavior changes. It cannot be used to control existing product behavior changes in versions such as V4.2.2 and V4.2.1. For example, in a V4.2.3.0 cluster, if you set this variable to V4.2.1.0 or V4.2.2.0, the product behavior in both versions is the same.
Examples
Specify the OceanBase Database version that is compatible with the product behavior changes as V4.2.3.0 when you create a tenant.
obclient> create tenant tenant_m57 zone_list=('z1'),primary_zone='z1',resource_pool_list=('pool1') set ob_compatibility_mode='MYSQL',ob_compatibility_version='4.2.3.0',ob_tcp_invited_nodes='%';
set global ob_compatibility_version ='4.3.1.0';
