1. 09 Nov, 2020 2 commits
  2. 05 Nov, 2020 2 commits
  3. 31 Oct, 2020 1 commit
  4. 30 Oct, 2020 4 commits
  5. 29 Oct, 2020 10 commits
  6. 28 Oct, 2020 5 commits
  7. 27 Oct, 2020 11 commits
    • Vladislav Vaintroub's avatar
      MDEV-24040 Named pipe permission issue · 3829b408
      Vladislav Vaintroub authored
      Tighten access control - deny FILE_CREATE_PIPE_INSTANCE permission to
      everyone except current user (the one that runs mysqld)
      3829b408
    • Eugene Kosov's avatar
      MDEV-23991 dict_table_stats_lock() has unnecessarily long scope · afc9d00c
      Eugene Kosov authored
      Patch removes dict_index_t::stats_latch. Table/index statistics now
      protected with dict_sys->mutex. That way statistics computation can
      happen in parallel in several threads and dict_sys->mutex will be locked
      only for a short period of time.
      
      This patch is a joint work with Marko Mäkelä
      
      dict_index_t::lock: make mutable which allows to pass const pointer
      when only lock is touched in an object
      
      btr_height_get()
      btr_get_size(): make index argument const for better type safety
      
      btr_estimate_number_of_different_key_vals(): now returns computed values
      instead of setting fields in dict_index_t directly
      
      remove everything related to dict_index_t::stats_latch
      
      dict_stats_index_set_n_diff(): now returns computed values instead
      of setting fields in dict_index_t directly
      
      dict_stats_analyze_index():  now returns computed values instead
      of setting fields in dict_index_t directly
      
      Reviewed by: Marko Mäkelä
      afc9d00c
    • Marko Mäkelä's avatar
      MDEV-16952 Introduce SET GLOBAL innodb_max_purge_lag_wait · 42e1815a
      Marko Mäkelä authored
      Let us introduce a dummy variable innodb_max_purge_lag_wait
      for waiting that the InnoDB history list length is below
      the user-specified limit. Specifically,
      
      SET GLOBAL innodb_max_purge_lag_wait=0;
      
      should wait for all history to be purged. This could be useful
      when upgrading from an older version to MariaDB 10.3 or later,
      to avoid hitting MDEV-15912.
      
      Note: the history cannot be purged if there exist transactions
      that may see old versions.
      
      Reviewed by: Vladislav Vaintroub
      42e1815a
    • Alexey Botchkov's avatar
      MDEV-22524 SIGABRT in safe_mutex_unlock with · 8761571a
      Alexey Botchkov authored
      session_track_system_variables and max_relay_log_size.
      
      lock LOCK_global_system_variables around the get_one_variable() call
      in the Session_sysvars_tracker::store_variable().
      8761571a
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-23693 Failing assertion: my_atomic_load32_explicit(&lock->lock_word,... · bc540b87
      Thirunarayanan Balathandayuthapani authored
      MDEV-23693 Failing assertion: my_atomic_load32_explicit(&lock->lock_word, MY_MEMORY_ORDER_RELAXED) == X_LOCK_DECR
      
      InnoDB frees the block lock during buffer pool shrinking when other
      thread is yet to release the block lock.  While shrinking the
      buffer pool, InnoDB allows the page to be freed unless it is buffer
      fixed. In some cases, InnoDB releases the latch after unfixing the
      block.
      
      Fix:
      ====
      - InnoDB should unfix the block after releases the latch.
      
      - Add more assertion to check buffer fix while accessing the page.
      
      - Introduced block_hint structure to store buf_block_t pointer
      and allow accessing the buf_block_t pointer only by passing a
      functor. It returns original buf_block_t* pointer if it is valid
      or nullptr if the pointer become stale.
      
      - Replace buf_block_is_uncompressed() with
      buf_pool_t::is_block_pointer()
      
      This change is motivated by a change in mysql-5.7.32:
      mysql/mysql-server@46e60de444a8fbd876cc6778a7e64a1d3426a48d
      Bug #31036301 ASSERTION FAILURE: SYNC0RW.IC:429:LOCK->LOCK_WORD
      bc540b87
    • mkaruza's avatar
      MDEV-22707: galera got stuck after flush tables · 6a614d69
      mkaruza authored
      Deadlock is possible between applier thread and local committing thread with active FLUSH TABLE.
      Applier thread should skip table share checks and locks when opening table.
      Reviewed-by: default avatarJan Lindström <jan.lindstrom@mariadb.com>
      6a614d69
    • Sergei Golubchik's avatar
      test case for BUG#31650096 · d03ea827
      Sergei Golubchik authored
      d03ea827
    • Sergei Golubchik's avatar
      cleanup: have_static_innodb.inc · a7d5e85c
      Sergei Golubchik authored
      and remove unused files
      a7d5e85c
    • Karthik Kamath's avatar
      BUG#31650096: MYSQL SERVER HEAP-USE-AFTER-FREE IN TRANS_SAVEPOINT · 1269fd42
      Karthik Kamath authored
      ANALYSIS:
      =========
      During Bootstrap, while executing the statements from sql
      file passed to the init-file server option, transaction
      mem_root was being freed for every statement. This creates
      an issue with multi statement transactions especially when a
      statement in the transaction has to access the memory used
      by the previous statement in the transaction.
      
      FIX:
      ====
      Transaction mem_root is freed whenever a transaction is
      committed or rolled-back. Hence explicitly freeing it is not
      necessary in the bootstrap implementation.
      
      Change-Id: I40f71d49781bf7ad32d474bb176bd6060c9377dc
      1269fd42
    • Sergei Golubchik's avatar
      Bug#31304432 "INSUFFICIENT PRIVILEGE CHECK BY LOCK TABLES" · 0c3723e1
      Sergei Golubchik authored
      `LOCK TABLES view_name` should require
      * invoker to have SELECT and LOCK TABLES privileges on the view
      * either invoker or definer (only if sql security definer) to
        have SELECT and LOCK TABLES privileges on the used tables/views.
      0c3723e1
    • Sergei Golubchik's avatar
      cleanup: PRIV_LOCK_TABLES (10.5 style) · 320a73f6
      Sergei Golubchik authored
      320a73f6
  8. 26 Oct, 2020 4 commits
    • Vicențiu Ciorbaru's avatar
      MDEV-14945 possible buffer overflow in stack resolver · 85843491
      Vicențiu Ciorbaru authored
      According to https://stackoverflow.com/questions/22827510/how-to-avoid-bad-fd-set-buffer-overflow-crash
      it seems that using select instead of poll can cause additional memory
      allocations. As we are in a crashed state, we must prevent allocating
      any memory (if possible). Thus, switch select call to poll.
      
      Also move some bigger datastructures to global space. The code is not
      run in a multithreaded context so best we don't use up stack space
      if it's not needed.
      85843491
    • Sachin Agarwal's avatar
      Bug #31228694 FTS QUERY WITH LIMIT HIT AN ASSERT · 1ff8588c
      Sachin Agarwal authored
      Problem:
      1. The server terminates abnormally when phrase search doesn't
      filter out doc_ids correctly. This problem has been fixed in bug
      2. Wrong query result: It's a regression from the bug #22709692 fix.
      This fix optimize full-text search query with limit clause.
      when FTS expression involves only union operation, we fetch only
      number of doc_ids specified with the limit clause.
      Fulltext phrase search is not an union operation and we consider
      phrase search with plugin parser a union operation.
      In phrase search with limit clause, we fetch limited doc_ids for
      each token and if any of the selected doc_id does not contain all
      tokens in correct order then we do not include that row_id in the
      result set.
      Therefore phrase search gets fewer number of rows than the qualified
      rows exist in the table.
      
      Fix:
      Added a condition that phrase search with plugin parser is not a
      union operation.
      
      RB: 24925
      Reviewed by : Annamalai Gurusami <annamalai.gurusami@oracle.com>
      
      This is a cherry-pick of
      mysql/mysql-server@5549920b7a33ef33034461d973a9ecb17ce49799
      without a test case, because the test case depends on an n-gram
      tokenizer that will be missing from MariaDB until MDEV-10267 is added.
      1ff8588c
    • Sachin Agarwal's avatar
      Bug #30933728 INNODB FTS PHRASE SEARCH HIT AN ASSERT · e391417f
      Sachin Agarwal authored
      Problem:
      In Full-text phrase search, we filter out row that do not contain
      all the tokens in the phrase.
      If we do not filter out doc_id that doesn't appear in all the
      token's doc_id lists then we hit an assert.
      
      Fix:
      if any of the token has last doc_id equal to ith doc_id of the first
      token doc_id list then filter out rest of the higher doc_ids.
      
      RB: 24909
      Reviewed by : Annamalai Gurusami <annamalai.gurusami@oracle.com>
      
      This is a cherry-pick of
      mysql/mysql-server@5aa075277dfe84a17a0331c57a6fe9b91dafb4cf
      but without a test case, because the test case depends on an n-gram
      tokenizer that will be missing from MariaDB until MDEV-10267 is added.
      e391417f
    • Oleksandr Byelkin's avatar
  9. 25 Oct, 2020 1 commit