1. 02 Jul, 2019 13 commits
    • LingBin's avatar
      Fix github urls of submodules · 6842a153
      LingBin authored
      Uniformly use the `.git` suffix format
      6842a153
    • Sergei Golubchik's avatar
      cleanup: mtr and plugins · 4fef6443
      Sergei Golubchik authored
      * in --parallel mode don't copy/symlinks plugins individually
        in each forked child's vardir, use the common parent vardir with
        all plugins
      * move pam plugin specific code from mysql-test-run.pl to
        suite/plugins/suite.pm
      4fef6443
    • Sergei Golubchik's avatar
      Skip pam tests unless $USER owns auth_pam_tool_dir · d84792b6
      Sergei Golubchik authored
      (meaning, if MariaDB is installed system-wide, pam tests
      require mtr to be run as mysql user)
      d84792b6
    • Sergei Golubchik's avatar
      MDEV-19879 server can send empty error message to client with pam_use_cleartext_plugin · 4f87ad19
      Sergei Golubchik authored
      fixed in MDEV-19878, here just adding tests
      4f87ad19
    • Sergei Golubchik's avatar
      MDEV-19880 pam v1: pam password authentication doesn't work at all in MariaDB 10.4 · 3914a792
      Sergei Golubchik authored
      * fix incorrect parentheses
      * if there was no password on the command line or in .cnf file,
        pkt will be "", and we need to request the user to enter the password
      3914a792
    • Sergei Golubchik's avatar
      MDEV-19878 pam v2: pam password authentication doesn't work at all · dd93028d
      Sergei Golubchik authored
      * wait() for the child process to die, let it rest in peace
      * fix incorrect parentheses
      * if there was no password on the command line or in .cnf file,
        pkt will be "", and we need to request the user to enter the password
      * make sure that auth->salt is always allocated on a permanent memroot.
        when called from set_user_salt_if_needed(), user_copy and its auth_str
        are on the thd memroot, but auth_copy->salt is then copied to auth->salt
      * adjust service files so that systemd wouldn't interfere with our
        setuid executables
      
      also
      * print the pam error message in debug mode
      dd93028d
    • Sergei Golubchik's avatar
      MDEV-19876 pam v2: auth_pam_tool_dir and auth_pam_tool permissions are wrong in RPMs · ec494cb1
      Sergei Golubchik authored
      in fact, permissions were fine in RPM, but mysql_install_db
      was resetting them.
      
      Also fix Debian, while we're at it
      ec494cb1
    • Sergei Golubchik's avatar
      build pam test module as a part of the build · a07c10f5
      Sergei Golubchik authored
      and install in mysql-test/suite/plugins/pam
      so that it could be manually copied into /etc if needed
      a07c10f5
    • Sergei Golubchik's avatar
      Alter pam test to ask for a password first · 9c74cc4d
      Sergei Golubchik authored
      this matches the common behavior with pam_unix and helps to
      catch password related errors
      
      also, use abort() instead of sigsegv to avoid polluting
      /var/log/messages with intentional crashes
      9c74cc4d
    • Sergei Golubchik's avatar
      enable TLSv1.0 in WolfSSL · e46b87aa
      Sergei Golubchik authored
      e46b87aa
    • Sergei Golubchik's avatar
      don't run tls_version test if TLSv1.1 is disabled · e79b9005
      Sergei Golubchik authored
      in /etc/ssl/openssl.cnf
      
      as it happens to be on the buster builder
      e79b9005
    • Sergei Golubchik's avatar
      cleanup: mtr suite.pm ssl checks · 4bfb19d4
      Sergei Golubchik authored
      4bfb19d4
    • Sujatha's avatar
      MDEV-19716: ASAN use-after-poison in Query_log_event::Query_log_event /... · 4bad6aa9
      Sujatha authored
      MDEV-19716: ASAN use-after-poison in Query_log_event::Query_log_event / THD::log_events_and_free_tmp_shares
      
      Analysis:
      ========
      When a given client session ends on a master, the server logs a DROP TEMPORARY
      TABLE IF EXISTS statement for each temporary table that still exists in the
      current session. It ensures a proper temporary table cleanup on the slave. In
      order to write the DROP TEMPORARY TABLE query in binary log a 'Query_log_event'
      object is created. Within the 'Query_log_event' constructor
      'thd->lex->sql_command' is read to identify what type of cache needs to be
      used to write the query. When the code reaches here as part of THD::cleanup
      the 'thd->lex->sql_command' will be in an invalid state. The 'thd->lex' could
      have been cleared or it could be pointing to a statement which was in the
      middle of execution when the session ended. In such cases ASAN reports
      use-after-poison error.
      
      Fix:
      ===
      The 'THD::Cleanup' code invokes 'THD::log_events_and_free_tmp_shares' to look
      for temporary tables and write appropriate DROP TABLE stmts for them. This
      cleanup code provides a special flag named 'direct=TRUE' to the
      Query_log_event constructor. Having 'direct=TRUE' means that this query
      doesn't require any caching. Hence in this scenario the 'Query_log_event'
      constructor should respect the 'direct' flag and simply skip the logic of
      deciding the type of cache to be used for the statement. Hence the code will
      not access the stale lex object.
      4bad6aa9
  2. 01 Jul, 2019 6 commits
  3. 30 Jun, 2019 1 commit
  4. 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
  5. 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
  6. 26 Jun, 2019 7 commits
  7. 25 Jun, 2019 3 commits
  8. 24 Jun, 2019 1 commit