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

qlafilter escapes newline with two quotes and a space

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 2.3.6
    • 2.3.9
    • qlafilter
    • 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

              markus makela markus makela
              kadir Kadir
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.