1. 26 Feb, 2019 4 commits
    • Marko Mäkelä's avatar
      MDEV-18719 Assertion (c.prtype ^ o->prtype) & ... failed on ALTER TABLE · 043c0471
      Marko Mäkelä authored
      The prtype & DATA_LONG_TRUE_VARCHAR flag only plays a role when
      converting between InnoDB internal format and the MariaDB SQL layer
      row format. Ideally this flag would never have been persisted in the
      InnoDB data dictionary.
      
      There were bogus assertion failures when an instant ADD, DROP, or
      column reordering was combined with a change of extending a VARCHAR
      from less than 256 bytes to more than 255 bytes. Such changes are
      allowed starting with MDEV-15563 in MariaDB 10.4.3.
      
      dict_table_t::instant_column(), dict_col_t::same_format(): Ignore
      the DATA_LONG_TRUE_VARCHAR flag, because it does not affect the
      persistent storage format.
      043c0471
    • Alexander Barkov's avatar
      MDEV-18408 Assertion `0' failed in Item::val_native_result /... · 0704e70e
      Alexander Barkov authored
      MDEV-18408 Assertion `0' failed in Item::val_native_result / Timestamp_or_zero_datetime_native_null::Timestamp_or_zero_datetime_native_null upon mysqld_list_fields after crash recovery
      
      The problem happened because Item_ident_for_show did not implement val_native().
      
      Solution:
      
      - Removing class Item_ident_for_show
      - Implementing a new method Protocol::send_list_fields() instead,
        which accepts a List<Field> instead of List<Item> as input.
        Now no any Item creation is done during mysqld_list_fields().
      
      Adding helper methods, to reuse the code easier:
      - Moved a part of Protocol::send_result_set_metadata(),
        responsible for sending an individual field metadata,
        into a new method Protocol_text::store_field_metadata().
        Reusing it in both send_list_fields() and send_result_set_metadata().
      - Adding Protocol_text::store_field_metadata()
      - Adding Protocol_text::store_field_metadata_for_list_fields()
      
      Note, this patch also automatically fixed another bug:
      
      MDEV-18685 mysql_list_fields() returns DEFAULT 0 instead of DEFAULT NULL for view columns
      
      The reason for this bug was that Item_ident_for_show::val_xxx() and get_date()
      did not check field->is_null() before calling field->val_xxx()/get_date().
      Now the default value is correctly sent by Protocol_text::store(Field*).
      0704e70e
    • Igor Babaev's avatar
      MDEV-18668 Server crash or ASAN use-after-poison in Item_equal_iterator / · 1fbe9bb1
      Igor Babaev authored
                 st_select_lex::pushdown_from_having_into_where upon query
                 with impossible WHERE condition
      
      Do not push from HAVING into impossible WHERE
      1fbe9bb1
    • Igor Babaev's avatar
      MDEV-18681 Server crashes in embedding_sjm · 53ebeb0d
      Igor Babaev authored
      Do not do substitution for best equal field in HAVING conditions.
      It's not needed.
      53ebeb0d
  2. 21 Feb, 2019 24 commits
  3. 20 Feb, 2019 7 commits
  4. 19 Feb, 2019 5 commits
    • Oleksandr Byelkin's avatar
      c65daf02
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-12026: Implement innodb_checksum_algorithm=full_crc32 · c0f47a4a
      Thirunarayanan Balathandayuthapani authored
      MariaDB data-at-rest encryption (innodb_encrypt_tables)
      had repurposed the same unused data field that was repurposed
      in MySQL 5.7 (and MariaDB 10.2) for the Split Sequence Number (SSN)
      field of SPATIAL INDEX. Because of this, MariaDB was unable to
      support encryption on SPATIAL INDEX pages.
      
      Furthermore, InnoDB page checksums skipped some bytes, and there
      are multiple variations and checksum algorithms. By default,
      InnoDB accepts all variations of all algorithms that ever existed.
      This unnecessarily weakens the page checksums.
      
      We hereby introduce two more innodb_checksum_algorithm variants
      (full_crc32, strict_full_crc32) that are special in a way:
      When either setting is active, newly created data files will
      carry a flag (fil_space_t::full_crc32()) that indicates that
      all pages of the file will use a full CRC-32C checksum over the
      entire page contents (excluding the bytes where the checksum
      is stored, at the very end of the page). Such files will always
      use that checksum, no matter what the parameter
      innodb_checksum_algorithm is assigned to.
      
      For old files, the old checksum algorithms will continue to be
      used. The value strict_full_crc32 will be equivalent to strict_crc32
      and the value full_crc32 will be equivalent to crc32.
      
      ROW_FORMAT=COMPRESSED tables will only use the old format.
      These tables do not support new features, such as larger
      innodb_page_size or instant ADD/DROP COLUMN. They may be
      deprecated in the future. We do not want an unnecessary
      file format change for them.
      
      The new full_crc32() format also cleans up the MariaDB tablespace
      flags. We will reserve flags to store the page_compressed
      compression algorithm, and to store the compressed payload length,
      so that checksum can be computed over the compressed (and
      possibly encrypted) stream and can be validated without
      decrypting or decompressing the page.
      
      In the full_crc32 format, there no longer are separate before-encryption
      and after-encryption checksums for pages. The single checksum is
      computed on the page contents that is written to the file.
      
      We do not make the new algorithm the default for two reasons.
      First, MariaDB 10.4.2 was a beta release, and the default values
      of parameters should not change after beta. Second, we did not
      yet implement the full_crc32 format for page_compressed pages.
      This will be fixed in MDEV-18644.
      
      This is joint work with Marko Mäkelä.
      c0f47a4a
    • Oleksandr Byelkin's avatar
      Merge branch '10.2' into bb-10.3-merge · 00906719
      Oleksandr Byelkin authored
      00906719
    • Oleksandr Byelkin's avatar
      Merge branch '10.3' into bb-10.3-merge · 055c09ad
      Oleksandr Byelkin authored
      055c09ad
    • Oleksandr Byelkin's avatar
      Merge branch '10.1' into 10.2 · 91d506cf
      Oleksandr Byelkin authored
      91d506cf