| 1235 | } |
| 1236 | |
| 1237 | static int log_proxy(const struct connection_info *cn, |
| 1238 | const struct mysql_event_connection *event) |
| 1239 | |
| 1240 | { |
| 1241 | time_t ctime; |
| 1242 | size_t csize; |
| 1243 | char raw_message[MAX_AUDIT_PAYLOAD_LENGTH + TIMESTAMP_OUTPUT_LENGTH]; |
| 1244 | char *message= raw_message + TIMESTAMP_OUTPUT_LENGTH; |
| 1245 | |
| 1246 | (void) time(&ctime); |
| 1247 | csize= log_header(message, MAX_AUDIT_PAYLOAD_LENGTH - 1, |
| 1248 | servhost, servhost_len, |
| 1249 | cn->user, cn->user_length, |
| 1250 | cn->host, cn->host_length, |
| 1251 | cn->ip, cn->ip_length, |
| 1252 | event->thread_id, event->port, |
| 1253 | 0, "PROXY_CONNECT"); |
| 1254 | csize+= my_snprintf(message+csize, MAX_AUDIT_PAYLOAD_LENGTH - 1 - csize, |
| 1255 | ",%.*s,`%.*s`@`%.*s`,%d", cn->db_length, cn->db, |
| 1256 | cn->proxy_length, cn->proxy, |
| 1257 | cn->proxy_host_length, cn->proxy_host, |
| 1258 | event->status); |
| 1259 | message[csize]= '\n'; |
| 1260 | return write_log_and_lock(message, csize + 1, ctime); |
| 1261 | } |
| 1262 | |
| 1263 | |
| 1264 | static int log_connection(const struct connection_info *cn, |
no test coverage detected