OceanBase Database in MySQL mode imposes limitations on expressions of function-based indexes. This topic lists the system functions that are not supported for function-based indexes.
Nondeterministic system functions
Expressions of the following nondeterministic system functions are prohibited in function-based indexes.
| BENCHMARK | Charset | Collation | NAME_CONST |
| NOW | RAND | UNIX_TIMESTAMP | - |
GIS system functions
The following geographic information system (GIS) system functions are exclusive in OceanBase Database, and are prohibited in function-based indexes.
| PRIV_ST_ASEWKB | PRIV_ST_ASEWKT | PRIV_ST_BESTSRID | PRIV_ST_BUFFER |
| PRIV_ST_POINT | PRIV_ST_SETSRID | ST_COVERS | ST_DWITHIN |
System functions not related to users
System functions not related to users are all prohibited in function-based indexes.
Other system functions
Expressions of the following functions are prohibited in function-based indexes.
| AES_DECRYPT | AES_ENCRYPT | BENCHMARK | CONNECTION_ID |
| CURRENT_DATE | CURRENT_TIME | CURRENT_TIMESTAMP | CURRENT_USER |
| CURRENT_USER_PRIV | DATABASE | DEFAULT | DES_DECRYPT |
| DES_ENCRYPT | DES_HEX_STR | DUMP | ENCRYPT |
| FOUND_ROWS | FROM_UNIXTIME | HOST_IP | ICU_VERSION |
| IS_SERVING_TENANT | LAST_EXECUTION_ID | LAST_INSERT_ID | LAST_TRACE_ID |
| LNNVL | LOCALTIMESTAMP | MYSQL_PORT | NAME_CONST |
| OB_VERSION | RAND | RANDOM_BYTES | REGEXP_INSTR |
| REGEXP_LIKE | REGEXP_REPLACE | REGEXP_SUBSTR | RPC_PORT |
| ROW_COUNT | SLEEP | STATEMENT_DIGEST | STATEMENT_DIGEST_TEXT |
| ST_GEOMFROMTEXT | ST_GEOMFROMWKB | ST_GEOMETRYFROMTEXT | ST_GEOMETRYFROMWKB |
| ST_SRID | SYS_PRIVILEGE_CHECK | SYSDATE | TIME_TO_USEC |
| UNIX_TIMESTAMP | USEC_TO_TIME | UTC_DATE | UTC_TIME |
| UTC_TIMESTAMP | USER | UUID | UUID_SHORT |
| VALIDATE_PASSWORD_STRENGTH | VALUES | VERSION | WEIGHT_STRING |