Merge pull request #70418 from Blargian/docs_connectionId

[Docs] update `connectionId` alias
This commit is contained in:
Robert Schulze 2024-10-09 02:14:41 +00:00 committed by GitHub
commit eefe70472e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3953,13 +3953,15 @@ Retrieves the connection ID of the client that submitted the current query and r
connectionId()
```
Alias: `connection_id`.
**Parameters**
None.
**Returned value**
Returns an integer of type UInt64.
The current connection ID. [UInt64](../data-types/int-uint.md).
**Implementation details**
@ -3977,40 +3979,6 @@ SELECT connectionId();
0
```
## connection_id
An alias of `connectionId`. Retrieves the connection ID of the client that submitted the current query and returns it as a UInt64 integer.
**Syntax**
```sql
connection_id()
```
**Parameters**
None.
**Returned value**
Returns an integer of type UInt64.
**Implementation details**
This function is most useful in debugging scenarios or for internal purposes within the MySQL handler. It was created for compatibility with [MySQL's `CONNECTION_ID` function](https://dev.mysql.com/doc/refman/8.0/en/information-functions.html#function_connection-id) It is not typically used in production queries.
**Example**
Query:
```sql
SELECT connection_id();
```
```response
0
```
## getClientHTTPHeader
Get the value of an HTTP header.