1. 30 Oct, 2017 2 commits
    • Alexander Barkov's avatar
      MDEV-13997 Change Item_bool_rowready_func2 to cache const items at fix time... · 84ed288f
      Alexander Barkov authored
      MDEV-13997 Change Item_bool_rowready_func2 to cache const items at fix time rather than evaluation time
      
      Side effect: the second debug Note in cache_temporal_4265.result disappeared.
      
      Before this change:
      - During JOIN::cache_const_exprs(),
        Item::get_cache() for Item_date_add_interval() was called.
        The data type for date_add('2001-01-01',interval 5 day) is VARCHAR,
        because the first argument is VARCHAR (not temporal).
        Item_get_cache() created Item_cache_str('2001-01-06').
      - During evaluate_join_record(), get_datetime_value() was called,
        which called Item::get_date() for Item_cache_str('2001-01-06').
        This gave the second Note. Then, get_datetime_value() created
        a new cache, now Item_cache_temporal for '2001-01-06', so not
        further str_to_datetime() happened.
      
      After this change:
      - During tem_bool_rowready_func2::fix_length_and_dec(),
        Arg_comparator::set_cmp_func_datetime() is called,
        which immediately creates an instance of Item_cache_date for
        the result of date_add('2001-01-01',interval 5 day).
        So later no str_to_datetime happens any more,
        neither during JOIN::cache_const_exprs(),
        nor during evaluate_join_record().
      84ed288f
    • Alexander Barkov's avatar
      667e4b97
  2. 27 Oct, 2017 1 commit
  3. 23 Oct, 2017 1 commit
  4. 22 Oct, 2017 6 commits
  5. 20 Oct, 2017 1 commit
  6. 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
  7. 18 Oct, 2017 2 commits
  8. 17 Oct, 2017 1 commit
  9. 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
  10. 13 Oct, 2017 3 commits
  11. 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
  12. 11 Oct, 2017 12 commits
  13. 10 Oct, 2017 5 commits