1. 10 Oct, 2018 7 commits
    • Jan Lindström's avatar
      Add missing file. · 48924ae9
      Jan Lindström authored
      48924ae9
    • Vasil Dimov's avatar
      Bump WSREP_PATCH_VERSION · f5003994
      Vasil Dimov authored
      f5003994
    • Vasil Dimov's avatar
      Make config knob wsrep_certification_rules dynamic · 8524c812
      Vasil Dimov authored
      There is no reason for it to be readonly at runtime and it is dynamic in
      5.6+ already.
      8524c812
    • Jan Lindström's avatar
      MariaDB adjustments. · b47a2182
      Jan Lindström authored
      b47a2182
    • Vasil Dimov's avatar
      Fix compilation error in row0ins.c · 508e715c
      Vasil Dimov authored
      row0ins.c:1437:6: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
      enum wsrep_key_type key_type = WSREP_KEY_EXCLUSIVE;
      ^
      508e715c
    • Vasil Dimov's avatar
      Add a new config variable wsrep_certification_rules · 27dcef39
      Vasil Dimov authored
      This is used for controlling whether to use a new/optimized
      certification rules or the old/classic ones that could cause more
      certification failures - when foreign keys are used and two INSERTs are
      done concurrently to the child table from different nodes.
      
      (cherry picked from commit 815d73e6af8daace6262ab63ca6c043ffc4204b3)
      27dcef39
    • Vasil Dimov's avatar
      Generalize "bool shared/exclusive" argument to enum · 6aa578ec
      Vasil Dimov authored
      wsrep_append_foreign_key() and wsrep_append_key() used to take a boolean
      argument denoting whether the relevant certification key type is shared
      (assuming it is exclusive if the argument is false). Change that
      argument to the enum wsrep_key_type from wsrep_api.h, so that eventually
      other types can also be passed (like WSREP_KEY_SEMI).
      
      This is a non-functional change.
      
      (cherry picked from commit 360bf36dbb9378b36ef57921c725a9505e19e0d9)
      6aa578ec
  2. 29 Aug, 2018 1 commit
  3. 03 Aug, 2018 1 commit
  4. 02 Aug, 2018 2 commits
    • Daniele Sciascia's avatar
      Follow up to previous commit for codership/mysql-wsrep#332 · e88e26b4
      Daniele Sciascia authored
      Fix misplaced `DBUG_RETURN` in `Alter_table_statement::execute`.
      e88e26b4
    • Daniele Sciascia's avatar
      Fix FK constraint violation in applier, after ALTER TABLE ADD FK · 4d2b5523
      Daniele Sciascia authored
      Adding a FK constraint to an existing table (ALTER TABLE ADD FOREIGN
      KEY) causes the applier to fail, if a concurrent DML statement that
      violate the new constraint (i.e. a DELETE or UPDATE of record in the
      parent table).
      
      For exmaple, the following scenario causes a crash in the applier:
      
      1. ALTER successfully adds FK constraint in node_1
      2. On node_2 is UPDATE is in pre_commit() and has certified successfully
      3. ALTER is delivered in node_2 and BF aborts DML
      4. Applying UPDATE event causes FK violation in node_1
      
      To avoid this situation it is necessary for UPDATE to fail during
      certification. And for the UPDATE to fail certfication it is necessary
      that ALTER appends certification keys for both the child and the parent
      table. Before this patch, ALTER TABLE ADD FK only appended keys for
      child table which is ALTERed.
      4d2b5523
  5. 01 Aug, 2018 1 commit
  6. 30 Jul, 2018 1 commit
  7. 29 Jul, 2018 1 commit
    • Oleksandr Byelkin's avatar
      Merge remote-tracking branch 'mysql/5.5' into 5.5 · fceda2da
      Oleksandr Byelkin authored
      We do not accept:
      1. We did not have this problem (fixed earlier and better)
       d982e717 Bug#27510150: MYSQLDUMP FAILS FOR SPECIFIC --WHERE CLAUSES
      2. We do not have such options (an DBUG_ASSERT put just in case)
       bbc2e37f Bug#27759871: BACKRONYM ISSUE IS STILL IN MYSQL 5.7
      3. Serg fixed it in other way in this release:
       e48d775c Bug#27980823: HEAP OVERFLOW VULNERABILITIES IN MYSQL CLIENT LIBRARY
      fceda2da
  8. 27 Jul, 2018 1 commit
  9. 25 Jul, 2018 3 commits
    • Varun Gupta's avatar
      MDEV-15454: Nested SELECT IN returns wrong results · 37dee22d
      Varun Gupta authored
      In this case we are setting the field Item_func_eq::in_eqaulity_no for the semi-join equalities.
      This helps us to remove these equalites as the inner tables are not available during parent select execution
      while the outer tables are not available during materialization phase.
      We only have it set for the equalites for the fields involved with the IN subquery
      and reset it for the equalities which do not belong to the IN subquery.
      
      For example in case of nested IN subqueries:
      
          SELECT t1.a FROM t1 WHERE t1.a IN
            (SELECT t2.a FROM t2 where t2.b IN
                (select t3.b from t3 where t3.c=27 ))
      
      there are two equalites involving the fields of the IN subquery
      
      1) t2.b = t3.b :  the field Item_func_eq::in_eqaulity_no is set when we merge the grandchild select into the child select
      2) t1.a = t2.a :  the field Item_func_eq::in_eqaulity_no is set when we merge the child select into the parent select
      
      But when we perform case 2) we should ensure that we reset the equalities in the child's WHERE clause.
      37dee22d
    • Varun Gupta's avatar
      MDEV-16751: Server crashes in st_join_table::cleanup or... · f9b43c25
      Varun Gupta authored
      MDEV-16751: Server crashes in st_join_table::cleanup or TABLE_LIST::is_with_table_recursive_reference
                  with join_cache_level>2
      
      During muliple equality propagation for a query in which we have an IN subquery, the items in the select list of the
      subquery may not be part of the multiple equality because there might be another occurence of the same field in the
      where clause of the subquery.
      So we keyuse_is_valid_for_access_in_chosen_plan function which expects the items in the select list of the subquery to
      be same to the ones in the multiple equality (through these multiple equalities we create keyuse array).
      The solution would be that we expect the same field not the same Item because when we have SEMI JOIN MATERIALIZATION SCAN,
      we use copy back technique to copies back the materialised table fields to the original fields of the base tables.
      f9b43c25
    • Igor Babaev's avatar
      MDEV-16820 Lost 'Impossible where' from query with inexpensive subquery · d567f161
      Igor Babaev authored
      This patch fixes another problem introduced by the patch for mdev-4817.
      The latter changed Item_cond::fix_fields() in such a way that it could
      call the virtual method is_expensive(). With the first its call
      the method saves the result in Item::is_expensive_cache. For all next
      calls the method returns the result from this cache. So if the item
      once was determined as expensive the method always returns true.
      For subqueries it's not good, because non-optimized subqueries always
      is considered as expensive.
      It means that the cache should be invalidated after the call of
      optimize_constant_subqueries().
      d567f161
  10. 19 Jul, 2018 1 commit
    • Igor Babaev's avatar
      MDEV-16726 Assertion `tab->type == JT_REF || tab->type == JT_EQ_REF' failed · 9cea4ccf
      Igor Babaev authored
      Due to a legacy bug in the code of make_join_statistics() detecting
      so-called constant tables could miss some of them in rare queries
      that used RIGHT JOIN. As a result these queries had execution plans
      different from the execution plans of the equivalent queries with
      LEFT JOIN.
      Besides starting from 10.2 this could trigger an assertion failure.
      9cea4ccf
  11. 16 Jul, 2018 1 commit
  12. 11 Jul, 2018 1 commit
  13. 10 Jul, 2018 1 commit
  14. 30 Jun, 2018 1 commit
    • Igor Babaev's avatar
      MDEV-16603 Crash with set join_cache_level=4 · 90cb7212
      Igor Babaev authored
      When the definition of the index used for hash join was created
      in create_hj_key_for_table() it could cause memory overwrite
      due to a bug that led to an underestimation of the number of
      the index component.
      90cb7212
  15. 27 Jun, 2018 4 commits
    • Sergey Vojtovich's avatar
      MDEV-8540 - Crash on server shutdown since 10.0.16 · 9d41dd2f
      Sergey Vojtovich authored
      For the purpose of reporting an error to error log, shutdown thread was
      attempting to access current_thd->variables.lc_messages->errmsgs->errmsgs.
      Whereas current_thd was NULL.
      
      We should log errors according to global lc_messages setting instead of
      session setting.
      9d41dd2f
    • Michael Widenius's avatar
      Fixed MDEV-16512, crashing on re-execution of failing SP · 937c1931
      Michael Widenius authored
      MDEV-16512 Server crashes in find_field_in_table_ref on 2nd
      execution of SP referring to non-existing field
      
      Problem was in the natural join code that it changed TABLE_LIST and
      Item_fields but didn't restore changed things if things goes wrong
      and was not able to re-execute after failure.
      Some of the problems could have been avoided if we would have run
      fix_fields before doing natural join transformations.
      
      Fixed by marking functions complete AFTER they had executed, instead at
      start.
      I had also to change some tests that checked if Item_fields are usable.
      
      This doesn't fix all known problems, but at least avoids some crashes.
      What should be done in the near future is to mark the statement in the SP
      as 'not re-executable' and force a reparse of it on next execution.
      
      Reviewer: Sergei Petrunia <psergey@askmonty.org>
      937c1931
    • Michael Widenius's avatar
      faef2e6a
    • Michael Widenius's avatar
      1f6a89a8
  16. 26 Jun, 2018 1 commit
  17. 20 Jun, 2018 3 commits
  18. 19 Jun, 2018 1 commit
  19. 15 Jun, 2018 1 commit
  20. 12 Jun, 2018 1 commit
  21. 11 Jun, 2018 4 commits
  22. 10 Jun, 2018 2 commits