1. 04 Aug, 2015 4 commits
    • Kristian Nielsen's avatar
      Merge fix of embedded server build. · d6d54584
      Kristian Nielsen authored
      d6d54584
    • Kristian Nielsen's avatar
      Fix embedded server build · 5ca061e6
      Kristian Nielsen authored
      5ca061e6
    • Kristian Nielsen's avatar
      Merge MDEV-8302 into 10.0 · e8e2ef47
      Kristian Nielsen authored
      e8e2ef47
    • Kristian Nielsen's avatar
      MDEV-8302: Duplicate key with parallel replication · 9b9c5e89
      Kristian Nielsen authored
      This bug is essentially another variant of MDEV-7458.
      
      If a transaction conflict caused a deadlock kill of T2 in record_gtid()
      during commit, the code would do a rollback _before_ running
      rgi->unmark_start_commit(). This creates a race where following transactions
      could start too early (before T2 has completed its transaction retry). This
      in turn could lead to replication failure, if there was a conflict that
      caused eg. duplicate key error or similar.
      
      The fix is to remove these rollbacks (in Query_log_event::do_apply_event()
      and Xid_log_event::do_apply_event(). They seem out-of-place; code in
      log_event.cc generally does not roll back on error, this is handled higher
      up.
      
      In addition, because of the extreme difficulty of reproducing bugs like
      MDEV-7458 and MDEV-8302, this patch adds some extra precations to try to
      detect (in debug builds) or prevent (in release builds) similar bugs.
      ha_rollback_trans() will now call unmark_start_commit() if needed (and
      assert in debug build when a caller does rollback without unmark first).
      
      We also add an extra check for thd->killed() so that we avoid doing
      mark_start_commit() if we already have a pending deadlock kill.
      
      And we add a missing unmark_start_commit() call in the error case, found by
      the above assertion.
      9b9c5e89
  2. 03 Aug, 2015 3 commits
    • Sergei Petrunia's avatar
      MDEV-7040: Crash in field_conv, memcpy_field_possible, part#2 · b74795b0
      Sergei Petrunia authored
      The problem was with Materialized_cursor and temporary table it uses.
      Temorary table's fields had Field::orig_table pointing to the tables
      that were used in the query that produced data for the cursor.
      When "FETCH INTO sp_var" statement is executed, those original tables
      were already closed.  However, copying from Materialized_cursor's table
      into SP variable may cause field_conv() to be invoked which calls
      field->type() which may access field->orig_table (for certain field types).
      
      Fixed by setting Materialized_cursor->table->field[i]->orig_table to point
      to Materialized_cursor->table.  (this is how it is done for regular base
      tables)
      b74795b0
    • Sergei Petrunia's avatar
      Merge branch 'tmp' into 10.0 · cb925491
      Sergei Petrunia authored
      cb925491
    • Sergei Petrunia's avatar
      MDEV-8554: Server crashes in base_list_iterator::next_fast ... · 193faa57
      Sergei Petrunia authored
      THD::>save_prep_leaf_list was set to true by multi-table update
      statements with mergeable selects and never reset.
      
      Make every statement reset it at start.
      193faa57
  3. 30 Jul, 2015 1 commit
  4. 29 Jul, 2015 1 commit
  5. 27 Jul, 2015 7 commits
  6. 26 Jul, 2015 2 commits
    • Monty's avatar
      Added easy way to assert if another thread has died. · 517ef2bd
      Monty authored
      Added some extra safety asserts in MyISAM key cache.
      
      my_thread_var->init is now:
      0 at startup
      1 at init
      2 when thread dies
      517ef2bd
    • Monty's avatar
      Fixed MDEV-8428: Mangled DML statements on 2nd level slave when enabling binlog checksums · f3e578ab
      Monty authored
      Fix was to add a test in Query_log_event::Query_log_event() if we are using
      CREATE ... SELECT and in this case use trans cache, like we do on the master.
      This avoid using (with doesn't have checksum)
      
      Other things:
      - Removed dummy call my_checksum(0L, NULL, 0)
      - More DBUG_PRINT
      - Cleaned up Log_event::need_checksum() to make it more readable (similar as in MySQL 5.6)
      - Renamed variable that was hiding another one in create_table_imp()
      f3e578ab
  7. 24 Jul, 2015 1 commit
  8. 23 Jul, 2015 2 commits
    • Dmitry Lenev's avatar
      MDEV-5997 - MySQL bug#11759114 - '51401: GRANT TREATS NONEXISTENT · a6ab8ef9
      Dmitry Lenev authored
      FUNCTIONS/PRIVILEGES DIFFERENTLY'
      
      Fix for bug#11759114 - '51401: GRANT TREATS NONEXISTENT
      FUNCTIONS/PRIVILEGES DIFFERENTLY'.
      
      The problem was that attempt to grant EXECUTE or ALTER
      ROUTINE privilege on stored procedure which didn't exist
      succeed instead of returning an appropriate error like
      it happens in similar situation for stored functions or
      tables.
      
      The code which handles granting of privileges on individual
      routine calls sp_exist_routines() function to check if routine
      exists and assumes that the 3rd parameter of the latter
      specifies whether it should check for existence of stored
      procedure or function. In practice, this parameter had
      completely different meaning and, as result, this check was
      not done properly for stored procedures.
      
      This fix addresses this problem by bringing sp_exist_routines()
      signature and code in line with expectation of its caller.
      Conflicts:
      	mysql-test/r/grant.result
      	mysql-test/t/grant.test
      	sql/sp.cc
      a6ab8ef9
    • Sergey Vojtovich's avatar
      MDEV-8399 - [PATCH] Missing Sanity Checks for memory allocation in MariaDB · d897015d
      Sergey Vojtovich authored
      - since param is quite small store it on stack
      - fixed a few memory leaks
      d897015d
  9. 22 Jul, 2015 1 commit
  10. 20 Jul, 2015 2 commits
  11. 19 Jul, 2015 2 commits
  12. 16 Jul, 2015 2 commits
  13. 14 Jul, 2015 3 commits
  14. 13 Jul, 2015 3 commits
  15. 10 Jul, 2015 1 commit
    • Monty's avatar
      Updated fill_help_tables for MariaDB · d9835658
      Monty authored
      - References changed from mysql.com to mariadb.com/kb
      - NDB specfic things removed
      - Changed other MySQL related things to MariaDB
      d9835658
  16. 30 Jun, 2015 1 commit
    • Jan Lindström's avatar
      MDEV-8392: Couldn't alter field with default value for make it not nullable. · 1a8cf15d
      Jan Lindström authored
      Analysis; Problem is that InnoDB does not have support for generating
      CURRENT_TIMESTAMP or constant default.
      
      Fix: Add additional check if column has changed from NULL -> NOT NULL
      and column default has changed. If this is is first column definition
      whose SQL type is TIMESTAMP and it is defined as NOT NULL and
      it has either constant default or function default we must use
      "Copy" method for alter table.
      1a8cf15d
  17. 24 Jun, 2015 2 commits
  18. 17 Jun, 2015 2 commits