An error occurred fetching the project authors.
  1. 26 Feb, 2014 1 commit
    • unknown's avatar
      MDEV-5657: Parallel replication. · e90f68c0
      unknown authored
      Clean up and improve the parallel implementation code, mainly related to
      scheduling of work to threads and handling of stop and errors.
      
      Fix a lot of bugs in various corner cases that could lead to crashes or
      corruption.
      
      Fix that a single replication domain could easily grab all worker threads and
      stall all other domains; now a configuration variable
      --slave-domain-parallel-threads allows to limit the number of
      workers.
      
      Allow next event group to start as soon as previous group begins the commit
      phase (as opposed to when it ends it); this allows multiple event groups on
      the slave to participate in group commit, even when no other opportunities for
      parallelism are available.
      
      Various fixes:
      
       - Fix some races in the rpl.rpl_parallel test case.
      
       - Fix an old incorrect assertion in Log_event iocache read.
      
       - Fix repeated malloc/free of wait_for_commit and rpl_group_info objects.
      
       - Simplify wait_for_commit wakeup logic.
      
       - Fix one case in queue_for_group_commit() where killing one thread would
         fail to correctly signal the error to the next, causing loss of the
         transaction after slave restart.
      
       - Fix leaking of pthreads (and their allocated stack) due to missing
         PTHREAD_CREATE_DETACHED attribute.
      
       - Fix how one batch of group-committed transactions wait for the previous
         batch before starting to execute themselves. The old code had a very
         complex scheduling where the first transaction was handled differently,
         with subtle bugs in corner cases. Now each event group is always scheduled
         for a new worker (in a round-robin fashion amongst available workers).
         Keep a count of how many transactions have started to commit, and wait for
         that counter to reach the appropriate value.
      
       - Fix slave stop to wait for all workers to actually complete processing;
         before, the wait was for update of last_committed_sub_id, which happens a
         bit earlier, and could leave worker threads potentially accessing bits of
         the replication state that is no longer valid after slave stop.
      
       - Fix a couple of places where the test suite would kill a thread waiting
         inside enter_cond() in connection with debug_sync; debug_sync + kill can
         crash in rare cases due to a race with mysys_var_current_mutex in this
         case.
      
       - Fix some corner cases where we had enter_cond() but no exit_cond().
      
       - Fix that we could get failure in wait_for_prior_commit() but forget to flag
         the error with my_error().
      
       - Fix slave stop (both for normal stop and stop due to error). Now, at stop
         we pick a specific safe point (in terms of event groups executed) and make
         sure that all event groups before that point are executed to completion,
         and that no event group after start executing; this ensures a safe place to
         restart replication, even for non-transactional stuff/DDL. In error stop,
         make sure that all prior event groups are allowed to execute to completion,
         and that any later event groups that have started are rolled back, if
         possible. The old code could leave eg. T1 and T3 committed but T2 not, or
         it could even leave half a transaction not rolled back in some random
         worker, which would cause big problems when that worker was later reused
         after slave restart.
      
       - Fix the accounting of amount of events queued for one worker. Before, the
         amount was reduced immediately as soon as the events were dequeued (which
         happens all at once); this allowed twice the amount of events to be queued
         in memory for each single worker, which is not what users would expect.
      
       - Fix that an error set during execution of one event was sometimes not
         cleared before executing the next, causing problems with the error
         reporting.
      
       - Fix incorrect handling of thd->killed in worker threads.
      e90f68c0
  2. 19 Feb, 2014 1 commit
    • Sergey Vojtovich's avatar
      MDEV-5314 - Compiling fails on OSX using clang · d12c7adf
      Sergey Vojtovich authored
      This is port of fix for MySQL BUG#17647863.
      
      revno: 5572
      revision-id: jon.hauglid@oracle.com-20131030232243-b0pw98oy72uka2sj
      committer: Jon Olav Hauglid <jon.hauglid@oracle.com>
      timestamp: Thu 2013-10-31 00:22:43 +0100
      message:
        Bug#17647863: MYSQL DOES NOT COMPILE ON OSX 10.9 GM
      
        Rename test() macro to MY_TEST() to avoid conflict with libc++.
      d12c7adf
  3. 07 Feb, 2014 1 commit
    • unknown's avatar
      MDEV-4984: Implement MASTER_GTID_WAIT() and @@LAST_GTID. · 4e6606ac
      unknown authored
      MASTER_GTID_WAIT() is similar to MASTER_POS_WAIT(), but works with a
      GTID position rather than an old-style filename/offset.
      
      @@LAST_GTID gives the GTID assigned to the last transaction written
      into the binlog.
      
      Together, the two can be used by applications to obtain the GTID of
      an update on the master, and then do a MASTER_GTID_WAIT() for that
      position on any read slave where it is important to get results that
      are caught up with the master at least to the point of the update.
      
      The implementation of MASTER_GTID_WAIT() is implemented in a way
      that tries to minimise the performance impact on the SQL threads,
      even in the presense of many waiters on single GTID positions (as
      from @@LAST_GTID).
      4e6606ac
  4. 05 Feb, 2014 1 commit
    • Michael Widenius's avatar
      Replication changes for CREATE OR REPLACE TABLE · 5426facd
      Michael Widenius authored
      - CREATE TABLE is by default executed on the slave as CREATE OR REPLACE
      - DROP TABLE is by default executed on the slave as DROP TABLE IF NOT EXISTS
      
      This means that a slave will by default continue even if we try to create
      a table that existed on the slave (the table will be deleted and re-created) or
      if we try to drop a table that didn't exist on the slave.
      This should be safe as instead of having the slave stop because of an inconsistency between
      master and slave, it will fix the inconsistency.
      Those that would prefer to get a stopped slave instead for the above cases can set slave_ddl_exec_mode to STRICT. 
      
      - Ensure that a CREATE OR REPLACE TABLE which dropped a table is replicated
      - DROP TABLE that generated an error on master is handled as an identical DROP TABLE on the slave (IF NOT EXISTS is not added in this case)
      - Added slave_ddl_exec_mode variable to decide how DDL's are replicated
      
      New logic for handling BEGIN GTID ... COMMIT from the binary log:
      
      - When we find a BEGIN GTID, we start a transaction and set OPTION_GTID_BEGIN
      - When we find COMMIT, we reset OPTION_GTID_BEGIN and execute the normal COMMIT code.
      - While OPTION_GTID_BEGIN is set:
        - We don't generate implict commits before or after statements
        - All tables are regarded as transactional tables in the binary log (to ensure things are executed exactly as on the master)
      - We reset OPTION_GTID_BEGIN also on rollback
      
      This will help ensuring that we don't get any sporadic commits (and thus new GTID's) on the slave and will help keep the GTID's between master and slave in sync.
      
      
      mysql-test/extra/rpl_tests/rpl_log.test:
        Added testing of mode slave_ddl_exec_mode=STRICT
      mysql-test/r/mysqld--help.result:
        New help messages
      mysql-test/suite/rpl/r/create_or_replace_mix.result:
        Testing of CREATE OR REPLACE TABLE with replication
      mysql-test/suite/rpl/r/create_or_replace_row.result:
        Testing of CREATE OR REPLACE TABLE with replication
      mysql-test/suite/rpl/r/create_or_replace_statement.result:
        Testing replication of create or replace
      mysql-test/suite/rpl/r/rpl_gtid_startpos.result:
        Test must be run in slave_ddl_exec_mode=STRICT as part of the test depends on that DROP TABLE should fail on slave.
      mysql-test/suite/rpl/r/rpl_row_log.result:
        Updated result
      mysql-test/suite/rpl/r/rpl_row_log_innodb.result:
        Updated result
      mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result:
        Updated result
      mysql-test/suite/rpl/r/rpl_stm_log.result:
        Updated result
      mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result:
        Updated result
      mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result:
        Updated result
      mysql-test/suite/rpl/t/create_or_replace.inc:
        Testing of CREATE OR REPLACE TABLE with replication
      mysql-test/suite/rpl/t/create_or_replace_mix.cnf:
        Testing of CREATE OR REPLACE TABLE with replication
      mysql-test/suite/rpl/t/create_or_replace_mix.test:
        Testing of CREATE OR REPLACE TABLE with replication
      mysql-test/suite/rpl/t/create_or_replace_row.cnf:
        Testing of CREATE OR REPLACE TABLE with replication
      mysql-test/suite/rpl/t/create_or_replace_row.test:
        Testing of CREATE OR REPLACE TABLE with replication
      mysql-test/suite/rpl/t/create_or_replace_statement.cnf:
        Testing of CREATE OR REPLACE TABLE with replication
      mysql-test/suite/rpl/t/create_or_replace_statement.test:
        Testing of CREATE OR REPLACE TABLE with replication
      mysql-test/suite/rpl/t/rpl_gtid_startpos.test:
        Test must be run in slave_ddl_exec_mode=STRICT as part of the test depends on that DROP TABLE should fail on slave.
      mysql-test/suite/rpl/t/rpl_stm_log.test:
        Removed some lines
      mysql-test/suite/sys_vars/r/slave_ddl_exec_mode_basic.result:
        Testing of slave_ddl_exec_mode
      mysql-test/suite/sys_vars/t/slave_ddl_exec_mode_basic.test:
        Testing of slave_ddl_exec_mode
      sql/handler.cc:
        Regard all tables as transactional in commit if OPTION_GTID_BEGIN is set.
        This is to ensure that statments are not commited too early if non transactional tables are used.
      sql/log.cc:
        Regard all tables as transactional in commit if OPTION_GTID_BEGIN is set.
        Also treat 'direct' log events as transactional (to get them logged as they where on the master)
      sql/log_event.cc:
        Ensure that the new error from DROP TABLE when trying to drop a view is treated same as the old one.
        Store error code that slave expects in THD.
        Set OPTION_GTID_BEGIN if we find a BEGIN.
        Reset OPTION_GTID_BEGIN if we find a COMMIT.
      sql/mysqld.cc:
        Added slave_ddl_exec_mode_options
      sql/mysqld.h:
        Added slave_ddl_exec_mode_options
      sql/rpl_gtid.cc:
        Reset OPTION_GTID_BEGIN if we record a gtid (safety)
      sql/sql_class.cc:
        Regard all tables as transactional in commit if OPTION_GTID_BEGIN is set.
      sql/sql_class.h:
        Added to THD: log_current_statement and slave_expected_error
      sql/sql_insert.cc:
        Ensure that CREATE OR REPLACE is logged if table was deleted.
        Don't do implicit commit for CREATE if we are under OPTION_GTID_BEGIN
      sql/sql_parse.cc:
        Change CREATE TABLE -> CREATE OR REPLACE TABLE for slaves
        Change DROP TABLE -> DROP TABLE IF EXISTS for slaves
        CREATE TABLE doesn't force implicit commit in case of OPTION_GTID_BEGIN
        Don't do commits before or after any statement if OPTION_GTID_BEGIN was set.
      sql/sql_priv.h:
        Added OPTION_GTID_BEGIN
      sql/sql_show.cc:
        Enhanced store_create_info() to also be able to handle CREATE OR REPLACE
      sql/sql_show.h:
        Updated prototype
      sql/sql_table.cc:
        Ensure that CREATE OR REPLACE is logged if table was deleted.
      sql/sys_vars.cc:
        Added slave_ddl_exec_mode
      sql/transaction.cc:
        Added warning if we got a GTID under OPTION_GTID_BEGIN
      5426facd
  5. 28 Jan, 2014 1 commit
  6. 23 Jan, 2014 1 commit
  7. 20 Jan, 2014 1 commit
  8. 06 Jan, 2014 1 commit
    • unknown's avatar
      MDEV-5363: Make parallel replication waits killable · cee92518
      unknown authored
      Add another test case. This one for killing a query that is waiting
      for a prior commit, when --log-slave-updates=0 (in this case the
      wait happens in different code from --log-slave-updates=1).
      cee92518
  9. 22 Dec, 2013 1 commit
  10. 13 Dec, 2013 1 commit
    • unknown's avatar
      MDEV-5363: Make parallel replication waits killable · dbfe5f47
      unknown authored
      Add a test case for killing a waiting query in parallel replication.
      
      Fix several bugs found:
      
       - We should not wakeup_subsequent_commits() in ha_rollback_trans(), since we
         do not know the right wakeup_error() to give.
      
       - When a wait_for_prior_commit() is killed, we must unregister from the
         waitee so we do not race and get an extra (non-kill) wakeup.
      
       - We need to deal with error propagation correctly in queue_for_group_commit
         when one thread is killed.
      
       - Fix one locking issue in queue_for_group_commit(), we could unlock the
         waitee lock too early and this end up processing wakeup() with insufficient
         locking.
      
       - Fix Xid_log_event::do_apply_event; if commit fails it must not update the
         in-memory @@gtid_slave_pos state.
      
       - Fix and cleanup some things in the rpl_parallel.cc error handling.
      
       - Add a missing check for killed in the slave sql driver thread, to avoid a
         race.
      dbfe5f47
  11. 09 Dec, 2013 3 commits
  12. 05 Dec, 2013 1 commit
  13. 12 Dec, 2013 1 commit
  14. 11 Nov, 2013 1 commit
    • Sergei Golubchik's avatar
      MDEV-4824 userstats - wrong user statistics · f486f49e
      Sergei Golubchik authored
      (and valgrind warnings)
      
      * move thd userstat initialization to the same function
        that was adding thd userstat to global counters.
      * initialize thd->start_bytes_received in THD::init
        (when thd->userstat_running is set)
      f486f49e
  15. 06 Nov, 2013 1 commit
    • unknown's avatar
      MDEV-4506: Parallel replication · c90f4f02
      unknown authored
      MDEV-5217: Unlock of de-allocated mutex
      
      There was a race in the code for wait_for_commit::wakeup().
      
      Since the waiter does a dirty read of the waiting_for_commit
      flag, it was possible for the waiter to complete and deallocate
      the wait_for_commit object while the waitee was still running
      inside wakeup(). This would cause the waitee to access invalid
      memory.
      
      Fixed by putting an extra lock/unlock in the destructor for
      wait_for_commit, to ensure that waitee has finished with the
      object before it is deallocated.
      c90f4f02
  16. 18 Oct, 2013 1 commit
  17. 17 Oct, 2013 1 commit
  18. 14 Oct, 2013 1 commit
    • unknown's avatar
      MDEV-4506: Parallel replication: error handling. · 2842f6b5
      unknown authored
      Add an error code to the wait_for_commit facility.
      
      Now, when a transaction fails, it can signal the error to
      any subsequent transaction that is waiting for it to commit.
      The waiting transactions then receive the error code back from
      wait_for_prior_commit() and can handle the error appropriately.
      
      Also fix one race that could cause crash if @@slave_parallel_threads
      were changed several times quickly in succession.
      2842f6b5
  19. 13 Oct, 2013 1 commit
    • Michael Widenius's avatar
      Fixes for parallel slave: · 2e100cc5
      Michael Widenius authored
      - Made slaves temporary table multi-thread slave safe by adding mutex around save_temporary_table usage.
        - rli->save_temporary_tables is the active list of all used temporary tables
        - This is copied to THD->temporary_tables when temporary tables are opened and updated when temporary tables are closed
        - Added THD->lock_temporary_tables() and THD->unlock_temporary_tables() to simplify this.
      - Relay_log_info->sql_thd renamed to Relay_log_info->sql_driver_thd to avoid wrong usage for merged code.
      - Added is_part_of_group() to mark functions that are part of the next function. This replaces setting IN_STMT when events are executed.
      - Added is_begin(), is_commit() and is_rollback() functions to Query_log_event to simplify code.
      - If slave_skip_counter is set run things in single threaded mode. This simplifies code for skipping events.
      - Updating state of relay log (IN_STMT and IN_TRANSACTION) is moved to one single function: update_state_of_relay_log()
        We can't use OPTION_BEGIN to check for the state anymore as the sql_driver and sql execution threads may be different.
        Clear IN_STMT and IN_TRANSACTION in init_relay_log_pos() and Relay_log_info::cleanup_context() to ensure the flags doesn't survive slave restarts
        is_in_group() is now independent of state of executed transaction.
      - Reset thd->transaction.all.modified_non_trans_table() if we did set it for single table row events.
        This was mainly for keeping the flag as documented.
      - Changed slave_open_temp_tables to uint32 to be able to use atomic operators on it.
      - Relay_log_info::sleep_lock -> rpl_group_info::sleep_lock
      - Relay_log_info::sleep_cond -> rpl_group_info::sleep_cond
      - Changed some functions to take rpl_group_info instead of Relay_log_info to make them multi-slave safe and to simplify usage
        - do_shall_skip()
        - continue_group()
        - sql_slave_killed()
        - next_event()
      - Simplifed arguments to io_salve_killed(), check_io_slave_killed() and sql_slave_killed(); No reason to supply THD as this is part of the given structure.
      - set_thd_in_use_temporary_tables() removed as in_use is set on usage
      - Added information to thd_proc_info() which thread is waiting for slave mutex to exit.
      - In open_table() reuse code from find_temporary_table()
      
      Other things:
      - More DBUG statements
      - Fixed the rpl_incident.test can be run with --debug
      - More comments
      - Disabled not used function rpl_connect_master()
      
      mysql-test/suite/perfschema/r/all_instances.result:
        Moved sleep_lock and sleep_cond to rpl_group_info
      mysql-test/suite/rpl/r/rpl_incident.result:
        Updated result
      mysql-test/suite/rpl/t/rpl_incident-master.opt:
        Not needed anymore
      mysql-test/suite/rpl/t/rpl_incident.test:
        Fixed that test can be run with --debug
      sql/handler.cc:
        More DBUG_PRINT
      sql/log.cc:
        More comments
      sql/log_event.cc:
        Added DBUG statements
        do_shall_skip(), continue_group() now takes rpl_group_info param
        Use is_begin(), is_commit() and is_rollback() functions instead of inspecting query string
        We don't have set slaves temporary tables 'in_use' as this is now done when tables are opened.
        Removed IN_STMT flag setting. This is now done in update_state_of_relay_log()
        Use IN_TRANSACTION flag to test state of relay log.
        In rows_event_stmt_cleanup() reset thd->transaction.all.modified_non_trans_table if we had set this before.
      sql/log_event.h:
        do_shall_skip(), continue_group() now takes rpl_group_info param
        Added is_part_of_group() to mark events that are part of the next event. This replaces setting IN_STMT when events are executed.
        Added is_begin(), is_commit() and is_rollback() functions to Query_log_event to simplify code.
      sql/log_event_old.cc:
        Removed IN_STMT flag setting. This is now done in update_state_of_relay_log()
        do_shall_skip(), continue_group() now takes rpl_group_info param
      sql/log_event_old.h:
        Added is_part_of_group() to mark events that are part of the next event.
        do_shall_skip(), continue_group() now takes rpl_group_info param
      sql/mysqld.cc:
        Changed slave_open_temp_tables to uint32 to be able to use atomic operators on it.
        Relay_log_info::sleep_lock -> Rpl_group_info::sleep_lock
        Relay_log_info::sleep_cond -> Rpl_group_info::sleep_cond
      sql/mysqld.h:
        Updated types and names
      sql/rpl_gtid.cc:
        More DBUG
      sql/rpl_parallel.cc:
        Updated TODO section
        Set thd for event that is execution
        Use new  is_begin(), is_commit() and is_rollback() functions.
        More comments
      sql/rpl_rli.cc:
        sql_thd -> sql_driver_thd
        Relay_log_info::sleep_lock -> rpl_group_info::sleep_lock
        Relay_log_info::sleep_cond -> rpl_group_info::sleep_cond
        Clear IN_STMT and IN_TRANSACTION in init_relay_log_pos() and Relay_log_info::cleanup_context() to ensure the flags doesn't survive slave restarts.
        Reset table->in_use for temporary tables as the table may have been used by another THD.
        Use IN_TRANSACTION instead of OPTION_BEGIN to check state of relay log.
        Removed IN_STMT flag setting. This is now done in update_state_of_relay_log()
      sql/rpl_rli.h:
        Changed relay log state flags to bit masks instead of bit positions (most other code we have uses bit masks)
        Added IN_TRANSACTION to mark if we are in a BEGIN ... COMMIT section.
        save_temporary_tables is now thread safe
        Relay_log_info::sleep_lock -> rpl_group_info::sleep_lock
        Relay_log_info::sleep_cond -> rpl_group_info::sleep_cond
        Relay_log_info->sql_thd renamed to Relay_log_info->sql_driver_thd to avoid wrong usage for merged code
        is_in_group() is now independent of state of executed transaction.
      sql/slave.cc:
        Simplifed arguments to io_salve_killed(), sql_slave_killed() and check_io_slave_killed(); No reason to supply THD as this is part of the given structure.
        set_thd_in_use_temporary_tables() removed as in_use is set on usage in sql_base.cc
        sql_thd -> sql_driver_thd
        More DBUG
        Added update_state_of_relay_log() which will calculate the IN_STMT and IN_TRANSACTION state of the relay log after the current element is executed.
        If slave_skip_counter is set run things in single threaded mode.
        Simplifed arguments to io_salve_killed(), check_io_slave_killed() and sql_slave_killed(); No reason to supply THD as this is part of the given structure.
        Added information to thd_proc_info() which thread is waiting for slave mutex to exit.
        Disabled not used function rpl_connect_master()
        Updated argument to next_event()
      sql/sql_base.cc:
        Added mutex around usage of slave's temporary tables. The active list is always kept up to date in sql->rgi_slave->save_temporary_tables.
        Clear thd->temporary_tables after query (safety)
        More DBUG
        When using temporary table, set table->in_use to current thd as the THD may be different for slave threads.
        Some code is ifdef:ed with REMOVE_AFTER_MERGE_WITH_10 as the given code in 10.0 is not yet in this tree.
        In open_table() reuse code from find_temporary_table()
      sql/sql_binlog.cc:
        rli->sql_thd -> rli->sql_driver_thd
        Remove duplicate setting of rgi->rli
      sql/sql_class.cc:
        Added helper functions rgi_lock_temporary_tables() and rgi_unlock_temporary_tables()
        Would have been nicer to have these inline, but there was no easy way to do that
      sql/sql_class.h:
        Added functions to protect slaves temporary tables
      sql/sql_parse.cc:
        Added DBUG_PRINT
      sql/transaction.cc:
        Added comment
      2e100cc5
  20. 25 Sep, 2013 1 commit
  21. 23 Sep, 2013 2 commits
  22. 17 Sep, 2013 1 commit
  23. 13 Sep, 2013 1 commit
  24. 06 Sep, 2013 1 commit
    • Sergey Vojtovich's avatar
      MDEV-4978 - Server cursor is broken with blobs in the select list, · bbc9e579
      Sergey Vojtovich authored
                  ORDER BY does not work
      
      Use "dynamic" row format (instead of "block") for MARIA internal
      temporary tables created for cursors.
      
      With "block" row format MARIA may shuffle rows, with "dynamic" row
      format records are inserted sequentially (there are no gaps in data
      file while we fill temporary tables).
      
      This is needed to preserve row order when scanning materialized cursors.
      bbc9e579
  25. 06 Aug, 2013 1 commit
  26. 02 Aug, 2013 1 commit
    • Sergey Petrunya's avatar
      MDEV-4816: rpl.rpl_trunc_temp fails in 10.0-serg · 5c49041b
      Sergey Petrunya authored
      Temorary fix for a number of replication tests (rpl.rpl_temp_table_mix_row 
      rpl.rpl_trunc_temp rpl.rpl_current_user rpl.rpl_gtid_master_promote):
      
      - THD::decide_logging_format() should not assume that mysql.gtid_slave_pos is 
        a non-replicated table. This used to cause unintended behavior for COMMIT 
        statement: replication would switch to row-based, etc.
      
      The question of what should be done when a user issues a statement that
      explicitly modifies mysql.gtid_slave_pos table remains open.
      5c49041b
  27. 30 Jul, 2013 1 commit
    • prabakaran thirumalai's avatar
      Bug#17083851 BACKPORT BUG#11765744 TO 5.1, 5.5 AND 5.6 · 592a2b2a
      prabakaran thirumalai authored
      Description:
      Original fix Bug#11765744 changed mutex to read write lock
      to avoid multiple recursive lock acquire operation on 
      LOCK_status mutex.  
      On Windows, locking read-write lock recursively is not safe. 
      Slim read-write locks, which MySQL uses if they are supported by
      Windows version, do not support recursion according to their 
      documentation. For our own implementation of read-write lock, 
      which is used in cases when Windows version doesn't support SRW,
      recursive locking of read-write lock can easily lead to deadlock
      if there are concurrent lock requests.
      
      Fix:  
      This patch reverts the previous fix for bug#11765744 that used
      read-write locks. Instead problem of recursive locking for
      LOCK_status mutex is solved by tracking recursion level using 
      counter in THD object and acquiring lock only once when we enter 
      fill_status() function first time. 
      592a2b2a
  28. 24 Jul, 2013 1 commit
    • Sergey Petrunya's avatar
      Alternative fix for failure in filesort_debug.test. · be39bccc
      Sergey Petrunya authored
      - Make THD::raise_condition() call push_warning() after set_error_status() call.
        (they seem to have accidentally exchanged in this merge cset:
         sergii@pisem.net-20130721143919-7cltcw2l9g29f983)
      - Rollback the patch from two csets before (the one with comment:
         Update filesort_debug.test (see comment #1 in MDEV-4786 for analysis))
      be39bccc
  29. 21 Jul, 2013 1 commit
  30. 15 Jul, 2013 1 commit
    • Sergei Golubchik's avatar
      Fixes for innodb suite, merging tests from 5.6. · e1c76b80
      Sergei Golubchik authored
      Includes 5.6 changesets for:
      *****
      Fix for BUG#13489996 valgrind:conditional jump or move depends on uninitialised values-field_blob.
      blob_ptr_size was not initialized properly: remove this variable.
      *****
      Bug#14021323 CRASH IN FIELD::SET_NULL WHEN INSERTING ROWS TO NEW TABLE
      *****
      e1c76b80
  31. 12 Jul, 2013 1 commit
  32. 11 Jul, 2013 1 commit
    • unknown's avatar
      Merge the following patch from MySQL 5.6.10, in order to make perfschema.binlog_* tests work. · f4d5dacf
      unknown authored
      revno: 4559
      committer: Marc Alff <marc.alff@oracle.com>
      branch nick: mysql-5.6-bug14741537-v4
      timestamp: Thu 2012-11-08 22:40:31 +0100
      message:
        Bug#14741537 - MYSQL 5.6, GTID AND PERFORMANCE_SCHEMA
        
        Before this fix, statements using performance_schema tables:
        - were marked as unsafe for replication,
        - did cause warnings during execution,
        - were written to the binlog, either in STATEMENT or ROW format.
        
        When using replication with the new GTID feature,
        unsafe warnings are elevated to errors,
        which prevents to use both the performance_schema and GTID together.
        
        The root cause of the problem is not related to raising warnings/errors
        in some special cases, but deeper: statements involving the performance
        schema should not even be written to the binary log in the first place,
        because the content of the performance schema tables is 'local' to a server
        instance, and may differ greatly between nodes in a replication
        topology.
        
        In particular, the DBA should be able to configure (INSERT, UPDATE, DELETE)
        or flush (TRUNCATE) performance schema tables on one node,
        without affecting other nodes.
        
        This fix introduces the concept of a 'non-replicated' or 'local' table,
        and adjusts the replication logic to ignore tables that are not replicated
        when deciding if or how to log a statement to the binlog.
        
        Note that while this issue was detected using the performance_schema,
        other tables are also affected by the same problem.
        
        This fix define as 'local' the following tables, which are then never
        replicated:
        - performance_schema.*
        - mysql.general_log
        - mysql.slow_log
        - mysql.slave_relay_log_info
        - mysql.slave_master_info
        - mysql.slave_worker_info
        
        Existing behavior for information_schema.* is unchanged by this fix,
        to limit the scope of changes.
        
        Coding wise, this fix implements the following changes:
        
        1)
        
        Performance schema tables are not using any replication flags,
        since performance schema tables are not replicated.
        
        2)
        
        In open_table_from_share(),
        tables with no replication capabilities (performance_schema.*),
        tables with TABLE_CATEGORY_LOG (logs)
        and tables with TABLE_CATEGORY_RPL_INFO (replication)
        are marked as non replicated, with TABLE::no_replicate
        
        3)
        
        A new THD member, THD::m_binlog_filter_state,
        indicate if the current statement is written to the binlog
        (normal cases for most statements), or is to be discarded
        (because the statements affects non replicated tables).
        
        4)
        
        In THD::decide_logging_format(), the replication logic
        is changed to take into account non replicated tables.
        
        Statements that affect only non replicated tables are
        executed normally (no warning or errors), but not written
        to the binlog.
        
        Statements that affect (i.e., write to) a replicated table
        while also using (i.e., reading from or writing to) a non replicated table
        are executed normally in MIXED and ROW binlog format,
        and cause a new error in STATEMENT binlog format.
        
        THD::decide_logging_format() uses THD::m_binlog_filter_state
        to indicate if a statement is to be ignored, when writing to
        the binlog.
        
        5)
        
        In THD::binlog_query(), statements marked as ignored
        are not written to the binary log.
        
        6)
        
        For row based replication, the existing test for 'table->no_replicate',
        has been moved from binlog_log_row() to check_table_binlog_row_based().
      f4d5dacf
  33. 10 Jul, 2013 1 commit
    • Annamalai Gurusami's avatar
      Bug #14017206 WITH CONSISTENT SNAPSHOT DOES NOT WORK WITH ISOLATION LEVEL · 0d71a36d
      Annamalai Gurusami authored
      SERIALIZABLE
      
      Problem:
      
      The documentation claims that WITH CONSISTENT SNAPSHOT will work for both
      REPEATABLE READ and SERIALIZABLE isolation levels.  But it will work only
      for REPEATABLE READ isolation level.  Also, the clause WITH CONSISTENT
      SNAPSHOT is silently ignored when it is not applicable to the given isolation
      level.  
      
      Solution:
      
      Generate a warning when the clause WITH CONSISTENT SNAPSHOT is ignored.
      
      rb#2797 approved by Kevin.
      
      Note: Support team wanted to push this to 5.5+.
      
      0d71a36d
  34. 03 Jul, 2013 1 commit
    • unknown's avatar
      MDEV-4506: Parallel replication. Intermediate commit. · 31a5edb5
      unknown authored
      Hook in the wait-for-prior-commit logic (not really tested yet).
      Clean up some resource maintenance around rpl_group_info (may still be some
      smaller issues there though).
      Add a ToDo list at the top of rpl_parallel.cc
      31a5edb5
  35. 02 Jul, 2013 2 commits
  36. 01 Jul, 2013 1 commit