1. 03 Mar, 2017 1 commit
    • Marko Mäkelä's avatar
      MDEV-11520: Retry posix_fallocate() after EINTR. · 29c776cf
      Marko Mäkelä authored
      The function posix_fallocate() as well as the Linux system call
      fallocate() can return EINTR when the operation was interrupted
      by a signal. In that case, keep retrying the operation, except
      if InnoDB shutdown has been initiated.
      29c776cf
  2. 02 Mar, 2017 6 commits
    • Daniel Black's avatar
      MDEV-11610: support-files/mysql-log-rotate.sh not binlog either · d04d835f
      Daniel Black authored
      For the same reason as removing binlog rotation on Debian.
      d04d835f
    • Daniel Black's avatar
      MDEV-11610: Alter Debian log rotate to not rotate binary/relay logs · 156cf86d
      Daniel Black authored
      Rotating binary/relay logs can cause interuption to the processing
      on the server. Binary and relay logs have their own mechanism already
      for not getting out of control (expire_logs_days).
      
      By no longer rotating binary and relay logs log rotation is limited to
      the following logs:
      * error log
      * general log
      * slow query log
      
      Writing these to the binary log would cause any logrotation on the
      slave to occur twice, once due to this and another due to the log-
      rotate script on the slave. Now --local is passed to mysqladmin to
      prevent this duplication.
      156cf86d
    • Daniel Black's avatar
      MDEV-11610: mysqladmin flush-X-log options · 0af8b565
      Daniel Black authored
      Add the following options to mysqladmin
      
      +  flush-binary-log        Flush binary log
      +  flush-engine-log        Flush engine log(s)
      +  flush-error-log         Flush error log
      +  flush-general-log       Flush general log
      +  flush-relay-log         Flush relay log
      +  flush-user-resources    Flush user resources
      0af8b565
    • Daniel Black's avatar
      MDEV-11610: Add --local to mysqladmin · 33c1f20d
      Daniel Black authored
      33c1f20d
    • Daniel Black's avatar
      MDEV-11386: Advance Toochain library cache workaround (temporary) · 659047b8
      Daniel Black authored
      Due to the way Advance Toolchain before 10.0-3 and 8.0-8 is
      packaged, shared libraries installed after the library cache
      advance-toolchain-atX.Y-runtime package aren't updated in
      /opt/atX.Y/etc/ld.so.cache. This results in mysqld,
      configured with RUNPATH set to /opt/atX.Y/lib64, resulting
      in the Advance Toolchain loader being used and if libraries
      such as jemalloc, libssl or any other library that mysqld uses
      is installed after Advance Toolchain, these libraries aren't in
      the cache and therefore won't be found in the RPM postinstall
      when mysqld is executed by mysql_install_db.
      Signed-off-by: default avatarDaniel Black <daniel.black@au.ibm.com>
      659047b8
    • Sergey Vojtovich's avatar
      MDEV-11221 - main.events_restart failed in bb · 71f53bf7
      Sergey Vojtovich authored
      This is an addition to original fix. Buildbot revealed another sporadic failure
      in perfschema.threads_mysql test. Tests relies on data stored in
      performance_schema.threads, while performing waits on
      information_schema.processlist. These tables are not updated synchronously.
      
      Fixed by performing waits on performance_schema.threads instead.
      71f53bf7
  3. 01 Mar, 2017 2 commits
    • Sergey Vojtovich's avatar
      Fixed missing DBUG_RETURN · c1c5b7a8
      Sergey Vojtovich authored
      c1c5b7a8
    • Sergey Vojtovich's avatar
      MDEV-11221 - main.events_restart failed in bb · e9ad4bdb
      Sergey Vojtovich authored
      Applied lost in a merge revision 7f38a070:
      
      MDEV-10043 - main.events_restart fails sporadically in buildbot (crashes upon
                   shutdown)
      
      There was race condition between shutdown thread and event worker threads.
      
      Shutdown thread waits for thread_count to become 0 in close_connections(). It
      may happen so that event worker thread was started but didn't increment
      thread_count by this time. In this case shutdown thread may miss wait for this
      working thread and continue deinitialization. Worker thread in turn may continue
      execution and crash on deinitialized data.
      
      Fixed by incrementing thread_count before thread is actually created like it is
      done for connection threads.
      
      Also let event scheduler not to inc/dec running threads counter for symmetry
      with other "service" threads.
      e9ad4bdb
  4. 28 Feb, 2017 15 commits
  5. 27 Feb, 2017 2 commits
    • Daniel Black's avatar
      MDEV-11619: mtr --mem {no argument of a directory} (#320) · b54566d7
      Daniel Black authored
      This removes functionality of where ./mtr --mem /tmp/dir could be a directory.
      
      Now MTR_MEM=/tmp/dir ./mtr is needed.
      
      The case where MTR_MEM=/tmp/dir ./mtr --mem has the equivalent effect.
      Signed-off-by: default avatarDaniel Black <daniel.black@au.ibm.com>
      
      --mem works better as a pure flag, because it can be followed by command-line arguments (test names). If the option is allowed to have a value, the test name which directly follows it will be treated as the option value instead. It is possible to implement workarounds to avoid this, but they would not be completely reliable, and there is no practical purpose of such extension of functionality to justify them.
      b54566d7
    • Oleksandr Byelkin's avatar
      MDEV-11935: Queries in stored procedures with and EXISTS(SELECT * FROM VIEW)... · e5b877ce
      Oleksandr Byelkin authored
      MDEV-11935: Queries in stored procedures with and EXISTS(SELECT * FROM VIEW) crashes and closes hte conneciton.
      
      Use correct start point even for taken out from subselect items in process of exists2in conversion.
      e5b877ce
  6. 26 Feb, 2017 1 commit
  7. 23 Feb, 2017 1 commit
  8. 22 Feb, 2017 2 commits
    • Marko Mäkelä's avatar
      MDEV-11520 post-fix · a0ce92dd
      Marko Mäkelä authored
      fil_extend_space_to_desired_size(): Use a proper type cast when
      computing start_offset for the posix_fallocate() call on 32-bit systems
      (where sizeof(ulint) < sizeof(os_offset_t)). This could affect 32-bit
      systems when extending files that are at least 4 MiB long.
      
      This bug existed in MariaDB 10.0 before MDEV-11520. In MariaDB 10.1
      it had been fixed in MDEV-11556.
      a0ce92dd
    • Marko Mäkelä's avatar
      MDEV-11520 Extending an InnoDB data file unnecessarily allocates · 81695ab8
      Marko Mäkelä authored
      a large memory buffer on Windows
      
      fil_extend_space_to_desired_size(), os_file_set_size(): Use calloc()
      for memory allocation, and handle failures. Properly check the return
      status of posix_fallocate(), and pass the correct arguments to
      posix_fallocate().
      
      On Windows, instead of extending the file by at most 1 megabyte at a time,
      write a zero-filled page at the end of the file.
      According to the Microsoft blog post
      https://blogs.msdn.microsoft.com/oldnewthing/20110922-00/?p=9573
      this will physically extend the file by writing zero bytes.
      (InnoDB never uses DeviceIoControl() to set the file sparse.)
      
      I tested that the file extension works properly with a multi-file
      system tablespace, both with --innodb-use-fallocate and
      --skip-innodb-use-fallocate (the default):
      
      ./mtr \
      --mysqld=--innodb-use-fallocate \
      --mysqld=--innodb-autoextend-increment=1 \
      --mysqld=--innodb-data-file-path='ibdata1:5M;ibdata2:5M:autoextend' \
      --parallel=auto --force --retry=0 --suite=innodb &
      
      ls -lsh mysql-test/var/*/mysqld.1/data/ibdata2
      (several samples while running the test)
      81695ab8
  9. 21 Feb, 2017 1 commit
  10. 20 Feb, 2017 2 commits
    • Marko Mäkelä's avatar
      MDEV-11802 innodb.innodb_bug14676111 fails · 13493078
      Marko Mäkelä authored
      The function trx_purge_stop() was calling os_event_reset(purge_sys->event)
      before calling rw_lock_x_lock(&purge_sys->latch). The os_event_set()
      call in srv_purge_coordinator_suspend() is protected by that X-latch.
      
      It would seem a good idea to consistently protect both os_event_set()
      and os_event_reset() calls with a common mutex or rw-lock in those
      cases where os_event_set() and os_event_reset() are used
      like condition variables, tied to changes of shared state.
      
      For each os_event_t, we try to document the mutex or rw-lock that is
      being used. For some events, frequent calls to os_event_set() seem to
      try to avoid hangs. Some events are never waited for infinitely, only
      timed waits, and os_event_set() is used for early termination of these
      waits.
      
      os_aio_simulated_put_read_threads_to_sleep(): Define as a null macro
      on other systems than Windows. TODO: remove this altogether and disable
      innodb_use_native_aio on Windows.
      
      os_aio_segment_wait_events[]: Initialize only if innodb_use_native_aio=0.
      13493078
    • Marko Mäkelä's avatar
      Revert the MDEV-4396 tweak to innodb.innodb_bug14676111. · 72994d64
      Marko Mäkelä authored
      MDEV-11802 aims to fix the root cause instead.
      72994d64
  11. 19 Feb, 2017 3 commits
    • Elena Stepanova's avatar
      MDEV-10631 rpl.rpl_mdev6386 failed in buildbot · 343ba585
      Elena Stepanova authored
      The failure happens due to a race condition between processing
      a row event (INSERT) and an automatically generated event
      DROP TEMPORARY TABLE. Even though DROP has a higher GTID, it can
      become visible in @@gtid_slave_pos before the row event with
      a lower GTID has been committed. Since the test makes the slave
      to synchronize with the master using GTID, the waiting stops
      as soon as GTID of the DROP TEMPORARY TABLE becomes visible,
      and if changes from the previous event haven't been applied yet,
      the error occurs.
      
      According to Kristian (see the comment to MDEV-10631), the real
      problem is that DROP TEMPORARY TABLE is logged in the row mode
      at all. For this particular test, since DROP does not do anything,
      nothing prevents it from competing with the prior transaction.
      
      The workaround for the test is to add a meaningful event
      after DROP TEMPORARY TABLE, so that the slave would wait on its
      GTID instead of the one from DROP.
      
      Additionally (unrelated to this problem) removed FLUSH TABLES,
      which, as the comment stated, should have been removed after
      MDEV-6403 was fixed.
      343ba585
    • Elena Stepanova's avatar
      MDEV-11766 Tests failed in buildbot with semaphore waiting warnings · 72a822f2
      Elena Stepanova authored
      The standalone warning is not a sign of a problem, just of slowness,
      so it should be added to global suppressions. If a real problem
      happens, there will be other errors
      72a822f2
    • Daniel Black's avatar
      MDEV-11619: mtr --mem and $MTR_MEM support in sane and consistent manner (10.0) (#289) · 5e42c958
      Daniel Black authored
      * Revert "Make --mem a pure flag. If there is need to specifically set the location"
      
      This reverts commit 716621db.
      
      * MDEV-11619: mtr: when --mem is pure flag, conflicts with $MTR_MEM
      
      Conflicts occurs when MTR_MEM=/xxx/yy ./mtr --mem is invoked. Here
      the --mem option overrides opt_mem leaving the default path to be chosen.
      
      This change makes when MTR_MEM set, opt_mem, the flag, is also
      set. Both the environment and flag can no be set without conflicting.
      Signed-off-by: default avatarDaniel Black <daniel.black@au.ibm.com>
      
      * MDEV-11619: if opt_mem is a path include it first
      
      * MDEV-11619: MTR_MEM locations - don't follow symlinks
      
      From Bjorn Munch it seems symlinks can confuse some
      tests. Lets just avoid those.
      
      (ref: https://github.com/mysql/mysql-server/pull/116#issuecomment-268479774)
      Signed-off-by: default avatarDaniel Black <daniel.black@au.ibm.com>
      5e42c958
  12. 16 Feb, 2017 1 commit
  13. 09 Feb, 2017 1 commit
  14. 08 Feb, 2017 1 commit
  15. 05 Feb, 2017 1 commit
    • Marko Mäkelä's avatar
      Rewrite the innodb.log_file_size test with DBUG_EXECUTE_IF. · f1627045
      Marko Mäkelä authored
      Remove the debug parameter innodb_force_recovery_crash that was
      introduced into MySQL 5.6 by me in WL#6494 which allowed InnoDB
      to resize the redo log on startup.
      
      Let innodb.log_file_size actually start up the server, but ensure
      that the InnoDB storage engine refuses to start up in each of the
      scenarios.
      f1627045