An error occurred fetching the project authors.
  1. 24 Apr, 2017 3 commits
  2. 21 Apr, 2017 1 commit
    • Marko Mäkelä's avatar
      MDEV-12488 Remove type mismatch in InnoDB printf-like calls · 5684aa22
      Marko Mäkelä authored
      Alias the InnoDB ulint and lint data types to size_t and ssize_t,
      which are the standard names for the machine-word-width data types.
      
      Correspondingly, define ULINTPF as "%zu" and introduce ULINTPFx as "%zx".
      In this way, better compiler warnings for type mismatch are possible.
      
      Furthermore, use PRIu64 for that 64-bit format, and define
      the feature macro __STDC_FORMAT_MACROS to enable it on Red Hat systems.
      
      Fix some errors in error messages, and replace some error messages
      with assertions.
      Most notably, an IMPORT TABLESPACE error message in InnoDB was
      displaying the number of columns instead of the mismatching flags.
      5684aa22
  3. 06 Apr, 2017 1 commit
  4. 31 Mar, 2017 1 commit
    • 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
  5. 30 Mar, 2017 1 commit
    • Marko Mäkelä's avatar
      Rename InnoDB transaction undo logging predicates. · a0c79bcf
      Marko Mäkelä authored
      trx::has_logged_persistent(): Renamed from trx_is_redo_rseg_updated().
      Determines if a transaction has generated any persistent undo log.
      
      trx::has_logged(): Renamed from trx_is_rseg_updated().
      Determines if a transaction has generated any undo log.
      a0c79bcf
  6. 28 Mar, 2017 1 commit
  7. 23 Mar, 2017 2 commits
  8. 17 Mar, 2017 2 commits
  9. 14 Mar, 2017 1 commit
    • Jan Lindström's avatar
      MDEV-11738: Mariadb uses 100% of several of my 8 cpus doing nothing · 50eb40a2
      Jan Lindström authored
      MDEV-11581: Mariadb starts InnoDB encryption threads
      when key has not changed or data scrubbing turned off
      
      Background: Key rotation is based on background threads
      (innodb-encryption-threads) periodically going through
      all tablespaces on fil_system. For each tablespace
      current used key version is compared to max key age
      (innodb-encryption-rotate-key-age). This process
      naturally takes CPU. Similarly, in same time need for
      scrubbing is investigated. Currently, key rotation
      is fully supported on Amazon AWS key management plugin
      only but InnoDB does not have knowledge what key
      management plugin is used.
      
      This patch re-purposes innodb-encryption-rotate-key-age=0
      to disable key rotation and background data scrubbing.
      All new tables are added to special list for key rotation
      and key rotation is based on sending a event to
      background encryption threads instead of using periodic
      checking (i.e. timeout).
      
      fil0fil.cc: Added functions fil_space_acquire_low()
      to acquire a tablespace when it could be dropped concurrently.
      This function is used from fil_space_acquire() or
      fil_space_acquire_silent() that will not print
      any messages if we try to acquire space that does not exist.
      fil_space_release() to release a acquired tablespace.
      fil_space_next() to iterate tablespaces in fil_system
      using fil_space_acquire() and fil_space_release().
      Similarly, fil_space_keyrotation_next() to iterate new
      list fil_system->rotation_list where new tables.
      are added if key rotation is disabled.
      Removed unnecessary functions fil_get_first_space_safe()
      fil_get_next_space_safe()
      
      fil_node_open_file(): After page 0 is read read also
      crypt_info if it is not yet read.
      
      btr_scrub_lock_dict_func()
      buf_page_check_corrupt()
      buf_page_encrypt_before_write()
      buf_merge_or_delete_for_page()
      lock_print_info_all_transactions()
      row_fts_psort_info_init()
      row_truncate_table_for_mysql()
      row_drop_table_for_mysql()
          Use fil_space_acquire()/release() to access fil_space_t.
      
      buf_page_decrypt_after_read():
          Use fil_space_get_crypt_data() because at this point
          we might not yet have read page 0.
      
      fil0crypt.cc/fil0fil.h: Lot of changes. Pass fil_space_t* directly
      to functions needing it and store fil_space_t* to rotation state.
      Use fil_space_acquire()/release() when iterating tablespaces
      and removed unnecessary is_closing from fil_crypt_t. Use
      fil_space_t::is_stopping() to detect when access to
      tablespace should be stopped. Removed unnecessary
      fil_space_get_crypt_data().
      
      fil_space_create(): Inform key rotation that there could
      be something to do if key rotation is disabled and new
      table with encryption enabled is created.
      Remove unnecessary functions fil_get_first_space_safe()
      and fil_get_next_space_safe(). fil_space_acquire()
      and fil_space_release() are used instead. Moved
      fil_space_get_crypt_data() and fil_space_set_crypt_data()
      to fil0crypt.cc.
      
      fsp_header_init(): Acquire fil_space_t*, write crypt_data
      and release space.
      
      check_table_options()
      	Renamed FIL_SPACE_ENCRYPTION_* TO FIL_ENCRYPTION_*
      
      i_s.cc: Added ROTATING_OR_FLUSHING field to
      information_schema.innodb_tablespace_encryption
      to show current status of key rotation.
      50eb40a2
  10. 09 Mar, 2017 1 commit
  11. 07 Mar, 2017 1 commit
    • Marko Mäkelä's avatar
      Fix many -Wconversion warnings. · 89d80c1b
      Marko Mäkelä authored
      Define my_thread_id as an unsigned type, to avoid mismatch with
      ulonglong.  Change some parameters to this type.
      
      Use size_t in a few more places.
      
      Declare many flag constants as unsigned to avoid sign mismatch
      when shifting bits or applying the unary ~ operator.
      
      When applying the unary ~ operator to enum constants, explictly
      cast the result to an unsigned type, because enum constants can
      be treated as signed.
      
      In InnoDB, change the source code line number parameters from
      ulint to unsigned type. Also, make some InnoDB functions return
      a narrower type (unsigned or uint32_t instead of ulint;
      bool instead of ibool).
      89d80c1b
  12. 03 Mar, 2017 1 commit
    • Marko Mäkelä's avatar
      MDEV-12121 Introduce build option WITH_INNODB_AHI to disable innodb_adaptive_hash_index · 27b9989d
      Marko Mäkelä authored
      The InnoDB adaptive hash index is sometimes degrading the performance of
      InnoDB, and it is sometimes disabled to get more consistent performance.
      We should have a compile-time option to disable the adaptive hash index.
      
      Let us introduce two options:
      
      OPTION(WITH_INNODB_AHI "Include innodb_adaptive_hash_index" ON)
      OPTION(WITH_INNODB_ROOT_GUESS "Cache index root block descriptors" ON)
      
      where WITH_INNODB_AHI always implies WITH_INNODB_ROOT_GUESS.
      
      As part of this change, the misleadingly named function
      trx_search_latch_release_if_reserved(trx) will be replaced with the macro
      trx_assert_no_search_latch(trx) that will be empty unless
      BTR_CUR_HASH_ADAPT is defined (cmake -DWITH_INNODB_AHI=ON).
      
      We will also remove the unused column
      INFORMATION_SCHEMA.INNODB_TRX.TRX_ADAPTIVE_HASH_TIMEOUT.
      In MariaDB Server 10.1, it used to reflect the value of
      trx_t::search_latch_timeout which could be adjusted during
      row_search_for_mysql(). In 10.2, there is no such field.
      
      Other than the removal of the unused column TRX_ADAPTIVE_HASH_TIMEOUT,
      this is an almost non-functional change to the server when using the
      default build options.
      
      Some tests are adjusted so that they will work with both
      -DWITH_INNODB_AHI=ON and -DWITH_INNODB_AHI=OFF. The test
      innodb.innodb_monitor has been renamed to innodb.monitor
      in order to track MySQL 5.7, and the duplicate tests
      sys_vars.innodb_monitor_* are removed.
      27b9989d
  13. 28 Feb, 2017 1 commit
    • Marko Mäkelä's avatar
      MDEV-12146 Deprecate and remove innodb_instrument_semaphores · 6cf29ab0
      Marko Mäkelä authored
      MDEV-7618 introduced configuration parameter innodb_instrument_semaphores
      in MariaDB Server 10.1. The parameter seems to only affect the rw-lock
      X-latch acquisition. Extra fields are added to rw_lock_t to remember one
      X-latch holder or waiter. These fields are not being consulted or reported
      anywhere. This is basically only adding code bloat.
      
      If the intention is to debug hangs or deadlocks, we have better tools for
      that in the debug server, and for the non-debug server, core dumps can
      reveal a lot. For example, the mini-transaction memo records the
      currently held buffer block or index rw-locks, to be released at
      mtr_t::commit().
      
      The configuration parameter innodb_instrument_semaphores will be
      deprecated in 10.2.5 and removed in 10.3.0.
      
      rw_lock_t: Remove the members lock_name, file_name, line, thread_id
      which did not affect any output.
      6cf29ab0
  14. 24 Feb, 2017 1 commit
    • Marko Mäkelä's avatar
      MDEV-11927 InnoDB change buffer is not being merged · 78153cf6
      Marko Mäkelä authored
      to tables in the system tablespace
      
      This is a regression caused by MDEV-11585, which accidentally
      changed Tablespace::is_undo_tablespace() in an incorrect way,
      causing the InnoDB system tablespace to be reported as a dedicated
      undo tablespace, for which the change buffer is not applicable.
      
      Tablespace::is_undo_tablespace(): Remove. There were only 2
      calls from the function buf_page_io_complete(). Replace those
      calls as appropriate.
      
      Also, merge changes to tablespace import/export tests from
      MySQL 5.7, and clean up the tests a little further, allowing
      them to be run with any innodb_page_size.
      
      Remove duplicated error injection instrumentation for the
      import/export tests.  In MySQL 5.7, the error injection label
      buf_page_is_corrupt_failure was renamed to
      buf_page_import_corrupt_failure.
      
      fil_space_extend_must_retry(): Correct a debug assertion
      (tablespaces can be extended during IMPORT), and remove a
      TODO comment about compressed temporary tables that was
      already addressed in MDEV-11816.
      
      dict_build_tablespace_for_table(): Correct a comment that
      no longer holds after MDEV-11816, and assert that
      ROW_FORMAT=COMPRESSED can only be used in .ibd files.
      78153cf6
  15. 15 Feb, 2017 4 commits
    • Marko Mäkelä's avatar
      MDEV-11641 innobase_get_stmt_safe() does not copy the last byte of thd->query_string · a90066b1
      Marko Mäkelä authored
      innobase_get_stmt_safe(): Copy also the last byte.
      a90066b1
    • Marko Mäkelä's avatar
      Fix some InnoDB memory leaks. · 703d0985
      Marko Mäkelä authored
      dict_init_free(): Make global, and move the call from
      dict_close() to srv_free(), because this is initialized
      earlier than dict_sys.
      
      innobase_space_shutdown(): Do not leak srv_allow_writes_event.
      703d0985
    • Marko Mäkelä's avatar
      MDEV-11782: Redefine the innodb_encrypt_log format · 2af28a36
      Marko Mäkelä authored
      Write only one encryption key to the checkpoint page.
      Use 4 bytes of nonce. Encrypt more of each redo log block,
      only skipping the 4-byte field LOG_BLOCK_HDR_NO which the
      initialization vector is derived from.
      
      Issue notes, not warning messages for rewriting the redo log files.
      
      recv_recovery_from_checkpoint_finish(): Do not generate any redo log,
      because we must avoid that before rewriting the redo log files, or
      otherwise a crash during a redo log rewrite (removing or adding
      encryption) may end up making the database unrecoverable.
      Instead, do these tasks in innobase_start_or_create_for_mysql().
      
      Issue a firm "Missing MLOG_CHECKPOINT" error message. Remove some
      unreachable code and duplicated error messages for log corruption.
      
      LOG_HEADER_FORMAT_ENCRYPTED: A flag for identifying an encrypted redo
      log format.
      
      log_group_t::is_encrypted(), log_t::is_encrypted(): Determine
      if the redo log is in encrypted format.
      
      recv_find_max_checkpoint(): Interpret LOG_HEADER_FORMAT_ENCRYPTED.
      
      srv_prepare_to_delete_redo_log_files(): Display NOTE messages about
      adding or removing encryption. Do not issue warnings for redo log
      resizing any more.
      
      innobase_start_or_create_for_mysql(): Rebuild the redo logs also when
      the encryption changes.
      
      innodb_log_checksums_func_update(): Always use the CRC-32C checksum
      if innodb_encrypt_log. If needed, issue a warning
      that innodb_encrypt_log implies innodb_log_checksums.
      
      log_group_write_buf(): Compute the checksum on the encrypted
      block contents, so that transmission errors or incomplete blocks can be
      detected without decrypting.
      
      Rewrite most of the redo log encryption code. Only remember one
      encryption key at a time (but remember up to 5 when upgrading from the
      MariaDB 10.1 format.)
      2af28a36
    • Marko Mäkelä's avatar
      MDEV-12061 Allow innodb_log_files_in_group=1 · 743ac7c2
      Marko Mäkelä authored
      The InnoDB redo log consists of a list of files that logically form
      a bigger file, as if the individual files were concatenated together.
      
      The first file will always be written on redo log checkpoint, because
      the two checkpoint pages are at the start of the single logical
      redo log file.
      
      There is no technical reason why InnoDB requires at least 2 files
      to exist. Let us reduce the minimum number to 1. In that way,
      restoring from backups will become easier, since InnoDB can directly
      deal with a single backed-up redo log file.
      743ac7c2
  16. 14 Feb, 2017 1 commit
    • Marko Mäkelä's avatar
      MDEV-12057 Embedded server shutdown hangs in InnoDB · 1b4b4f68
      Marko Mäkelä authored
      Ever since MDEV-5800 enabled indexed virtual columns for InnoDB,
      the InnoDB shutdown relied on close_connections() that would set
      thd->killed for the InnoDB purge threads. Alas, the embedded server
      shutdown is not invoking close_connections(), and thus InnoDB purge
      threads fail to initiate shutdown, causing a hang.
      
      innodb_inited: Remove. Use srv_was_started instead.
      
      innobase_fast_shutdown: Remove. Use srv_fast_shutdown instead.
      
      srv_running: Renamed from thd_destructor_myvar, and made global.
      The value NULL means that shutdown was requested or the purge threads
      should not be running because of innodb_read_only_mode=1.
      
      innobase_init(): Set srv_was_started after ensuring that srv_running
      was initialized. (In innodb_read_only mode, the purge threads are not
      started and we do not care if srv_running==NULL.)
      
      innobase_start_or_create_for_mysql(): Do not set srv_was_started.
      Let it be set by the only caller innobase_init().
      
      srv_purge_should_exit(): Check also srv_was_started and srv_running
      when evaluating thd->killed.
      1b4b4f68
  17. 13 Feb, 2017 2 commits
    • Sergei Golubchik's avatar
      bugfix: disable ICP in InnoDB for indexes on virtual columns · 1913daf4
      Sergei Golubchik authored
      because it doesn't work, vcols are never calculated for ICP
      1913daf4
    • Marko Mäkelä's avatar
      MDEV-12050 Remove unused InnoDB Memcached hooks · a45866c6
      Marko Mäkelä authored
      Oracle introduced a Memcached plugin interface to the InnoDB
      storage engine in MySQL 5.6. That interface is essentially a
      fork of Memcached development snapshot 1.6.0-beta1 of an old
      development branch 'engine-pu'.
      
      To my knowledge, there have not been any updates to the Memcached code
      between MySQL 5.6 and 5.7; only bug fixes and extensions related to
      the Oracle modifications.
      
      The Memcached plugin is not part of the MariaDB Server. Therefore it
      does not make sense to include the InnoDB interfaces for the Memcached
      plugin, or to have any related configuration parameters:
      
          innodb_api_bk_commit_interval
          innodb_api_disable_rowlock
          innodb_api_enable_binlog
          innodb_api_enable_mdl
          innodb_api_trx_level
      
      Removing this code in one commit makes it possible to easily restore
      it, in case it turns out to be needed later.
      a45866c6
  18. 10 Feb, 2017 1 commit
    • Nirbhay Choubey's avatar
      MDEV-7635: Part 1 · 3435e8a5
      Nirbhay Choubey authored
      innodb_autoinc_lock_mode            = 2
      innodb_buffer_pool_dump_at_shutdown = ON
      innodb_buffer_pool_dump_pct         = 25
      innodb_buffer_pool_load_at_startup  = ON
      innodb_checksum_algorithm           = CRC32
      innodb_file_format                  = Barracuda
      innodb_large_prefix                 = ON
      innodb_log_compressed_pages         = ON
      innodb_purge_threads                = 4
      innodb_strict_mode                  = ON
      binlog_annotate_row_events          = ON
      binlog_format                       = MIXED
      binlog-row-event-max-size           = 8192
      group_concat_max_len                = 1M
      lock_wait_timeout                   = 86400
      log_slow_admin_statements           = ON
      log_slow_slave_statements           = ON
      log_warnings                        = 2
      max_allowed_packet                  = 16M
      replicate_annotate_row_events       = ON
      slave_net_timeout                   = 60
      sync_binlog                         = 1
      aria_recover                        = BACKUP,QUICK
      myisam_recover_options              = BACKUP,QUICK
      3435e8a5
  19. 08 Feb, 2017 1 commit
    • Jan Lindström's avatar
      MDEV-11974: MariaDB 10.2 encryption does not support spatial indexes · 7b27465e
      Jan Lindström authored
      Encryption stores used key_version to
      FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION (offset 26)
      field. Spatial indexes store RTREE Split Sequence Number
      (FIL_RTREE_SPLIT_SEQ_NUM) in the same field. Both values
      can't be stored in same field. Thus, current encryption
      implementation does not support encrypting spatial indexes.
      
      fil_space_encrypt(): Do not encrypt page if page type is
      FIL_PAGE_RTREE (this is required for background
      encryption innodb-encrypt-tables=ON).
      
      create_table_info_t::check_table_options() Do not allow creating
      table with ENCRYPTED=YES if table contains spatial index.
      7b27465e
  20. 07 Feb, 2017 1 commit
  21. 05 Feb, 2017 1 commit
    • Marko Mäkelä's avatar
      Rewrite the innodb.log_file_size test with DBUG_EXECUTE_IF. · f1627045
      Marko Mäkelä authored
      Remove the debug parameter innodb_force_recovery_crash that was
      introduced into MySQL 5.6 by me in WL#6494 which allowed InnoDB
      to resize the redo log on startup.
      
      Let innodb.log_file_size actually start up the server, but ensure
      that the InnoDB storage engine refuses to start up in each of the
      scenarios.
      f1627045
  22. 01 Feb, 2017 2 commits
    • Marko Mäkelä's avatar
      Shut down InnoDB after aborted startup. · 81b7fe9d
      Marko Mäkelä authored
      This fixes memory leaks in tests that cause InnoDB startup to fail.
      
      buf_pool_free_instance(): Also free buf_pool->flush_rbt, which would
      normally be freed when crash recovery finishes.
      
      fil_node_close_file(), fil_space_free_low(), fil_close_all_files():
      Relax some debug assertions to tolerate !srv_was_started.
      
      innodb_shutdown(): Renamed from innobase_shutdown_for_mysql().
      Changed the return type to void. Do not assume that all subsystems
      were started.
      
      que_init(), que_close(): Remove (empty functions).
      
      srv_init(), srv_general_init(): Remove as global functions.
      
      srv_free(): Allow srv_sys=NULL.
      
      srv_get_active_thread_type(): Only return SRV_PURGE if purge really
      is running.
      
      srv_shutdown_all_bg_threads(): Do not reset srv_start_state. It will
      be needed by innodb_shutdown().
      
      innobase_start_or_create_for_mysql(): Always call srv_boot() so that
      innodb_shutdown() can assume that it was called. Make more subsystems
      dependent on SRV_START_STATE_STAT.
      
      srv_shutdown_bg_undo_sources(): Require SRV_START_STATE_STAT.
      
      trx_sys_close(): Do not assume purge_sys!=NULL. Do not call
      buf_dblwr_free(), because the doublewrite buffer can exist while
      the transaction system does not.
      
      logs_empty_and_mark_files_at_shutdown(): Do a faster shutdown if
      !srv_was_started.
      
      recv_sys_close(): Invoke dblwr.pages.clear() which would normally
      be invoked by buf_dblwr_process().
      
      recv_recovery_from_checkpoint_start(): Always release log_sys->mutex.
      
      row_mysql_close(): Allow the subsystem not to exist.
      81b7fe9d
    • Marko Mäkelä's avatar
      MDEV-11671 Duplicated message for innodb_page_size · 774056c8
      Marko Mäkelä authored
      Display a NOTE, not a WARNING for non-default page size.
      774056c8
  23. 31 Jan, 2017 2 commits
  24. 30 Jan, 2017 1 commit
  25. 28 Jan, 2017 1 commit
    • Sergei Golubchik's avatar
      cleanup: thd_destructor_proxy · 30ba3100
      Sergei Golubchik authored
      1. wait for thd_destructor_proxy thread to start after creating it.
         this ensures that the thread is ready to receive a shutdown signal
         whenever we want to send it.
      2. join it at shutdown, this guarantees that no innodb THD will exist
         after innobase_end().
      
      this fixes crashes and memory leaks in main.mysqld_option_err
      (were innodb was started and then immediately shut down).
      30ba3100
  26. 27 Jan, 2017 2 commits
    • Marko Mäkelä's avatar
    • Marko Mäkelä's avatar
      MDEV-11233 CREATE FULLTEXT INDEX with a token longer than 127 bytes · 732672c3
      Marko Mäkelä authored
      crashes server
      
      This bug is the result of merging the Oracle MySQL follow-up fix
      BUG#22963169 MYSQL CRASHES ON CREATE FULLTEXT INDEX
      without merging the base bug fix:
      Bug#79475 Insert a token of 84 4-bytes chars into fts index causes
      server crash.
      
      Unlike the above mentioned fixes in MySQL, our fix will not change
      the storage format of fulltext indexes in InnoDB or XtraDB
      when a character encoding with mbmaxlen=2 or mbmaxlen=3
      and the length of a word is between 128 and 84*mbmaxlen bytes.
      The Oracle fix would allocate 2 length bytes for these cases.
      
      Compatibility with other MySQL and MariaDB releases is ensured by
      persisting the used maximum length in the SYS_COLUMNS table in the
      InnoDB data dictionary.
      
      This fix also removes some unnecessary strcmp() calls when checking
      for the legacy default collation my_charset_latin1
      (my_charset_latin1.name=="latin1_swedish_ci").
      
      fts_create_one_index_table(): Store the actual length in bytes.
      This metadata will be written to the SYS_COLUMNS table.
      
      fts_zip_initialize(): Initialize only the first byte of the buffer.
      Actually the code should not even care about this first byte, because
      the length is set as 0.
      
      FTX_MAX_WORD_LEN: Define as HA_FT_MAXCHARLEN * 4 aka 336 bytes,
      not as 254 bytes.
      
      row_merge_create_fts_sort_index(): Set the actual maximum length of the
      column in bytes, similar to fts_create_one_index_table().
      
      row_merge_fts_doc_tokenize(): Remove the redundant parameter word_dtype.
      Use the actual maximum length of the column. Calculate the extra_size
      in the same way as row_merge_buf_encode() does.
      732672c3
  27. 26 Jan, 2017 1 commit
  28. 24 Jan, 2017 1 commit
    • Jan Lindström's avatar
      MDEV-11254: innodb-use-trim has no effect in 10.2 · 6495806e
      Jan Lindström authored
      Problem was that implementation merged from 10.1 was incompatible
      with InnoDB 5.7.
      
      buf0buf.cc: Add functions to return should we punch hole and
      how big.
      
      buf0flu.cc: Add written page to IORequest
      
      fil0fil.cc: Remove unneeded status call and add test is
      sparse files and punch hole supported by file system when
      tablespace is created. Add call to get file system
      block size. Used file node is added to IORequest. Added
      functions to check is punch hole supported and setting
      punch hole.
      
      ha_innodb.cc: Remove unneeded status variables (trim512-32768)
      and trim_op_saved. Deprecate innodb_use_trim and
      set it ON by default. Add function to set innodb-use-trim
      dynamically.
      
      dberr.h: Add error code DB_IO_NO_PUNCH_HOLE
      if punch hole operation fails.
      
      fil0fil.h: Add punch_hole variable to fil_space_t and
      block size to fil_node_t.
      
      os0api.h: Header to helper functions on buf0buf.cc and
      fil0fil.cc for os0file.h
      
      os0file.h: Remove unneeded m_block_size from IORequest
      and add bpage to IORequest to know actual size of
      the block and m_fil_node to know tablespace file
      system block size and does it support punch hole.
      
      os0file.cc: Add function punch_hole() to IORequest
      to do punch_hole operation,
      get the file system block size and determine
      does file system support sparse files (for punch hole).
      
      page0size.h: remove implicit copy disable and
      use this implicit copy to implement copy_from()
      function.
      
      buf0dblwr.cc, buf0flu.cc, buf0rea.cc, fil0fil.cc, fil0fil.h,
      os0file.h, os0file.cc, log0log.cc, log0recv.cc:
      Remove unneeded write_size parameter from fil_io
      calls.
      
      srv0mon.h, srv0srv.h, srv0mon.cc: Remove unneeded
      trim512-trim32678 status variables. Removed
      these from monitor tests.
      6495806e
  29. 19 Jan, 2017 1 commit