1. 23 Jan, 2019 6 commits
    • Sergei Golubchik's avatar
      MDEV-17421: mtr does not restart the server whose parameters were changed · 7886a70e
      Sergei Golubchik authored
      remove tests that rely on specific execution order
      7886a70e
    • Jan Lindström's avatar
      Merge pull request #880 from tempesta-tech/sysprg/MDEV-17421 · 2d098933
      Jan Lindström authored
      MDEV-17421: mtr does not restart the server whose parameters were changed
      2d098933
    • Marko Mäkelä's avatar
      Merge 10.0 into 10.1 · 3b6d2efc
      Marko Mäkelä authored
      3b6d2efc
    • Marko Mäkelä's avatar
      MDEV-17933 slow server status - dict_sys_get_size() · 52d13036
      Marko Mäkelä authored
      dict_sys_get_size(): Replace the time-consuming loop with
      a crude estimate that can be computed without holding any mutex.
      
      Even before dict_sys->size was removed in MDEV-13325,
      not all memory allocations by the InnoDB data dictionary cache
      were being accounted for. One example is foreign key constraints.
      Another example is virtual column metadata, starting with 10.2.
      52d13036
    • Sergei Golubchik's avatar
      Bug#28867993: POSSIBLE ISSUE WITH MYSQL SERVER RESTART · 2a0f1d61
      Sergei Golubchik authored
      on startup innodb is checking whether files "ib_logfileN"
      (for N from 1 to 100) exist, and whether they're readable.
      A non-existent file aborted the scan.
      A directory instead of a file made InnoDB to fail.
      
      Now it treats "directory exists" as "file doesn't exist".
      2a0f1d61
    • Marko Mäkelä's avatar
      MDEV-18349 InnoDB file size changes are not safe when file system crashes · 31d592ba
      Marko Mäkelä authored
      When InnoDB is invoking posix_fallocate() to extend data files, it
      was missing a call to fsync() to update the file system metadata.
      If file system recovery is needed, the file size could be incorrect.
      
      When the setting innodb_flush_method=O_DIRECT_NO_FSYNC
      that was introduced in MariaDB 10.0.11 (and MySQL 5.6) is enabled,
      InnoDB would wrongly skip fsync() after extending files.
      
      Furthermore, the merge commit d8b45b0c
      inadvertently removed XtraDB error checking for posix_fallocate()
      which this fix is restoring.
      
      fil_flush(): Add the parameter bool metadata=false to request that
      fil_buffering_disabled() be ignored.
      
      fil_extend_space_to_desired_size(): Invoke fil_flush() with the
      extra parameter. After successful posix_fallocate(), invoke
      os_file_flush(). Note: The bookkeeping for fil_flush() would not be
      updated the posix_fallocate() code path, so the "redundant"
      fil_flush() should be a no-op.
      31d592ba
  2. 21 Jan, 2019 3 commits
  3. 18 Jan, 2019 2 commits
    • Varun Gupta's avatar
      MDEV-14440: Assertion `inited==RND' failed in handler::ha_rnd_end · 2061e00c
      Varun Gupta authored
      In the function QUICK_RANGE_SELECT::init_ror_merged_scan we create a seperate handler if the handler in
      head->file cannot be reused. The flag free_file tells us if we have a seperate handler or not.
      There are cases where you might create a handler and then there might be a failure(running ALTER)
      and then we have to revert the handler back to the original one. The code does that
      but it does not reset the flag 'free_file' in this case.
      Also backported f2c41807.
      2061e00c
    • Marko Mäkelä's avatar
      MDEV-18237 InnoDB: Unable to drop FTS index aux table and further errors (possibly bogus) · 1d72db45
      Marko Mäkelä authored
      row_drop_table_for_mysql(): Fix a regression introduced in MDEV-16515.
      Similar to the follow-up fixes MDEV-16647 and MDEV-17470, we must make
      the internal tables of FULLTEXT INDEX immune to kills, to avoid noise
      and resource leakage on DROP TABLE or ALTER TABLE. (Orphan internal tables
      would be dropped at the next InnoDB startup only.)
      1d72db45
  4. 17 Jan, 2019 4 commits
  5. 16 Jan, 2019 3 commits
  6. 15 Jan, 2019 5 commits
  7. 14 Jan, 2019 3 commits
  8. 07 Jan, 2019 1 commit
    • Jan Lindström's avatar
      MDEV-15740: InnoDB does not flush redo log when it shoul · 1d56d875
      Jan Lindström authored
      During database recovery, a transaction with wsrep XID is
      recovered from InnoDB in prepared state. However, when the
      transaction is looked up with trx_get_trx_by_xid() in
      innobase_commit_by_xid(), trx->xid gets cleared in
      trx_get_trx_by_xid_low() and commit time serialization history
      write does not update the wsrep XID in trx sys header for
      that recovered trx. As a result the transaction gets
      committed during recovery but the wsrep position does not
      get updated appropriately.
      
      As a fix, we preserve trx->xid for Galera over transaction
      commit in recovery phase.
      
      Fix authored by: Teemu Ollakka (GaleraCluster) and Marko Mäkelä.
      
      	modified:   mysql-test/suite/galera/disabled.def
      	modified:   mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result
      	modified:   mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result
      	modified:   mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.test
      	modified:   mysql-test/suite/galera/t/galera_gcache_recover_manytrx.test
      	modified:   storage/innobase/trx/trx0trx.cc
      	modified:   storage/xtradb/trx/trx0trx.cc
      1d56d875
  9. 06 Jan, 2019 1 commit
    • Varun Gupta's avatar
      MDEV-13784: query causes seg fault · d0d0f88f
      Varun Gupta authored
      When we have a nested subquery then a subquery that was a dependent subquery
      may change to an independent one when we optimizer the inner subqueries.
      This is handled st_select_lex::optimize_unflattened_subqueries.
      Currently a subquery that was changed to independent from dependent after optimization
      phase incorrectly shows dependent in the output of Explain, this happens because we
      don't update used_tables for the WHERE clause, ON clause, etc after the optimization phase.
      d0d0f88f
  10. 03 Jan, 2019 2 commits
    • Marko Mäkelä's avatar
      MDEV-18129 Backup fails for encrypted tables: mariabackup: Database page... · 7158edcb
      Marko Mäkelä authored
      MDEV-18129 Backup fails for encrypted tables: mariabackup: Database page corruption detected at page 1
      
      If an encrypted table is created during backup, then
      mariabackup --backup could wrongly fail.
      
      This caused a failure of the test mariabackup.huge_lsn once on buildbot.
      
      This is due to the way how InnoDB creates .ibd files. It would first
      write a dummy page 0 with no encryption information. Due to this,
      xb_fil_cur_open() could wrongly interpret that the table is not encrypted.
      Subsequently, page_is_corrupted() would compare the computed page
      checksum to the wrong checksum. (There are both "before" and "after"
      checksums for encrypted pages.)
      
      To work around this problem, we introduce a Boolean option
      --backup-encrypted that is enabled by default. With this option,
      Mariabackup will assume that a nonzero key_version implies that the
      page is encrypted. We need this option in order to be able to copy
      encrypted tables from MariaDB 10.1 or 10.2, because unencrypted pages
      that were originally created before MySQL 5.1.48 could contain nonzero
      garbage in the fields that were repurposed for encryption.
      
      Later, MDEV-18128 would clean up the way how .ibd files are created,
      to remove the need for this option.
      
      page_is_corrupted(): Add missing const qualifiers, and do not check
      space->crypt_data unless --skip-backup-encrypted has been specified.
      
      xb_fil_cur_read(): After a failed page read, output a page dump.
      7158edcb
    • Sergei Golubchik's avatar
      Merge branch '10.0' into 10.1 · 3ba3f81a
      Sergei Golubchik authored
      3ba3f81a
  11. 02 Jan, 2019 4 commits
  12. 29 Dec, 2018 5 commits
  13. 28 Dec, 2018 1 commit
    • Eugene Kosov's avatar
      MDEV-17470 Orphan temporary files after interrupted ALTER cause InnoDB:... · c5a5eaa9
      Eugene Kosov authored
      MDEV-17470 Orphan temporary files after interrupted ALTER cause InnoDB: Operating system error number 17 and eventual fatal error 71
      
      Orphan #sql* tables may remain after ALTER TABLE
      was interrupted by timeout or KILL or client disconnect.
      
      This is a regression caused by MDEV-16515.
      
      Similar to temporary tables (MDEV-16647), we had better ignore the
      KILL when dropping the original table in the final part of ALTER TABLE.
      
      Closes #1020
      c5a5eaa9