1. 04 Feb, 2017 2 commits
    • Marko Mäkelä's avatar
      MDEV-11985 Make innodb_read_only shutdown more robust · 20e83474
      Marko Mäkelä authored
      If InnoDB is started in innodb_read_only mode such that
      recovered incomplete transactions exist at startup
      (but the redo logs are clean), an assertion will fail at shutdown,
      because there would exist some non-prepared transactions.
      
      logs_empty_and_mark_files_at_shutdown(): Do not wait for incomplete
      transactions to finish if innodb_read_only or innodb_force_recovery>=3.
      Wait for purge to finish in only one place.
      
      trx_sys_close(): Relax the assertion that would fail first.
      
      trx_free_prepared(): Also free recovered TRX_STATE_ACTIVE transactions
      if innodb_read_only or innodb_force_recovery>=3.
      20e83474
    • Marko Mäkelä's avatar
      MDEV-11947 InnoDB purge workers fail to shut down · 9f0dbb31
      Marko Mäkelä authored
      srv_release_threads(): Actually wait for the threads to resume
      from suspension. On CentOS 5 and possibly other platforms,
      os_event_set() may be lost.
      
      srv_resume_thread(): A counterpart of srv_suspend_thread().
      Optionally wait for the event to be set, optionally with a timeout,
      and then release the thread from suspension.
      
      srv_free_slot(): Unconditionally suspend the thread. It is always
      in resumed state when this function is entered.
      
      srv_active_wake_master_thread_low(): Only call os_event_set().
      
      srv_purge_coordinator_suspend(): Use srv_resume_thread() instead
      of the complicated logic.
      9f0dbb31
  2. 03 Feb, 2017 1 commit
  3. 01 Feb, 2017 4 commits
  4. 30 Jan, 2017 1 commit
  5. 27 Jan, 2017 3 commits
    • Marko Mäkelä's avatar
      Clean up a few tests that kill the server. · 4e82aaab
      Marko Mäkelä authored
      As noted in MDEV-8841, any test that kills the server must issue
      FLUSH TABLES, so that tables of crash-unsafe storage engines will
      not be corrupted. Consistently issue this statement after any
      call mtr.add_suppression() calls.
      
      Also, do not invoke shutdown_server directly, but use helpers instead.
      4e82aaab
    • Marko Mäkelä's avatar
      MDEV-11814 test fix · ea9caea8
      Marko Mäkelä authored
      Do not kill the server after call mtr.add_suppression(), because
      the procedure modifies a crash-unsafe table, and we do not want to
      corrupt that table.
      ea9caea8
    • 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
  6. 26 Jan, 2017 2 commits
    • Marko Mäkelä's avatar
      MDEV-11915 Detect InnoDB system tablespace size mismatch early · afb46158
      Marko Mäkelä authored
      InnoDB would refuse to start up if there is a mismatch on
      the size of the system tablespace files. However, before this
      check is conducted, the system tablespace may already have been
      heavily modified.
      
      InnoDB should perform the size check as early as possible.
      
      recv_recovery_from_checkpoint_finish():
      Move the recv_apply_hashed_log_recs() call to
      innobase_start_or_create_for_mysql().
      
      innobase_start_or_create_for_mysql(): Test the mutex functionality
      before doing anything else. Use a compile_time_assert() for a
      sizeof() constraint. Check the size of the system tablespace as
      early as possible.
      afb46158
    • Marko Mäkelä's avatar
      MDEV-11814 Refuse innodb_read_only startup if crash recovery is needed · 49fe9bad
      Marko Mäkelä authored
      recv_scan_log_recs(): Remember if redo log apply is needed,
      even if starting up in innodb_read_only mode.
      
      recv_recovery_from_checkpoint_start_func(): Refuse
      innodb_read_only startup if redo log apply is needed.
      49fe9bad
  7. 23 Jan, 2017 1 commit
  8. 20 Jan, 2017 1 commit
    • Sachin Setiya's avatar
      MDEV-4774 Strangeness with max_binlog_stmt_cache_size Settings · 18ef02b0
      Sachin Setiya authored
      Problem:- When setting max_binlog_stmt_cache_size=18446744073709547520
      from either command line or .cnf file, server fails to start.
      
      Solution:- Added one more function eval_num_suffix_ull , which uses
      strtoull to get unsigned ulonglong from string. And getopt_ull calls this
      function instead of eval_num_suffix. Also changed previous eval_num_suffix to
      eval_num_suffix_ll to remain consistent.
      18ef02b0
  9. 17 Jan, 2017 4 commits
  10. 14 Jan, 2017 4 commits
    • Sergei Golubchik's avatar
      bugfix: Item_func_min_max stored thd internally · b948b5f7
      Sergei Golubchik authored
      It was used for get_datetime_value() and for thd->is_error().
      
      But in fact, get_datetime_value() never used thd argument, because the
      cache ptr argument was NULL. And thd->is_error() check was not needed
      at that place at all.
      b948b5f7
    • Sergei Golubchik's avatar
      bugfix: cmp_item_row::alloc_comparators() allocated on the wrong arena · 798fcb54
      Sergei Golubchik authored
      it used current_thd->alloc() and allocated on the thd's execution arena,
      not on table->expr_arena.
      
      Remove THD::arena_for_cached_items that is temporarily set in
      update_virtual_fields(), and replaces THD arena in get_datetime_value().
      Instead set THD arena to table->expr_arena for the whole  duration
      of update_virtual_fields()
      798fcb54
    • Sergei Golubchik's avatar
      MDEV-9690 concurrent queries with virtual columns crash in temporal code · 67e20281
      Sergei Golubchik authored
      Item_func_le included Arg_comparator. Arg_comparator remembered
      the current_thd during fix_fields and used that value during
      execution to allocate Item_cache in get_datetime_value().
      But for vcols fix_fields and val_int can happen in different threads.
      
      Same bug for Item_func_in using in_datetime or cmp_item_datetime,
      both also remembered current_thd at fix_fields() to use it later
      for get_datetime_value().
      
      As a fix, these objects no longer remember the current_thd,
      and get_datetime_value() uses current_thd at run time. This
      should not increase the number of current_thd calls much, as
      Item_cache is created only once anyway.
      67e20281
    • Vicențiu Ciorbaru's avatar
      Merge branch '5.5' into 10.0 · 66744f45
      Vicențiu Ciorbaru authored
      66744f45
  11. 13 Jan, 2017 1 commit
  12. 12 Jan, 2017 3 commits
  13. 11 Jan, 2017 5 commits
  14. 10 Jan, 2017 8 commits
    • iangilfillan's avatar
      Update mysql_secure_installation man page · 9a4bc0d0
      iangilfillan authored
      9a4bc0d0
    • Sergei Golubchik's avatar
      6ad3dd60
    • Marko Mäkelä's avatar
      Fix an innodb_plugin leak noted in MDEV-11686 · 78e6fafc
      Marko Mäkelä authored
      buf_flush_init_flush_rbt() was called too early in MariaDB server 10.0,
      10.1, MySQL 5.5 and MySQL 5.6. The memory leak has been fixed in
      the XtraDB storage engine and in MySQL 5.7.
      
      As a result, when the server is started to initialize new data files,
      the buf_pool->flush_rbt will be created unnecessarily and then leaked.
      This memory leak was noticed in MariaDB server 10.1 when running the
      test encryption.innodb_first_page.
      78e6fafc
    • Vicențiu Ciorbaru's avatar
      Fix unit test after merge from mysql 5.5.35 perfschema · 4799af09
      Vicențiu Ciorbaru authored
      The problem in MariaDB is introduced by this merge commit:
      c33db2cd
      
      The merge comes from mysql and the original author comes from this
      commit from MySQL:
      ------------------------------------------------
          commit 160b823d146288d66638e4a740d6d2da72f9a689
          Author: Marc Alff <marc.alff@oracle.com>
          Date:   Tue Aug 30 12:14:07 2016 +0200
      
          Bug#22551677 SIGNAL 11 IN LF_PINBOX_PUT_PINS
      
          Backport to 5.6
      ------------------------------------------------
      
      The breaking change is in start_socket_wait_v1 where instead of using
      m_thread_owner, we make use of my_pthread_getspecific_ptr to fetch a
      thread local storage value. Unfortunately this invalidates the
      "m_thread_owner" member when a socket is created. The internals of the
      socket structure have m_thread_owner set to NULL, but when checking for
      ownership we actually look at the current thread's key store.
      
      This seems incorrect however it is not immediately apparent why.
      
      To not diverge from MySQL's reasoning as it is not described what the
      actual problem was that this commit is trying to fix, I have adjusted the
      unittest to account for this new behaviour. We destroy the current
      thread in the unit test, such that the newly created socket actually has
      no thread owner. The m_thread_owner is untouched in all this.
      4799af09
    • Vicențiu Ciorbaru's avatar
      d00d46f4
    • Vicențiu Ciorbaru's avatar
      Fix problems from 5.5 merge · ecdb39a9
      Vicențiu Ciorbaru authored
      * Update mysqld_safe script to remove duplicated parameter --crash-script
      * Make --core-file-size accept underscores as well as dashes correctly.
      * Add mysqld_safe_helper to Debian and Ubuntu files.
      * Update innodb minor version to 35
      ecdb39a9
    • Vicențiu Ciorbaru's avatar
    • vicentiu's avatar