1. 07 Nov, 2019 1 commit
    • Varun Gupta's avatar
      MDEV-20519: Query plan regression with optimizer_use_condition_selectivity > 1 · b1ab2ba5
      Varun Gupta authored
      The issue here is the wrong estimate of the cardinality of a partial join,
      the cardinality is too high because the function table_cond_selectivity()
      returns an absurd number 100 while selectivity cannot be greater than 1.
      
      When accessing table t by outer reference t1.a via index we do not perform any
      range analysis for t. Yet we see TABLE::quick_key_parts[key] and
      TABLE->quick_rows[key] contain a non-zero value though these should have been
      remained untouched and equal to 0.
      
      Thus real cause of the problem is that TABLE::init does not clean the arrays
      TABLE::quick_key_parts[] and TABLE::>quick_rows[].
      It should have done it because the TABLE structure created for any
      instance of a table can be reused for many queries.
      b1ab2ba5
  2. 06 Nov, 2019 2 commits
    • Marko Mäkelä's avatar
      Merge 5.5 into 10.1 · 4e99e67c
      Marko Mäkelä authored
      4e99e67c
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-20987 InnoDB fails to start when fts table has FK relation · 5c3bbbd8
      Thirunarayanan Balathandayuthapani authored
      InnoDB: Assertion failure in file .../dict/dict0dict.cc line ...
      InnoDB: Failing assertion: table->can_be_evicted
      
      This fixes a regression that was caused by the fix of MDEV-20621
      (commit a41d4297).
      MySQL 5.6 (and MariaDB 10.0) introduced eviction of tables from
      the InnoDB data dictionary cache. Tables that are connected to
      FOREIGN KEY constraints or FULLTEXT INDEX are exempt of the eviction.
      With the problematic change, a table that would already be exempt
      from eviction due to FOREIGN KEY would cause the problem if there
      also was a FULLTEXT INDEX defined on it.
      
      dict_load_table(): Only prevent eviction if table->can_be_evicted holds.
      5c3bbbd8
  3. 05 Nov, 2019 2 commits
  4. 04 Nov, 2019 3 commits
    • Vladislav Vaintroub's avatar
      Fix ninja build · dc771113
      Vladislav Vaintroub authored
      Do not rely on existence of CMakeFiles/${target}.dir directory existence
      It is not there for custom targets in Ninja build.
      dc771113
    • Sergei Golubchik's avatar
      MDEV-20971 ASAN heap-use-after-free in list_delete / heap_close · cd156e2c
      Sergei Golubchik authored
      Don't save/restore HP_INFO as it could be changed by a concurrent thread.
      different parts of HP_INFO are protected by different mutexes and
      the mutex that protect most of the HP_INFO does not protect its open_list
      data.
      
      As a bonus, make heap_check_heap() to take const HP_INFO* and not
      make any changes there whatsoever.
      cd156e2c
    • Marko Mäkelä's avatar
      Fix GCC 9.2.1 -Wstringop-truncation · 5164f8c2
      Marko Mäkelä authored
      dict_table_rename_in_cache(): Use strcpy() instead of strncpy(),
      because they are known to be equivalent in this case (the length
      of old_name was already validated).
      
      mariabackup: Invoke strncpy() with one less than the buffer size,
      and explicitly add NUL as the last byte of the buffer.
      5164f8c2
  5. 02 Nov, 2019 1 commit
    • pkubaj's avatar
      Fix build on !glibc/powerpc* · eb56339b
      pkubaj authored
      Do the same that newer branches do and don't include glibc-related headers on non-glibc environment.
      eb56339b
  6. 01 Nov, 2019 2 commits
  7. 31 Oct, 2019 2 commits
  8. 30 Oct, 2019 14 commits
  9. 29 Oct, 2019 4 commits
  10. 28 Oct, 2019 2 commits
  11. 25 Oct, 2019 2 commits
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-20621 FULLTEXT INDEX activity causes InnoDB hang · a41d4297
      Thirunarayanan Balathandayuthapani authored
      - fts_optimize_thread() uses dict_table_t object instead of table id.
      So that it doesn't acquire dict_sys->mutex. It leads to remove the
      hang of dict_sys->mutex between fts_optimize_thread() and other threads.
      
      - in_queue to indicate whether the table is in fts_optimize_queue. It
      is protected by fts_optimize_wq->mutex to avoid any race condition.
      
      - fts_optimize_init() adds the fts table to the fts_optimize_wq
      a41d4297
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-19073 FTS row mismatch after crash recovery · bd22650b
      Thirunarayanan Balathandayuthapani authored
      InnoDB stores synced_doc_id + 1 value in FTS_CONFIG table. But
      while reading the synced doc id from FTS_CONFIG table after restart,
      InnoDB should read synced_doc_id - 1 to get the actual synced
      doc id value.
      bd22650b
  12. 23 Oct, 2019 1 commit
  13. 19 Oct, 2019 3 commits
  14. 15 Oct, 2019 1 commit