1. 20 Jun, 2018 1 commit
  2. 19 Jun, 2018 2 commits
    • Oleksandr Byelkin's avatar
      083279f7
    • Igor Babaev's avatar
      MDEV-16420 View stop working after upgrade from 10.1.15 to 10.3.7 · 956b2962
      Igor Babaev authored
      This bug happened for queries that used a materialized view that
      renamed columns of the specifying query in an inner table of
      an outer join. For such a query name resolution for a column
      belonging the view could fail if the underlying column was
      non-nullable.
      When creating the defintion of the the temporary table for
      the materialized view used in the inner part of an outer join
      the definition of the non-nullable columns are created by the
      function create_tmp_field_from_item() that names the columns
      according to the names of the underlying columns. So these names
      should be changed for the view column names.
      
      This bug cannot be reproduced in 10.2 because there setup_fields()
      called when preparing joins in the view specification effectively
      renames the underlying columns in the function find_field_in_view().
      In 10.3 this renaming was removed as improper
      (see Monty's commit b478276b).
      956b2962
  3. 18 Jun, 2018 2 commits
  4. 16 Jun, 2018 1 commit
  5. 15 Jun, 2018 4 commits
  6. 14 Jun, 2018 4 commits
    • Galina Shalygina's avatar
      MDEV-16386: Wrong result when pushdown into the HAVING clause of the · ec4fdd57
      Galina Shalygina authored
                  materialized derived table/view that uses aliases is done
      
      The problem appears when a column alias inside the materialized derived
      table/view t1 definition coincides with the column name used in the
      GROUP BY clause of t1. If the condition that can be pushed into t1
      uses that ambiguous column name this column is determined as a column that
      is used in the GROUP BY clause instead of the alias used in the projection
      list of t1. That causes wrong result.
      To prevent it resolve_ref_in_select_and_group() was changed.
      ec4fdd57
    • Marko Mäkelä's avatar
      MDEV-16457 mariabackup 10.2+ should default to innodb_checksum_algorithm=crc32 · a79b033b
      Marko Mäkelä authored
      Since MariaDB Server 10.2.2 (and MySQL 5.7), the default value of
      innodb_checksum_algorithm is crc32 (CRC-32C), not the inefficient "innodb"
      checksum. Change Mariabackup to use the same default, so that checksum
      validation (when using the default algorithm on the server) will take less
      time during mariabackup --backup. Also, mariabackup --prepare should be
      a little faster, and the server should read backups faster, because the
      page checksums would only be validated against CRC-32C.
      a79b033b
    • Marko Mäkelä's avatar
      MDEV-13103 Deal with page_compressed page corruption · 2ca904f0
      Marko Mäkelä authored
      fil_page_decompress(): Replaces fil_decompress_page().
      Allow the caller detect errors. Remove
      duplicated code. Use the "safe" instead of "fast" variants of
      decompression routines.
      
      fil_page_compress(): Replaces fil_compress_page().
      The length of the input buffer always was srv_page_size (innodb_page_size).
      Remove printouts, and remove the fil_space_t* parameter.
      
      buf_tmp_buffer_t::reserved: Make private; the accessors acquire()
      and release() will use atomic memory access.
      
      buf_pool_reserve_tmp_slot(): Make static. Remove the second parameter.
      Do not acquire any mutex. Remove the allocation of the buffers.
      
      buf_tmp_reserve_crypt_buf(), buf_tmp_reserve_compression_buf():
      Refactored away from buf_pool_reserve_tmp_slot().
      
      buf_page_decrypt_after_read(): Make static, and simplify the logic.
      Use the encryption buffer also for decompressing.
      
      buf_page_io_complete(), buf_dblwr_process(): Check more failures.
      
      fil_space_encrypt(): Simplify the debug checks.
      
      fil_space_t::printed_compression_failure: Remove.
      
      fil_get_compression_alg_name(): Remove.
      
      fil_iterate(): Allocate a buffer for compression and decompression
      only once, instead of allocating and freeing it for every page
      that uses compression, during IMPORT TABLESPACE. Also, validate the
      page checksum before decryption, and reduce the scope of some variables.
      
      fil_page_is_index_page(), fil_page_is_lzo_compressed(): Remove (unused).
      
      AbstractCallback::operator()(): Remove the parameter 'offset'.
      The check for it in FetchIndexRootPages::operator() was basically
      redundant and dead code since the previous refactoring.
      2ca904f0
    • Alexander Barkov's avatar
  7. 13 Jun, 2018 5 commits
  8. 12 Jun, 2018 3 commits
  9. 11 Jun, 2018 2 commits
  10. 08 Jun, 2018 1 commit
  11. 07 Jun, 2018 5 commits
    • Vladislav Vaintroub's avatar
      aba2d730
    • Vladislav Vaintroub's avatar
      MDEV-16300 : remove rocksdb checkpoint created by mariabackup. · ea705862
      Vladislav Vaintroub authored
      Add variable rocksdb_remove_mariabackup_checkpoint.
      If set, it will remove $rocksdb_datadir/mariabackup-checkpoint directory.
      The variable is to be used by exclusively by mariabackup,
      to remove temporary checkpoints.
      ea705862
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · 62d21dda
      Marko Mäkelä authored
      62d21dda
    • Marko Mäkelä's avatar
      MDEV-16367 mariabackup: error: failed to copy enough redo log · dc9c5554
      Marko Mäkelä authored
      log_copying_thread(): Keep copying redo log until the end has been
      reached. (Previously, we would stop copying as soon as
      the first batch of xtrabackup_copy_logfile() returned.)
      
      log_copying: Remove. Use log_copying_running instead.
      
      copy_logfile: Remove. Log copying will now only be invoked from
      2 places: from xtrabackup_backup_func() for the initial batch,
      and from log_copying_thread() until all of the log has been read.
      Use the global variable metadata_to_lsn for determining if the
      final part of the log is being copied.
      
      xtrabackup_copy_log(): Add diagnostic messages for terminating
      the copying. These messages should be dead code, because
      log_group_read_log_seg() should be checking for the same.
      
      xtrabackup_copy_logfile(): Correct the retrying logic.
      If anything was successfully read, process the portion that
      was read. On failure, let the caller close dst_log_file.
      
      io_watching_thread(): Stop throttling during the last phase
      of copying the log (metadata_to_lsn!=0). The final copying
      of the log will now be performed in log_copying_thread().
      
      stop_backup_threads(): Clean up the message about stopping
      the log copying thread.
      
      xtrabackup_backup_low(): Read metadata_to_lsn from the latest
      checkpoint header page, even if it is the first page.
      Let the log_copying_thread take care of copying all of
      the redo log.
      dc9c5554
    • Marko Mäkelä's avatar
      Mariabackup: Make some globals static · 619c277a
      Marko Mäkelä authored
      619c277a
  12. 06 Jun, 2018 2 commits
  13. 05 Jun, 2018 8 commits
    • Marko Mäkelä's avatar
      MDEV-16124 fil_rename_tablespace() times out and crashes server during table-rebuilding ALTER TABLE · 55abcfa7
      Marko Mäkelä authored
      InnoDB insisted on closing the file handle before renaming a file.
      Renaming a file should never be a problem on POSIX systems. Also on
      Windows it should work if the file was opened in FILE_SHARE_DELETE
      mode.
      
      fil_space_t::stop_ios: Remove. We no longer need to stop file access
      during rename operations.
      
      fil_mutex_enter_and_prepare_for_io(): Remove the wait for stop_ios.
      
      fil_rename_tablespace(): Remove the retry logic; do not close the
      file handle. Remove the unused fault injection that was added along
      with the DATA DIRECTORY functionality (MySQL WL#5980).
      
      os_file_create_simple_func(), os_file_create_func(),
      os_file_create_simple_no_error_handling_func(): Include FILE_SHARE_DELETE
      in the share_mode. (We will still prevent multiple InnoDB instances
      from using the same files by not setting FILE_SHARE_WRITE.)
      55abcfa7
    • Otto Kekäläinen's avatar
    • Daniel Black's avatar
      MDEV-16318: mysqld_safe - partial revert on 64094e12 · 88a263ea
      Daniel Black authored
      Revert part of 64094e12 because mysqld_safe isn't just used for
      Debian. As such references to specific packaging files like
      /etc/mysql/debian.cnf shouldn't have passed a review.
      
      There's also no history of why 64094e12 was needed based on
      the history of debian/patches/38_scripts__mysqld_safe.sh__signals.dpatch
      
      Other distos have survived without mysqld_safe handling signals.
      88a263ea
    • Daniel Black's avatar
      mysqld_safe: use sh not bash · c10bed17
      Daniel Black authored
      c902d5a4 changed this to bash.
      This isn't approprate as mysqld_safe is used by FreeBSD where
      there is no bash by default.
      
      The original reason to use bash seems related to MDEV-3279 which
      was a dash bug fixed in 2009 - https://git.kernel.org/pub/scm/utils/dash/dash.git/commit/?id=3800d4934391b144fd261a7957aea72ced7d47ea
      
      Working around 9 year old fixed bugs shouldn't be done here.
      c10bed17
    • Marko Mäkelä's avatar
      MDEV-15824 innodb_defragment=ON trumps innodb_optimize_fulltext_only=ON in OPTIMIZE TABLE · 3b7da8a4
      Marko Mäkelä authored
      ha_innobase::optimize(): If both innodb_defragment and
      innodb_optimize_fulltext_only are at their default settings (OFF),
      fall back to ALTER TABLE. Else process one or both options.
      3b7da8a4
    • Marko Mäkelä's avatar
    • Marko Mäkelä's avatar
      Remove dead code that was added in MDEV-5834 · 41cbe92b
      Marko Mäkelä authored
      ha_innobase::set_partition_owner_stats(): Remove (unused function).
      
      ha_innobase::ha_partition_stats: Remove (the variable is never read).
      
      Remove unused ut_timer functions.
      41cbe92b
    • Alexander Barkov's avatar
      MDEV-16385 ROW SP variable is allowed in unexpected context · 106f0b57
      Alexander Barkov authored
      The problem described in the bug report happened because the code
      did not test check_cols(1) after fix_fields() in a few places.
      
      Additionally, fix_fields() could be called multiple times for SP variables,
      because they are all fixed at a early stage in append_for_log().
      
      Solution:
      1. Adding a few helper methods
         - fix_fields_if_needed()
         - fix_fields_if_needed_for_scalar()
         - fix_fields_if_needed_for_bool()
         - fix_fields_if_needed_for_order_by()
        and using it in many cases instead of fix_fields() where
        the "fixed" status is not definitely known to be "false".
      
      2. Adding DBUG_ASSERT(!fixed) into Item_splocal*::fix_fields()
         to catch double execution.
      
      3. Adding tests.
      
      As a good side effect, the patch removes a lot of duplicate code (~60 lines):
      
         if (!item->fixed &&
             item->fix_fields(..) &&
             item->check_cols(1))
           return true;
      106f0b57