maria:bb-10.5-mdev-31743

Last commit made on 2023-08-03
Get this branch:
git clone -b bb-10.5-mdev-31743 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.5-mdev-31743
Repository:
lp:maria

Recent commits

b610348... by Oleg Smirnov

MDEV-31743 Server crash in store_length, assertion failure in Type_handler_string_result::sort_length

After MDEV-21580 the truncation of SORT_FIELD::length
  set_if_smaller(sortorder->length, thd->variables.max_sort_length)

became conditional:
  if (is_variable_sized())
    set_if_smaller(length, thd->variables.max_sort_length)

To provide correct functioning of is_variable_sized() SORT_FIELD::type
must be set properly. This commit adds the necessary initialization
of SORT_FIELD::type to JOIN_TAB::remove_duplicates() as it is done
in filesort's sortlength() function.

DBUG_ASSERT is added to sortlength() just in case to prevent
a possible uint32 overflow

61acb43... by Sergei Golubchik

MDEV-31822 ALTER TABLE ENGINE=x started failing instead of producing warning on unsupported TRANSACTIONAL=1

make TRANSACTIONAL table option behave similar to other engine-defined
table options. If the engine doesn't suport it:
* if specified expicitly in CREATE or ALTER - it's ER_UNKNOWN_OPTION
* an error or a warning depending on sql_mode IGNORE_BAD_TABLE_OPTIONS
* in ALTER TABLE from the engine that suppors it to the engine that
  doesn't - silently preserved (no warning)
* it is commented out in SHOW CREATE unless IGNORE_BAD_TABLE_OPTIONS

da09ae0... by Sergei Golubchik

MDEV-18114 Foreign Key Constraint actions don't affect Virtual Column

* invoke check_expression() for all vcol_info's in
  mysql_prepare_create_table() to check for FK CASCADE
* also check for SET NULL and SET DEFAULT
* to check against existing FKs when a vcol is added in ALTER TABLE,
  old FKs must be added to the new_key_list just like other indexes are
* check columns recursively, if vcol1 references vcol2,
  flags of vcol2 must be taken into account
* remove check_table_name_processor(), put that logic under
  check_vcol_func_processor() to avoid walking the tree twice

ab1191c... by Sergei Golubchik

cleanup: key->key_create_info.check_for_duplicate_indexes -> key->old

mark old keys in the ALTER TABLE with the `old` flag, not with
the `key_create_info.check_for_duplicate_indexes`.

This allows to mark old foreign keys too.

0c9794d... by Sergei Golubchik

cleanup: Item_field::check_vcol_func_processor()

to declutter Item_field::check_vcol_func_processor(), move alter_info
specific part of it into Alter_info::check_vcol_field()

b8233b3... by Sergei Golubchik

cleanup: put db/table_name into Alter_info

also, prefer Lex_table_name and Lex_ident over LEX_CSTRING

2f6d464... by Sergei Golubchik

cleanup: reorder enum_fk_option

f7a9f44... by Sergei Golubchik

cleanup: remove unused keyinfo flag

HA_UNIQUE_CHECK was
* only used internally by MyISAM/Aria
* only used for internal temporary tables (for DISTINCT)
* never saved in frm
* saved in MYI/MAD but only for temporary tables
* only set, never checked

it's safe to remove it and free the bit (there are only 16 of them)

383baa8... by Sergei Golubchik

cleanup: invert return code

010f535... by Sergei Golubchik

cleanup: remove redundant arguments