1. 24 Nov, 2017 2 commits
    • Sergey Vojtovich's avatar
      Fixed build failure with PFS disabled · abf61fd9
      Sergey Vojtovich authored
      mariabackup fails to builds with PFS disabled. The reason was missing include,
      which was included by PFS otherwise.
      abf61fd9
    • Sergey Vojtovich's avatar
      Fix hang in buf_flush_set_page_cleaner_thread_cnt · 17529785
      Sergey Vojtovich authored
      Running mysqld with innodb-buffer-pool-instances > 1 hangs on startup.
      
      On startup wrong variables was being used to detect number of page cleaner
      threads. As a result no threads were actually started. And subsequent code
      waits for threads to start forever.
      
      Fixed by using page_cleaner->n_workers, which holds number of page cleaner
      threads (0 at startup) instead of srv_n_page_cleaners, which holds number
      of requested page cleaner threads (4 by default).
      17529785
  2. 23 Nov, 2017 9 commits
    • Marko Mäkelä's avatar
      Use ST_AsText() to get textual result · 1773116f
      Marko Mäkelä authored
      1773116f
    • Sergey Vojtovich's avatar
      Less code to depend on ut_crc32_init() · 84ee7a10
      Sergey Vojtovich authored
      84ee7a10
    • Sergey Vojtovich's avatar
      Removed HW acceleration for big endian checksum · aaf5ee85
      Sergey Vojtovich authored
      Big endian checksum is needed to workaround 10+ years old bug, where checksum
      was calculated incorrectly on big endian hardware. We can still checksum such
      tablespaces using software implementation of CRC32.
      aaf5ee85
    • Sergey Vojtovich's avatar
      62ce8ce7
    • Monty's avatar
      Improve performance of heap tables · e69466d0
      Monty authored
      - make hp_mask an inline function (short and called 16 times)
      - Simplify hp_search. Biggest benefit is for doing key lookup
        without a matching row. Matching rows may be a bit slower, but
        is offseted by having hp_mask inlined.
      e69466d0
    • Marko Mäkelä's avatar
      MDEV-14477 InnoDB update_time is wrongly updated after partial rollback or internal COMMIT · d8ada081
      Marko Mäkelä authored
      The non-persistent UPDATE_TIME for InnoDB tables was not being
      updated consistently at transaction commit.
      
      If a transaction is partly rolled back so that in the end it will
      not modify a table that it intended to modify, the update_time will
      be updated nevertheless. This will also happen when InnoDB fails
      to write an undo log record for the intended modification.
      
      If a transaction is committed internally in InnoDB, instead of
      being committed from the SQL interface, then the trx_t::mod_tables
      will not be applied to the update_time of the tables.
      
      trx_t::mod_tables: Replace the std::set<dict_table_t*>
      with std::map<dict_table_t*,undo_no_t>, so that the very first
      modification within the transaction is identified.
      
      trx_undo_report_row_operation(): Update mod_tables for every operation
      after the undo log record was successfully written.
      
      trx_rollback_to_savepoint_low(): After partial rollback, erase from
      trx_t::mod_tables any tables for which all changes were rolled back.
      
      trx_commit_in_memory(): Tighten some assertions and simplify conditions.
      Invoke trx_update_mod_tables_timestamp() if persistent tables were
      affected.
      
      trx_commit_for_mysql(): Remove the call to
      trx_update_mod_tables_timestamp(), as it is now invoked at the
      lower level, in trx_commit_in_memory().
      
      trx_rollback_finish(): Clear mod_tables before invoking trx_commit(),
      because the trx_commit_in_memory() would otherwise wrongly process
      mod_tables after a full ROLLBACK.
      d8ada081
    • Marko Mäkelä's avatar
      Correct a comment · fda4fabe
      Marko Mäkelä authored
      fda4fabe
    • Michael Widenius's avatar
      Less dependencies in include files · 8a24be6e
      Michael Widenius authored
      8a24be6e
    • Michael Widenius's avatar
      Remove not used mem_root argument from build_clone(), get_copy() and get_item_copy() · 166056f7
      Michael Widenius authored
      TODO:
      - Make get_thd_memroot() inline
        - To do this, we need to reduce dependence of include files, especially
          so that sql_class.h is not depending in item.h
      166056f7
  3. 22 Nov, 2017 1 commit
  4. 21 Nov, 2017 3 commits
  5. 19 Nov, 2017 1 commit
  6. 17 Nov, 2017 6 commits
  7. 16 Nov, 2017 2 commits
  8. 15 Nov, 2017 2 commits
  9. 13 Nov, 2017 1 commit
    • Marko Mäkelä's avatar
      MDEV-14378 In ALGORITHM=INPLACE, use a common name for the intermediate tables or partitions · e94c9d24
      Marko Mäkelä authored
      Allow DROP TABLE `#mysql50##sql-...._.` to drop tables that were
      being rebuilt by ALGORITHM=INPLACE
      
      NOTE: If the server is killed after the table-rebuilding ALGORITHM=INPLACE
      commits inside InnoDB but before the .frm file has been replaced, then
      the recovery will involve something else than DROP TABLE.
      
      NOTE: If the server is killed in a true inplace ALTER TABLE commits
      inside InnoDB but before the .frm file has been replaced, then we
      are really out of luck. To properly handle that situation, we would
      need a transactional mysql.ddl_fixup table that directs recovery to
      rename or remove files.
      
      prepare_inplace_alter_table_dict(): Use the altered_table->s->table_name
      for generating the new_table_name.
      
      table_name_t::part_suffix: The start of the partition name suffix.
      
      table_name_t::dbend(): Return the end of the schema name.
      
      table_name_t::dblen(): Return the length of the schema name, in bytes.
      
      table_name_t::basename(): Return the name without the schema name.
      
      table_name_t::part(): Return the partition name, or NULL if none.
      
      row_drop_table_for_mysql(): Assert for #sql, not #sql-ib.
      e94c9d24
  10. 10 Nov, 2017 8 commits
  11. 09 Nov, 2017 5 commits
    • Marko Mäkelä's avatar
      MDEV-13795/MDEV-14332 Corruption during online table-rebuilding ALTER when VIRTUAL columns exist · 5d142f99
      Marko Mäkelä authored
      When MySQL 5.7 introduced indexed virtual columns, it introduced
      several bugs into the online table-rebuilding ALTER, that is,
      the row_log_table_apply() family of functions.
      
      The online_log format that was introduced for online table-rebuilding
      ALTER in MySQL 5.6 should be sufficient. Ideally, any indexed virtual
      column values would be evaluated based on the log records in the temporary
      file. There is no need to log virtual column values.
      
      (For ADD INDEX, that is row_log_apply(), we always must log the values of
      the keys, no matter if the columns are virtual.)
      
      Because omitting the virtual column values removes any chance of
      row_log_table_apply() working with indexed virtual columns, we
      will for now refuse LOCK=NONE in table-rebuilding ALTER operations
      when indexes on virtual columns exist. This restriction would be
      lifted in MDEV-14341.
      
      innobase_indexed_virtual_exist(): New predicate, to determine if
      indexed virtual columns exist in a table definition.
      
      ha_innobase::check_if_supported_inplace_alter(): Refuse online rebuild
      if indexed virtual columns exist.
      
      rec_get_converted_size_temp_v(), rec_convert_dtuple_to_temp_v(): Remove.
      
      row_log_table_delete(), row_log_table_update(, row_log_table_insert():
      Remove parameters for virtual columns.
      
      trx_undo_read_v_rows(): Remove the col_map parameter.
      
      row_log_table_apply(): Do not deal with virtual columns.
      5d142f99
    • Monty's avatar
      Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext · 0bb0d522
      Monty authored
      Conflicts:
      	mysql-test/r/cte_recursive.result
      	mysql-test/r/derived_cond_pushdown.result
      	mysql-test/t/cte_recursive.test
      	mysql-test/t/derived_cond_pushdown.test
      	sql/datadict.cc
      	sql/handler.cc
      0bb0d522
    • Sergei Petrunia's avatar
    • Monty's avatar
      d40c2357
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · 761cf492
      Marko Mäkelä authored
      761cf492