1. 02 Sep, 2015 5 commits
    • Kristian Nielsen's avatar
      Merge MDEV-8725 into 10.1 · ef82cb7c
      Kristian Nielsen authored
      ef82cb7c
    • Kristian Nielsen's avatar
      Fix a potential lost wakeup for binlog_commit_wait_usec · 09bfaf3a
      Kristian Nielsen authored
      If a transaction T1 needs to wait for a transaction T2, T2's commit will
      skip the normal binlog_commit_wait_usec delay, in order not to needlessly
      stall throughput.
      
      This works by checking if T2 is already ready to commit. If so, it is woken
      up. If not, we set a flag in T2 so that when it gets ready to commit, it
      will do so immediately.
      
      But there was a potential race due to insufficient locking, if T2 gets ready
      to commit just at the point where T1 does the check. If the race hits, the
      wakeup (and early commit) of T2 might be lost.
      
      The race is only theoretical (from code inspection, no known test case), but
      seems best to fix it anyway, by properly locking LOCK_prepare_ordered around
      the check.
      09bfaf3a
    • Kristian Nielsen's avatar
      MDEV-8725: Assertion `!(thd->rgi_slave && thd->... · 999c43ae
      Kristian Nielsen authored
      MDEV-8725: Assertion `!(thd->rgi_slave && thd-> rgi_slave->did_mark_start_commit)' failed in ha_rollback_trans
      
      The assertion is there to catch cases where we rollback while
      mark_start_commit() is active. This can allow following event groups
      to be replicated too early, causing conflicts.
      
      But in this case, we have an _explicit_ ROLLBACK event in the binlog,
      which should not assert.
      
      We fix this by delaying the mark_start_commit() in the explicit
      ROLLBACK case. It seems safest to delay this in ROLLBACK case anyway,
      and there should be no reason to try to optimise this corner case.
      999c43ae
    • Alexander Barkov's avatar
      The fix for MDEV-8723 unintentionally broke vcol_supported_sql_funcs_myisam · 4f37a861
      Alexander Barkov authored
      and vcol_supported_sql_funcs_innodb. Moving the test for using CHARSET(),
      COLLATION(), COERCIBILITY() in virtual column from
      vcol_supported_sql_funcs_xxx to vcol_blocked_sql_funcs_xxx,
      as these functions are not supported in virtual columns any longer.
      Discussed with Sanja on IRC.
      4f37a861
    • Alexander Barkov's avatar
  2. 01 Sep, 2015 4 commits
    • Alexander Barkov's avatar
    • Monty's avatar
      Fixed errors and bugs found by valgrind: · 4f0255cb
      Monty authored
      - If run with valgrind, mysqltest will now wait longer when syncronizing slave with master
      - Ensure that we wait with cleanup() until slave thread has stopped.
      - Added signal_thd_deleted() to signal close_connections() that all THD's has been freed.
      - Check in handle_fatal_signal() that we don't use variables that has been freed.
      - Increased some timeouts when run with --valgrind
      
      Other things:
      - Fixed wrong test in one_thread_per_connection_end() if galera is used.
      - Removed not needed calls to THD_CHECK_SENTRY() when we are calling 'delete thd'.
      4f0255cb
    • Monty's avatar
      MDEV-6152: Remove calls to current_thd while creating Item · 56aa1998
      Monty authored
      Part 5: Removing calls to current_thd in net_read calls, creating fields,
              query_cache, acl and some other places where thd was available
      56aa1998
    • Alexander Barkov's avatar
      MDEV-8722 The patch for MDEV-8688 disabled equal field propagation for... · 8ea9b8c0
      Alexander Barkov authored
      MDEV-8722 The patch for MDEV-8688 disabled equal field propagation for temporal column and BETWEEN and IN
      Item::cmp_context was inconsistently used in combination with cmp_type()
      and result_type() in different places of the code. Fixed to use cmp_type()
      in all places where cmp_context is involved, to avoid unexpected results
      for temporal data types (which have result_type()==STRING_RESULT and
      cmp_type==TIME_RESULT).
      8ea9b8c0
  3. 31 Aug, 2015 1 commit
  4. 29 Aug, 2015 5 commits
  5. 28 Aug, 2015 1 commit
  6. 27 Aug, 2015 2 commits
    • Monty's avatar
      MDEV-6152: Remove calls to current_thd while creating Item · 3bca8db4
      Monty authored
      - Part 4: Removing calls to sql_alloc() and sql_calloc()
      
      Other things:
      - Added current_thd in some places to make it clear that it's called (easier to remove later)
      - Move memory allocation from Item_func_case::fix_length_and_dec() to Item_func_case::fix_fields()
      - Added mem_root to some new calls
      - Fixed some wrong UNINIT_VAR() calls
      - Fixed a bug in generate_partition_syntax() in case of errors
      - Added mem_root to argument to new thread_info
      - Simplified my_parse_error() call in sql_yacc.yy
      3bca8db4
    • Monty's avatar
      MDEV-6152: Remove calls to current_thd while creating Item · 3cb578c0
      Monty authored
      - Part 3: Adding mem_root to push_back() and push_front()
      
      Other things:
      - Added THD as an argument to some partition functions.
      - Added memory overflow checking for XML tag's in read_xml()
      3cb578c0
  7. 26 Aug, 2015 8 commits
  8. 25 Aug, 2015 3 commits
  9. 22 Aug, 2015 1 commit
  10. 21 Aug, 2015 3 commits
  11. 18 Aug, 2015 4 commits
    • Monty's avatar
      Merge /my/maria-10.1-default into 10.1 · 4374da63
      Monty authored
      4374da63
    • Monty's avatar
      Fixed failing tests and compiler warnings · dfac82e4
      Monty authored
      - UNINIT_VAR() was required for 4.8.3 on openSUSE 13.2
      dfac82e4
    • Monty's avatar
      Ensure that fields declared with NOT NULL doesn't have DEFAULT values if not... · 6b203426
      Monty authored
      Ensure that fields declared with NOT NULL doesn't have DEFAULT values if not specified and if not timestamp or auto_increment
      
      In original code, sometimes one got an automatic DEFAULT value in some cases, in other cases not.
      
      For example:
      create table t1 (a int primary key)      - No default
      create table t2 (a int, primary key(a))  - DEFAULT 0
      create table t1 SELECT ....              - Default for all fields, even if they where defined as NOT NULL
      ALTER TABLE ... MODIFY could sometimes add an unexpected DEFAULT value.
      
      The patch is quite big because we had some many test cases that used
      CREATE ... SELECT or CREATE ... (...PRIMARY KEY(xxx)) which doesn't have an automatic DEFAULT anymore.
      
      Other things:
      - Removed warnings from InnoDB when waiting from semaphore (got this when testing things with --big)
      6b203426
    • Monty's avatar
      MDEV-8475 stale .TMM file causes MyiSAM and Aria engine to stop serving the table · 92fd6583
      Monty authored
      Issue was two fold (both in MyISAM and Aria)
      - optimize and repair failed if there was an old .TMM file around. As optimized and repair are protected against multiple execution, I decided to change so that we just truncate the file if it exists.
      - I had missed to check for error condition if creation of the temporary index file failed. This caused the strange behaviour that it looked as if optimized would have worked once.
      92fd6583
  12. 17 Aug, 2015 1 commit
    • Alexander Barkov's avatar
      Adding EXPLAIN SELECT tests for: · 5fe8b747
      Alexander Barkov authored
      MDEV-7649 wrong result when comparing utf8 column with an invalid literal
      This is a preparatory patch for:
      MDEV-8433 Make field<'broken-string' use indexes
      5fe8b747
  13. 14 Aug, 2015 2 commits
    • Alexander Barkov's avatar
      Adding MY_CHARSET_HANDLER::native_to_mb(). · 78b80cb6
      Alexander Barkov authored
      This is a pre-requisite patch for:
      - MDEV-8433 Make field<'broken-string' use indexes
      - MDEV-8625 Bad result set with ignorable characters when using a prefix key
      - MDEV-8626 Bad result set with contractions when using a prefix key
      78b80cb6
    • Jan Lindström's avatar
      MDEV-8589: Non-default ENCRYPTION_KEY_ID is ignored upon reading a table · bfb6ea02
      Jan Lindström authored
      Analysis: Problem was that when a new tablespace is created a default
      encryption info is also created and stored to the tablespace. Later a
      new encryption information was created with correct key_id but that
      does not affect on IV.
      
      Fix: Push encryption mode and key_id to lower levels and create
      correct encryption info when a new tablespace is created.
      
      This fix does not contain test case because, currently incorrect
      encryption key causes page corruption and a lot of error messages
      to error log causing mtr to fail.
      bfb6ea02