1. 22 Jul, 2022 1 commit
  2. 20 Jul, 2022 1 commit
  3. 18 Jul, 2022 9 commits
    • Aleksey Midenkov's avatar
      MDEV-29023 MTR hangs after multiple failures · 18488048
      Aleksey Midenkov authored
      Passing $opt_parallel as $childs is wrong: child can be killed before
      it connects and you will never decrement $childs for this.
      
      Another problem is (and that is the cause of this bug): child can be
      killed and never close server socket. This can happen f.ex. after
      unmaskable KILL signal. In such case the socket is closed by reaping
      the child but that never happens inside reading the socket loop in
      run_test_server().
      
      The proper design is the waitless reap of children inside the socket
      loop and if there is no more children we finish the socket loop. Since
      there is Windows variation where we don't control the children via
      waitpid(), all the clients must normally close the socket and only
      this can finish the socket loop. For Unix variation we reckon that
      case as all children closed the socket but not all yet died and for
      that we do final waiting waitpid() (was done before the patch as
      well).
      
      To be more complete, we now handle 3 end-of-game scenarios in Unix:
      
         1. all children closed socket, all children died: everything is
            handled by the socket loop;
      
         2. all children closed socket, not all yet died: we wait for alive
            children to die after exiting the socket loop;
      
         3. not all children closed socket, all children died: everything is
            handled by the socket loop.
      
      For Windows end-of-game scenario is only one:
      
         All children close the socket.
      18488048
    • Aleksey Midenkov's avatar
      MDEV-29023 waitpid() cleanup · 7ca5c7d8
      Aleksey Midenkov authored
      The case for "Unknown process $ret_pid exited" is never known to be
      valid. Such state is not documented for waitpid().
      7ca5c7d8
    • Aleksey Midenkov's avatar
    • Aleksey Midenkov's avatar
    • Aleksey Midenkov's avatar
      MDEV-28931 MTR prints detailed stack trace unconditionally · e9be5428
      Aleksey Midenkov authored
      66832e3a introduced change that prints core dumps in very detailed
      format. That's completely out of user-friendliness but serves as a
      measure for debugging hard-reproducible bugs.
      
      The proper way to implement this:
      
        1. it must be controlled by command-line and environment variable;
        2. detailed traces must be default for buildbots only, for user
           invocations normal stack traces should be printed.
      
      Options for control are: MTR_PRINT_CORE and --print-core that accept
      the following values:
      
        no	         Don't print core
        short	       	 Print stack trace of failed thread
        medium	 Print stack traces of all threads
        detailed       Print all stack traces with debug context
        custom:<code>  Use debugger commands <code> to print stack trace
      
      Default setting is: short (see env_or_default() call in pre_setup())
      
      For environment variable wrong values are silently ignored (falls back
      to default setting, see env_or_default()).
      
      Command-line option --print-core (or -C) overrides environment
      variable. Its default value is 'short' if not specified explicitly
      (same env_or_default() call in pre_setup()). Explicit values are
      checked for validity.
      
      --print-method option can specify by which debugger we print
      cores. For Windows there is only one choice: cdb. For Unix the values
      are: gdb, dbx, lldb, auto. Default value is: auto
      
      In 'auto' we try to use all possible debuggers until success.
      e9be5428
    • Aleksey Midenkov's avatar
      MDEV-28931 Debugger.pm readability fix · 220fb679
      Aleksey Midenkov authored
      setup_boot_args(), setup_client_args(), setup_args() traversing
      datastructures on each invocation. Even if performance is not
      important to perl script (though it definitely saves some CO2), this
      nonetheless provokes some code-reading questions. Reading and
      debugging such code is not convenient.
      
      The better way is to prepare all the data in advance in an easily
      readable form as well as do the validation step before any further
      processing.
      
      Use mtr_report() instead of die() like the other code does.
      
      TODO: do_args() does even more data processing magic. Prepare that
      data according the above strategy in advance in pre_setup() if possible.
      220fb679
    • Aleksey Midenkov's avatar
      MDEV-28931 --verbose option is too verbose · ce7820eb
      Aleksey Midenkov authored
      GetOpt::Long bundling option for convenient one-char verbosity levels:
      
        -v    General verbosity (file and execute operations)
        -vv   High verbosity (algorithmic considerations)
        -vvv  Debug verbosity (anything else)
      ce7820eb
    • Aleksey Midenkov's avatar
      MDEV-28931 Cleanup: try GDB to print core first · 83f7d25c
      Aleksey Midenkov authored
      Do we still need this Sun Studio hack?
      83f7d25c
    • Vladislav Vaintroub's avatar
      990ddaba
  4. 17 Jul, 2022 1 commit
  5. 14 Jul, 2022 2 commits
  6. 13 Jul, 2022 1 commit
    • Brandon Nesterenko's avatar
      MDEV-28487: sequences not respect value of binlog_row_image with select nextval(seq_gen) · 02e85aea
      Brandon Nesterenko authored
      Problem:
      ========
      When using sequences, the function
      sequence_definition::write(TABLE *table, bool all_fields)
      is used to save DML/DDL updates to sequence tables (e.g. nextval,
      setval, and alter). Prior to this patch, the value all_fields was
      always false when invoked via nextval and setval, which forced the
      bitmap to only include changed columns.
      
      Solution:
      ========
      Change all_fields when invoked via nextval and setval to be reliant
      on binlog_row_image, such that it is false when binlog_row_image is
      MINIMAL, and true otherwise.
      
      Reviewed By:
      ===========
      Andrei Elkin <andrei.elkin@mariadb.com>
      02e85aea
  7. 11 Jul, 2022 3 commits
    • Sergei Golubchik's avatar
      MDEV-21445 update test results · 96be3fe8
      Sergei Golubchik authored
      followup for 57f5c319
      96be3fe8
    • Marko Mäkelä's avatar
      MDEV-28689, MDEV-28690: Remove ctrl_mutex · b817afaa
      Marko Mäkelä authored
      This reverts the revert 4f62dfe6
      and fixes the hang that was introduced when ctrl_mutex was removed.
      
      The test mariabackup.compress_qpress covers this code, but the
      test is skipped if a stand-alone qpress executable is not available.
      It is not available in many software repositories, possibly because
      the code base has not been updated since 2010.
      
      This was tested with an executable that was compile from the source
      code at http://www.quicklz.com/qpress-11-source.zip (after adding
      a missing #include <unistd.h> for the definition of isatty()).
      
      Compared to the grandparent commit (before the revert), the changes
      are as follows:
      
      comp_thread_ctxt_t::done_cond: A separate condition for completed
      compression, signaling that thd->to_len has been updated.
      
      compress_write(): Replace some threads[i] with thd.
      Reset thd->to_len = 0 after consuming the compressed data.
      
      compress_worker_thread_func(): After consuming the uncompressed
      data, set thd->data_avail = FALSE. After compressing, signal
      thd->done_cond.
      b817afaa
    • Vladislav Vaintroub's avatar
      4f62dfe6
  8. 10 Jul, 2022 1 commit
    • Sergei Golubchik's avatar
      MDEV-28197 Linux mariadb-client build does not accept Unicode characters · 7598ef4b
      Sergei Golubchik authored
      Apparently newer libedit is readline-compatible enough
      to be detected as a readline, with USE_NEW_READLINE_INTERFACE defined
      and USE_LIBEDIT_INTERFACE not defined.
      
      Let's set the locale unconditionally, independently from the
      readline/libedit variant. It's already happening anyway now,
      unless one specifies --default-character-set explicitly.
      7598ef4b
  9. 07 Jul, 2022 2 commits
    • Sergei Petrunia's avatar
      MDEV-28871: Assert ... failed in JOIN::dbug_verify_sj_inner_tables... · 0e9a255e
      Sergei Petrunia authored
      optimize_semi_joins() calls update_sj_state() to update semi-join
      optimization state in the JOIN class.
      
      greedy_search() algorithm considers different join prefixes,
      and then picks one table to put into the join prefix.
      Most of the semi-join optimization state is in the table's entry
      in the join->positions[cur_prefix_size].
      
      However, it also needs to call update_sj_state() to update the
      semi-join optimization state in the JOIN class.
      
      There is one exception, which is the cause of this bug: when we're
      inside optimize_semi_join_nests() and are optimizing a subquery,
      optimize_semi_joins() does nothing, it doesn't call update_sj_state().
      
      greedy_search() must not do that either.
      0e9a255e
    • Vladislav Vaintroub's avatar
      MDEV-28746 Wrong error code ER_BAD_DB_ERROR for long filenames · 66c06735
      Vladislav Vaintroub authored
      Add check for path length if CreateFile fails with ERROR_PATH_NOT_FOUND.
      66c06735
  10. 06 Jul, 2022 3 commits
  11. 05 Jul, 2022 3 commits
  12. 04 Jul, 2022 1 commit
  13. 01 Jul, 2022 4 commits
  14. 30 Jun, 2022 1 commit
  15. 28 Jun, 2022 1 commit
    • Alexander Barkov's avatar
      A cleanup for MDEV-25243 ASAN heap-use-after-free in... · efdbb3cf
      Alexander Barkov authored
      A cleanup for MDEV-25243 ASAN heap-use-after-free in Item_func_sp::execute_impl upon concurrent view DDL and I_S query with view and function
      
      The test was reported to fail sporadicaly with this diff:
      
      --- mysql-test/main/information_schema_tables.result
      +++ mysql-test/main/information_schema_tables.reject
      @@ -21,6 +21,8 @@
       disconnect con1;
       connection default;
       DROP VIEW IF EXISTS vv;
      +Warnings:
      +Note	4092	Unknown VIEW: 'test.vv'
      
      in the "The originally reported non-deterministic test" part.
      Disabling warnings around the DROP VIEW statement.
      efdbb3cf
  16. 27 Jun, 2022 5 commits
    • Nayuta Yanagisawa's avatar
      MDEV-21310 AUTO_INCREMENT column throws range error on INSERT in partitioned... · 5375f0b4
      Nayuta Yanagisawa authored
      MDEV-21310 AUTO_INCREMENT column throws range error on INSERT in partitioned table | Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' failed.
      
      The bug is caused by a similar mechanism as MDEV-21027.
      
      The function, check_insert_or_replace_autoincrement, failed to open
      all the partitions on INSERT SELECT statements and it results in the
      assertion error.
      5375f0b4
    • Marko Mäkelä's avatar
      MDEV-26577 InnoDB: Failing assertion: dict_tf2_is_valid(flags, flags2) during ADD COLUMN · f339ef3f
      Marko Mäkelä authored
      prepare_inplace_alter_table_dict(): If the table will not be rebuilt,
      preserve all of the original ROW_FORMAT, including the compressed
      page size flags related to ROW_FORMAT=COMPRESSED.
      f339ef3f
    • Marko Mäkelä's avatar
      MDEV-28389 fixup: Fix compiler warnings · a75ad735
      Marko Mäkelä authored
      hex_to_ascii(): Add #if around the definition to avoid
      clang -Wunused-function. Avoid GCC 5 -Wconversion with a cast.
      a75ad735
    • Marko Mäkelä's avatar
      MDEV-28389: Simplify the InnoDB corrupted page output · c86b1389
      Marko Mäkelä authored
      buf_page_print(): Dump the buffer page 32 bytes (64 hexadecimal digits)
      per line. In this way, the limitation in mtr
      ("Data too long for column 'line'") will not be triggered.
      
      Also, do not bother decoding the page contents, because everything
      is present in the hexadecimal output.
      
      dict_index_find_on_id_low(): Merge to dict_index_get_if_in_cache_low().
      The direct call in buf_page_print() was prone to crashing, in case the
      table definition was concurrently evicted or dropped from the
      data dictionary cache.
      c86b1389
    • Hirokazu Hata's avatar
      MDEV-28854 Disallow INSERT DELAYED on Spider table · 2c1aaa66
      Hirokazu Hata authored
      Spider supports (or at least allows) INSERT DELAYED but the
      documentation does not specify spider as a storage engine that supports
      "INSERT DELAYED".
      Also, although not mentioned in the documentation, "INSERT DELAYED" is
      not intended to be executed inside a transaction, as can be seen from
      the list of supported storage engines.
      The current implementation allows executing a delayed insert on a
      remote transactional table and this breaks the consistency ensured by
      the transaction.
      
      We too remove "internal_delayed", one of the Spider table parameters.
      Documentation says,
      
      > Whether to transmit existence of delay to remote servers when
      > executing an INSERT DELAYED statement on local server.
      
      This table parameter is only used for "INSERT DELAYED".
      
      Reviewed by: Nayuta Yanagisawa
      2c1aaa66
  17. 24 Jun, 2022 1 commit