1. 22 Oct, 2017 5 commits
  2. 20 Oct, 2017 1 commit
  3. 19 Oct, 2017 3 commits
    • Michael Widenius's avatar
      MDEV-14092 NEXTVAL fails on slave · 211f9eea
      Michael Widenius authored
      The problem was that the code in replication didn't distinguish between a
      setval() failing because the stored sequence number was bigger than the
      current (should have been ignored) and a failure from the storage engine.
      211f9eea
    • Alexander Barkov's avatar
      sp_rcontext::sp cleanup · e156db85
      Alexander Barkov authored
      - Renaming sp_rcontext::sp to sp_rcontext:m_sp for consistency
        with other sp_rcontext_members, and for consistency with the
        same purpose member Item_sp_variable::m_sp.
      
      - Passing a "const sp_head*" pointer to sp_rcontext::sp_rcontext()
        and to sp_rcontext::create().
        Initializing sp_rcontext::m_sp right in the constructor
        instead of having a separate initialization after "new sp_rcontext"
        or sp_rcontext::create().
      
      - Adding the "const" qualifier to sp_rcontext::m_sp and Item_sp_variable::m_sp
      e156db85
    • Alexander Barkov's avatar
      Moving a piece of open_and_process_routine() into a new function sp_acquire_routine() · f5e09b5f
      Alexander Barkov authored
      Reason:
      - avoid huge functions
      - sp_acquire_routine() will be reused for Oracle-style packages soon
      f5e09b5f
  4. 18 Oct, 2017 2 commits
  5. 17 Oct, 2017 1 commit
  6. 14 Oct, 2017 2 commits
    • halfspawn's avatar
      MDEV-14013 : sql_mode=EMPTY_STRING_IS_NULL · 75aabd03
      halfspawn authored
      75aabd03
    • Marko Mäkelä's avatar
      MDEV-14055 Assertion `page_rec_is_leaf(rec)' failed in lock_rec_validate_page · ad46ce65
      Marko Mäkelä authored
      This was a false alarm in a debug check that was introduced in
      commit 48192f96 which was a
      10.2 code refactoring in preparation for
      MDEV-11369 (instant ADD COLUMN) in 10.3.2. The code refactoring
      only affected debug builds.
      
      InnoDB B-tree record locks are only supposed to exist on leaf page
      records. An assertion failed, because the debug function lock_validate()
      was invoking lock_rec_block_validate() on a page for which there were
      no locks set in the record lock bitmap. This could happen on a page split.
      Especially when the index size grows from a single page to multiple pages,
      the root page would transform from a leaf node into an internal node,
      and its record lock bitmap would be emptied.
      
      lock_validate(): Skip empty lock bitmaps.
      ad46ce65
  7. 13 Oct, 2017 3 commits
  8. 12 Oct, 2017 1 commit
    • Jan Lindström's avatar
      MDEV-11336: Enable defragmentation on 10.2 when tests pass · a4fa940b
      Jan Lindström authored
      Problem was that we could take page latches on different
      order than wat is entitled with SX-lock. To follow the
      latching order defined in WL#6326, acquire index->lock X-latch.
      This entitles us to acquire page latches in any order for the index.
      
      btr0btr.cc
      	Document latch rules before and after MariaDB 10.2.2
      
      sync0rw.cc
      	Document latch compatibility rules better.
      
      btr_defragment_merge_pages
      	Fix parameter value.
      
      btr_defragment_thread
      	Acquire X-lock to dict_index_t::lock before restoring
      	cursor position and continuing defragmentation.
      
      ha_innobase::optimize
      	Restore defragment feature.
      
      Testing
      	Add GIS-index and FT-index to table being defragmented.
      
      	Defragmentation is not done to GIS-indexes and FT auxiliary
      	tables.
      a4fa940b
  9. 11 Oct, 2017 12 commits
  10. 10 Oct, 2017 10 commits
    • Marko Mäkelä's avatar
      Reapply a MySQL 5.6.23/5.7.10 Oracle Bug#20029625 fix that was inadvertently... · 4de344a8
      Marko Mäkelä authored
      Reapply a MySQL 5.6.23/5.7.10 Oracle Bug#20029625 fix that was inadvertently reverted in MariaDB 10.2.2
      
      The fix https://github.com/mysql/mysql-server/commit/716f97e2714e70f35d2dc01f0125ed833c62b408
      was inadvertently reverted in
      commit 2e814d47
      "Merge InnoDB 5.7 from mysql-5.7.9".
      
      Reapply the fix, because the test of the bug would fail
      after merging MDEV-13838, which replaced an earlier incorrect
      bug fix with a correct one.
      4de344a8
    • Varun Gupta's avatar
      MDEV-13974: Build failure in rocksdb/rdb_datadic.cc · ac2ae901
      Varun Gupta authored
      Added cstdlib librabry to rdb_datadic.h
      ac2ae901
    • Jan Lindström's avatar
      Fix test failure on galera.view caused by incorrect location · f2a0fa86
      Jan Lindström authored
      of WSREP_TO_ISOLATION_BEGIN.
      f2a0fa86
    • Marko Mäkelä's avatar
      MDEV-13311 Presence of old logs in 10.2.7 will corrupt restored instance (change in behavior) · 1b478a7a
      Marko Mäkelä authored
      Mariabackup 10.2.7 would delete the redo log files after a successful
      --prepare operation. If the user is manually copying the prepared files
      instead of using the --copy-back option, it could happen that some old
      redo log file would be preserved in the restored location. These old
      redo log files could cause corruption of the restored data files when
      the server is started up.
      
      We prevent this scenario by creating a "poisoned" redo log file
      ib_logfile0 at the end of the --prepare step. The poisoning consists
      of simply truncating the file to an empty file. InnoDB will refuse
      to start up on an empty redo log file.
      
      copy_back(): Delete all redo log files in the target if the source
      file ib_logfile0 is empty. (Previously we did this if the source
      file is missing.)
      
      SRV_OPERATION_RESTORE_EXPORT: A new variant of SRV_OPERATION_RESTORE
      when the --export option is specified. In this mode, we will keep
      deleting all redo log files, instead of truncating the first one.
      
      delete_log_files(): Add a parameter for the first file to delete,
      to be passed as 0 or 1.
      
      innobase_start_or_create_for_mysql(): In mariabackup --prepare,
      tolerate an empty ib_logfile0 file. Otherwise, require the first
      redo log file to be longer than 4 blocks (2048 bytes). Unless
      --export was specified, truncate the first log file at the
      end of --prepare.
      1b478a7a
    • Vladislav Vaintroub's avatar
      dc93ce8d
    • Vladislav Vaintroub's avatar
      Windows : small optimization in os_is_sparse_file_supported() · fa7a1a57
      Vladislav Vaintroub authored
      Use GetFileInformationByHandleEx with FileAttributeTagInfo to query whether
      the file is sparse. This saves 1 syscall, as GetFileInformationByHandle()
      would additionally query volume info.
      fa7a1a57
    • Vladislav Vaintroub's avatar
      MDEV-13941 followup. · ff2d9e12
      Vladislav Vaintroub authored
      Try to fix fragmentation (unsparse files), for pre-existing
      installations.
      
      Unsparse the innodb file, when it needs to be extended, unless compression
      is used. For Win7/2008R2 unsparse  does not work (as documented in MSDN),
      therefore for sparse files in older Windows, file extension will be done
      via writing zeroes at the end of file.
      ff2d9e12
    • Vladislav Vaintroub's avatar
      MDEV-13822 mariabackup incremental prepare incorrectly sets file size. · fe18e6b0
      Vladislav Vaintroub authored
      MDEV-13310 Preparing an incremental backup twice can corrupt data
      fe18e6b0
    • Vladislav Vaintroub's avatar
      Innodb : Refactor os_file_set_size() to be compatible 10.1 · b731a5bc
      Vladislav Vaintroub authored
      The last parameter to this function is now,"bool is_sparse", like in 10.1
      rather than the  unused/useless "bool is_readonly", merged from MySQL 5.7
      
      Like in 10.1, this function now supports sparse files, and efficient
      platform specific mechanisms for file extension
      
      os_file_set_size() is now consistenly used in all places where
      innodb files are extended.
      b731a5bc
    • sjaakola's avatar
      MW-416 DDL replication moved after acl checking · 0b5a5258
      sjaakola authored
      galera_events test shows a regression with the original fix for MW-416
      Reason was that Events::drop_event() can be called also from inside event
      execution, and there we have a speacial treatment for event, which executes
      "DROP EVENT" statement, and runs TOI replication inside the event processing body.
      This resulted in executing WSREP_TO_ISOLATION two times for such DROP EVENT statement.
      Fix is to call WSREP_TO_ISOLATION_BEGIN only in Events::drop_event()
      0b5a5258