1. 03 Jun, 2019 1 commit
  2. 31 May, 2019 1 commit
  3. 30 May, 2019 2 commits
    • Sergey Vojtovich's avatar
      MDEV-15734 - calculation inside sizeof() warning · dd939d6f
      Sergey Vojtovich authored
      Reverted incorrect change introduced by 548d03d7.
      
      As result is char**, third qsort() parameter must be sizeof(char*).
      Not sizeof(result[0] + 2), which is same as sizeof(result[0]).
      Not even sizeof(result[0]) + 2, which would cause invalid memory access.
      
      Proper sorting is responsibility of logfilenamecompare() callback.
      dd939d6f
    • Sujatha's avatar
      MDEV-18913: typo in error log · 78c1be8b
      Sujatha authored
      Problem:
      ========
      Following typo in error log:
      
      2019-03-13 15:58:10 0 [Note] Reading of all Master_info entries succeded
      
      Should be 'succeeded'
      
      Fix:
      ===
      Fixed the typo with the right word 'succeeded'.
      78c1be8b
  4. 29 May, 2019 2 commits
    • Sujatha's avatar
      MDEV-11094: Blackhole table updates on slave fail when row annotation is enabled · a47464d1
      Sujatha authored
      Post push fix.
      
      Simplified the earlier fixes.
      a47464d1
    • Sujatha's avatar
      MDEV-11094: Blackhole table updates on slave fail when row annotation is enabled · b3473961
      Sujatha authored
      Problem:
      =======
      rpl_blackhole.test fails when executed with following options
      mysqld=--binlog_annotate_row_events=1, mysqld=--replicate_annotate_row_events=1
      
      Test output:
      ------------
      worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
      rpl.rpl_blackhole_bug 'mix'              [ pass ]    791
      rpl.rpl_blackhole_bug 'row'              [ fail ]
      Replicate_Wild_Ignore_Table
      Last_Errno	1032
      Last_Error	Could not execute Update_rows_v1 event on table test.t1; Can't find
      record in 't1', Error_code: 1032; handler error HA_ERR_END_OF_FILE; the event's
      master log master-bin.000001, end_log_pos 1510
      
      Analysis:
      =========
      Enabling "replicate_annotate_row_events" on slave, Tells the slave to write
      annotate rows events received from the master to its own binary log. The
      received annotate events are applied after the Gtid event as shown below.
      thd->query() will be set to the actual query received from the master, through
      annotate event. Annotate_rows event should not be deleted after the event is
      applied as the thd->query will be used to generate new Annotate_rows event
      during applying the subsequent Rows events. After the last Rows event has been
      applied, the saved Annotate_rows event (if any) will be deleted.
      
      In balckhole engine all the DML operations are noops as they donot store any
      data. They simply return success without doing any operation. But the existing
      strictly expects thd->query() to be 'NULL' to identify that row based
      replication is in use. This assumption will fail when row annotations are
      enabled as the query is not 'NULL'. Hence various row based operations like
      'update', 'delete', 'index lookup' will fail when row annotations are enabled.
      
      Fix:
      ===
      Extend the row based replication check to include row annotations as well.
      i.e Either the thd->query() is NULL or thd->query() points to query and row
      annotations are in use.
      b3473961
  5. 28 May, 2019 6 commits
    • Marko Mäkelä's avatar
      MDEV-19614: Fix innodb_plugin on Windows · 8358c6f0
      Marko Mäkelä authored
      LOCK_global_system_variables: Declare with MYSQL_PLUGIN_IMPORT
      8358c6f0
    • Marko Mäkelä's avatar
      Merge 5.5 into 10.1 · bf8fe324
      Marko Mäkelä authored
      bf8fe324
    • Marko Mäkelä's avatar
      MDEV-19614 SET GLOBAL innodb_ deadlock due to LOCK_global_system_variables · 626f2a1c
      Marko Mäkelä authored
      The update callback functions for several settable global InnoDB variables
      are acquiring InnoDB latches while holding LOCK_global_system_variables.
      
      On the other hand, some InnoDB code is invoking THDVAR() while holding
      InnoDB latches. An example of this is thd_lock_wait_timeout() that is
      called by lock_rec_enqueue_waiting(). In some cases, the
      intern_sys_var_ptr() that is invoked by THDVAR() may acquire
      LOCK_global_system_variables, via sync_dynamic_session_variables().
      
      In lock_rec_enqueue_waiting(), we really must be holding some InnoDB
      latch while invoking THDVAR(). This implies that
      LOCK_global_system_variables must conceptually reside below any InnoDB
      latch in the latching order. That in turns implies that the various
      update callback functions must release LOCK_global_system_variables
      before acquiring any InnoDB mutexes or rw-locks, and reacquire
      LOCK_global_system_variables later. The validate functions are being
      invoked while not holding LOCK_global_system_variables and thus they
      do not need any changes.
      
      The following statements are affected by this:
      
      SET GLOBAL innodb_adaptive_hash_index = …;
      SET GLOBAL innodb_cmp_per_index_enabled = 1;
      SET GLOBAL innodb_old_blocks_pct = …;
      SET GLOBAL innodb_fil_make_page_dirty_debug = …; -- debug builds only
      SET GLOBAL innodb_buffer_pool_evict = uncompressed; -- debug builds only
      SET GLOBAL innodb_purge_run_now = 1; -- debug builds only
      SET GLOBAL innodb_purge_stop_now = 1; -- debug builds only
      SET GLOBAL innodb_log_checkpoint_now = 1; -- debug builds only
      SET GLOBAL innodb_buf_flush_list_now = 1; -- debug builds only
      SET GLOBAL innodb_buffer_pool_dump_now = 1;
      SET GLOBAL innodb_buffer_pool_load_now = 1;
      SET GLOBAL innodb_buffer_pool_load_abort = 1;
      SET GLOBAL innodb_status_output = …;
      SET GLOBAL innodb_status_output_locks = …;
      SET GLOBAL innodb_encryption_threads = …;
      SET GLOBAL innodb_encryption_rotate_key_age = …;
      SET GLOBAL innodb_encryption_rotation_iops = …;
      SET GLOBAL innodb_encrypt_tables = …;
      SET GLOBAL innodb_disallow_writes = …;
      
      buf_LRU_old_ratio_update(): Correct the return type.
      626f2a1c
    • Marko Mäkelä's avatar
      MDEV-6812: Remove the wrapper my_log2f() · 242a28c3
      Marko Mäkelä authored
      242a28c3
    • Marko Mäkelä's avatar
      Mention the sample IPv4 address 10.0.0.1 · 661289f4
      Marko Mäkelä authored
      661289f4
    • Igor Babaev's avatar
      MDEV-18479 Assertion `join->best_read < double(1.79769313486231570815e+308L)' · 0955462d
      Igor Babaev authored
      or server crashes in JOIN::fix_all_splittings_in_plan after EXPLAIN
      
      This patch resolves the problem of overflowing when performing
      calculations to estimate the cost of an evaluated query execution plan.
      The overflowing in a non-debug build could cause different kind of
      problems uncluding crashes of the server.
      0955462d
  6. 24 May, 2019 2 commits
    • Andrei Elkin's avatar
      MDEV-17948 Assertion `thd_killed(thd) || !m_active_tranxs .. · aaf53ea0
      Andrei Elkin authored
      Simulation of a big-sized event in rpl.rpl_semi_sync_skip_repl did not clean
      up after itself so screw the last binlog event offset which could jump
      backwards.
      The test is refined to rotate a binlog file with simulation and use the next
      one for logics of the test incl master-slave synchonization.
      aaf53ea0
    • Igor Babaev's avatar
      MDEV-19258 RIGHT JOIN hangs in MariaDB · e57bb1f7
      Igor Babaev authored
      This patch corrects the patch for the bug 10006. The latter incorrectly
      calculates the attribute TABLE_LIST::dep_tables for inner tables
      of outer joins that are to be converted into inner joins.
      As a result after the patch some valid join orders were not evaluated
      and the optimizer could choose an execution plan that was far from
      being optimal.
      e57bb1f7
  7. 22 May, 2019 1 commit
  8. 21 May, 2019 3 commits
  9. 20 May, 2019 2 commits
  10. 19 May, 2019 1 commit
    • Igor Babaev's avatar
      MDEV-18896 Crash in convert_join_subqueries_to_semijoins : Correction · 2c9844a4
      Igor Babaev authored
      This patch complements the original patch for MDEV-18896 that prevents
      conversions to semi-joins in tableless selects used in INSERT statements
      in post-5.5 versions of the server.
      The test case was corrected as well to ensure that potential conversion
      to jtbm semi-joins is also checked (the problem was that one of
      the preceeding testcases in subselect_sj.test did not restore the
      state of the optimizer switch leaving the 'materialization' in the state
      'off' and so blocking this check).
      Noticed an inconsistency in the state of select_lex::table_list used
      in INSERT statements and left a comment about this.
      2c9844a4
  11. 17 May, 2019 4 commits
  12. 16 May, 2019 2 commits
  13. 15 May, 2019 1 commit
  14. 14 May, 2019 1 commit
    • Sujatha's avatar
      MDEV-11095: rpl.rpl_row_mysqlbinlog test fails if row annotation enabled · 47637a3d
      Sujatha authored
      Problem:
      =======
      Whel rpl.rpl_row_mysqlbinlog test is executed as shown below it fails with
      result content mismatch.
      
      perl mtr rpl_row_mysqlbinlog --mysqld=--binlog-annotate-row-events=1
      
      Analysis:
      =========
      When row annotations are enabled the actual query is written into the binlog
      which helps users to understand the query, even when row based replication is
      enabled.
      
      For example: Simple insert in row based replication looks like shown below.
      
      #190402 16:31:27 server id 1  end_log_pos 526 	Annotate_rows:
      #Q> insert into t values (10)
      #190402 16:31:27 server id 1  end_log_pos 566 	Table_map: `test`.`t` mapped to number 19
      # at 566
      #190402 16:31:27 server id 1  end_log_pos 600 	Write_rows: table id 19 flags: STMT_END_F
      
      BINLOG '
      B0GjXBMBAAAAKAAAADYCAAAAABMAAAAAAAEABHRlc3QAAXQAAQMAAQ==
      B0GjXBcBAAAAIgAAAFgCAAAAABMAAAAAAAEAAf/+CgAAAA==
      '/*!*/;
      # at 600
      
      The test creates some binary log events and redirects them into a SQL file.
      Executes RESET MASTER and sources the SQL file back on clean master and verifies
      that the data is available. Please refer following steps.
      
      ../client/mysqlbinlog ./var/mysqld.1/data/master-bin.000001 > test.sql
      ../client/mysql -uroot -S./var/tmp/mysqld.1.sock -Dtest  < test.sql
      ../client/mysqlbinlog ./var/mysqld.1/data/master-bin.000001 -v > row.sql
      
      When the row based replication specific SQL file is sourced once again on master
      the newly generated binlog will treat the entire "BASE 64" encoded event as
      query and write it into the binary log.
      
      Output from 'row.sql':
      
      #Q> BINLOG '
      #Q> B0GjXBMBAAAAKAAAADYCAAAAABMAAAAAAAEABHRlc3QAAXQAAQMAAQ==
      #Q> B0GjXBcBAAAAIgAAAFgCAAAAABMAAAAAAAEAAf/+CgAAAA==
      #190402 16:31:27 server id 1  end_log_pos 657 	Table_map: `test`.`t` mapped to number 23
      # at 657
      #190402 16:31:27 server id 1  end_log_pos 691 	Write_rows: table id 23 flags: STMT_END_F
      
      BINLOG '
      B0GjXBMBAAAAKAAAAJECAAAAABcAAAAAAAEABHRlc3QAAXQAAQMAAQ==
      B0GjXBcBAAAAIgAAALMCAAAAABcAAAAAAAEAAQH+CgAAAA==
      ### INSERT INTO `test`.`t`
      ### SET
      ###   @1=10
      '/*!*/;
      # at 691
      
      
      This is expected behaviour as we cannot extract query from BASE 64 encoded
      input. This causes more number of binary logs to be generated when the test is
      executed with row annotations.
      
      The following lines from test assumes that only two binary logs will contain
      entire data.
      
       --echo --- Test 4 Second Remote test --
      ---exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1
      	--port=$MASTER_MYPORT master-bin.000001 > $MYSQLTEST_VARDIR/tmp/remote.sql
      ---exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1
      	--port=$MASTER_MYPORT master-bin.000002 >> $MYSQLTEST_VARDIR/tmp/remote.sql
      
      In a case when row annotations are enabled the data gets spread across four
      binary logs. As test uses only the first two binary log files, data available in
      other binary logs gets missed. Hence test fails with result content mismatch as
      less data is avaialble.
      
      Fix:
      ====
      Use "-to-the-last" option of "mysqlbinlog" tool which will ensure that all the
      available binary log specific contents are included in .sql file.
      47637a3d
  15. 13 May, 2019 4 commits
    • Marko Mäkelä's avatar
      MDEV-19445 heap-use-after-free related to innodb_ft_aux_table · 2647fd10
      Marko Mäkelä authored
      Try to fix the race conditions between
      SET GLOBAL innodb_ft_aux_table = ...;
      and access to the INFORMATION_SCHEMA tables that depend on
      this variable.
      
      innodb_ft_aux_table: Replaces
      fts_internal_tbl_name,fts_internal_tbl_name2. Just store the
      user-specified parameter as is.
      
      innodb_ft_aux_table_id: The table_id corresponding to
      SET GLOBAL innodb_ft_aux_table, or 0 if the table does not exist
      or does not contain FULLTEXT INDEX. If the table is renamed later,
      the INFORMATION_SCHEMA tables will continue to refer to the table.
      If the table is dropped or rebuilt, the INFORMATION_SCHEMA tables
      will not find the table.
      2647fd10
    • Marko Mäkelä's avatar
      fts_optimize_words(): Remove stray output · 1c97e07f
      Marko Mäkelä authored
      With SET GLOBAL innodb_optimize_fulltext_only=1
      in effect, OPTIMIZE TABLE would output words from the fulltext index
      to the server error log, even in non-debug builds.
      
      fts_optimize_words(): Remove the unwanted output.
      1c97e07f
    • Marko Mäkelä's avatar
      fts_doc_ids_free(): Define inline · c7c54ce6
      Marko Mäkelä authored
      c7c54ce6
    • Marko Mäkelä's avatar
      MDEV-19441 Typo in error message "InnoDB: FTS Doc ID must be large than" · 7f721107
      Marko Mäkelä authored
      row_insert_for_mysql(): Correct the grammar error, and
      display the table name in both messages.
      7f721107
  16. 11 May, 2019 5 commits
  17. 10 May, 2019 2 commits
    • Michal Schorm's avatar
      Update FSF address · 17b4f999
      Michal Schorm authored
      This commit is based on the work of Michal Schorm, rebased on the
      earliest MariaDB version.
      
      Th command line used to generate this diff was:
      
      find ./ -type f \
        -exec sed -i -e 's/Foundation, Inc., 59 Temple Place, Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \
        -exec sed -i -e 's/Foundation, Inc. 59 Temple Place.* Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \
        -exec sed -i -e 's/MA.*.....-1307.*USA/MA 02110-1335 USA/g' {} \; \
        -exec sed -i -e 's/Foundation, Inc., 59 Temple/Foundation, Inc., 51 Franklin/g' {} \; \
        -exec sed -i -e 's/Place, Suite 330, Boston, MA.*02111-1307.*USA/Street, Fifth Floor, Boston, MA 02110-1335 USA/g' {} \; \
        -exec sed -i -e 's/MA.*.....-1307/MA 02110-1335/g' {} \;
      17b4f999
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-13893 encryption.innodb-redo-badkey failed in buildbot with page cannot be decrypted · 3e8cab51
      Thirunarayanan Balathandayuthapani authored
      buf_dblwr_process(): Remove the useless warning that a copy of a page
      in the doublewrite buffer is corrupted. We already report an error if a
      corrupted page cannot be recovered from the doublewrite buffer.
      
      Note: In MariaDB 10.1, the original bug reported in MDEV-13893 could
      still be easily repeatable. In MariaDB 10.2.24, MDEV-12699 should
      have reduced the probability considerably.
      3e8cab51