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

qlafilter escapes newline with two quotes and a space

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.3.6
    • Fix Version/s: 2.3.9
    • Component/s: qlafilter
    • Labels:
      None

      Description

      The default value for the qlafilter newline replacement is `" "` (two quotes separated by a space). This was not always so and changed in commit 013dfa7. Before 013dfa7 the default behavior was a simple space: ` ` and implemented with relation to ticket MXS-1511.

      But the current default behavior leads to wrong quoted queries.

      # Executed query
      SELECT
        c.id,
        c.name
      FROM
        car AS c
      WHERE
        c.type = 'porsche'
      

      # with default behavior `" "` as newline replacement
      SELECT" "  c.id," "  c.name" "FROM" "  car AS c" "WHERE" "  c.type = 'porsche'
      

      # with previous behavior ` ` as newline replacement
      SELECT   c.id,   c.name FROM   car AS c WHERE   c.type = 'porsche'
      

      This seems to be a bug but can be easily prevented by adding newline_replacement=" ".

      @markus. I also have a question before I implement this config change. What was the intention of the change in 013dfa7, the behavior before that seemed already the right one. Is there some detail I am missing?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              markus makela markus makela
              Reporter:
              kadir Kadir
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration