1. 24 Mar, 2020 1 commit
    • Igor Babaev's avatar
      MDEV-21883 Server crashes when joining a subselect with 32 tables and GROUP BY · caf110fa
      Igor Babaev authored
      This bug could cause a crash for any query that used a derived table/view/CTE
      whose specification was a SELECT with a GROUP BY clause and a FROM list
      containing 32 or more table references.
      The problem appeared only in the cases when the splitting optimization
      could be applied to such derived table/view/CTE.
      caf110fa
  2. 20 Mar, 2020 7 commits
  3. 19 Mar, 2020 5 commits
    • Marko Mäkelä's avatar
      MDEV-21981 Replace arithmetic + with bitwise OR when possible · a66eebf5
      Marko Mäkelä authored
      Several macros such as sint2korr() and uint4korr() are using the
      arithmetic + operator while a bitwise or operator would suffice.
      
      GCC 5 and clang 5 and later can detect patterns consisting of
      bitwise or and shifts by multiples of 8 bits, such as those used
      in the InnoDB function mach_read_from_4(). They actually translate
      that verbose low-level code into high-level machine language
      (i486 bswap instruction or fused into the Haswell movbe instruction).
      
      We should do the same for MariaDB Server code that is outside InnoDB.
      
      Note: The Microsoft C compiler is lacking this optimization.
      There, we might consider using _byteswap_ushort(), _byteswap_ulong(),
      _byteswap_uint64(). But, those would lead to unaligned reads, which are
      bad for reasons stated in MDEV-20277. Besides, outside InnoDB,
      most data is already being stored in the native little-endian format
      of that compiler.
      a66eebf5
    • Marko Mäkelä's avatar
      MDEV-21983: Crash on DROP/RENAME TABLE after DISCARD TABLESPACE · 6960e9ed
      Marko Mäkelä authored
      fil_delete_tablespace(): Remove the unused parameter drop_ahi,
      and add the parameter if_exists=false. We want to suppress
      error messages if we know that the tablespace has been discarded.
      
      dict_table_rename_in_cache(): Pass the new parameter to
      fil_delete_tablespace(), that is, do not complain about
      missing tablespace if the tablespace has been discarded.
      
      row_make_new_pathname(): Declare as static.
      
      row_drop_table_for_mysql(): Tolerate !table->data_dir_path
      when the tablespace has been discarded.
      
      row_rename_table_for_mysql(): Skip part of the RENAME TABLE
      when fil_space_get_first_path() returns NULL.
      6960e9ed
    • Marko Mäkelä's avatar
      MDEV-13626: Clean up the buffer pool resizing tests from MySQL 5.7 · 9fd692ae
      Marko Mäkelä authored
      buf_pool_resize(): Simplify the fault injection
      for innodb.buf_pool_resize_oom.
      
      innodb.buf_pool_resize_oom: Use a small buffer pool.
      
      innodb.innodb_buffer_pool_load_now: Make use of the sequence engine,
      to avoid creating explicit InnoDB record locks. Clean up the
      accesses to information_schema.innodb_buffer_page_lru.
      9fd692ae
    • Marko Mäkelä's avatar
    • Marko Mäkelä's avatar
      MDEV-14057: Fix some tests · e28b4b68
      Marko Mäkelä authored
      e28b4b68
  4. 18 Mar, 2020 4 commits
  5. 17 Mar, 2020 4 commits
  6. 16 Mar, 2020 3 commits
  7. 14 Mar, 2020 2 commits
  8. 13 Mar, 2020 10 commits
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · 5fe87ac4
      Marko Mäkelä authored
      5fe87ac4
    • Marko Mäkelä's avatar
      Fix GCC 10.0 -Wstringop-overflow · ed21202a
      Marko Mäkelä authored
      myrg_open(): Reduce the scope of the variable 'end' and
      simplify the code.
      
      For some reason, I got no warning for this code in the 10.2
      branch, only 10.3 or later.
      
      The ENGINE=MERGE is covered by the tests main.merge, main.merge_debug,
      and main.merge-big.
      ed21202a
    • Sujatha's avatar
      MDEV-10047: table-based master info repository · d9d3c222
      Sujatha authored
      Problem:
      =======
      When we upgrade from "mysql" to "mariadb" if slave is using repositories as
      tables their data is completely ignored and no warning is issued in error log.
      
      Fix:
      ===
      "mysql_upgrade" test should check for the presence of data in
      "mysql.slave_master_info" and "mysql.slave_relay_log_info" tables. When tables
      have some data the upgrade script should report a warning which hints users
      that the data in repository tables will be ignored.
      d9d3c222
    • Marko Mäkelä's avatar
      Fix clang 10 warnings · 9f858f38
      Marko Mäkelä authored
      _ma_fetch_keypage(): Correct an assertion that used to always hold.
      Thanks to clang -Wint-in-bool-context for flagging this.
      
      double_to_datetime_with_warn(): Suppress -Wimplicit-int-float-conversion
      by adding a cast. LONGLONG_MAX converted to double will actually be
      LONGLONG_MAX+1.
      9f858f38
    • Marko Mäkelä's avatar
      MDEV-21933 INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES accesses SYS_DATAFILES · 2e8b0c56
      Marko Mäkelä authored
      All tablespace metadata is buffered in fil_system. There is a LRU
      mechanism, but that only controls the opening and closing of
      fil_node_t::handle.
      
      It is much more efficient and less error-prone to access data file names
      by looking up the fil_space_t object rather than by essentially joining
      each row with an access to SYS_DATAFILES via the InnoDB internal SQL parser.
      
      dict_get_first_path(): Declare static. The function may only be needed
      when loading or updating the data dictionary. Also, change a condition
      in order to avoid a bogus GCC 10 -Wstringop-overflow warning for
      mem_strdupl() about len==ULINT_UNDEFINED.
      
      i_s_sys_tablespaces_fill_table(): Do not access other InnoDB internal
      dictionary tables than SYS_TABLESPACES.
      2e8b0c56
    • Marko Mäkelä's avatar
      Fix GCC 10 -Wclass-memaccess · 47382a2f
      Marko Mäkelä authored
      47382a2f
    • Marko Mäkelä's avatar
      Fix GCC 10 -Wstringop-truncation · a8566f72
      Marko Mäkelä authored
      a8566f72
    • Marko Mäkelä's avatar
      Update libmariadb · 2c8fa28f
      Marko Mäkelä authored
      This fixes GCC 10.0.1 -Wstringop-truncation and some typos.
      2c8fa28f
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · 32904dc5
      Marko Mäkelä authored
      32904dc5
    • Marko Mäkelä's avatar
      Merge 5.5 into 10.1 · 7b082fb0
      Marko Mäkelä authored
      7b082fb0
  9. 12 Mar, 2020 2 commits
  10. 11 Mar, 2020 2 commits
    • Monty's avatar
      Fixed wrong assert (found by clang) · cebf43e1
      Monty authored
      cebf43e1
    • Eugene Kosov's avatar
      MDEV-21918 improve page_zip_verify_checksum() · 7f36300d
      Eugene Kosov authored
      actually, page_zip_verify_checksum() generally allows all-zeroes
      checksums because our CRC32 checksum is something like
      crc_1 ^ crc_2 ^ crc_3
      
      Also, all zeroes page is considered correct.
      
      As a side effect fix nasty reinterpret_cast<> UB
      
      Also, since c0f47a4a innodb_checksum_algorithm=full_crc32
      exists which computes CRC32 in one go (without bitwise arithmetic)
      7f36300d