Note
- For OceanBase Database V4.3.x, this variable was introduced in OceanBase Database V4.3.2.
- For OceanBase Database V4.2.x, this variable was introduced in OceanBase Database V4.2.3.
Description
ob_compatibility_version specifies the compatible OceanBase Database version in the case of normal product behavioral changes.
Limitations
Query the variable
In the
systenant or a user tenant, you can execute theSHOW VARIABLESstatement to query the variable at the global level or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (in Oracle mode) orinformation_schema.GLOBAL_VARIABLESview (in MySQL mode) for the variable at the global level.Modify the variable
In the
systenant, you can directly change the value of the variable at the global level.In a MySQL user tenant, you must have the
SUPERorALTER SYSTEMprivilege to change the value of the variable at the global level.In OceanBase Database V4.2.0 and later V4.x versions, you must have the
ALTER SYSTEMprivilege to change the value of the variable at the global level in an Oracle user tenant.
Attributes
| Attribute | Description |
|---|---|
| Type | Varchar |
| Default value | 4.2.1.0 |
| Value range | 4.2.3.0 and other released OceanBase Database versions |
| Effective scope | Global |
| Modifiable | Yes. You can use the SET or ALTER SESSION SET statement to modify the variable. |
Considerations
If you do not specify this variable when you create a tenant, the value of
cluster_versionis used by default.This variable applies only to product behavioral changes in the future, and cannot control existing behavioral changes in released versions such as V4.2.2 and V4.2.1. For example, when you set this variable to
4.2.1.0or4.2.2.0for a cluster of OceanBase Database V4.2.3.0, product behaviors of the cluster do not change.
Examples
Set the compatible OceanBase Database version in the case of normal product behavioral changes to 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';