1. 04 Apr, 2017 4 commits
  2. 03 Apr, 2017 3 commits
  3. 01 Apr, 2017 4 commits
  4. 31 Mar, 2017 7 commits
    • Sergei Golubchik's avatar
      restore libmariadb state · 63154265
      Sergei Golubchik authored
      that was destroyed in a previous commit
      63154265
    • Marko Mäkelä's avatar
      MDEV-12289 Keep 128 persistent rollback segments for compatibility and performance · 124bae08
      Marko Mäkelä authored
      InnoDB divides the allocation of undo logs into rollback segments.
      The DB_ROLL_PTR system column of clustered indexes can address up to
      128 rollback segments (TRX_SYS_N_RSEGS). Originally, InnoDB only
      created one rollback segment. In MySQL 5.5 or in the InnoDB Plugin
      for MySQL 5.1, all 128 rollback segments were created.
      
      MySQL 5.7 hard-codes the rollback segment IDs 1..32 for temporary undo logs.
      On upgrade, unless a slow shutdown (innodb_fast_shutdown=0)
      was performed on the old server instance, these rollback segments
      could be in use by transactions that are in XA PREPARE state or
      transactions that were left behind by a server kill followed by a
      normal shutdown immediately after restart.
      
      Persistent tables cannot refer to temporary undo logs or vice versa.
      Therefore, we should keep two distinct sets of rollback segments:
      one for persistent tables and another for temporary tables. In this way,
      all 128 rollback segments will be available for both types of tables,
      which could improve performance. Also, MariaDB 10.2 will remain more
      compatible than MySQL 5.7 with data files from earlier versions of
      MySQL or MariaDB.
      
      trx_sys_t::temp_rsegs[TRX_SYS_N_RSEGS]: A new array of temporary
      rollback segments. The trx_sys_t::rseg_array[TRX_SYS_N_RSEGS] will
      be solely for persistent undo logs.
      
      srv_tmp_undo_logs. Remove. Use the constant TRX_SYS_N_RSEGS.
      
      srv_available_undo_logs: Change the type to ulong.
      
      trx_rseg_get_on_id(): Remove. Instead, let the callers refer to
      trx_sys directly.
      
      trx_rseg_create(), trx_sysf_rseg_find_free(): Remove unneeded parameters.
      These functions only deal with persistent undo logs.
      
      trx_temp_rseg_create(): New function, to create all temporary rollback
      segments at server startup.
      
      trx_rseg_t::is_persistent(): Determine if the rollback segment is for
      persistent tables.
      
      trx_sys_is_noredo_rseg_slot(): Remove. The callers must know based on
      context (such as table handle) whether the DB_ROLL_PTR is referring to
      a persistent undo log.
      
      trx_sys_create_rsegs(): Remove all parameters, which were always passed
      as global variables. Instead, modify the global variables directly.
      
      enum trx_rseg_type_t: Remove.
      
      trx_t::get_temp_rseg(): A method to ensure that a temporary
      rollback segment has been assigned for the transaction.
      
      trx_t::assign_temp_rseg(): Replaces trx_assign_rseg().
      
      trx_purge_free_segment(), trx_purge_truncate_rseg_history():
      Remove the redundant variable noredo=false.
      Temporary undo logs are discarded immediately at transaction commit
      or rollback, not lazily by purge.
      
      trx_purge_mark_undo_for_truncate(): Remove references to the
      temporary rollback segments.
      
      trx_purge_mark_undo_for_truncate(): Remove a check for temporary
      rollback segments. Only the dedicated persistent undo log tablespaces
      can be truncated.
      
      trx_undo_get_undo_rec_low(), trx_undo_get_undo_rec(): Add the
      parameter is_temp.
      
      trx_rseg_mem_restore(): Split from trx_rseg_mem_create().
      Initialize the undo log and the rollback segment from the file
      data structures.
      
      trx_sysf_get_n_rseg_slots(): Renamed from
      trx_sysf_used_slots_for_redo_rseg(). Count the persistent
      rollback segment headers that have been initialized.
      
      trx_sys_close(): Also free trx_sys->temp_rsegs[].
      
      get_next_redo_rseg(): Merged to trx_assign_rseg_low().
      
      trx_assign_rseg_low(): Remove the parameters and access the
      global variables directly. Revert to simple round-robin, now that
      the whole trx_sys->rseg_array[] is for persistent undo log again.
      
      get_next_noredo_rseg(): Moved to trx_t::assign_temp_rseg().
      
      srv_undo_tablespaces_init(): Remove some parameters and use the
      global variables directly. Clarify some error messages.
      
      Adjust the test innodb.log_file. Apparently, before these changes,
      InnoDB somehow ignored missing dedicated undo tablespace files that
      are pointed by the TRX_SYS header page, possibly losing part of
      essential transaction system state.
      124bae08
    • Sergei Golubchik's avatar
    • Alexander Barkov's avatar
    • Sergei Golubchik's avatar
      properly close the table in fill_schema_table_from_frm() · 6fbcf413
      Sergei Golubchik authored
      this closes the memory leak, that started to appear after da5c3e03
      6fbcf413
    • Alexander Barkov's avatar
    • Alexander Barkov's avatar
      MDEV-12415 Remove sp_name::m_qname · e191833d
      Alexander Barkov authored
      e191833d
  5. 30 Mar, 2017 6 commits
  6. 29 Mar, 2017 11 commits
  7. 28 Mar, 2017 5 commits
    • Sergei Golubchik's avatar
      update a forgotten result file · 3f7455c0
      Sergei Golubchik authored
      3f7455c0
    • Sergei Golubchik's avatar
      cleanup: innodb files in cmake/ · 3a3b3d8b
      Sergei Golubchik authored
      moved to storage/innobase/
      
      also removed duplicate checks from storage/innobase/CMakeLists.txt
      (they're all in storage/innobase/innodb.cmake)
      3a3b3d8b
    • Sergei Golubchik's avatar
      MDEV-11605 Assertion `(longlong) thd->status_var.local_memory_used >= 0 ||... · 92aafebd
      Sergei Golubchik authored
      MDEV-11605 Assertion `(longlong) thd->status_var.local_memory_used >= 0 || !debug_assert_on_not_freed_memory' failed in my_malloc_size_cb_func
      
      MyISAM in compute_vcols() - which is used only in mi_check code -
      was computing indexed vcols into an internally allocated buffer
      (not record[0]) and the buffer was calculated to be long enough to fit
      every keyseg (a keyseg knows where its value in a record buffer is
      and the length of the value).
      
      This logic didn' work for prefix keys, because the keyseg length is the
      length of a prefix, but the record buffer needs to fit the complete
      value of a vcol. In this bug MyISAM was writing a 2K varchar
      into a buffer too short.
      
      Also it didn't work for repair-with-keycache, because that code
      recalculats all vcols, not only indexed ones.
      
      So, the buffer size (MYISAM_SHARE::vreclength) should include all
      vcols' full lengths. But it was calculated in mi_open and low-level
      MyISAM code has no knowledge of vcols.
      
      As a fix we now recalculate MYISAM_SHARE::vreclength in
      ha_myisam::setup_vcols_for_repair() which is always called
      before compute_vcols().
      92aafebd
    • Sergei Golubchik's avatar
      MDEV-10354 Assertion `! is_set()' failed in Diagnostics_area::set_ok_status on... · f63007a3
      Sergei Golubchik authored
      MDEV-10354 Assertion `! is_set()' failed in Diagnostics_area::set_ok_status on CREATE TABLE with invalid default
      
      test case
      f63007a3
    • Sergei Golubchik's avatar
      MDEV-11114 Cannot drop column referenced by CHECK constraint: Unknown column... · 7a1b0582
      Sergei Golubchik authored
      MDEV-11114 Cannot drop column referenced by CHECK constraint: Unknown column 'a' in 'virtual column function'
      
      clarify the error message
      7a1b0582