1. 26 Jan, 2022 25 commits
  2. 25 Jan, 2022 1 commit
  3. 24 Jan, 2022 8 commits
    • Alexander Barkov's avatar
      A clean-up for MDEV-10654 add support IN, OUT, INOUT parameter qualifiers for stored functions · 05050867
      Alexander Barkov authored
      Changes:
      
      1. Enabling IN/OUT/INOUT mode for sql_mode=DEFAULT,
         adding tests for sql_mode=DEFAULT based by mostly
         translating compat/oracle.sp-inout.test to SQL/PSM
         with minor changes (e.g. testing trigger OLD.column and
         NEW.column as IN/OUT parameters).
      
      2. Removing duplicate grammar:
         sp_pdparam and sp_fdparam implemented exactly the same syntax after
         - the first patch for MDEV-10654 (for sql_mode=ORACLE)
         - the change #1 from this patch (for sql_mode=DEFAULT)
         Removing separate rules and adding a single "sp_param" rule instead,
         which now covers both PRDEDURE and FUNCTION parameters
         (and CURSOR parameters as well!).
      
      3. Adding a helper rule sp_param_name_and_mode, which is a combination
         of the parameter name and the IN/OUT/INOUT mode. It allows to simplify
         the grammer a bit.
      
      4. The first patch unintentionally allowed IN/OUT/INOUT mode
        to be specified in CURSOR parameters.
        This is good for the IN keyword - it is allowed in PL/SQL CURSORs.
        This is not good the the OUT/INOUT keywords - they should not be allowed.
        Adding a additional symantic post-check.
      05050867
    • ManoharKB's avatar
      MDEV-10654 add support IN, OUT, INOUT parameter qualifiers for stored functions · 4572dc23
      ManoharKB authored
      Problem: Currently stored function does not support IN/OUT/INOUT parameter qualifiers.
      This is needed for Oracle compatibility (sql_mode = ORACLE).
      
      Solution: Implemented parameter qualifier support to CREATE FUNCTION (reference: CREATE PROCEDURE)
      Implemented return by reference for OUT/INOUT parameters in execute_function() (reference: execute_procedure())
      
      Files changed:
      sql/sql_yacc.yy: Added IN, OUT, INOUT parameter qualifiers for CREATE FUNCTION.
      sql/sp_head.cc: Added input and output parameter binding for IN/OUT/INOUT parameters in execute_function() so that OUT/INOUT can return by reference.
      sql/share/errmsg-utf8.txt: Added error message to restrict OUT/INOUT parameters while function being called from SQL query.
      mysql-test/suite/compat/oracle/t/sp-inout.test: Added test cases
      mysql-test/suite/compat/oracle/r/sp-inout.result: Added test results
      
      Reviewed-by: iqbal@hasprime.com
      4572dc23
    • Nayuta Yanagisawa's avatar
      MDEV-27521 SIGSEGV in spider_parse_connect_info in MDEV-27106 branch · 5595ed9d
      Nayuta Yanagisawa authored
      Add NULL check to SPIDER_OPTION_STR_LIST.
      5595ed9d
    • Nayuta Yanagisawa's avatar
      MDEV-26858 Spider: Remove dead code related to HandlerSocket · 0599dd90
      Nayuta Yanagisawa authored
      Remove the dead-code, in Spider, which is related to the Spider's
      HandlerSocket support. The code has been disabled for a long time
      and it is unlikely that the code will be enabled.
      0599dd90
    • Nayuta Yanagisawa's avatar
      MDEV-27106 Spider: specify connection to data node by engine-defined attributes · 72f34df3
      Nayuta Yanagisawa authored
      We introduce engine-defined attributes to specify remote data nodes.
      
      The engine attributes do not cover all the existing DSN parameters
      because most of them need not be specified at the table level.
      We introduce the following three attributes: REMOTE_SERVER,
      REMOTE_DATABASE, REMOTE_TABLE.
      
      One cannot specify both DSN parameter, in COMMENT or CONNECT, and
      engine-defined attribute that are for the same SPIDER_SHARE attribute.
      For example, Spider returns an error if both COMMENT='table "t1"'
      and REMOTE_TABLE="t2" are specified for a single Spider table or
      a single partition in a Spider table.
      72f34df3
    • Nayuta Yanagisawa's avatar
      MDEV-5271 Support engine-defined attributes per partition · c5d09f73
      Nayuta Yanagisawa authored
      Make it possible to specify engine-defined attributes on partitions
      as well as tables.
      
      If an engine-defined attribute is only specified at the table level,
      it applies to all the partitions in the table.
      This is a backward-compatible behavior.
      
      If the same attribute is specified both at the table level and the
      partition level, the per-partition one takes precedence.
      So, we can consider per-table attributes as default values.
      
      One cannot specify engine-defined attributes on subpartitions.
      
      Implementation details:
      
      * We store per-partition attributes in the partition_element class
        because we already have the part_comment field, which is for
        per-partition comments.
      
      * In the case of ALTER TABLE statements, the partition_elements in
        table->part_info is set up by mysql_unpack_partition().
        So, we parse per-partition attributes after the call of the function.
      c5d09f73
    • Daniel Black's avatar
      MDEV-27314 InnoDB Buffer Pool Resize output cleanup (mtr postfix) · 83dd7db6
      Daniel Black authored
      More tests depending on 'Completed resizing buffer pool.' output
      83dd7db6
    • Haidong Ji's avatar
      MDEV-27314 InnoDB Buffer Pool Resize output cleanup · d0ca235d
      Haidong Ji authored
      Cleaned up the log messages as suggested, with a minor code
      formatting change.
      
      On bullet point 13, I decided to not include timestamp in output
      message. In most (all?) cases, the output goes to the log file,
      which has timestamp already.
      d0ca235d
  4. 22 Jan, 2022 2 commits
    • Otto Kekäläinen's avatar
      Extend the Gitlab-CI pipeline to run mini benchmark · c5c61b51
      Otto Kekäläinen authored
      Implement new mini-benchmark script for simple CPU bound benchmark for the
      duration of 5 minutes. The script can be run stand-alone or as part of a
      CI pipeline.
      
      Extend Gitlab-CI to run mini-benchmark on every commit to catch if there
      are severe performance regressions.
      
      Also bump MARIADB_MAJOR_VERSION to 10.8 which is needed on the 10.8 branch.
      c5c61b51
    • Marko Mäkelä's avatar
      MDEV-27208: mtr --ps-protocol test fixup · 1f5fc7b7
      Marko Mäkelä authored
      The test ./mtr --ps-protocol main.func_math
      was broken in commit 5b3ad94c
      because in that mode, one of several truncation warnings for
      a single integer literal would be omitted. Those warnings are
      issued by the parser somewhere outside CRC32() or CRC32C().
      1f5fc7b7
  5. 21 Jan, 2022 4 commits
    • Marko Mäkelä's avatar
      MDEV-27208: Extend CRC32() and implement CRC32C() · 5b3ad94c
      Marko Mäkelä authored
      We used to define a native unary function CRC32() that computes the CRC-32
      of a string using the ISO 3309 polynomial that is being used by zlib
      and many others.
      
      Often, a CRC is computed in pieces. To faciliate this, we introduce a
      2-ary variant of the function that inputs a previous CRC as the first
      argument: CRC32('MariaDB')=CRC32(CRC32('Maria'),'DB').
      
      InnoDB and MyRocks use a different polynomial, which was implemented
      in SSE4.2 instructions that were introduced in the
      Intel Nehalem microarchitecture. This is commonly called CRC-32C
      (Castagnoli).
      
      We introduce a native function that uses the Castagnoli polynomial:
      CRC32C('MariaDB')=CRC32C(CRC32C('Maria'),'DB'). This allows
      SELECT...INTO DUMPFILE to be used for the creation of files with
      valid checksums, such as a logically empty InnoDB redo log file
      ib_logfile0 corresponding to a particular log sequence number.
      5b3ad94c
    • Marko Mäkelä's avatar
      MDEV-27199: Remove FIL_PAGE_FILE_FLUSH_LSN · b07920b6
      Marko Mäkelä authored
      The only purpose of the field FIL_PAGE_FILE_FLUSH_LSN was to
      store the log sequence number for a new ib_logfile0 when the
      InnoDB redo log was missing at startup.
      
      Because FIL_PAGE_FILE_FLUSH_LSN no longer serves any purpose,
      we will stop updating it. The writes of that field were inherently
      risky, because they were not covered by neither the redo log nor
      the doublewrite buffer.
      
      Warning: After MDEV-14425 and before this change, users could perform
      a clean shutdown of the server, replace the ib_logfile0 with a
      0-length file, and expect a valid log file to be created on the
      next server startup. After this change, if the FIL_PAGE_FILE_FLUSH_LSN
      had ever been updated in the past, the server would still create a
      log file in such a scenario, but possibly with an incorrect (too small)
      LSN. Users should not manipulate log files directly!
      b07920b6
    • Marko Mäkelä's avatar
      Disable adaptive spinning on buf_pool.mutex · 88d9fbb4
      Marko Mäkelä authored
      During the testing of MDEV-14425, buf_pool.mutex and log_sys.mutex
      were identified as the main bottlenecks for write workloads.
      Let us disable spinning also for buf_pool.mutex, except on ARMv8
      where spinning was enabled for log_sys.mutex
      in commit f7684f0c (MDEV-26855).
      This was tested on AMD64 and recommended by Axel Schwenke.
      
      According to Krunal Bauskar, removing the spinloops did not improve
      performance in his tests on ARMv8.
      88d9fbb4
    • Marko Mäkelä's avatar
      5d54fd61