Name
client_attr — returns a varchar containing the requested information from the connection
Synopsis
varchar
client_attr
(
|
in
attr
varchar
); |
Parameters
attr
can by one of the following:
- client_protocol - returns connection protocol (HTTP/1.0, HTTP/1.1, SQL -- SQL corresponds to ODBC, JDBC, .net, OLEDB).
- client_ip - returns the IP where the invoking connection originates. 127.0.0.1 for unix domain socket or internal scheduled task, otherwise the ip of the http or sql client.
- accepting_ip - returns the local listener through which the call came. If unix domain socket or internal scheduled operation, this is 127.0.0.1
- client_application - returns the application name as sent by the driver. Empty string if unknown or internal.
- client_ssl - returns one if SSL encrypted connection either for SQL or HTTPS. False if internal or unix domain socket.
- client_certificate - If certificate based login, returns the certificate, null otherwise.
- transaction_log - 0 if the transaction log is off (turned on/off by log_enable ()); 1 if on (default) .
Errors
Table 24.9. Errors signalled by client_attr
| SQLState | Error Code | Error Text |
|---|---|---|
| 22005 | SR401 | Server address not known. |
| 22005 | SR402 | Cannot allocate temp space. SSL error : xxx |
| 22005 | SR403 | xxx is not valid client_attr option. |