1. 03 Jul, 2017 1 commit
    • Lixun Peng's avatar
      MDEV-12067 flashback does not correcly revert update/replace statements · 007d3ed9
      Lixun Peng authored
      Problem
      -------
      For one-statement contains multiple row events, Flashback didn't reverse the
      sequence of row events inside one-statement.
      
      Solution
      --------
      Using a new array 'events_in_stmt' to store the row events of one-statement,
      when parsed the last one event, then print from the last one to the first one.
      
      In the same time, fixed another bug, without -vv will not insert the table_map
      into print_event_info->m_table_map, then change_to_flashback_event() will not
      execute because of Table_map_log_event is empty.
      007d3ed9
  2. 01 Jul, 2017 5 commits
    • Monty's avatar
      92f1837a
    • Monty's avatar
      Fixed failing test on 32 bit systems · cc8912f2
      Monty authored
      cc8912f2
    • Monty's avatar
      Clean up BUILD script · 38330974
      Monty authored
      - Removed some not old, not used build scipts
      - Removed tokudb and rocksdb from 32 bit builds
        This enables one now to easily build 32 bit binaries
        on 64 bit systems
      38330974
    • Monty's avatar
      MDEV-13226 Server crashes when tmpdir runs out of space · 2e9b55f7
      Monty authored
      There was a missing test in CTE handling if creating a temporary table
      failed (in this case as a result of out of space). This caused a table
      handler to be used even if it was not allocated.
      2e9b55f7
    • Marko Mäkelä's avatar
      Assert that DB_TRX_ID must be set on delete-marked records · c436338d
      Marko Mäkelä authored
      This is preparation for MDEV-12288, which would set DB_TRX_ID=0
      when purging history. Also with that change in place, delete-marked
      records must always refer to an undo log record via a nonzero
      DB_TRX_ID column. (The DB_TRX_ID is only present in clustered index
      leaf page records.)
      
      btr_cur_parse_del_mark_set_clust_rec(), rec_get_trx_id():
      Statically allocate the offsets
      (should never use the heap). Add some debug assertions.
      
      Replace some use of rec_get_trx_id() with row_get_rec_trx_id().
      
      trx_undo_report_row_operation(): Add some sanity checks that are
      common for all operations that produce undo log.
      c436338d
  3. 30 Jun, 2017 15 commits
  4. 29 Jun, 2017 16 commits
    • Marko Mäkelä's avatar
      Reduce the granularity of innodb_log_file_size · 84e4e450
      Marko Mäkelä authored
      In Mariabackup, we would want the backed-up redo log file size to be
      a multiple of 512 bytes, or OS_FILE_LOG_BLOCK_SIZE. However, at startup,
      InnoDB would be picky, requiring the file size to be a multiple of
      innodb_page_size.
      
      Furthermore, InnoDB would require the parameter to be a multiple of
      one megabyte, while the minimum granularity is 512 bytes. Because
      the data-file-oriented fil_io() API is being used for writing the
      InnoDB redo log, writes will for now require innodb_log_file_size to
      be a multiple of the maximum innodb_page_size (65536 bytes).
      
      To complicate matters, InnoDB startup divided srv_log_file_size by
      UNIV_PAGE_SIZE, so that initially, the unit was bytes, and later it
      was innodb_page_size. We will simplify this and keep srv_log_file_size
      in bytes at all times.
      
      innobase_log_file_size: Remove. Remove some obsolete checks against
      overflow on 32-bit systems. srv_log_file_size is always 64 bits, and
      the maximum size 512GiB in multiples of innodb_page_size always fits
      in ulint (which is 32 or 64 bits). 512GiB would be 8,388,608*64KiB or
      134,217,728*4KiB.
      
      log_init(): Remove the parameter file_size that was always passed as
      srv_log_file_size.
      
      log_set_capacity(): Add a parameter for passing the requested file size.
      
      srv_log_file_size_requested: Declare static in srv0start.cc.
      
      create_log_file(), create_log_files(),
      innobase_start_or_create_for_mysql(): Invoke fil_node_create()
      with srv_log_file_size expressed in multiples of innodb_page_size.
      
      innobase_start_or_create_for_mysql(): Require the redo log file sizes
      to be multiples of 512 bytes.
      84e4e450
    • Marko Mäkelä's avatar
      Clean up InnoDB shutdown · e903d458
      Marko Mäkelä authored
      Tablespace::shutdown(): Clear m_path. This was moved from
      Tablespace::~Tablespace().
      
      LatchDebug::shutdown(): Remove a redundant condition.
      e903d458
    • Marko Mäkelä's avatar
      Simplify access to the binlog offset in InnoDB · 591edccc
      Marko Mäkelä authored
      trx_sys_print_mysql_binlog_offset(): Use 64-bit arithmetics and ib::info().
      
      TRX_SYS_MYSQL_LOG_OFFSET: Replaces TRX_SYS_MYSQL_LOG_OFFSET_HIGH,
      TRX_SYS_MYSQL_LOG_OFFSET_LOW.
      
      trx_sys_update_mysql_binlog_offset(): Remove the constant parameter
      field=TRX_SYS_MYSQL_LOG_INFO. Use 64-bit arithmetics.
      591edccc
    • Marko Mäkelä's avatar
    • Marko Mäkelä's avatar
      buf_read_ibuf_merge_pages(): Discard all entries for a missing tablespace · cd623508
      Marko Mäkelä authored
      A similar change was contributed to Percona XtraBackup, but for some
      reason, it is not present in Percona XtraDB. Since MDEV-9566
      (MariaDB 10.1.23), that change is present in the MariaDB XtraDB.
      cd623508
    • Marko Mäkelä's avatar
      Minor cleanup of InnoDB I/O routines · 68b5aeae
      Marko Mäkelä authored
      Change many function parameters from IORequest& to const IORequest&.
      
      Remove an unused definition of ECANCELED.
      68b5aeae
    • Marko Mäkelä's avatar
      Simplify up InnoDB redo log system startup and shutdown · 859714e7
      Marko Mäkelä authored
      recv_sys_init(): Remove the parameter.
      
      recv_sys_create(): Merge to recv_sys_init().
      
      recv_sys_mem_free(): Merge to recv_sys_close().
      
      log_mem_free(): Merge to log_shutdown().
      859714e7
    • Marko Mäkelä's avatar
      8143ef1b
    • Marko Mäkelä's avatar
      Minor cleanup of InnoDB shutdown · bb60a832
      Marko Mäkelä authored
      os_thread_active(): Remove.
      
      srv_shutdown_all_bg_threads(): Assert that high-level threads
      have already exited. Do not sleep if os_thread_count=0.
      bb60a832
    • Sachin Setiya's avatar
      Fix MDEV-12758 · de3201df
      Sachin Setiya authored
      de3201df
    • Sachin Setiya's avatar
      MDEV-12758 wrep.pool_of_threads failed in buildbot with WSREP ... · 629c6097
      Sachin Setiya authored
      Problem:- While running tests from wsrep suite , we include file have_wsrep.inc
      or have_wsrep_enabled.inc , these file test wsrep plugin is ACTIVE or 'wsrep_on'
      is ON. These select does not ensure that whether 'wsrep_ready' is ON , So that
      we can process SQL queries. So sometimes we will get error like this
      mysqltest: At line 81: query 'call mtr.check_testcase()' failed: 1047: WSREP has
      not yet prepared node for application use  not ok
      
      Solution:- In file have_wsrep.inc and have_wsrep_enabled.inc we will include
      wait_until_ready.inc , which will wait untill 'wsrep_on' is on
      629c6097
    • Daniel Black's avatar
      travis: force deb build not to use ccache · 7c997f4b
      Daniel Black authored
      18a2b0a1 wasn't sufficient.
      The path needed to be set so ccache wasn't picked up.
      7c997f4b
    • Igor Babaev's avatar
      Fixed a failure of the test case for the bug mdev-13107 in --ps-protocol. · 13221b1e
      Igor Babaev authored
      The fix was in the call the open_normal_and_derived_tables() from
      the function mysql_test_select() and it was similar to those from
      the patch for mdev-13107.
      
      Added explicit PREPARE statements that failed in --ps-protocol.
      13221b1e
    • Daniel Black's avatar
      18a2b0a1
    • Daniel Black's avatar
      travis: MDEV-13002 fixed - don't allow failures in MYSQL_TEST_SUITES=plugins · 9e0aa294
      Daniel Black authored
      Revert "travis: allowed_failures MYSQL_TEST_SUITES=plugins (MDEV-13002)"
      
      This reverts commit c4cbc7a8.
      9e0aa294
    • Daniel Black's avatar
      9222d79b
  5. 28 Jun, 2017 3 commits
    • Igor Babaev's avatar
      Fixed the bug mdev-13107 and some similar unreported bugs. · e6080239
      Igor Babaev authored
      The problems were in the code of sql_show.cc. There the tables
      could be opened in such a way that mysql_derived_init() never
      worked for CTE tables. As a result they were not marked as
      derived and mysql_handle_derived() were not called for derived
      tables used in their specifications.
      e6080239
    • Vicențiu Ciorbaru's avatar
      MDEV-12851: Case with window functions query crashes server · 31ba0fa4
      Vicențiu Ciorbaru authored
      The "is null" function performs one operation which no other Item_func
      does, which is to update used tables during fix_length_and_dec().
      
      This however can not be performed before window functions have had a
      chance to resolve their order by and partition by definitions, which
      happens after the initial setup_fields call. Consequently, do not call
      Item_func_isnull update_used_tables during fix_length_and_dec().
      
      There was another issue detected once the crash was resolved.
      Because window functions did not implement is_null() method, we would
      end up returning bad results for "is null" and "is not null" functions.
      Implemented is_null() method for Item_windowfunc.
      31ba0fa4
    • Vicențiu Ciorbaru's avatar
      MDEV-13186: main.win failure post MDEV-12336 · 23edc7c8
      Vicențiu Ciorbaru authored
      During statement preparation st_order::item gets set to a value in
      ref_ptr_array. During statement execution we were overriding that value,
      causing subsequent checks for window functions to return true.
      
      Whenever we do any setting from ref_ptr_array, make sure to always
      store the value in all_fields as well.
      
      For function items containing window functions, as MDEV-12336 has
      discovered, we don't need to create a separate Item_direct_ref or
      Item_aggregate_ref as they will be computed directly from the top-level
      item once the window function argument columns are computed.
      23edc7c8