1. 08 Nov, 2021 1 commit
  2. 02 Nov, 2021 4 commits
    • Aleksey Midenkov's avatar
      MDEV-26928 Column-inclusive WITH SYSTEM VERSIONING doesn't work with explicit system fields · c8cece91
      Aleksey Midenkov authored
      versioning_fields flag indicates that any columns were specified WITH
      SYSTEM VERSIONING. In that case we imply WITH SYSTEM VERSIONING for
      the whole table and WITHOUT SYSTEM VERSIONING for the other columns.
      c8cece91
    • Aleksey Midenkov's avatar
      MDEV-25552 system versioned partitioned by LIMIT tables break CHECK TABLE · 1be39f86
      Aleksey Midenkov authored
      Replaced HA_ADMIN_NOT_IMPLEMENTED error code by HA_ADMIN_OK. Now CHECK
      TABLE does not fail by unsupported check_misplaced_rows(). Admin
      message is not needed as well.
      
      Test case is the same as for MDEV-21011 (a7cf0db3), the result have
      been changed.
      1be39f86
    • Aleksey Midenkov's avatar
      MDEV-25803 innodb.alter_candidate_key fix · c6207ecb
      Aleksey Midenkov authored
      There is a case when implicit primary key may be changed when removing
      NOT NULL from the part of unique key. In that case we update
      modified_primary_key which is then used to not skip key sorting.
      
      According to is_candidate_key() there is no other cases when primary
      kay may be changed implicitly.
      c6207ecb
    • Aleksey Midenkov's avatar
      MDEV-25803 Inplace ALTER breaks MyISAM/Aria table when order of keys is changed · 63c922ae
      Aleksey Midenkov authored
      mysql_prepare_create_table() does my_qsort(sort_keys) on key
      info. This sorting is indeterministic: a table is created with one
      order and inplace alter may overwrite frm with another order. Since
      inplace alter does nothing about key info for MyISAM/Aria storage
      engines this results in discrepancy between frm and storage engine key
      definitions.
      
      The fix avoids the sorting of keys when no new keys added by ALTER
      (and this is ok for MyISAM/Aria since it cannot add new keys inplace).
      
      Notes:
      
      mi_keydef_write()/mi_keyseg_write() are used only in mi_create(). They
      should be used in ha_inplace_alter_table() as well.
      
      Aria corruption detection is unimplemented: maria_check_definition()
      is never used!
      
      MySQL 8.0 has this bug as well as of 8.0.26.
      
      This breaks main.long_unique in 10.4. The new result is correct and
      should be applied as it just different (original) order of keys.
      63c922ae
  3. 28 Oct, 2021 4 commits
  4. 27 Oct, 2021 4 commits
    • Sergei Petrunia's avatar
      Fix compile warning: · 3a9967d7
      Sergei Petrunia authored
      ha_rocksdb.h:459:15: warning: 'table_type' overrides a member
      function but is not marked 'override' [-Winconsistent-missing-override]
      3a9967d7
    • Alexander Barkov's avatar
      MDEV-25402 Assertion `!str || str != Ptr' failed in String::copy · 2ed148c8
      Alexander Barkov authored
      The assert inside String::copy() prevents copying from from "str"
      if its own String::Ptr also points to the same memory.
      
      The idea of the assert is that copy() performs memory reallocation,
      and this reallocation can free (and thus invalidate) the memory pointed by Ptr,
      which can lead to further copying from a freed memory.
      
      The assert was incomplete: copy() can free the memory pointed by its Ptr
      only if String::alloced is true!
      
      If the String is not alloced, it is still safe to copy even from
      the location pointed by Ptr.
      
      This scenario demonstrates a safe copy():
        const char *tmp= "123";
        String str1(tmp, 3);
        String str2(tmp, 3);
        // This statement is safe:
        str2.copy(str1->ptr(), str1->length(), str1->charset(), cs_to, &errors);
      
      Inside the copy() the parameter "str" is equal to String::Ptr in this example.
      But it's still ok to reallocate the memory for str2, because str2
      was a constant before the copy() call. Thus reallocation does not
      make the memory pointed by str1->ptr() invalid.
      
      Adjusting the assert condition to allow copying for constant strings.
      2ed148c8
    • Marko Mäkelä's avatar
      Fix tests for PLUGIN_PARTITION=NO · 4b8340d8
      Marko Mäkelä authored
      4b8340d8
    • Alexander Barkov's avatar
      MDEV-22380: Assertion `name.length == strlen(name.str)' failed ... · e97b785d
      Alexander Barkov authored
      Also fixes:
      MDEV-25399 Assertion `name.length == strlen(name.str)' failed in Item_func_sp::make_send_field
      
      Also fixes a problem that in this scenario:
      
      SET NAMES binary;
      SELECT 'some not well-formed utf8 string';
      
      the auto-generated column name copied the binary string value directly
      to the Item name, without checking utf8 well-formedness.
      
      After this change auto-generated column names work as follows:
      - Zero bytes 0x00 are copied to the name using HEX notation
      - In case of "SET NAMES binary", all bytes sequences that do not make
        well-formed utf8 characters are copied to the name using HEX notation.
      e97b785d
  5. 26 Oct, 2021 6 commits
  6. 25 Oct, 2021 4 commits
  7. 22 Oct, 2021 1 commit
  8. 21 Oct, 2021 13 commits
  9. 20 Oct, 2021 3 commits