Information functions
Information functions return dynamic database information. This topic describes the information functions that are supported and unsupported by PolarDB-X.
Supported functions
The following table describes the information functions that are supported by PolarDB-X.
Function | Description |
---|---|
CONNECTION_ID() | Returns a unique connection ID. |
CURRENT_USER(), CURRENT_USER | Returns the details of the user who calls the function. |
DATABASE() | Returns the name of the current database. |
LAST_INSERT_ID() | Returns a value that is inserted into an auto-increment primary key due to the most recently executed INSERT statement. |
SCHEMA() | Returns the name of the current database. The SCHEMA() function works in the same manner as the DATABASE() function. |
SESSION_USER() | Returns the details of the user who calls the function. The SESSION_USER() function works in the same manner as the USER() function. |
SYSTEM_USER() | Returns the details of the user who calls the function. The SYSTEM_USER() function works in the same manner as the USER() function. |
USER() | Returns the details of the user who calls the function. |
VERSION() | Returns the current version of the database. |
BENCHMARK() | Repeatedly executes an expression. |
CHARSET() | Returns the name of a character set. |
COLLATION() | Returns the collation of a string. |
FOUND_ROWS() | Returns the number of rows in the result set by the last SQL statement. |
ROW_COUNT() | Returns the number of rows that are affected by the last SQL statement. |
Unsupported functions
The following table describes the information functions that are not supported by PolarDB-X. These functions are supported by databases that run the MySQL 5.7 engine.
Function | Description |
---|---|
COERCIBILITY() | Returns the collation coercibility value of a string argument. |