1. 20 Dec, 2017 2 commits
  2. 19 Dec, 2017 2 commits
    • 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
  3. 18 Dec, 2017 3 commits
  4. 13 Dec, 2017 5 commits
  5. 22 Nov, 2017 1 commit
  6. 16 Nov, 2017 3 commits
  7. 15 Nov, 2017 2 commits
  8. 14 Nov, 2017 1 commit
  9. 10 Nov, 2017 1 commit
  10. 09 Nov, 2017 5 commits
    • Sergei Golubchik's avatar
      MDEV-12372 mysqlbinlog --version output is the same on 10.x as on 5.5.x, and... · 56394a78
      Sergei Golubchik authored
      MDEV-12372 mysqlbinlog --version output is the same on 10.x as on 5.5.x, and contains not only version
      
      don't print usage() for --version
      56394a78
    • Sergei Golubchik's avatar
      remove redundant tests from mysql-test/include/*.inc files · c97a7cdb
      Sergei Golubchik authored
      Some tests are skipped by checks in suite.pm. It is redundant to
      have an sql-level run-time check in the .inc file itself.
      
      In some cases it's not only redundant, but dangerous.
      After one bug in 10.2 innodb.create_isl_with_direct failed
      to start InnoDB, but the server started fine (just without InnoDB)
      and instead of failing, the test was skipped by run-time check in
      have_innodb.inc.
      
      # Conflicts:
      #	mysql-test/include/not_embedded.inc
      #	mysql-test/r/change_user_notembedded.result
      #	mysql-test/suite.pm
      #	mysql-test/t/change_user_notembedded.test
      c97a7cdb
    • Sergei Golubchik's avatar
      typo · 7ec6c6fa
      Sergei Golubchik authored
      7ec6c6fa
    • Sergei Golubchik's avatar
      Merge branch '5.5' into 10.0 · 3028357a
      Sergei Golubchik authored
      3028357a
    • Oleksandr Byelkin's avatar
      MDEV-14164: Unknown column error when adding aggregate to function in oracle... · c2c93fc6
      Oleksandr Byelkin authored
      MDEV-14164: Unknown column error when adding aggregate to function in oracle style procedure FOR loop
      
      Make differentiation between pullout for merge and pulout of outer field during exists2in transformation.
      In last case the field was outer and so we can safely start from name resolution context of the SELECT where it was pulled.
      Old behavior lead to inconsistence between list of tables and outer name resolution context (which skips one SELECT for merge purposes) which creates problem vor name resolution.
      c2c93fc6
  11. 07 Nov, 2017 1 commit
  12. 06 Nov, 2017 1 commit
    • Marko Mäkelä's avatar
      MDEV-14140 IMPORT TABLESPACE must not go beyond FSP_FREE_LIMIT · 6a524fcf
      Marko Mäkelä authored
      ibuf_check_bitmap_on_import(): Only access the pages that
      are below FSP_FREE_LIMIT. It is possible that especially with
      ROW_FORMAT=COMPRESSED, the FSP_SIZE will be much bigger than
      the FSP_FREE_LIMIT, and the bitmap pages (page_size*N, 1+page_size*N)
      are filled with zero bytes.
      
      buf_page_is_corrupted(), buf_page_io_complete(): Make the
      fault injection compatible with MariaDB 10.2.
      
      Backport the IMPORT tests from 10.2.
      6a524fcf
  13. 05 Nov, 2017 3 commits
    • Elena Stepanova's avatar
      MDEV-10651, MDEV-14196 sys_vars.innodb_buffer_pool_* tests fail · bfde65c0
      Elena Stepanova authored
      - innodb_buffer_pool_dump_now_basic is modified to make sure it
        really performs a dump and waits till it completion, to avoid
        the apparent or hidden failure similar to MDEV-9713 / MDEV-10651
      - innodb_buffer_pool_dump_pct_basic is modified to re-use the new
        code from innodb_buffer_pool_dump_now_basic and thus avoid
        the failure MDEV-10651
      - innodb_buffer_pool_load_now_basic is re-written to simplify
        the logic by re-using the code innodb_buffer_pool_dump_now_basic
        and is given an opt file to avoid race conditions with
        buffer pool load performed upon server startup, which causes
        MDEV-14196 failure
      bfde65c0
    • Elena Stepanova's avatar
      MDEV-14029 Server does not remove #sql*.frm files after crash during ALTER TABLE · 5e5adfa7
      Elena Stepanova authored
      Add a check for #sql* files in test and mysql subdirs to the testcase check
      5e5adfa7
    • Elena Stepanova's avatar
      MDEV-11864 main.view test uses CHECK PARTITION but does not check for the partition plugin · 0ed5c09b
      Elena Stepanova authored
      The test would pass even with skipped partitioning, because
      CHECK PARTITION for a view works identically with enabled/disabled
      partitioning; but if the server is compiled without partitioning
      at all, it cannot execute the statement, and the test would fail.
      
      Check for the presence of partitioning allows to skip the test
      in this case, rather than let it fail
      0ed5c09b
  14. 03 Nov, 2017 4 commits
  15. 02 Nov, 2017 1 commit
  16. 30 Oct, 2017 2 commits
    • Marko Mäkelä's avatar
      Backport MDEV-13890 from 10.2 (InnoDB/XtraDB shutdown failure) · d11001d1
      Marko Mäkelä authored
      If InnoDB or XtraDB recovered committed transactions at server
      startup, but the processing of recovered transactions was
      prevented by innodb_read_only or by innodb_force_recovery,
      an assertion would fail at shutdown.
      
      This bug was originally reproduced when Mariabackup executed
      InnoDB shutdown after preparing (applying redo log into) a backup.
      
      trx_free_prepared(): Allow TRX_STATE_COMMITTED_IN_MEMORY.
      
      trx_undo_free_prepared(): Allow any undo log state. For transactions
      that were resurrected in TRX_STATE_COMMITTED_IN_MEMORY
      the undo log state would have been reset by trx_undo_set_state_at_finish().
      d11001d1
    • Daniel Bartholomew's avatar
      bump the VERSION · 2b332ab7
      Daniel Bartholomew authored
      2b332ab7
  17. 27 Oct, 2017 2 commits
  18. 26 Oct, 2017 1 commit