1. 23 Mar, 2014 2 commits
    • Alexander Barkov's avatar
      A joint patch for: · 92bd6801
      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.
      92bd6801
    • Alexander Barkov's avatar
      MDEV-5870 Assertion `ltime->neg == 0' fails with COALESCE, ADDDATE, MAKEDATE · e0f75b1b
      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.
      e0f75b1b
  2. 22 Mar, 2014 1 commit
    • Igor Babaev's avatar
      Fixed bug mdev-5931. · 887a210f
      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.
      887a210f
  3. 21 Mar, 2014 4 commits
    • unknown's avatar
      MDEV-5914: Parallel replication deadlock due to InnoDB lock conflicts · b3529691
      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.
      b3529691
    • unknown's avatar
      MDEV-5921: In parallel replication, an error is not correctly signalled to the next transaction · a5418c55
      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.
      a5418c55
    • Sergey Petrunya's avatar
      MDEV-5917: EITS: different order of predicates in IN (...) causes different estimates · e59dec03
      Sergey Petrunya authored
      - Forgot to update one .result file.
      e59dec03
    • Jan Lindström's avatar
      MDEV-5830: Assertion failure mutex_get_waiters(mutex) == 0 at shutdown. · affe1731
      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.
      affe1731
  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. · 06ef0bda
      Igor Babaev authored
      Corrected cost estimates when a join buffer is used and the optimizer is requested
      to use condition selectivities.
      06ef0bda
  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 · 89406110
      Sergei Golubchik authored
      89406110
    • Sergei Golubchik's avatar
      typo fixed · 4e29d31c
      Sergei Golubchik authored
      4e29d31c
    • Michael Widenius's avatar
      MDEV-5619: CREATE OR REPLACE does not release MDL_EXCLUSIVE upon failure · f320b12c
      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.
      f320b12c
    • Michael Widenius's avatar
      Fixed some failing tests · 49ca12a1
      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
      49ca12a1
    • unknown's avatar
      Update the help text for --slave-parallel-threads, to clarify the · 2fc4a103
      unknown authored
      meaning of the count, and to remove the alpha warning.
      2fc4a103
  12. 11 Mar, 2014 3 commits
    • unknown's avatar
      MDEV-5804: If same GTID is received on multiple master connections in... · 8b9b7ec3
      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.
      8b9b7ec3
    • Michael Widenius's avatar
      Merge with 5.5 · 17278496
      Michael Widenius authored
      17278496
    • Michael Widenius's avatar
      Fixed a compiler failure and removed some warnings in windows · 800a278f
      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
      800a278f