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

[PATCH] Sys_query_cache_limit initialization depends on initialization in other source files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.0.2, 5.5.31
    • Fix Version/s: 10.0.4, 5.5.33
    • Component/s: None
    • Labels:
      None

      Description

      Sys_query_cache_limit variable has query_cache.query_cache_limit as a place to write its value to. But it's a member of a class that has constructor and so initialization of Sys_query_cache_limit (which assigns default value to the variable) is dependent on initialization of query_cache to happen earlier. As these variables are in different source files order of initialization between them is not defined.

      The attached patch fixes Sys_query_cache_limit to point to global variable instead of class member.

      Detected by new feature of AddressSanitizer – check_initialization_order.

        Attachments

          Activity

            People

            Assignee:
            sanja Oleksandr Byelkin
            Reporter:
            pivanof Pavel Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration