[MXS-4901] Turning on log_info causes parsing related errors and warnings Created: 2023-12-15  Updated: 2024-01-02  Resolved: 2023-12-18

Status: Closed
Project: MariaDB MaxScale
Component/s: qc_sqlite
Affects Version/s: 23.08.4
Fix Version/s: 23.08.5

Type: Bug Priority: Major
Reporter: markus makela Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None

Sprint: MXS-SPRINT-198

 Description   

When log_info is enabled, the parsing of queries is done unconditionally on all routed packets which causes errors to be reported about the lack of SQL in the packets. One example of this is the COM_QUIT packet which is sent when the client closes the connection:

2023-12-15 11:28:53   info   : (2) [readconnroute] (Read-Connection-Router); Routed to 'server1': cmd: (0x03) COM_QUERY, plen: 13, type: sql::TYPE_READ, stmt: select 1 
2023-12-15 11:28:53   info   : (2) [readconnroute] (Read-Connection-Router); Reply complete from 'server1': Resultset: 1 rows in 57B
2023-12-15 11:28:53   warning: (2) [pp_sqlite] (Read-Connection-Router); The provided buffer does not contain SQL.
2023-12-15 11:28:53   error  : (2) [pp_sqlite] (Read-Connection-Router); The query could not be parsed. Either memory could not be allocated or there was no SQL to parse.
2023-12-15 11:28:53   info   : (2) [readconnroute] (Read-Connection-Router); Routed to 'server1': cmd: (0x01) COM_QUIT, plen: 5, type: N/A, stmt:  
2023-12-15 11:28:53   info   : (2) Stopped Read-Connection-Router client session [2]

The errors logged by the parser are directed at the MaxScale developers and are thus useless for the end user. They should be removed so that an error is only logged if the parser is unable to allocate memory for the parsing information.


Generated at Thu Feb 08 04:31:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.