1. 16 Jul, 2021 1 commit
    • Dmitry Shulga's avatar
      MDEV-26150: The test main.opt_trace fails in case it is run in PS mode · 461cac89
      Dmitry Shulga authored
      In case the test main.opt_trace is run with the option --ps-protocol
      it fails since querying from the table INFORMATION_SCHEMA.OPTIMIZER_TRACE
      produces an output that differed from the expected one in the following way:
        @@ -2829,14 +2829,6 @@
                           }
                         },
                         {
        -                  "transformation": {
        -                    "select_id": 2,
        -                    "from": "IN (SELECT)",
        -                    "to": "semijoin",
        -                    "chosen": true
        -                  }
        -                },
        -                {
                           "expanded_query": "/* select#2 */ select t10.pk from t10"
                         }
      
      The table INFORMATION_SCHEMA.OPTIMIZER_TRACE is filled when optimizer_trace is on.
      The reason of missing above mentioned pieces in query result set is that
      the C++ macros
        OPT_TRACE_TRANSFORM(thd, trace_wrapper, trace_transform,
                            select_lex->select_number,
                            "IN (SELECT)", "semijoin");
      located in the standalone function check_and_do_in_subquery_rewrites()
      is executed twice in case the statement
        explain extended select * from t1 where a in (select pk from t10);
      is run in PS mode. The first time it is executed on PREPARE phase and
      the second time on EXECUTE phase. The output produced by this macros on
      EXECUTE phase rewrites the output produced on PREPARE phase.
      In result test failed in case it was run in PS mode.
      
      To make test output uniform regardless the test is run in PS or normal
      mode the operator '--source include/protocol.inc' has been added to
      the file opt_trace.test and extra opt_trace,ps.rdiff file has been added.
      
      Additionally, added operators
        --enable_prepared_warnings/--disable_prepared_warnings
      in order to store warnings in result file that received on PREPARE phase
      during running the statemement 'SELECT INTO'.
      461cac89
  2. 15 Jul, 2021 1 commit
    • Dmitry Shulga's avatar
      MDEV-26142: Fix failures of the tests main.features and... · 429382c2
      Dmitry Shulga authored
      MDEV-26142: Fix failures of the tests main.features and sys_vars.stored_program_cache_func when they are run in PS mode
      
      These tests produced different results in case they were run
      with the option --ps-protocol.
      
      These tests produced different result sets since a value of
      Feature_subquery and handler_read_key status system variables
      are updated one time more for ps-protocol (the first time it is updated
      on Prepare phase and the second time on Execute phase of PS protocol)
      So different result sets are expected for both tests. To make tests
      successfully runnable both for case it is run with and without
      the option --ps-protocol the new protocol combination [ps, nm]
      and protocol specific result files have been added.
      
      Moreover, the perl script mysql-test/mariadb-test-run.pl
      has been updated to make the variable opt_ps_protocol visible
      outside perl file containing this variable.
      429382c2
  3. 14 Jul, 2021 2 commits
    • Dmitry Shulga's avatar
      MDEV-26146: The test main.limit_rows_examined fails in case it is run in PS mode. · ff0d3bb8
      Dmitry Shulga authored
      Test failed by firing assert in append_warnings() when it is called
      from run_query_stmt() and there are more results from server.
      
      Obviously, append_warnings() should be called after the last packet
      received from server. So, to fix the assertion failure the function
      mysql_more_results() has to be called to check that now more results
      does exist and invokes append_warnings() in case the condition satisfied.
      ff0d3bb8
    • Otto Kekäläinen's avatar
      Implement simple Gitlab-CI pipeline for MariaDB with RPM builds · 04369f9c
      Otto Kekäläinen authored
      As Travis-CI has stopped offering free testing for open source projects,
      and they don't seem to have any plans to revert their new restrictions,
      MariaDB no longer has a good CI system outside contributors could run
      independently for basic validation before submitting Pull Requests.
      
      Implement a simple Gitlab-CI pipeline that runs basic RPM builds on
      one old, one less old and one very new distro release and then do some
      basic tests on the RPM packages to validate they installed and the
      server actually runs.
      04369f9c
  4. 13 Jul, 2021 1 commit
  5. 06 Jul, 2021 1 commit
  6. 05 Jul, 2021 2 commits
  7. 04 Jul, 2021 1 commit
  8. 03 Jul, 2021 4 commits
    • Marko Mäkelä's avatar
      fixup 0a67b15a · 789a2a36
      Marko Mäkelä authored
      trx_t::free(): Declare xid as fully initialized in order to
      avoid tripping the subsequent MEM_CHECK_DEFINED
      (in WITH_MSAN and WITH_VALGRIND builds).
      789a2a36
    • Marko Mäkelä's avatar
      Merge 10.5 into 10.6 · b797f217
      Marko Mäkelä authored
      b797f217
    • Marko Mäkelä's avatar
      MDEV-26017 fixup · f0f47cbc
      Marko Mäkelä authored
      buf_flush_relocate_on_flush_list(): Use dpage->physical_size()
      because bpage->zip.ssize may already have been zeroed in
      page_zip_set_size() invoked by buf_pool_t::realloc().
      
      This would cause occasional failures of the test
      innodb.innodb_buffer_pool_resize, which creates a
      ROW_FORMAT=COMPRESSED table.
      f0f47cbc
    • Marko Mäkelä's avatar
      MDEV-26033: Race condition between buf_pool.page_hash and resize() · bd5a6403
      Marko Mäkelä authored
      The replacement of buf_pool.page_hash with a different type of
      hash table in commit 5155a300 (MDEV-22871)
      introduced a race condition with buffer pool resizing.
      
      We have an execution trace where buf_pool.page_hash.array is changed
      to point to something else while page_hash_latch::read_lock() is
      executing. The same should also affect page_hash_latch::write_lock().
      
      We fix the race condition by never resizing (and reallocating) the
      buf_pool.page_hash. We assume that resizing the buffer pool is
      a rare operation. Yes, there might be a performance regression if a
      server is first started up with a tiny buffer pool, which is later
      enlarged. In that case, the tiny buf_pool.page_hash.array could cause
      increased use of the hash bucket lists. That problem can be worked
      around by initially starting up the server with a larger buffer pool
      and then shrinking that, until changing to a larger size again.
      
      buf_pool_t::resize_hash(): Remove.
      
      buf_pool_t::page_hash_table::lock(): Do not attempt to deal with
      hash table resizing. If we really wanted that in a safe manner,
      we would probably have to introduce a global rw-lock around the
      operation, or at the very least, poll buf_pool.resizing, both of
      which would be detrimental to performance.
      bd5a6403
  9. 02 Jul, 2021 27 commits