1. 11 May, 2020 2 commits
  2. 08 May, 2020 3 commits
  3. 07 May, 2020 1 commit
    • Marko Mäkelä's avatar
      MDEV-22497 [ERROR] InnoDB: Unable to purge a record · 26aab96e
      Marko Mäkelä authored
      The InnoDB insert buffer was upgraded in MySQL 5.5 into a change
      buffer that also covers delete-mark and delete (purge) operations.
      
      There is an important constraint for delete operations: a B-tree
      leaf page must not become empty unless the entire tree becomes empty,
      consisting of an empty root page. Because change buffer merges only
      occur on a single leaf page at a time, delete operations must not be
      buffered if it is possible that the last record of the page could be
      deleted. (In that case, we would refuse to use the change buffer, and
      if we really delete the last record, we would shrink the index tree.)
      
      The function ibuf_get_volume_buffered_hash() is part of our insurance
      that the page would not become empty. It is supposed to map each
      buffered INSERT or DELETE_MARK record payload into a hash value.
      We will only count each such record as a distinct key if there is no
      hash collision. DELETE operations will always decrement the predicted
      number fo records in the page.
      
      Due to a bug in the function, we would actually compute the hash value
      not only on the record payload, but also on some following bytes,
      in case the record contains NULL values. In MySQL Bug #61104, we had
      some examples of this dating back to 2012. But back then, we failed to
      reproduce the bug, and in commit d84c9557
      we simply demoted the hard assertion to a message printout and a debug
      assertion failure.
      
      ibuf_get_volume_buffered_hash(): Correctly compute the hash value
      of the payload bytes only. Note: we will consider
      ('foo','bar'),(NULL,'foobar'),('foob','ar') to be equal, but this
      is not a problem, because in case of a hash collision, we could
      also consider ('boo','far') to be equal, and underestimate the number
      of records in the page, leading to refusing to buffer a DELETE.
      26aab96e
  4. 06 May, 2020 6 commits
  5. 05 May, 2020 2 commits
  6. 04 May, 2020 4 commits
  7. 30 Apr, 2020 12 commits
  8. 29 Apr, 2020 7 commits
  9. 28 Apr, 2020 3 commits
    • Marko Mäkelä's avatar
      InnoDB 5.6.48 · 713e427b
      Marko Mäkelä authored
      713e427b
    • Marko Mäkelä's avatar
      MDEV-22393 Corruption for SET GLOBAL innodb_ string variables · 70418074
      Marko Mäkelä authored
      Several MYSQL_SYSVAR_STR parameters that employ both a validate
      function callback fail to copy the string for saving the
      validated value. The affected variables include the following:
      
      innodb_ft_aux_table
      innodb_ft_server_stopword_table
      innodb_ft_user_stopword_table
      innodb_buffer_pool_filename
      
      The test case is an enhanced version of
      mysql/mysql-server@0b0c30641fd66336e87394ac28587e40864f8af9
      and the code changes are inspired by their fixes.
      
      We are also importing and adjusting the test innodb_fts.stopword
      to get coverage for the variable innodb_ft_user_stopword_table.
      
      buf_dump(), buf_load(): Protect srv_buf_dump_filename with
      LOCK_global_system_variables.
      
      fts_load_user_stopword(): Minor cleanup
      
      fts_load_stopword(): Remove the parameter global_stopword_table.
      
      innobase_fts_load_stopword(): Protect innodb_server_stopword_table
      against concurrent SET GLOBAL.
      70418074
    • Marko Mäkelä's avatar
      MDEV-22392 Race condition on SET GLOBAL innodb_buffer_pool_evict='uncompressed' · cce1b6e2
      Marko Mäkelä authored
      innodb_buffer_pool_evict_uncompressed(): Restart the loop when
      prev_block might not enjoy mutex protection.
      
      This is based on
      mysql/mysql-server@eccaecac070b6747ecf14d6b9150791f8c3e8f6d
      cce1b6e2