The MySQL mode of OceanBase Database 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.
| RAND | BENCHMARK | UNIX_TIMESTAMP | NOW |
| charset | Collation | NAME_CONST | - |
GIS system functions
The following geographic information system (GIS) system functions are exclusive in OceanBase Database, and are prohibited in function-based indexes.
| ST_COVERS | ST_DWITHIN | PRIV_ST_BESTSRID | PRIV_ST_POINT |
| PRIV_ST_ASEWKT | PRIV_ST_BUFFER | PRIV_ST_SETSRID | PRIV_ST_ASEWKB |
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.
| REGEXP_REPLACE | REGEXP_SUBSTR | REGEXP_INSTR | REGEXP_LIKE |
| TIME_TO_USEC | USEC_TO_TIME | SLEEP | STATEMENT_DIGEST |
| STATEMENT_DIGEST_TEXT | NAME_CONST | DES_DECRYPT | DES_ENCRYPT |
| RAND | UUID_SHORT | BENCHMARK | RANDOM_BYTES |
| ENCRYPT | UTC_TIMESTAMP | CURRENT_TIMESTAMP | CURRENT_TIME |
| CURRENT_DATE | UNIX_TIMESTAMP | DATABASE | CURRENT_USER |
| VERSION | CONNECTION_ID | HOST_IP | RPC_PORT |
| MYSQL_PORT | ROW_COUNT | IS_SERVING_TENANT | LAST_EXECUTION_ID |
| LAST_TRACE_ID | UUID | SYSDATE | LOCALTIMESTAMP |
| OB_VERSION | ICU_VERSION | CURRENT_USER_PRIV | UTC_TIME |
| UTC_DATE | AES_ENCRYPT | AES_DECRYPT | ST_GEOMFROMWKB |
| ST_GEOMETRYFROMWKB | ST_SRID | ST_GEOMETRYFROMTEXT | ST_GEOMFROMTEXT |
| FOUND_ROWS | LAST_INSERT_ID | SYS_PRIVILEGE_CHECK | FROM_UNIX_TIME |
| EXTRACT | USER | VALIDATE_PASSWORD_STRENGTH | CHARSET |
| COLLATION | COERCIBILITY | DEFAULT | LNNVL |
| VALUES | DES_HEX_STR | WEIGHT_STRING | DUMP |