1. 30 Aug, 2018 1 commit
    • Jacob Mathew's avatar
      MDEV-16889: Spider Crash mysqld got exception 0xc0000005 · f6694b62
      Jacob Mathew authored
      The SELECT with the INNER JOIN is executed with one of the two tables being
      optimized as a constant table, which is pre-read.  Spider nevertheless attempts
      to push down the join to the data node.  The crash occurs because the constant
      table is excluded from the optimized query that Spider attempts to push down.
      
      In order for Spider to be able to push down a join, the following conditions
      need to be met:
      - All of the tables involved in the join need to be included in the optimized
        query that Spider pushes down.  When any of the tables involved in the join
        is a constant table, it is excluded from the optimized query that Spider
        attempts to push down.
      - All fields involved in the query need to be members of tables included in the
        optimized query.
      
      I fixed the problem by preventing Spider from pushing down queries that include
      a field that is not a member of a table included in the optimized query.  This
      solution fixes the reported problem and also fixes other potential problems.
      
      Author:
        Jacob Mathew.
      
      Reviewer:
        Kentoku Shiba.
      
      Cherry-Picked:
        Commit 4885baf6 on branch bb-10.3-MDEV-16889
      f6694b62
  2. 28 Aug, 2018 3 commits
    • Jacob Mathew's avatar
      MDEV-16250: Spider system tables are MyISAM and needs repair after a crash · 6ccd7d2d
      Jacob Mathew authored
      During a server restart that follows a server crash, there may be error
      messages that indicate that certain system tables are marked as crashed and
      may be corrupted.  Upon checking the system tables that are marked as crashed,
      it may be found that there is no corruption that needs repair.  However, the
      error messages that are issued imply that the user needs to nevertheless
      manually repair the system tables that were marked as crashed.  These issues
      have been moved to a separate bug MDEV-17068.
      
      MDEV-16250 addresses the work to make the Spider system tables crash safe.
      This work involves the following changes in 10.4:
      - Changes to the install_spider.sql script to change the storage engine for
        the Spider system tables to Aria.  This is implemented in such a way as to
        allow the script to be run repeatedly without any harm or errors.
      - Changes to the init_spider.inc script that is run during initialization of
        every test in the Spider test suites.  This script now uses the Aria
        storage engine for the Spider system tables in MariaDB Server 10.4 and
        later releases.
      - Added a test to the Spider test suite to display the storage engine of each
        Spider system table, to verify that the correct storage engine is used.
      
      Author:
        Jacob Mathew.
      
      Reviewer:
        Kentoku Shiba.
      
      Merged:
        Commit 73fac2a5 from branch bb-10.4-MDEV-16250
      6ccd7d2d
    • Monty's avatar
      MDEV-17068 mysql system table is marked as crashed and should be repaired... · 8cc53ade
      Monty authored
      MDEV-17068 mysql system table is marked as crashed and should be repaired after the server crashes or is killed
      
      - Changed ERROR to WARNING for MyISAM/Aria message
        that are warnings in the check utilities.
        This affects for example "client is using or
        hasn't closed the table properly".
      - Print "Table is fixed" if check succeded in
        fixing the table.
      8cc53ade
    • Monty's avatar
      Updated company name in Aria plugin definition · f451fd8c
      Monty authored
      f451fd8c
  3. 27 Aug, 2018 1 commit
    • Jacob Mathew's avatar
      MDEV-16250: Spider system tables are MyISAM and needs repair after a crash · 73fac2a5
      Jacob Mathew authored
      During a server restart that follows a server crash, there may be error
      messages that indicate that certain system tables are marked as crashed and
      may be corrupted.  Upon checking the system tables that are marked as crashed,
      it may be found that there is no corruption that needs repair.  However, the
      error messages that are issued imply that the user needs to nevertheless
      manually repair the system tables that were marked as crashed.  These issues
      have been moved to a separate bug MDEV-17068.
      
      MDEV-16250 addresses the work to make the Spider system tables crash safe.
      This work involves the following changes in 10.4:
      - Changes to the install_spider.sql script to change the storage engine for
        the Spider system tables to Aria.  This is implemented in such a way as to
        allow the script to be run repeatedly without any harm or errors.
      - Changes to the init_spider.inc script that is run during initialization of
        every test in the Spider test suites.  This script now uses the Aria
        storage engine for the Spider system tables in MariaDB Server 10.4 and
        later releases.
      - Added a test to the Spider test suite to display the storage engine of each
        Spider system table, to verify that the correct storage engine is used.
      
      Author:
        Jacob Mathew.
      
      Reviewer:
        Kentoku Shiba.
      73fac2a5
  4. 24 Aug, 2018 1 commit
  5. 20 Aug, 2018 3 commits
  6. 18 Aug, 2018 1 commit
  7. 17 Aug, 2018 2 commits
    • Varun Gupta's avatar
      Fixed ASAN failure for the test main.func_misc. · bf1c53e9
      Varun Gupta authored
      For Item name_const , we should never do typecast it to Item_field because we
      always expect it to be a constant value.
      So instead of checking the type() its better to introduce a function in the
      Item class get_item_field, which would return the item_field object for the item
      which have type of FIELD_ITEM
      bf1c53e9
    • Monty's avatar
      MDEV-16986 Unitialized mutex, SIGSEGV and assorted assertion failures in Aria code · 3faed09d
      Monty authored
      This was introduced by two pointers I added to TRN
      as part of MDEV-16421 Make system tables crash safe
      
      - Added code to ensure that trn_prev is not pointing
        to wrong object
      - A lot of new asserts and more code comments
      - Simplified code in _ma_trnman_end_trans_hook()
        - New back link allowed me to remove a loop
      3faed09d
  8. 16 Aug, 2018 10 commits
  9. 15 Aug, 2018 4 commits
  10. 14 Aug, 2018 7 commits
    • Marko Mäkelä's avatar
      MDEV-15872 Crash in online ALTER TABLE...ADD PRIMARY KEY after instant ADD COLUMN...NULL · 021652ba
      Marko Mäkelä authored
      row_log_table_get_pk_col(): Replace a condition that was inadvertently
      removed in MDEV-16365. PRIMARY KEY columns are never allowed to be NULL,
      and failure to enforce the constraint caused a null pointer to be
      dereferenced in mem_heap_dup().
      021652ba
    • Daniel Bartholomew's avatar
      bump the VERSION · 964ad0c4
      Daniel Bartholomew authored
      964ad0c4
    • Vladislav Vaintroub's avatar
    • Michael Widenius's avatar
      MDEV-16421 Make system tables crash safe · d6d63f48
      Michael Widenius authored
      Make all system tables in mysql directory of type
      engine=Aria
      
      Privilege tables are using transactional=1
      Statistical tables are using transactional=0, to allow them
      to be quickly updated with low overhead.
      Help tables are also using transactional=0 as these are only
      updated at init time.
      
      Other changes:
      - Aria store engine is now a required engine
      - Update comment for Aria tables to reflect their new usage
      - Fixed that _ma_reset_trn_for_table() removes unlocked table
        from transaction table list. This was needed to allow one
        to lock and unlock system tables separately from other
        tables, for example when reading a procedure from mysql.proc
      - Don't give a warning when using transactional=1 for engines
        that is using transactions. This is both logical and also
        to avoid warnings/errors when doing an alter of a privilege
        table to InnoDB.
      - Don't abort on warnings from ALTER TABLE for changes that
        would be accepted by CREATE TABLE.
      - New created Aria transactional tables are marked as not movable
        (as they include create_rename_lsn).
      - bootstrap.test was changed to kill orignal server, as one
        can't anymore have two servers started at same time on same
        data directory and data files.
      - Disable maria.small_blocksize as one can't anymore change
        aria block size after system tables are created.
      - Speed up creation of help tables by using lock tables.
      - wsrep_sst_resync now also copies Aria redo logs.
      d6d63f48
    • Monty's avatar
      Fixed some source comments and help texts · 0e0f1092
      Monty authored
      0e0f1092
    • Monty's avatar
      Remove warning from perfschema.bad_option_# tests · 5e1bbf66
      Monty authored
      5e1bbf66
    • Michael Widenius's avatar
      Updated wrong result files · cf7b48ff
      Michael Widenius authored
      cf7b48ff
  11. 13 Aug, 2018 7 commits
    • Vladislav Vaintroub's avatar
      adjust result file · 9a4998a3
      Vladislav Vaintroub authored
      9a4998a3
    • Vladislav Vaintroub's avatar
      MDEV-15680 xb_aws_key_management fails in buildbot. · 1faaaa97
      Vladislav Vaintroub authored
      aws_key_management needs current directory to be datadir during
      initalization, it scans current directory for encrypted keys.
      
      Fix is to ensure, that plugin initialization in mariabackup happens
      after the call to my_setwd(mysql_real_data_home).
      1faaaa97
    • Jacob Mathew's avatar
      MDEV-16398: Spider Creates Query With Non-Existent Function · e39eb182
      Jacob Mathew authored
      The problem occurs because the statement generated by Spider used an
      internal function name, ADD_TIME.
      
      This problem has been corrected by the fix for bug MDEV-16878 within the
      server, which enables Spider to generate the statement using the actual
      SQL function name.  I have made some additional changes within Spider to fix
      related problems that I observed while testing.
      
      Author:
        Jacob Mathew.
      
      First Reviewer:
        Alexander Barkov.
      
      Second Reviewer:
        Kentoku Shiba.
      
      Cherry-Picked:
        Commit 4b6dccc8 on branch bb-10.3-MDEV-16398
      e39eb182
    • Jacob Mathew's avatar
      MDEV-16398: Spider Creates Query With Non-Existent Function · e10ca66b
      Jacob Mathew authored
      The problem occurs because the statement generated by Spider used an
      internal function name, ADD_TIME.
      
      This problem has been corrected by the fix for bug MDEV-16878 within the
      server, which enables Spider to generate the statement using the actual
      SQL function name.  I have made some additional changes within Spider to fix
      related problems that I observed while testing.
      
      Author:
        Jacob Mathew.
      
      First Reviewer:
        Alexander Barkov.
      
      Second Reviewer:
        Kentoku Shiba.
      
      Merged:
        Commit 4b6dccc8 on branch bb-10.3-MDEV-16398
      e10ca66b
    • Sergei Petrunia's avatar
      MDEV-16575: rocksdb.bulk_load_errors fails in buildbot with wrong result · 562dd53c
      Sergei Petrunia authored
      Fix a race condition in the test.
      562dd53c
    • Marko Mäkelä's avatar
      MDEV-12041: innodb_encrypt_log key rotation · f6d4f624
      Marko Mäkelä authored
      This will change the InnoDB encrypted redo log format only.
      Unencrypted redo log will keep using the MariaDB 10.3 format.
      In the new encrypted redo log format, 4 additional bytes will
      be reserved in the redo log block trailer for storing the
      encryption key version.
      
      For performance reasons, the encryption key rotation
      (checking if the latest encryption key version is being used)
      is only done at log_checkpoint().
      
      LOG_HEADER_FORMAT_CURRENT: Remove.
      
      LOG_HEADER_FORMAT_ENC_10_4: The encrypted 10.4 format.
      
      LOG_BLOCK_KEY: The encryption key version field.
      
      LOG_BLOCK_TRL_SIZE: Remove.
      
      log_t: Add accessors framing_size(), payload_size(), trailer_offset(),
      to be used instead of referring to LOG_BLOCK_TRL_SIZE.
      
      log_crypt_t: An operation passed to log_crypt().
      
      log_crypt(): Perform decryption, encryption, or encryption with key
      rotation. Return an error if key rotation at decryption fails.
      On encryption, keep using the previous key if the rotation fails.
      At startup, old-format encrypted redo log may be written before
      the redo log is upgraded (rebuilt) to the latest format.
      
      log_write_up_to(): Add the parameter rotate_key=false.
      
      log_checkpoint(): Invoke log_write_up_to() with rotate_key=true.
      f6d4f624
    • Sergei Golubchik's avatar
      fix third-party tool packaging on Win · fac3e575
      Sergei Golubchik authored
      fac3e575