1. 24 Jan, 2019 2 commits
  2. 23 Jan, 2019 3 commits
    • Andrei Elkin's avatar
      MDEV-17803 Row-based event is not applied when table map id is greater · cce2b45c
      Andrei Elkin authored
                 32 bit int
      
      Row-based slave applier could not parse correctly the table id when
      the value exceeded the max of 32 bit unsigned int.
      The reason turns out in that the being parsed value placeholder
      was sized as 4 bytes.
      
      The type is fixed to ulonglong.
      
      Additionally the patch works around Rows_log_event::m_table_id 4 bytes
      size on 32 bits platforms. In case of last_table_id value overflows
      the 4 byte max, there won't be the zero value for m_table_id generated
      and the first wrapped-around value is one, this is thanks to excluding
      UINT_MAX32 + 1 from TABLE_SHARE::table_map_id.
      cce2b45c
    • 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
  3. 21 Jan, 2019 1 commit
  4. 18 Jan, 2019 1 commit
    • 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
  5. 16 Jan, 2019 2 commits
  6. 15 Jan, 2019 3 commits
  7. 14 Jan, 2019 2 commits
  8. 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
  9. 02 Jan, 2019 4 commits
  10. 29 Dec, 2018 1 commit
    • Eugene Kosov's avatar
      MDEV-18041 Database corruption after renaming a prefix-indexed column · 802ce967
      Eugene Kosov authored
      This is a regression after MDEV-13671.
      
      The bug is related to key part prefix lengths wich are stored in SYS_FIELDS.
      Storage format is not obvious and was handled incorrectly which led to data
      dictionary corruption.
      
      SYS_FIELDS.POS actually contains prefix length too in case if any key part
      has prefix length.
      
      innobase_rename_column_try(): fixed prefixes handling
      
      Tests for prefixed indexes added too.
      
      Closes #1063
      802ce967
  11. 28 Dec, 2018 1 commit
    • Marko Mäkelä's avatar
      row_drop_table_for_mysql(): Correct a parameter to innobase_format_name() · b74eb5a5
      Marko Mäkelä authored
      This fixes a regression that was introduced in MySQL 5.6.6
      in an error handling code path, in the following change:
      
      commit 024f363d6b5f09b20d1bba411af55be95c7398d3
      Author: kevin.lewis@oracle.com <>
      Date:   Fri Jun 15 09:01:42 2012 -0500
      
          Bug #14169459 INNODB; DROP TABLE DOES NOT DELETE THE IBD FILE
          FOR A TEMPORARY TABLE.
      b74eb5a5
  12. 20 Dec, 2018 1 commit
  13. 19 Dec, 2018 3 commits
  14. 18 Dec, 2018 1 commit
  15. 17 Dec, 2018 1 commit
  16. 16 Dec, 2018 1 commit
  17. 13 Dec, 2018 6 commits
  18. 12 Dec, 2018 2 commits
    • Sergei Golubchik's avatar
      Merge branch '5.5' into 10.0 · b58f2872
      Sergei Golubchik authored
      b58f2872
    • Jiaye Wu's avatar
      Fix UNICODE issue of dlerror · 9eadef01
      Jiaye Wu authored
      Current implementation is conflicting. If UNICODE is defined, FormatMessage() will be FormatMessageW(), and variable win_errormsg with type char can not be passed to it, which should be changed to TCHAR instead. Since we don't use UNICODE here, we can use FormatMessageA() directly to avoid conversion error.
      ```
      my_global.h(1092): error C2664: 'DWORD FormatMessageW(D
      WORD,LPCVOID,DWORD,DWORD,LPWSTR,DWORD,va_list *)' : cannot convert argument 5 from 'char [2048]' to 'LPWSTR'
      ```
      9eadef01
  19. 11 Dec, 2018 1 commit
  20. 07 Dec, 2018 2 commits
  21. 06 Dec, 2018 1 commit
    • Sergei Golubchik's avatar
      MDEV-17898 FLUSH PRIVILEGES crashes server with segfault · daca7e70
      Sergei Golubchik authored
      merge_role_db_privileges() was remembering pointers into Dynamic_array
      acl_dbs, and later was using them, while pushing more elements into the
      array. But pushing can cause realloc, and it can invalidate all pointers.
      
      Fix: remember and use indexes of elements, not pointers.
      daca7e70