Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-8450

[PATCH] Wrong macro expansion in Query_cache::send_result_to_client()

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.0.20, 10.1.5
    • 10.0.22, 10.1.7
    • OTHER
    • None

    Description

      Query_cache::send_result_to_client() has a statement here https://github.com/MariaDB/server/blob/10.1/sql/sql_cache.cc#L2141 that looks like the following:

      thd->query_plan_flags= (thd->query_plan_flags & ~QPLAN_QC_NO) | QPLAN_QC;

      Given that QPLAN_QC_NO is defined as 1 << 6 (without parenthesis) in https://github.com/MariaDB/server/blob/10.1/sql/log_slow.h, the expression expands into something that is apparently not wanted.

      All macro definitions in sql/log_slow.h should be put in parenthesis.

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            pivanof Pavel Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.