1. 09 Sep, 2015 5 commits
    • Alexey Yurchenko's avatar
      1b1410c4
    • Philip Stoev's avatar
    • Alexey Yurchenko's avatar
      Synced xtrabackup SST fixes from Percona tree (as of PXC 5.6.24-25.11... · a7ea3ec3
      Alexey Yurchenko authored
      Synced xtrabackup SST fixes from Percona tree (as of PXC 5.6.24-25.11 release). This fixes/adresses the following LP bugs:
        - LP1380697: wsrep_sst_xtrabackup-v2 doesn't stop when mysql is SIGKILLed. (full fix for this (as engineeered by Percona) requires Linux-specific patch that we don't carry, but keep xtrabackup scripts as close as possible)
        - LP1399134: Log the innobackupex/SST logs in SST to syslog if possible. (fixed)
        - LP1405668: Race condition between donor and joiner in PXB SST. (fixed)
        - LP1405985: Fail early if xtrabackup_checkkpoints is missing. (fixed)
        - LP1407599: wsrep_sst_xtrabackup-v2 script causes innobackupex to print a false positive stack trace into the log. (fixed)
        - LP1441762: IST Fails with SST script error. (fixed)
        - LP1451670: Fail when move-back fails in xtrabackup SST. (fixed)
      a7ea3ec3
    • Alexey Yurchenko's avatar
      Refs codership/mysql-wsrep#141: this commit · d78110e7
      Alexey Yurchenko authored
        1. Passes wsrep_sst_auth_value to SST scripts via WSREP_SST_OPT_AUTH envronmental variable, so it never appears on the command line
        2. In mysqldump and xtrabackup* SST scripts which rely on MySQL authentication, instead of passing password on the command line, SST script sets MYSQL_PWD environment variable, so that password also never appears on the mysqldump/innobackupex command line.
      d78110e7
    • Alexey Yurchenko's avatar
      Fixes codership/mysql-wsrep#118 · 4f4f3a5e
      Alexey Yurchenko authored
      4f4f3a5e
  2. 22 Aug, 2015 1 commit
  3. 21 Aug, 2015 1 commit
    • Nirbhay Choubey's avatar
      MDEV-5146 : Bulk loads into partitioned table not working · 4ee28865
      Nirbhay Choubey authored
      When wsrep is enabled, for any update on innodb tables, the
      corresponding keys are appended to galera's transaction writeset
      (wsrep_append_keys()). However, for LOAD DATA, this got skipped
      if binary logging was disabled or it was non-ROW based.
      As a result, while the updates from LOAD DATA on non-partitioned
      tables replicated fine as wsrep implicitly enables binary logging
      (if not enabled, explicitly), the same did not work on partitioned
      tables as for partitioned tables the binary logging gets disabled
      temporarily (ha_partition::write_row()).
      
      Fixed by removing the unwanted conditions from the check.
      Also backported some changes from 10.0-galera to make sure
      wsrep_load_data_splitting affects LOAD DATA commands only.
      4ee28865
  4. 20 Aug, 2015 1 commit
  5. 18 Aug, 2015 1 commit
  6. 14 Aug, 2015 2 commits
    • Nirbhay Choubey's avatar
      Fix for some failing tests. · fe757e00
      Nirbhay Choubey authored
      fe757e00
    • Nirbhay Choubey's avatar
      MDEV-8617: Multiple galera tests failures with --ps-protocol · c18e0dab
      Nirbhay Choubey authored
      In galera cluster, when myisam replication is enabled
      (wsrep_replicate_myisam=ON), DML statements are replicated
      in open_tables(). However, in case of prepared statements,
      for an INSERT, open_tables() gets invoked twice. Once for
      COM_STMT_PREPARE (to validate and prepare INSERT) and later
      for COM_STMT_EXECUTE. As a result, the command gets replicated
      twice. Same happens for REPLACE, UPDATE and DELETE commands.
      Fixed by adding a check to not replicate during 'prepare'
      phase. Also changed the order of conditions to make it more
      efficient. Lastly, in order to support wsrep_dirty_reads, made
      changes to allow COM_STMT_XXX commands to continue past initial
      check even when wsrep is not ready.
      c18e0dab
  7. 12 Aug, 2015 1 commit
    • Nirbhay Choubey's avatar
      MDEV-8598 : Failed MySQL DDL commands and Galera replication · e998dffd
      Nirbhay Choubey authored
      RENAME TABLE, unlike other DDLs, was getting replicated before
      the access check was performed. As a result, the command could
      get get replicated and thus executed on other nodes, even if it
      fails on the originating node due to permission issues. Fixed by
      moving the logic to check user privileges before replicating the
      command.
      e998dffd
  8. 07 Aug, 2015 1 commit
  9. 04 Aug, 2015 1 commit
  10. 03 Aug, 2015 1 commit
  11. 01 Aug, 2015 3 commits
  12. 31 Jul, 2015 10 commits
  13. 29 Jul, 2015 1 commit
  14. 25 Jul, 2015 2 commits
    • Monty's avatar
      Fixed memory loss detected on P8. This can happen when we call after_flush but... · e40bc659
      Monty authored
      Fixed memory loss detected on P8. This can happen when we call after_flush but never call after_rollback() or after_commit().
      
      The old code used pthread_setspecific() to store temporary data used by the thread.
      This is not safe when used with thread pool, as the thread may change for the transaction.
      
      The fix is to save the data in THD, which is guaranteed to be properly freed.
      I also fixed the code so that we don't do a malloc() for every transaction.
      e40bc659
    • Monty's avatar
      Fixed warnings and errors found by buildbot · 71153414
      Monty authored
      field.cc
      - Fixed warning about overlapping memory copy (backport from 10.0)
      
      Item_subselect.cc
      - Fixed core dump in main.view
      - Problem was that thd->lex->current_select->master_unit()->item was not set, which caused crash in maxr_as_dependent
      
      sql/mysqld.cc
      - Got error on shutdown as we where freeing mutex before all THD objects was freed
        (~THD uses some mutex). Fixed by during shutdown freeing THD inside mutex.
      
      sql/log.cc
      - log_space_lock and LOCK_log where locked in inconsistenly. Fixed by not having a log_space_lock around purge_logs.
      
      sql/slave.cc
      - Remove unnecessary log_space_lock
      - Move cond_broadcast inside lock to ensure we don't miss the signal
      71153414
  15. 21 Jul, 2015 1 commit
    • Jan Lindström's avatar
      MDEV-8474: InnoDB sets per-connection data unsafely · 7a967021
      Jan Lindström authored
      Analysis: At check_trx_exists function InnoDB allocates
      a new trx if no trx is found from thd but this newly
      allocated trx is not registered to thd. This is unsafe,
      because nothing prevents InnoDB plugin from being uninstalled
      while there's active transaction. This can cause crashes, hang
      and any other odd behavior. It may also corrupt stack, as
      functions pointers are not available after dlclose.
      
      Fix: The fix is to use thd_set_ha_data() when
      manipulating per-connection handler data. It does appropriate
      plugin locking.
      7a967021
  16. 20 Jul, 2015 1 commit
    • Nirbhay Choubey's avatar
      MDEV-8464 : ALTER VIEW not replicated in some cases · af2f7ce3
      Nirbhay Choubey authored
      In galera, like other DDLs, CREATE/ALTER VIEW commands are recreated
      and replicated during parsing. The ALGORITHM clause is internally set
      to VIEW_ALGORITHM_INHERIT if its not explicitly specified by the user.
      But since its not a valid type to be used in a command, it leads to an
      assertion failure. The solution is to not include the ALGORITHM clause
      in the command if its not explicitly specified (or INHERIT).
      af2f7ce3
  17. 16 Jul, 2015 3 commits
    • Monty's avatar
      a63d8738
    • Monty's avatar
      MDEV-8432 Slave cannot replicate signed integer-type values with high bit set to 1 · 00d3b20f
      Monty authored
      The fix is that if the slave has a different integer size than
      the master, then they will assume the master has the same signed/unsigned modifier
      as the slave.
      
      This means that one can safely change a coon the slave an int to a bigint
      or an unsigned int to an unsigned int.  Changing an unsigned int to an
      signed bigint will cause replication failures when the high bit of the
      unsigned int is set.
      
      We can't give an error if the signess is different on the master and slave
      as the binary log doesn't contain the signess of the column on the master.
      00d3b20f
    • Monty's avatar
      MDEV-8432 Slave cannot replicate signed integer-type values with high bit set to 1 · 44de090a
      Monty authored
      The fix is that if the slave has a different integer size than
      the master, then they will assume the master has the same signed/unsigned modifier
      as the slave.
      
      This means that one can safely change a coon the slave an int to a bigint
      or an unsigned int to an unsigned int.  Changing an unsigned int to an
      signed bigint will cause replication failures when the high bit of the
      unsigned int is set.
      
      We can't give an error if the signess is different on the master and slave
      as the binary log doesn't contain the signess of the column on the master.
      44de090a
  18. 26 Jun, 2015 1 commit
  19. 25 Jun, 2015 3 commits
    • Monty's avatar
      Simple cleanups · 67c56ab1
      Monty authored
      - Removing use of calls to current_thd
      - More DBUG_PRINT
      - Code style changes
      - Made some local functions static
      Ensure that calls to print_keyuse are locked with mutex to get all lines in same debug packet
      67c56ab1
    • Monty's avatar
      Problem was that for cases like: · 8c815751
      Monty authored
      SELECT ... WHERE XX IN (SELECT YY)
      this was transformed to something like:
      SELECT ... WHERE IF_EXISTS(SELECT ... HAVING XX=YY)
      
      The bug was that for normal execution XX was fixed in the original outer SELECT context while in PS it was fixed in the sub query context and this confused the optimizer.
      
      Fixed by ensuring that XX is always fixed in the outer context.
      8c815751
    • Monty's avatar
      Fixed crashing bug when using ONLY_FULL_GROUP_BY in a stored procedure/trigger... · 2e941fe9
      Monty authored
      Fixed crashing bug when using ONLY_FULL_GROUP_BY in a stored procedure/trigger that is repeatedly executed.
      This is MDEV-7601, including it's sub tasks MDEV-7594, MDEV-7555, MDEV-7590, MDEV-7581, MDEV-7589
      
      The problem was that select_lex->non_agg_fields was not properly reset for re-execution and this caused an overwrite of a random memory position.
      The fix was move non_agg_fields from select_lext to JOIN, which is properly reset.
      2e941fe9