Note
This variable is available starting with V1.4.
Description
ob_compatibility_mode specifies the compatibility mode of a tenant.
Privilege requirements
Query variables
Global level
systenant and all user tenants can execute theSHOW 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.Session level
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_SESSION_VARIABLEview (Oracle mode) or theinformation_schema.SESSION_VARIABLESview (MySQL mode) to view the value of a session system variable.
Modify variables
You cannot modify this variable by using an SQL statement after the tenant is created.
Privilege requirements
Query variables
Global level
systenants and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (Oracle mode) or theinformation_schema.GLOBAL_VARIABLESview (MySQL mode) to view the values of global system variables.Session level
systenants and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_SESSION_VARIABLEview (Oracle mode) or theinformation_schema.SESSION_VARIABLESview (MySQL mode) to view the values of session system variables.
Modify variables
Global level
systenants can directly modify the values of global system variables.MySQL user tenants must have the
SUPERorALTER SYSTEMprivilege to modify the values of global system variables.Oracle user tenants must have the
ALTER SYSTEMprivilege to modify the values of global system variables.
Session level
systenants and all user tenants can directly modify the values of session system variables of their own tenants.
Attributes
| Attribute | Description |
|---|---|
| Type | Enum |
| Default value | MYSQL |
| Value range |
|
| Scope |
|
| Modifiable | No. You can specify this variable when you create a tenant, but you cannot modify it by using an SQL statement after the tenant is created. |
Examples
The following example shows how to specify the ob_compatibility_mode variable as MYSQL when you execute the CREATE TENANT statement to create a tenant:
obclient> CREATE TENANT IF NOT EXISTS t1 zone_list = ('zone1'), primary_zone = 'zone1', resource_pool_list = ('pool1') SET ob_compatibility_mode = 'MYSQL',lower_case_table_names = 0;