1. 21 Dec, 2017 1 commit
    • 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
  2. 20 Dec, 2017 4 commits
  3. 19 Dec, 2017 3 commits
    • Simon J Mudd's avatar
    • 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
  4. 18 Dec, 2017 3 commits
  5. 16 Dec, 2017 1 commit
  6. 13 Dec, 2017 5 commits
  7. 08 Dec, 2017 1 commit
  8. 06 Dec, 2017 1 commit
  9. 05 Dec, 2017 1 commit
  10. 30 Nov, 2017 1 commit
  11. 22 Nov, 2017 1 commit
  12. 20 Nov, 2017 1 commit
  13. 16 Nov, 2017 5 commits
  14. 15 Nov, 2017 2 commits
  15. 14 Nov, 2017 1 commit
  16. 11 Nov, 2017 1 commit
    • Igor Babaev's avatar
      Fixed bug MDEV-14368 Improper error for a grouping query that · b5cb4ae4
      Igor Babaev authored
      uses alias in HAVING when sql_mode = 'ONLY_FULL_GROUP_BY'
      
      This patch corrects the patch for bug#18739: non-standard
      HAVING extension was allowed in strict ANSI sql mode
      added in 2006 by commit 4b7c4cd2.
      As a result of incompleteness of the fix in the above commit
      if a query with GROUP BY contained an aggregate function with an
      alias and this alias was used in the HAVING clause of the query
      the server reported an error when sql_mode was set to
      'ONLY_FULL_GROUP_BY'.
      b5cb4ae4
  17. 10 Nov, 2017 2 commits
  18. 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
  19. 07 Nov, 2017 1 commit