1. 23 May, 2017 1 commit
  2. 22 May, 2017 1 commit
  3. 19 May, 2017 7 commits
    • Marko Mäkelä's avatar
      Remove bogus __attribute__((nonnull)) · 7edadde7
      Marko Mäkelä authored
      These were reported when running tests after compiling the debug server
      with -O3 -fsanitize=undefined in GCC 7.1.0.
      7edadde7
    • Marko Mäkelä's avatar
      Fix a compilation warning introduced by MDEV-11782 · 9756440f
      Marko Mäkelä authored
      log_crypt(): Do not cast byte* to uint32_t*, because it may break
      strict aliasing rules. Instead, cast in the opposite direction.
      9756440f
    • Marko Mäkelä's avatar
      6f54d04e
    • Marko Mäkelä's avatar
      Fix some -Wimplicit-fallthrough warnings in InnoDB · 907cbadb
      Marko Mäkelä authored
      buf_read_ahead_linear(): Do not display a message if the tablespace
      is being deleted.
      
      dtype_print(): Add a missing break statement.
      907cbadb
    • Marko Mäkelä's avatar
      MDEV-12698 innodb.innodb_stats_del_mark test failure · 0bfa3dff
      Marko Mäkelä authored
      In my merge of the MySQL fix for Oracle Bug#23333990 / WL#9513
      I overlooked some subsequent revisions to the test, and I also
      failed to notice that the test is actually always failing.
      
      Oracle introduced the parameter innodb_stats_include_delete_marked
      but failed to consistently take it into account in FOREIGN KEY
      constraints that involve CASCADE or SET NULL.
      
      When innodb_stats_include_delete_marked=ON, obviously the purge of
      delete-marked records should update the statistics as well.
      
      One more omission was that statistics were never updated on ROLLBACK.
      We are fixing that as well, properly taking into account the
      parameter innodb_stats_include_delete_marked.
      
      dict_stats_analyze_index_level(): Simplify an expression.
      (Using the ternary operator with a constant operand is unnecessary
      obfuscation.)
      
      page_scan_method_t: Revert the change done by Oracle. Instead,
      examine srv_stats_include_delete_marked directly where it is needed.
      
      dict_stats_update_if_needed(): Renamed from
      row_update_statistics_if_needed().
      
      row_update_for_mysql_using_upd_graph(): Assert that the table statistics
      are initialized, as guaranteed by ha_innobase::open(). Update the
      statistics in a consistent way, both for FOREIGN KEY triggers and
      for the main table. If FOREIGN KEY constraints exist, do not dereference
      a freed pointer, but cache the proper value of node->is_delete so that
      it matches prebuilt->table.
      
      row_purge_record_func(): Update statistics if
      innodb_stats_include_delete_marked=ON.
      
      row_undo_ins(): Update statistics (on ROLLBACK of a fresh INSERT).
      This is independent of the parameter; the record is not delete-marked.
      
      row_undo_mod(): Update statistics on the ROLLBACK of updating key columns,
      or (if innodb_stats_include_delete_marked=OFF) updating delete-marks.
      
      innodb.innodb_stats_persistent: Renamed and extended from
      innodb.innodb_stats_del_mark. Reduced the unnecessarily large dataset
      from 262,144 to 32 rows. Test both values of the configuration
      parameter innodb_stats_include_delete_marked.
      Test that purge is updating the statistics.
      
      innodb_fts.innodb_fts_multiple_index: Adjust the result. The test
      is performing a ROLLBACK of an INSERT, which now affects the statistics.
      
      include/wait_all_purged.inc: Moved from innodb.innodb_truncate_debug
      to its own file.
      0bfa3dff
    • Marko Mäkelä's avatar
      Merge 10.0 into 10.1 · 13a350ac
      Marko Mäkelä authored
      13a350ac
    • Igor Babaev's avatar
      Fixed the bug mdev-12788. · 5e9d6511
      Igor Babaev authored
      In some rare cases queries with UNION ALL
      using a derived table specified by
      a grouping select with a subquery in WHERE and
      impossible HAVING detected after constant row
      substitution could hang.
      The cause was not a proper return from the
      function subselect_single_select_engine::exec()
      in the case when the subquery was not optimized
      beforehand and the optimization performed
      in this function requested for a change of the
      subquery engine. This was fixed.
      Also a change was applied that avoided execution
      of a subquery if impossible having was detected
      for the main query at the optimization stage.
      5e9d6511
  4. 18 May, 2017 8 commits
    • Marko Mäkelä's avatar
      MDEV-12794 innodb_zip.recover failed in buildbot · 4807df6f
      Marko Mäkelä authored
      Issue FLUSH TABLES to prevent unintended corruption of
      crash-unsafe tables when the server is killed.
      4807df6f
    • Vladislav Vaintroub's avatar
      d0eb4ee9
    • Vladislav Vaintroub's avatar
      9dffa307
    • Vladislav Vaintroub's avatar
      MDEV-12814 mariabackup : don't try io throttling in copy-back · 40c7778e
      Vladislav Vaintroub authored
      Throttling only works with when creating backup.  Attempt to use it with
       --copy-back results in crash, since throttle events are not initialized.
      Thus, ignore throttling unless --backup is given.
      40c7778e
    • Jan Lindström's avatar
      MDEV-12593: InnoDB page compression should use lz4_compress_default if · f302a3cf
      Jan Lindström authored
      available
      
      lz4.cmake: Check if shared or static lz4 library has LZ4_compress_default
      function and if it has define HAVE_LZ4_COMPRESS_DEFAULT.
      
      fil_compress_page: If HAVE_LZ4_COMPRESS_DEFAULT is defined use
      LZ4_compress_default function for compression if not use
      LZ4_compress_limitedOutput function.
      
      Introduced a innodb-page-compression.inc file for page compression
      tests that will also search .ibd file to verify that pages
      are compressed (i.e. used search string is not found). Modified
      page compression tests to use this file.
      
      Note that snappy method is not included because of MDEV-12615
      InnoDB page compression method snappy mostly does not compress pages
      that will be fixed on different commit.
      f302a3cf
    • Marko Mäkelä's avatar
      Fix some __attribute__((nonnull)) misuse · 54bb04f7
      Marko Mäkelä authored
      This fixes warnings that were emitted when running InnoDB test
      suites on a debug server that was compiled with GCC 7.1.0 using
      the flags -O3 -fsanitize=undefined.
      
      thd_requested_durability(): XtraDB can call this with trx->mysql_thd=NULL.
      Remove the function in InnoDB, because it is not used there.
      
      calc_row_difference(): Do not call memcmp(o_ptr, NULL, 0).
      
      innobase_index_name_is_reserved(): This can be called with
      key_info=NULL, num_of_keys=0.
      
      innobase_dropping_foreign(), innobase_check_foreigns_low(),
      innobase_check_foreigns(): This can be called with
      drop_fk=NULL, n_drop_fk=0.
      
      rec_convert_dtuple_to_rec_comp(): Do not invoke memcpy(end, NULL, 0).
      54bb04f7
    • Marko Mäkelä's avatar
      ibuf_get_volume_buffered_hash(): Use a proper type cast · a436e349
      Marko Mäkelä authored
      On 64-bit systems, the constant 1 would be 32-bit (int or unsigned)
      by default. Cast the constant to ulint before shifting to avoid a
      -fsanitize=undefined warning or any potential overflow.
      a436e349
    • Marko Mäkelä's avatar
      Refactor trx_undo_report_row_operation() · 9f57e595
      Marko Mäkelä authored
      Fix a -fsanitizer=undefined warning that trx_undo_report_row_operation()
      was being passed thr=NULL when the BTR_NO_UNDO_LOG_FLAG flag was set.
      
      trx_undo_report_row_operation(): Remove the first two parameters.
      The parameter clust_entry!=NULL distinguishes inserts from updates.
      
      This should be a non-functional change (no observable change in
      behaviour; slightly smaller code).
      9f57e595
  5. 17 May, 2017 13 commits
    • Marko Mäkelä's avatar
      Follow-up to MDEV-12534: Align srv_sys · 8b34aabf
      Marko Mäkelä authored
      Allocate srv_sys statically so that the desired alignment can be
      guaranteed. This silences -fsanitize=undefined warnings.
      There probably is no performance impact of this, because the
      reason for the alignment to ensure the absence of false sharing
      between counters. Even with the misalignment, each counter would
      have been been aligned at 64 bits, and the counters would reside
      in separate cache lines.
      8b34aabf
    • Marko Mäkelä's avatar
      MDEV-12358 Work around what looks like a bug in GCC 7.1.0 · 9f89b94b
      Marko Mäkelä authored
      The parameter thr of the function btr_cur_optimistic_insert()
      is not declared as nonnull, but GCC 7.1.0 with -O3 is wrongly
      optimizing away the first part of the condition
      UNIV_UNLIKELY(thr && thr_get_trx(thr)->fake_changes)
      when the function is being called by row_merge_insert_index_tuples()
      with thr==NULL.
      
      The fake_changes is an XtraDB addition. This GCC bug only appears
      to have an impact on XtraDB, not InnoDB.
      
      We work around the problem by not attempting to dereference thr
      when both BTR_NO_LOCKING_FLAG and BTR_NO_UNDO_LOG_FLAG are set
      in the flags. Probably BTR_NO_LOCKING_FLAG alone should suffice.
      
      btr_cur_optimistic_insert(), btr_cur_pessimistic_insert(),
      btr_cur_pessimistic_update(): Correct comments that disagree with
      usage and with nonnull attributes. No other parameter than thr can
      actually be NULL.
      
      row_ins_duplicate_error_in_clust(): Remove an unused parameter.
      
      innobase_is_fake_change(): Unused function; remove.
      
      ibuf_insert_low(), row_log_table_apply(), row_log_apply(),
      row_undo_mod_clust_low():
      Because we will be passing BTR_NO_LOCKING_FLAG | BTR_NO_UNDO_LOG_FLAG
      in the flags, the trx->fake_changes flag will be treated as false,
      which is the right thing to do at these low-level operations
      (change buffer merge, ALTER TABLE…LOCK=NONE, or ROLLBACK).
      This might be fixing actual XtraDB bugs.
      
      Other callers that pass these two flags are also passing thr=NULL,
      implying fake_changes=false. (Some callers in ROLLBACK are passing
      BTR_NO_LOCKING_FLAG and a nonnull thr. In these callers, fake_changes
      better be false, to avoid corruption.)
      9f89b94b
    • Sergei Petrunia's avatar
      Fix a compiler warning · fff61e31
      Sergei Petrunia authored
      fff61e31
    • Marko Mäkelä's avatar
      fil_create_new_single_table_tablespace(): Correct a bogus nonnull attribute · e22d86a3
      Marko Mäkelä authored
      The parameter path can be passed as NULL.
      This error was reported by GCC 7.1.0 when compiling
      CMAKE_BUILD_TYPE=Debug with -O3.
      e22d86a3
    • Marko Mäkelä's avatar
      Remove redundant UT_LIST_INIT() calls · 956d2540
      Marko Mäkelä authored
      The macro UT_LIST_INIT() zero-initializes the UT_LIST_NODE.
      There is no need to call this macro on a buffer that has
      already been zero-initialized by mem_zalloc() or mem_heap_zalloc()
      or similar.
      
      For some reason, the statement UT_LIST_INIT(srv_sys->tasks) in
      srv_init() caused a SIGSEGV on server startup when compiling with
      GCC 7.1.0 for AMD64 using -O3. The zero-initialization was attempted
      by the instruction movaps %xmm0,0x50(%rax), while the proper offset
      of srv_sys->tasks would seem to have been 0x48.
      956d2540
    • Marko Mäkelä's avatar
      Make some variables const in fil_iterate() · febe8819
      Marko Mäkelä authored
      This is a non-functional change to make it slightly easier
      to read the code. We seem to have some bugs in this
      IMPORT TABLESPACE code; see MDEV-12396.
      febe8819
    • Marko Mäkelä's avatar
      Never pass NULL to innobase_get_stmt() · 408ef65f
      Marko Mäkelä authored
      408ef65f
    • Marko Mäkelä's avatar
      Silence bogus GCC 7 warnings -Wimplicit-fallthrough · 71cd2059
      Marko Mäkelä authored
      Do not silence uncertain cases, or fix any bugs.
      
      The only functional change should be that ha_federated::extra()
      is not calling DBUG_PRINT to report an unhandled case for
      HA_EXTRA_PREPARE_FOR_DROP.
      71cd2059
    • Marko Mäkelä's avatar
      Never pass NULL to innobase_get_stmt() · 4754f88c
      Marko Mäkelä authored
      4754f88c
    • Marko Mäkelä's avatar
      Silence bogus GCC 7 warnings -Wimplicit-fallthrough · 7972da8a
      Marko Mäkelä authored
      Do not silence uncertain cases, or fix any bugs.
      
      The only functional change should be that ha_federated::extra()
      is not calling DBUG_PRINT to report an unhandled case for
      HA_EXTRA_PREPARE_FOR_DROP.
      7972da8a
    • Marko Mäkelä's avatar
      Fix an incorrect debug assertion · 492c1e41
      Marko Mäkelä authored
      492c1e41
    • Marko Mäkelä's avatar
    • Marko Mäkelä's avatar
      Fix warnings in innochecksum compilation · e63e2fe2
      Marko Mäkelä authored
      e63e2fe2
  6. 16 May, 2017 3 commits
  7. 15 May, 2017 7 commits