1. 28 Dec, 2017 1 commit
  2. 27 Dec, 2017 1 commit
  3. 25 Dec, 2017 4 commits
    • Sergei Golubchik's avatar
      MDEV-14026 ALTER TABLE ... DELAY_KEY_WRITE=1 creates table copy for... · 5377242f
      Sergei Golubchik authored
      MDEV-14026 ALTER TABLE ... DELAY_KEY_WRITE=1 creates table copy for partitioned MyISAM table with DATA DIRECTORY/INDEX DIRECTORY options
      
      set data_file_name and index_file_name in HA_CREATE_INFO
      before calling check_if_incompatible_data()
      5377242f
    • Sergei Golubchik's avatar
      6d8b1bd6
    • Sergei Golubchik's avatar
      cleanup: ha_myisam::data_file_name and index_file_name · c881d82c
      Sergei Golubchik authored
      don't allocate them on THD::mem_root on every init(HA_STATUS_CONST) call,
      do it once in open() (because they don't change) on TABLE::mem_root
      (so they stay valid until the table is closed)
      c881d82c
    • Sachin Setiya's avatar
      MDEV-10715 Galera: Replicate MariaDB GTID to other nodes in the cluster · 2fe61861
      Sachin Setiya authored
      Problem:- Gtid are not transferred in Galera Cluster.
      
      Solution:- We need to transfer gtid in the case on either when cluster is
      slave/master in async replication. In normal Gtid replication gtid are generated on
      recieving node itself and it is always on sync with other nodes. Because galera keeps
      node in sync , So all nodes get same no of event groups. So the issue arises when
      say galera is slave in async replication.
      A
      |    (Async replication)
      D <-> E <-> F  {Galera replication}
      So what should happen is that all node should apply the master gtid but this does
      node happen, becuase node E, F does not recieve gtid from D in write set , So what E(or F)
      does is that it applies wsrep_gtid_domain_id, D server-id , E gtid next seq no. This
      generated gtid does not always work when say A has different domain id.
      
      So In this commit, on galera node when we see that this event is recieved from master
      we simply write Gtid_Log_Event in write_set and send it to other nodes.
      2fe61861
  4. 22 Dec, 2017 2 commits
  5. 21 Dec, 2017 6 commits
    • Vicențiu Ciorbaru's avatar
      Follow up to MDEV-12366: FLUSH privileges can break hierarchy of roles · 24efee91
      Vicențiu Ciorbaru authored
      A suggestion to make role propagation simpler from serg@mariadb.org.
      
      Instead of gathering the leaf roles in an array, which for very wide
      graphs could potentially mean a big part of the whole roles schema, keep
      the previous logic. When finally merging a role, set its counter
      to something positive.
      
      This will effectively mean that a role has been merged, thus a random pass
      through roles hash that touches a previously merged role won't cause the problem
      described in MDEV-12366 any more, as propagate_role_grants_action will stop
      attempting to merge from that role.
      24efee91
    • Marko Mäkelä's avatar
      Make a test more robust · 461cf3e5
      Marko Mäkelä authored
      Sometimes, the test would fail with a result difference for
      the READ UNCOMMITTED read, because the incremental backup
      would finish before redo log was written for all the rows
      that were inserted in the second batch.
      
      To fix that, cause a redo log write by creating another
      transaction. The transaction rollback (which internally does commit)
      will be flushed to the redo log, and before that, all the preceding
      changes will be flushed to the redo log as well.
      461cf3e5
    • Marko Mäkelä's avatar
      Merge 10.0 into 10.1 · 9d7c0882
      Marko Mäkelä authored
      9d7c0882
    • Marko Mäkelä's avatar
      MDEV-12827 Assertion failure when reporting duplicate key error in online table rebuild · 0202e472
      Marko Mäkelä authored
      row_log_table_apply_insert_low(), row_log_table_apply_update():
      When reporting the error_key_num, only count the clustered index
      if it corresponds to a key in the SQL layer.
      
      The assertion failure was probably introduced by the (incomplete)
      MySQL 5.6.28 bug fix
      Bug #21364096 THE BOGUS DUPLICATE KEY ERROR IN ONLINE DDL
      WITH INCORRECT KEY NAME
      which we are improving.
      
      Side note: the fix was incorrectly merged to MySQL 5.7.10;
      incorrect key names will continue to be reported in MySQL 5.7.
      0202e472
    • Marko Mäkelä's avatar
      MDEV-6247 post-fix: Re-enable some debug assertions · 1cf28964
      Marko Mäkelä authored
      These assertions were disabled in MariaDB 10.1.1 in
      commit df4dd593
      with a bogus comment referring to the function wsrep_fake_trx_id()
      that was introduced in the very same commit.
      1cf28964
    • Elena Stepanova's avatar
      5f896b36
  6. 20 Dec, 2017 9 commits
  7. 19 Dec, 2017 10 commits
    • sjaakola's avatar
      MW-416 DDL replication moved after acl checking · 64e1dda0
      sjaakola authored
      galera_events test shows a regression with the original fix for MW-416
      Reason was that Events::drop_event() can be called also from inside event
      execution, and there we have a speacial treatment for event, which executes
      "DROP EVENT" statement, and runs TOI replication inside the event processing body.
      This resulted in executing WSREP_TO_ISOLATION two times for such DROP EVENT statement.
      Fix is to call WSREP_TO_ISOLATION_BEGIN only in Events::drop_event()
      64e1dda0
    • sjaakola's avatar
      MW-416 · 1a8da003
      sjaakola authored
      Changed return code for replicatio error to TRUE.
      This is aligned with native mysql convention to return TRUE (defined to 1) or FALSE (defined to 0) from a bool function.
      This is wrong, but follows the mysql conventiosn, at least...
      1a8da003
    • Simon J Mudd's avatar
    • Sergey Vojtovich's avatar
      MDEV-14265 - RPMLint warning: shared-lib-calls-exit · 2cd31691
      Sergey Vojtovich authored
      find_type_or_exit() client helper did exit(1) on error, exit(1) moved to
      clients.
      
      mysql_read_default_options() did exit(1) on error, error is passed through and
      handled now.
      
      my_str_malloc_default() did exit(1) on error, replaced my_str_ allocator
      functions with normal my_malloc()/my_realloc()/my_free().
      
      sql_connect.cc did many exit(1) on hash initialisation failure. Removed error
      check since my_hash_init() never fails.
      
      my_malloc() did exit(1) on error. Replaced with abort().
      
      my_load_defaults() did exit(1) on error, replaced with return 2.
      
      my_load_defaults() still does exit(0) when invoked with --print-defaults.
      2cd31691
    • Jan Lindström's avatar
      DEV-14701: install_db shows corruption for rest encryption with innodb_data_file_path=ibdata1:3M · ed7e4b68
      Jan Lindström authored
      Problem was that crypt_data->min_key_version is not a reliable way
      to detect is tablespace encrypted and could lead that in first page
      of the second (page 192 and similarly for other files if more configured)
      system tablespace file used key_version is replaced with zero leading
      a corruption as in next startup page is though to be corrupted.
      Note that crypt_data->min_key_version is updated only after all
      pages from tablespace have been processed (i.e. key rotation is done)
      and flushed.
      
      fil_write_flushed_lsn
              Use crypt_data->should_encrypt() instead.
      ed7e4b68
    • Jan Lindström's avatar
      Fix galera.view test case crash. · 252e690c
      Jan Lindström authored
      WSREP_TO_ISOLATION_BEGIN() call must be after view name is back
      on tables list.
      252e690c
    • Vicențiu Ciorbaru's avatar
      MDEV-12366: FLUSH PRIVILEGES can break hierarchy of roles · be758322
      Vicențiu Ciorbaru authored
      Whenever we call merge_role_privileges on a role, we make use of
      the role->counter variable to check if all it's children have had their
      privileges merged. Only if all children have had their privileges merged,
      do we update the privileges on parent. This is done to prevent extra work.
      The same idea is employed during flush privileges. You only begin merging
      from "leaf" roles. The recursive calls will merge their parents at some point.
      A problem arises when we try to "re-merge" a parent. Take the following graph:
      
      {noformat}
           A (0)  ----  C (2) ---- D (2)  ---- USER
                       /          /
           B (0)  ----/          /
                                /
           E (0) --------------/
      {noformat}
      
      In parentheses we have the "counter" value right before we start to iterate
      through the roles hash and propagate values. It represents the number of roles
      granted to the current role. The order in which we iterate through the roles
      hash is alphabetical.
      
      * First merge A, which leads to decreasing the counter for C to 1. Since C is
      not 0, we don't proceed with merging into C.
      
      * Second we merge B, which leads to decreasing the counter for C to 0. Now
      we proceed with merging into C. This leads to reducing the counter for D to 1
      as part of C merge process.
      
      * Third as we iterate through the hash, we see that C has counter 0, thus we
      start the merge process *again*. This leads to reducing the counter for
      D to 0! We then attempt to merge D.
      
      * Fourth we start merging E. When E sees D as it's parent (according to the code)
      it attempts to reduce D's counter, which leads to overflow. Now D's counter is
      a very large number, thus E's privileges are not forwarded to D yet.
      
      To correct this behavior we must make sure to only start merging from initial
      leaf nodes.
      be758322
    • Vicențiu Ciorbaru's avatar
      MDEV-13655: Set role does not properly grant privileges. · 2fced9e7
      Vicențiu Ciorbaru authored
      When granting a role to another role, DB privileges get propagated. If
      the grantee had no previous DB privileges, an extra ACL_DB entry is created to
      house those "indirectly received" privileges. If, afterwards, DB
      privileges are granted to the grantee directly, we must make sure to not
      create a duplicate ACL_DB entry.
      2fced9e7
    • Daniel Black's avatar
    • Daniel Black's avatar
      64f1fab0
  8. 18 Dec, 2017 7 commits
    • Marko Mäkelä's avatar
      Merge 10.0 into 10.1 · 09c5bbf4
      Marko Mäkelä authored
      09c5bbf4
    • Marko Mäkelä's avatar
      MDEV-13407 innodb.drop_table_background failed in buildbot with "Tablespace for table exists" · 40088bfc
      Marko Mäkelä authored
      The InnoDB background DROP TABLE queue is something that we should
      really remove, but are unable to until we remove dict_operation_lock
      so that DDL and DML operations can be combined in a single transaction.
      
      Because the queue is not persistent, it is not crash-safe. In stable
      versions of MariaDB, we can only try harder to drop all enqueued
      tables before server shutdown.
      
      row_mysql_drop_t::table_id: Replaces table_name.
      
      row_drop_tables_for_mysql_in_background():
      Do not remove the entry from the list as long as the table exists.
      In this way, the table should eventually be dropped.
      40088bfc
    • Nirbhay Choubey's avatar
      MDEV-10442: "Address already in use" on restart · 682c3bfd
      Nirbhay Choubey authored
      SST processes should inherit mysqld's process group.
      682c3bfd
    • sjaakola's avatar
      MW-416 · 91daf881
      sjaakola authored
      Moved TOI replication to happen after ACL checking for commands:
      SQLCOM_CREATE_EVENT
      SQLCOM_ALTER_EVENT
      SQLCOM_DROP_EVENT
      SQLCOM_CREATE_VIEW
      SQLCOM_CREATE_TRIGGER
      SQLCOM_DROP_TRIGGER
      SQLCOM_INSTALL_PLUGIN
      SQLCOM_UNINSTALL_PLUGIN
      91daf881
    • Sergei Golubchik's avatar
      MDEV-13969 sst mysqldump and xtrabackup-v2 handle WSREP_SST_OPT_CONF incorrectly · beabe6b2
      Sergei Golubchik authored
      $WSREP_SST_OPT_CONF already includes --defaults-extra-file= prefix.
      beabe6b2
    • Martynas Bendorius's avatar
      MDEV-13969 sst mysqldump and xtrabackup-v2 handle WSREP_SST_OPT_CONF incorrectly · 1c2f59f7
      Martynas Bendorius authored
      wrep_sst_common: Setting "-c ''" for my_print_defaults just takes no values from config at all. $MY_PRINT_DEFAULTS is already set at the top of the script to have --defaults-file and --defaults-extra-file. If WSREP_SST_OPT_CONF if set to "--defaults-file=/etc/my.cnf --defaults-extra-file=/etc/my.extra.cnf", then "my_print_defaults -c "" --defaults-file=/etc/my.cnf" succeeds, but if WSREP_SST_OPT_CONF is empty - no default values are taken at all.
      wsrep_sst_xtrabackup-v2: innobackupex does not support --defaults-extra-file, so ${WSREP_SST_OPT_CONF} cannot be used as an argument, it has been changed to ${WSREP_SST_OPT_DEFAULT}. Removed --defaults-file= from INNOMOVE line, because WSREP_SST_OPT_CONF already includes it (INNOBACKUP was fine, INNOMOVE - not).
      1c2f59f7
    • Vladislav Vaintroub's avatar