1. 01 Jul, 2019 6 commits
  2. 30 Jun, 2019 1 commit
  3. 28 Jun, 2019 4 commits
    • Kentoku SHIBA's avatar
    • Kentoku SHIBA's avatar
      MDEV-16508 spider: sql_mode not maintained between spider node and data nodes (#1347) · d4bdf1c0
      Kentoku SHIBA authored
      Add the following parameter.
      
      - spider_sync_sql_mode
        Local sql_mode synchronous existence to remote server.
         0 : It doesn't synchronize.
         1 : It synchronizes.
        The default value is 1
      d4bdf1c0
    • Marko Mäkelä's avatar
      MDEV-19845: Define my_timer_cycles() inline · 5e929ee8
      Marko Mäkelä authored
      On clang, use __builtin_readcyclecounter() when available.
      Hinted by Sergey Vojtovich. (This may lead to runtime failure
      on ARM systems. The hardware should be available on ARMv8 (AArch64),
      but access to it may require special privileges.)
      
      We remove support for the proprietary Sun Microsystems compiler,
      and rely on clang or the __GNUC__ assembler syntax instead.
      
      For now, we retain support for IA-64 (Itanium) and 32-bit SPARC,
      even though those platforms are likely no longer widely used.
      
      We remove support for clock_gettime(CLOCK_SGI_CYCLE),
      because Silicon Graphics ceased supporting IRIX in December 2013.
      This was the only cycle timer interface available for MIPS.
      
      On PowerPC, we rely on the GCC 4.8 __builtin_ppc_get_timebase()
      (or clang __builtin_readcyclecounter()), which should be equivalent
      to the old assembler code on both 64-bit and 32-bit targets.
      5e929ee8
    • Kentoku SHIBA's avatar
      MDEV-17402 slave_transaction_retry_errors="12701" won't be enabled (#1346) · 1635ea94
      Kentoku SHIBA authored
      error code 12701 is already included in default value, but other plugin specific error codes are ignored because of checking with ER_ERROR_LAST. ER_ERROR_LAST does not include plugin specific error codes. So I just removed it for fixing this issue.
      1635ea94
  4. 27 Jun, 2019 5 commits
    • Monty's avatar
      MDEV-17551 assert or crashed table when using blobs · 9053047f
      Monty authored
      The bug was that when long item-strings was converted to VARCHAR,
      type_handler::string_type_handler() didn't take into account max
      VARCHAR length.  The resulting Aria temporary table was created with
      a VARCHAR field of length 1 when it should have been 65537. This caused
      MariaDB to send impossible records to ma_write() and Aria reported
      eventually the table as crashed.
      
      Fixed by updating Type_handler::string_type_handler() to not create too long
      VARCHAR fields. To make things extra safe, I also added checks in when
      writing dynamic Aria records to ensure we find the wrong record during write
      instead of during read.
      9053047f
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · b7b0bc8f
      Marko Mäkelä authored
      We omit the work-around commit 0b7fa5a0
      because it appears to be needed for CentOS 6 only,
      which we no longer support.
      b7b0bc8f
    • Marko Mäkelä's avatar
      MDEV-19845: Fix the build on some platforms · f5c080c7
      Marko Mäkelä authored
      On some platforms, MY_RELAX_CPU() falls back to an atomic
      memory operation, but my_cpu.h fails to include my_atomic.h.
      f5c080c7
    • Marko Mäkelä's avatar
      MDEV-19845: Fix the build on some x86 targets · 0b7fa5a0
      Marko Mäkelä authored
      The RDTSC instruction, which was introduced in the Intel Pentium,
      has been used in MariaDB for a long time. But, the __rdtsc()
      wrapper is not available by default in some x86 build environments.
      The simplest solution seems to replace the inlined instruction
      with a call to the wrapper function my_timer_cycles(). The overhead
      for the call should not affect the measurement threshold.
      
      On Windows and on AMD64, we will keep using __rdtsc() directly.
      0b7fa5a0
    • Marko Mäkelä's avatar
      MDEV-19845: Adaptive spin loops · 042fc295
      Marko Mäkelä authored
      Starting with the Intel Skylake microarchitecture, the PAUSE
      instruction latency is about 140 clock cycles instead of earlier 10.
      On AMD processors, the latency could be 10 or 50 clock cycles,
      depending on microarchitecture.
      
      Because of this big range of latency, let us scale the loops around
      the PAUSE instruction based on timing results at server startup.
      
      my_cpu_relax_multiplier: New variable: How many times to invoke PAUSE
      in a loop. Only defined for IA-32 and AMD64.
      
      my_cpu_init(): Determine with RDTSC the time to run 16 PAUSE instructions
      in two unrolled loops according, and based on the quicker of the two
      runs, initialize my_cpu_relax_multiplier. This form of calibration was
      suggested by Mikhail Sinyavin from Intel.
      
      LF_BACKOFF(), ut_delay(): Use my_cpu_relax_multiplier when available.
      
      ut_delay(): Define inline in my_cpu.h.
      
      UT_COMPILER_BARRIER(): Remove. This does not seem to have any effect,
      because in our ut_delay() implementation, no computations are being
      performed inside the loop. The purpose of UT_COMPILER_BARRIER() was to
      prohibit the compiler from reordering computations. It was not
      emitting any code.
      042fc295
  5. 26 Jun, 2019 7 commits
  6. 25 Jun, 2019 3 commits
  7. 24 Jun, 2019 1 commit
  8. 22 Jun, 2019 3 commits
    • Eugene Kosov's avatar
      NFC: refactor Field::is_equal() and related stuff · a82e42fd
      Eugene Kosov authored
      Make Field::is_equal() const and return bool as it's a naturally fitting
      type for it. Also it's agrument was narrowed to Column_definition.
      
      InnoDB can change type of some columns by itself. InnoDB-specific code used to
      reside in Field_xxx:is_equal() methods. Now engine-specific stuff was
      moved to a virtual methods of handler::can_convert{string,varstring,blob,geom}.
      These methods are called by Field::can_be_converted_by_engine() which is a
      double dispatch pattern.
      
      Some InnoDB-specific code still resides in compare_keys_but_name(). It should
      be moved from here someday to handler::compare_key_parts(...) or similar.
      
      IS_EQUAL_WITH_REINTERPRET_COMPATIBLE_CHARSET
      IS_EQUAL_WITH_REINTERPRET_COMPATIBLE_CHARSET_BUT_COLLATE: both was removed
      
      IS_EQUAL_NO, IS_EQUAL_YES are not needed now and should be removed
      along with deprecated handler::check_if_incompatible_data().
      
      HA_EXTENDED_TYPES_CONVERSION: was removed as such logic is not needed now by
      server code.
      
      ALTER_COLUMN_EQUAL_PACK_LENGTH: was renamed to a more generic
      ALTER_COLUMN_TYPE_CHANGE_BY_ENGINE
      a82e42fd
    • Eugene Kosov's avatar
      MDEV-17301 Change of COLLATE unnecessarily requires ALGORITHM=COPY · 854c219a
      Eugene Kosov authored
      Patch is about two cases:
      1) On some collate changes it's possible to rebuild only secondary indexes
      2) For non-indexed columns collate can be changed INSTANTly
      
      Implemented mostly in Field_{string,varstring,blob}::is_equal().
      Make this method return how exactly collationa differs.
      This information is later used by fill_alter_inplace_info() to pass
      correct info to engine.
      854c219a
    • Vladislav Vaintroub's avatar
      remove workaround from MDEV-9409 · 72d3676f
      Vladislav Vaintroub authored
      72d3676f
  9. 21 Jun, 2019 2 commits
  10. 20 Jun, 2019 2 commits
  11. 19 Jun, 2019 2 commits
  12. 18 Jun, 2019 4 commits
    • Daniel Bartholomew's avatar
      bump the VERSION · efbfcc8b
      Daniel Bartholomew authored
      efbfcc8b
    • Michael Widenius's avatar
      MDEV-19595 fixed · 8acbf9c1
      Michael Widenius authored
      The test cases for the MDEV found several independent bugs
      in MariaDB server and Aria:
      - If a temporary table was marked as crashed, it could never
        be deleted.
      - Opening of a crashed temporary table gave an error message
        but the error was never forwarded to the caller which caused
        an assert() in my_ok()
      - init_read_record() did mmap of all temporary tables, which is
        probably not a good idea as this area can potentially be
        very big. Changed code to only mmap internal temporary tables.
      - mmap-ed tables where not unmapped in case of repair/optimize
        which caused bad data in table and crashes if the original
        table files where replaced with new ones (as the old mmap
        was still in place). Fixed by removing the mmap in case
        of repair.
      - Cleaned up usage of code that disabled mmap in Aria
      8acbf9c1
    • Sergei Golubchik's avatar
      3db4d018
    • Michael Widenius's avatar
      MDEV-18078 Assertion `trnman_has_locked_tables(trn) > 0' failed · b23c82fe
      Michael Widenius authored
      Problem was that in case of implicit rollback for alter table
      Aria did try to run commit twice.
      
      The test case for this is tricky to do in 10.2, so it will
      be added to 10.4 as part of BACKUP STAGE testing.
      b23c82fe