Information functions are used to retrieve dynamic database information. This topic describes the information functions that are supported or not supported by PolarDB-X 1.0.
Supported functions
PolarDB-X 1.0 supports the following information functions.
| Function | Description |
|---|---|
| CONNECTION_ID() | Return the connection ID (thread ID) for the connection |
| CURRENT_USER(), CURRENT_USER | The authenticated user name and host name |
| DATABASE() | Return the default (current) database name |
| LAST_INSERT_ID() | Value of the AUTOINCREMENT column for the last INSERT |
| SCHEMA() | Synonym for DATABASE() |
| SESSION_USER() | Synonym for USER() |
| SYSTEM_USER() | Synonym for USER() |
| USER() | The user name and host name provided by the client |
| VERSION() | Return a string that indicates the MySQL server version |
Functions that are not supported
PolarDB-X 1.0 does not support the following information functions that are supported by MySQL 5.7.
| Function | Description |
|---|---|
| BENCHMARK() | Repeatedly execute an expression |
| CHARSET() | Return the character set of the argument |
| COERCIBILITY() | Return the collation coercibility value of the string argument |
| COLLATION() | Return the collation of the string argument |
| FOUND_ROWS() | For a SELECT with a LIMIT clause, the number of rows that would be returned were there no LIMIT clause |
| ROW_COUNT() | The number of rows updated |