1. 08 Apr, 2018 1 commit
    • Vladislav Vaintroub's avatar
      MDEV-15707 : deadlock in Innodb IO code, caused by change buffering. · 7b16291c
      Vladislav Vaintroub authored
      In async IO completion code, after reading a page,Innodb can wait for
      completion of other bufferpool reads.
      This is for example what happens if change-buffering is active.
      
      Innodb on Windows could deadlock, as it did not have dedicated threads
      for processing change buffer asynchronous reads.
      
      The fix for that is to have windows now has the same background threads,
      including dedicated thread for ibuf, and log AIOs.
      
      The ibuf/read completions are now dispatched to their threads with
      PostQueuedCompletionStatus(), the write and log completions are processed
      in thread where they arrive.
      7b16291c
  2. 07 Apr, 2018 2 commits
  3. 05 Apr, 2018 2 commits
    • Sergey Vojtovich's avatar
      Fix misuse of MY_CHECK_CXX_COMPILER_FLAG · 5ccf3f96
      Sergey Vojtovich authored
      - compile_flags already include from top CMakeLists.txt
      - MY_CHECK_CXX_COMPILER_FLAG() accepts only one parameter
      - output variable of MY_CHECK_CXX_COMPILER_FLAG() is have_CXX__Wa__nH
      - same check for mariabackup
      
      Based on contribution by satanson (PR#466).
      5ccf3f96
    • Marko Mäkelä's avatar
      MDEV-15553 Assertion failed in dict_table_get_col_name · 4fde1361
      Marko Mäkelä authored
      dict_foreign_qualify_index(): Avoid a redundant and harmful
      computation of col_name of a virtual column. This fixes the
      assertion failure.
      
      dict_foreign_push_index_error(): Do not call dict_table_get_col_name()
      on a virtual column. (It is unclear if this condition is actually
      reachable.)
      4fde1361
  4. 03 Apr, 2018 3 commits
  5. 02 Apr, 2018 1 commit
    • Galina Shalygina's avatar
      MDEV-15579 Crash in Item_field::used_tables() called by · 6223f1dd
      Galina Shalygina authored
                 Item::derived_field_transformer_for_having
      
      The crash occurred due to an inappropriate handling of multiple equalities
      when pushing conditions into materialized views/derived tables. If equalities
      extracted from a multiple equality can be pushed into a materialized
      view/derived table they should be plainly conjuncted with other pushed
      predicates rather than form a separate AND sub-formula.
      6223f1dd
  6. 01 Apr, 2018 2 commits
    • Vladislav Vaintroub's avatar
      MDEV-15636 mariabackup --lock-ddl-per-table hangs if ALTER table is running · 27c24808
      Vladislav Vaintroub authored
      concurrently.
      
      There is a deadlock between
      
      C1 mariabackup's connection that holds MDL locks
      C2 Online ALTER TABLE that wants to have MDL exclusively
         and tries to upgrade its mdl lock.
      C3 another mariabackup's connection that does FLUSH TABLES (or FTWRL)
      
      C3 waits waits for C2,  which waits for C1, which waits for C3,
      thus the deadlock.
      
      
      MDL locks cannot be released until FLUSH  succeeds, because
      otherwise it would allow ALTER to sneak in, causing backup to abort and
      breaking lock-ddl-per-table's promise.
      
      The fix here workarounds the deadlock, by killing connections in
      "Waiting for metadata lock" status (i.e ALTER). This killing continues
      until FTWRL succeeds.
      
      Killing connections is skipped in case --no-locks parameter
      was  passed to backup, because there won't be a FLUSH.
      
      For the reference,in Percona's xtrabackup --lock-ddl-per-connection
      silently implies --no-lock ie FLUSH is always skipped there.
      
      A rather large part of fix is introducing DBUG capability to start
      a query  the new connection at the right moment of backup
      compensating somewhat for mariabackup' lack of send_query or DBUG_SYNC.
      27c24808
    • Vladislav Vaintroub's avatar
  7. 29 Mar, 2018 10 commits
    • Marko Mäkelä's avatar
      55f4e480
    • Daniel Black's avatar
      MDEV-13785: move defination HAVE_LARGE_PAGES -> HAVE_LINUX_LARGE_PAGES · 402c7584
      Daniel Black authored
      HAVE_LARGE_PAGES was always Linux but now there is
      HAVE_SOLARIS_LARGE_PAGES in the code base. Innodb was using HAVE_LINUX_LARGE_PAGES
      so keep this consistent everywhere.
      
      Test plan:
      
      $ grep Hugepagesize: /proc/meminfo
      Hugepagesize:       2048 kB
      
      $ sudo sysctl vm.nr_hugepages=1024
      vm.nr_hugepages = 1024
      $ sudo sysctl  kernel.shmmax=$(( 2 * 1024 *1024 * 1024 ))
      kernel.shmmax = 2147483648
      
      No errors in ouput:
      $ sql/mysqld --skip-networking --datadir=/tmp/datadir --log-bin=/tmp/datadir/mysqlbin --socket /tmp/s.sock --lc-messages-dir=${PWD}/sql/share --verbose --large-pages=1
      2018-03-23 12:51:18 139697428129984 [Note] sql/mysqld (mysqld 10.2.14-MariaDB-log) starting as process 25406 ...
      2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
      2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Uses event mutexes
      2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Compressed tables use zlib 1.2.11
      2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Using Linux native AIO
      2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Number of pools: 1
      2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Using SSE2 crc32 instructions
      2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
      2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Completed initialization of buffer pool
      2018-03-23 12:51:18 139696883590912 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
      2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Highest supported file format is Barracuda.
      2018-03-23 12:51:18 139697428129984 [Note] InnoDB: 128 out of 128 rollback segments are active.
      2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
      2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Creating shared tablespace for temporary tables
      2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
      2018-03-23 12:51:18 139697428129984 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
      2018-03-23 12:51:18 139697428129984 [Note] InnoDB: 5.7.21 started; log sequence number 1620099
      2018-03-23 12:51:18 139696713733888 [Note] InnoDB: Loading buffer pool(s) from /tmp/datadir/ib_buffer_pool
      2018-03-23 12:51:18 139696713733888 [Note] InnoDB: Buffer pool(s) load completed at 180323 12:51:18
      2018-03-23 12:51:18 139697428129984 [Note] Plugin 'FEEDBACK' is disabled.
      2018-03-23 12:51:18 139697428129984 [Note] Reading of all Master_info entries succeded
      2018-03-23 12:51:18 139697428129984 [Note] Added new Master_info '' to hash table
      2018-03-23 12:51:18 139697428129984 [Note] sql/mysqld: ready for connections.
      Version: '10.2.14-MariaDB-log'  socket: '/tmp/s.sock'  port: 0  Source distribution
      
      $ grep -i huge /proc/25406/smaps | grep -v ' 0 kB'
      Private_Hugetlb:    8192 kB
      Private_Hugetlb:    2048 kB
      $ grep huge /proc/25406/numa_maps
      7f0d74400000 default file=/SYSV00000000\040(deleted) huge
      7f0dbd200000 default file=/SYSV00000000\040(deleted) huge dirty=4 N0=4 kernelpagesize_kB=2048
      7f0dc5600000 default file=/SYSV00000000\040(deleted) huge
      7f0dd1200000 default file=/SYSV00000000\040(deleted) huge dirty=1 N0=1 kernelpagesize_kB=2048
      
      $ grep Huge  /proc/meminfo
      AnonHugePages:         0 kB
      ShmemHugePages:        0 kB
      HugePages_Total:     940
      HugePages_Free:      935
      HugePages_Rsvd:      177
      HugePages_Surp:        0
      Hugepagesize:       2048 kB
      
      Ran again with --memlock
      (note needs ulimit -l > size)
      
      $ grep Huge  /proc/meminfo
      AnonHugePages:         0 kB
      ShmemHugePages:        0 kB
      HugePages_Total:     940
      HugePages_Free:      758
      HugePages_Rsvd:        0
      HugePages_Surp:        0
      Hugepagesize:       2048 kB
      
      $ grep huge /proc/26020/numa_maps
      7fe870400000 default file=/SYSV00000000\040(deleted) huge dirty=62 N0=62 kernelpagesize_kB=2048
      7fe8b3a00000 default file=/SYSV00000000\040(deleted) huge dirty=66 N0=66 kernelpagesize_kB=2048
      7fe8bd600000 default file=/SYSV00000000\040(deleted) huge dirty=53 N0=53 kernelpagesize_kB=2048
      7fe8c8400000 default file=/SYSV00000000\040(deleted) huge dirty=1 N0=1 kernelpagesize_kB=2048
      
      $ grep -i huge /proc/26020/smaps | grep -v ' 0 kB'
      Private_Hugetlb:  126976 kB
      Private_Hugetlb:  135168 kB
      Private_Hugetlb:  108544 kB
      Private_Hugetlb:    2048 kB
      402c7584
    • Marko Mäkelä's avatar
      MDEV-15719: Adjust a test case · 014dfe47
      Marko Mäkelä authored
      014dfe47
    • Marko Mäkelä's avatar
      3eb73bf6
    • Marko Mäkelä's avatar
      row_drop_table_for_mysql(): Use a constant string · 622d21e2
      Marko Mäkelä authored
      It does not hurt to delete non-existing records from SYS_TABLESPACES
      and SYS_DATAFILES. Because MariaDB does not support CREATE TABLESPACE,
      only the system tablespace (space_id=0) can contain multiple tables.
      But, there are no entries for the system tablespace in these tables
      (which actually are stored inside the system tablespace).
      622d21e2
    • Sergei Petrunia's avatar
      MDEV-15472: Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failure · b9227410
      Sergei Petrunia authored
      MariaDB differs from the upstream for "DDL-like" command. For these,
      it sets binlog_format=STATEMENT for the duration of the statement.
      This doesn't play well with MyRocks, which tries to prevent DML
      commands with binlog_format!=ROW.
      
      Also, if Locked_tables_list::reopen_tables() returned an error, then
      close_cached_tables should propagate the error condition and not silently
      consume it (it's difficult to have test coverage for this because this
      error condition is rare)
      b9227410
    • Marko Mäkelä's avatar
      MDEV-15682 mariabackup.unsupported_redo fails in buildbot with wrong result code · adaee46a
      Marko Mäkelä authored
      Skip the test mariabackup.unsupported_redo if a checkpoint occurred
      before mariabackup --backup completed. Remove the slow shutdowns
      and restarts which were attempting to prevent the checkpoints from
      occurring.
      adaee46a
    • Marko Mäkelä's avatar
      MDEV-15720 ib_buffer_pool unnecessarily includes the temporary tablespace · 6cccef21
      Marko Mäkelä authored
      The purpose of the InnoDB buffer pool dump is to allow InnoDB to be
      restarted with the same persistent data pages in the buffer pool.
      
      The InnoDB temporary tablespace that was introduced in MariaDB 10.2.2
      is always reinitialized on restart. Therefore, it does not make sense
      to attempt to dump or restore any pages of the temporary tablespace.
      6cccef21
    • Marko Mäkelä's avatar
      MDEV-15719 ALTER TABLE…ALGORITHM=INPLACE is unnecessarily refused due to innodb_force_recovery · 4d9969c2
      Marko Mäkelä authored
      ha_innobase::check_if_supported_inplace_alter(): Only check for
      high_level_read_only. Do not unnecessarily refuse
      ALTER TABLE...ALGORITHM=INPLACE if innodb_force_recovery was
      specified as 1, 2, or 3.
      
      innobase_start_or_create_for_mysql(): Block all writes from SQL
      if the system tablespace was initialized with 'newraw'.
      4d9969c2
    • Sergei Petrunia's avatar
      MDEV-15686: Loading MyRocks plugin back after it has been unloaded causes a crash · 0d2fffb6
      Sergei Petrunia authored
      Adjust the testcase to handle all possible outcomes.
      0d2fffb6
  8. 28 Mar, 2018 5 commits
  9. 27 Mar, 2018 2 commits
    • Daniel Bartholomew's avatar
      bump the VERSION · aafb9d44
      Daniel Bartholomew authored
      aafb9d44
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-15325 Incomplete validation of missing tablespace during recovery · 73af8af0
      Thirunarayanan Balathandayuthapani authored
      Problem:
      =======
      	During validation of missing tablespace, missing tablespace id is
      being compared with hash table of redo logs (recv_sys->addr_hash). But if the
      hash table ran out of memory then there is a possibility that it will not contain
      the redo logs of all tablespace. In that case, Server will load the InnoDB
      even though there is a missing tablespace.
      
      Solution:
      ========
      	If the recv_sys->addr_hash hash table ran out of memory then InnoDB needs
      to scan the remaining redo log again to validate the missing tablespace.
      73af8af0
  10. 26 Mar, 2018 5 commits
  11. 25 Mar, 2018 1 commit
  12. 24 Mar, 2018 4 commits
  13. 23 Mar, 2018 2 commits