Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-4551

qlafilter with options=extended does not log query nor date

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 6.4.5, 22.08.4
    • 6.4.7
    • qlafilter
    • None
    • Linux Debian 11 bullseye, Ubuntu 22
    • MXS-SPRINT-180, MXS-SPRINT-181

    Description

      When using qlafilter with the following conf :

       
      [log_query]
      type=filter
      module=qlafilter
      filebase=/var/log/maxscale/query
      match=/.*/
      separator=";"
      newline_replacement=" NL "
      options=ignorecase,extended
      log_type=unified
      log_data=date,service,default_db,user,query,total_reply_time,num_rows,error_msg
      flush=true
      

      the following sample output is written to /var/log/maxscale/query.unified :

      dns_service;;user_pdns2@::ffff:192.168.119.35;;pdnsfbx;-2147483648;3;
      dns_service;;user_pdns2@::ffff:192.168.119.35;;pdnsfbx;-2147483648;6;
      dns_service;;user_pdns2@::ffff:192.168.119.35;;pdnsfbx;-2147483648;4;
      dns_service;;user_pdns2@::ffff:192.168.119.35;;pdnsfbx;-2147483648;3;
      dns_service;;user_pdns2@::ffff:192.168.119.35;;pdnsfbx;-2147483648;6;
      dns_service;;user_pdns2@::ffff:192.168.119.35;;pdnsfbx;-2147483648;10;
      dns_service;;user_pdns2@::ffff:192.168.119.35;;pdnsfbx;-2147483648;2;
      dns_service;;user_pdns2@::ffff:192.168.119.35;;pdnsfbx;-2147483648;3;
      
      

      Please not that query and date are replaced by an empty string, and total_reply_time is wrong (-2^31).

      After removing options=extended, everything is fine :

       
      dns_service;2023-03-08 13:52:11;user_pdns2@::ffff:192.168.119.35;show databases;pdnsfbx;1;3;
      dns_service;2023-03-08 13:52:11;user_pdns2@::ffff:192.168.119.35;show tables;pdnsfbx;0;6;
      dns_service;2023-03-08 13:52:11;user_pdns2@::ffff:192.168.119.35;show tables;pdnsfbx;14;4;
      dns_service;2023-03-08 13:52:11;user_pdns2@::ffff:192.168.119.35;show tables;pdnsfbx;27;3;
      dns_service;2023-03-08 13:52:11;user_pdns2@::ffff:192.168.119.35;show tables;pdnsfbx;40;6;
      dns_service;2023-03-08 13:52:11;user_pdns2@::ffff:192.168.119.35;show tables;pdnsfbx;53;10;
      dns_service;2023-03-08 13:52:11;user_pdns2@::ffff:192.168.119.35;show tables;pdnsfbx;66;2;
      dns_service;2023-03-08 13:52:11;user_pdns2@::ffff:192.168.119.35;show tables;pdnsfbx;79;3;
      
      

      Tested with Maxscale 6.4.5 and 22.04 installed from official repo on Ubuntu 22.04.02 and Debian 11
      (amd64).

      "Extended" is not what i was thinking (using PCRE instead of regular Posix regexp) so this is not important for our setup, but maybe this can be useful for somebody

      Thanks anyway.

      Attachments

        Issue Links

          Activity

            People

              markus makela markus makela
              athivillon Alain Thivillon
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.