1. 24 Nov, 2021 2 commits
    • Marko Mäkelä's avatar
      PFS_events_statements cleanup: Use offsetof · 6b2b5108
      Marko Mäkelä authored
      The macro my_offsetof() performs pointer arithmetics that may be
      undefined behavior. As reported in MDEV-26272, it may cause
      clang -fsanitize=undefined to generate invalid memory references.
      
      struct PFS_events_statements: Convert to std::is_standard_layout
      by encapsulating the standard-layout struct PFS_events instead of
      deriving from it, so that the standard macro offsetof() can be used.
      
      PFS_events_statements::copy(): Renamed from copy_events_statements().
      A cast to void* is now needed in memcpy() to avoid GCC -Wclass-memaccess
      "writing to an object ... leaves 64 bytes unchanged".
      6b2b5108
    • Daniel Black's avatar
      Debian: comment default config · 8d398710
      Daniel Black authored
      There's no need for Debian to set config items to their
      default. Left commented user, datadir and tmpdir as
      these may want to be changed. lc-messages and skip-external-locks
      are so infrequently set even listing them looks overly verbose.
      
      socket left uncommented in [client-server] as various client
      implementations may have different defaults compiled in.
      8d398710
  2. 17 Nov, 2021 6 commits
    • Marko Mäkelä's avatar
      Merge 10.4 into 10.5 · 5489ce0a
      Marko Mäkelä authored
      5489ce0a
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · 70e788b1
      Marko Mäkelä authored
      70e788b1
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · 9962cda5
      Marko Mäkelä authored
      9962cda5
    • Marko Mäkelä's avatar
      MDEV-23805 fixup: Adjsut the MDEV-16131 and MDEV-24730 tests · 878f7e38
      Marko Mäkelä authored
      MDEV-23805 simplified the treatment of empty tables during ALTER TABLE,
      which could prevent the scenarios that were previously reported and
      fixed as MDEV-16131 and MDEV-24730.
      
      With the MDEV-23805 fix, the statement
      SET DEBUG_SYNC = 'now WAIT_FOR copied';
      could occasionally time out, depending on timing.
      Apparently, there was a race condition where purge could resume
      (and empty the table) before ALTER TABLE got the chance to execute.
      We must prevent the purge of history from running before
      ALTER TABLE has started executing.
      878f7e38
    • Eugene Kosov's avatar
      MDEV-26747 improve corruption check for encrypted tables on ALTER IMPORT · ed0a224b
      Eugene Kosov authored
      fil_space_decrypt(): change signature to return status via dberr_t only.
      Also replace impossible condition with an assertion and prove it via
      test cases.
      ed0a224b
    • Igor Babaev's avatar
      MDEV-26825 Bogus error for query with two usage of CTE referring another CTE · 8f24f5fe
      Igor Babaev authored
        This bug affected queries with two or more references to a CTE referring
      another CTE if the definition of the latter contained an invocation of
      a stored function that used a base table. The bug could lead to a bogus
      error message or to an assertion failure.
        For any non-first reference to CTE cte1 With_element::clone_parsed_spec()
      is called that parses the specification of cte1 to construct the unit
      structure for this usage of cte1. If cte1 refers to another CTE cte2
      outside of the specification of cte1 then With_element::clone_parsed_spec()
      has to be called for cte2 as well. This call is made by the function
      LEX::resolve_references_to_cte() within the invocation of the function
      With_element::clone_parsed_spec() for cte1.
        When the specification of a CTE is parsed all table references encountered
      in it must be added to the global list of table references for the query.
      As the specification for the non-first usage of a CTE is parsed at a
      recursive call of the parser the function With_element::clone_parsed_spec()
      invoked at this recursive call should takes care of appending the list of
      table references encountered in the specification of this CTE cte1 to the
      list of table references created for the query. And it should do it after
      the call of LEX::resolve_references_to_cte() that resolves references to
      CTEs defined outside of the specification of cte1 because this call may
      invoke the parser again for specifications of other CTEs and  the table
      references from their specifications must ultimately appear in the global
      list of table references of the query.
        The code of With_element::clone_parsed_spec() misplaced the call of
      LEX::resolve_references_to_cte(). As a result LEX::query_tables_last used
      for the query that was supposed to point to the field 'next_global' of the
      last element in the global list of table references actually pointed to
      'next_global' of the previous element.
        The above inconsistency certainly caused serious problems when table
      references used in the stored functions invoked in cloned specifications
      of CTEs were added to the global list of table references.
      8f24f5fe
  3. 16 Nov, 2021 6 commits
  4. 13 Nov, 2021 1 commit
  5. 12 Nov, 2021 1 commit
  6. 11 Nov, 2021 5 commits
  7. 10 Nov, 2021 1 commit
  8. 09 Nov, 2021 18 commits