1. 23 Mar, 2014 2 commits
    • Alexander Barkov's avatar
      A joint patch for: · 767f26ad
      Alexander Barkov authored
      - MDEV-5689 ExtractValue(xml, 'substring(/x,/y)') crashes
      - MDEV-5709 ExtractValue() with XPath variable references returns wrong result.
      
      Description:
      
      1. The main problem was that that nodeset_func->fix_fields() was
      called in Item_func_xml_extractvalue::val_str() and
      Item_func_xml_update::val_str(), which led in some cases to
      execution of the XPath engine *before* having a parsed XML value.
      Moved to Item_xml_str_func::fix_fields().
      
      2. Cleanup: added a new method Item_xml_str_func::fix_fields() and moved
      most of the code from Item_xml_str_func::fix_length_and_dec()
      to Item_xml_str_func::fix_fields(), to follow the usual Item layout.
      
      3. Cleanup: a parsed XML value is useless without the raw XML value
      it was built from.
      
      Previously the parsed and the raw values where stored in separate String
      instances. It was hard to follow how they are synchronized.
      Added a helper class XML which contains both parsed and raw values.
      Makes things easier to read and modify.
      
      4. MDEV-5709: const_item() could incorrectly return a "true"
      result when XPath expression contains users/SP variable references.
      Now nodeset_func->const_item() is also taken into account to
      catch such cases.
      
      5. Minor code enhancements.
      767f26ad
    • Alexander Barkov's avatar
      MDEV-5870 Assertion `ltime->neg == 0' fails with COALESCE, ADDDATE, MAKEDATE · fc640314
      Alexander Barkov authored
      A huge number in the "day" part of an interval made the code to return
      a negative date erroneously. Adding a test to return an error on a too
      large "day" value.
      fc640314
  2. 22 Mar, 2014 1 commit
    • Igor Babaev's avatar
      Fixed bug mdev-5931. · e4d30b9e
      Igor Babaev authored
      After constant table row substitution the where condition may be converted
      to always true. The function calculate_cond_selectivity_for_table() should
      take into account this possibility.
      e4d30b9e
  3. 21 Mar, 2014 4 commits
    • unknown's avatar
      MDEV-5914: Parallel replication deadlock due to InnoDB lock conflicts · 48855507
      unknown authored
      Due to how gap locks work, two transactions could group commit together on the
      master, but get lock conflicts and then deadlock due to different thread
      scheduling order on slave.
      
      For now, remove these deadlocks by running the parallel slave in READ
      COMMITTED mode. And let InnoDB/XtraDB allow statement-based binlogging for the
      parallel slave in READ COMMITTED.
      
      We are also investigating a different solution long-term, which is based on
      relaxing the gap locks only between the transactions running in parallel for
      one slave, but not against possibly external transactions.
      48855507
    • unknown's avatar
      MDEV-5921: In parallel replication, an error is not correctly signalled to the next transaction · 25241ea1
      unknown authored
      When a transaction fails in parallel replication, it should signal the error
      to any following transactions doing wait_for_prior_commit() on it. But the
      code for this was incorrect, and would not correctly remember a prior error
      when sending the signal. This caused corruption when slave stopped due to an
      error.
      
      Fix by remembering the error code when we first get an error, and passing the
      saved error code to wakeup_subsequent_commits().
      
      Thanks to nanyi607rao who reported this bug on
      maria-developers@lists.launchpad.net and analysed the root cause.
      25241ea1
    • Sergey Petrunya's avatar
      MDEV-5917: EITS: different order of predicates in IN (...) causes different estimates · b5ef651a
      Sergey Petrunya authored
      - Forgot to update one .result file.
      b5ef651a
    • Jan Lindström's avatar
      MDEV-5830: Assertion failure mutex_get_waiters(mutex) == 0 at shutdown. · fb76e041
      Jan Lindström authored
      Analysis: XtraDB merge regression, at the end of mutex_spin_wait before goto mutex_loop
      there is missing  
      
      if (prio_mutex) { 
      	os_atomic_decrement_ulint(&prio_mutex->high_priority_waiters, 1); 
      }
      
      Hence we get unbalanced waiter count.
      
      Thanks to Laurynas Biveinis for finding this.
      fb76e041
  4. 20 Mar, 2014 3 commits
  5. 19 Mar, 2014 12 commits
  6. 18 Mar, 2014 1 commit
    • Igor Babaev's avatar
      Fixed bug mdev-5191. · 1f4b7ae4
      Igor Babaev authored
      Corrected cost estimates when a join buffer is used and the optimizer is requested
      to use condition selectivities.
      1f4b7ae4
  7. 17 Mar, 2014 3 commits
  8. 16 Mar, 2014 1 commit
  9. 14 Mar, 2014 3 commits
  10. 13 Mar, 2014 2 commits
  11. 12 Mar, 2014 5 commits
    • Sergei Golubchik's avatar
      update test results · 686387f6
      Sergei Golubchik authored
      686387f6
    • Sergei Golubchik's avatar
      typo fixed · 23d81a50
      Sergei Golubchik authored
      23d81a50
    • Michael Widenius's avatar
      MDEV-5619: CREATE OR REPLACE does not release MDL_EXCLUSIVE upon failure · 9efb2bf2
      Michael Widenius authored
      
      mysql-test/r/create_or_replace.result:
        Added test of releasing of metadata locks
      mysql-test/t/create_or_replace.test:
        Added test of releasing of metadata locks
      sql/handler.h:
        Added marker if table was deleted as part of CREATE OR REPLACE
      sql/sql_base.cc:
        Added Locked_tables_list::unlock_locked_table()
      sql/sql_class.h:
        New prototypes
      sql/sql_insert.cc:
        Unlock metadata locks for deleted table in case of error. Also do unlock tables if this was the only locked table.
      sql/sql_table.cc:
        Unlock metadata locks for deleted table in case of error. Also do unlock tables if this was the only locked table.
      9efb2bf2
    • Michael Widenius's avatar
      Fixed some failing tests · 5ca574a0
      Michael Widenius authored
      Remove memory warnings if mysql client aborts early
      Changed copyright for clients
      
      client/mysql.cc:
        Free memory if get_options fails, so that we don't get warnings from safemalloc
      include/welcome_copyright_notice.h:
        Added SkySQL to client copyrights
      mysql-test/valgrind.supp:
        Added suppressions for memory leaks from dlopen() for OpenSUSE 12.3
      storage/oqgraph/mysql-test/oqgraph/regression_mdev5744.result:
        Suppress warning
      storage/oqgraph/mysql-test/oqgraph/regression_mdev5744.test:
        Suppress warning
      5ca574a0
    • unknown's avatar
      Update the help text for --slave-parallel-threads, to clarify the · b3c9a228
      unknown authored
      meaning of the count, and to remove the alpha warning.
      b3c9a228
  12. 11 Mar, 2014 3 commits
    • unknown's avatar
      MDEV-5804: If same GTID is received on multiple master connections in... · 23b3cb8f
      unknown authored
      MDEV-5804: If same GTID is received on multiple master connections in multi-source replication, the event is double-executed causing corruption or replication failure
      
      Some fixes, mainly to make it work in non-parallel replication mode also
      (--slave-parallel-threads=0).
      
      Patch should be fairly complete now.
      23b3cb8f
    • Michael Widenius's avatar
      Merge with 5.5 · fe75144a
      Michael Widenius authored
      fe75144a
    • Michael Widenius's avatar
      Fixed a compiler failure and removed some warnings in windows · c5c3a43d
      Michael Widenius authored
      extra/replace.c:
        Removed compiler warning
      sql/unireg.cc:
        Removed compiler warning
      storage/maria/ma_blockrec.c:
        Removed compiler warning
      storage/maria/ma_dynrec.c:
        Fixed compiler failure
      storage/maria/ma_unique.c:
        Removed compiler warning
      storage/myisam/mi_check.c:
        Removed compiler warning
      storage/myisam/mi_checksum.c:
        Removed compiler warning
      c5c3a43d