mariadb/plugin
Alexander Barkov 20b0ec9aae MDEV-32879 Server crash in my_decimal::operator= or unexpected ER_DUP_ENTRY upon comparison with INET6 and similar types
This is the 10.6 version of the patch.

Item_bool_rowready_func2, Item_func_between, Item_func_in
did not check if a not-NULL argument of an arbitrary data type
can produce a NULL value on conversion to INET6.

This caused a crash on DBUG_ASSERT() in conversion failures,
because the function returned SQL NULL for something that
has Item::maybe_null() equal to false.

Adding setting NULL-ability in such cases.

Details:

- Removing the code in Item_func::setup_args_and_comparator()
  performing character set aggregation with optional narrowing.
  This aggregation is done inside Arg_comparator::set_cmp_func_string().
  So this code was redundant

- Removing Item_func::setup_args_and_comparator() as it git simplified to
  just to two lines:
    convert_const_compared_to_int_field(thd);
    return cmp->set_cmp_func(thd, this, &args[0], &args[1], true);
  Using these lines directly in:
    - Item_bool_rowready_func2::fix_length_and_dec()
    - Item_func_nullif::fix_length_and_dec()

- Adding a new virtual method:
  - Type_handler::Item_bool_rowready_func2_fix_length_and_dec().

- Adding tests detecting if the data type conversion can return SQL NULL into
  the following methods of Type_handler_fbt:
  - Item_bool_rowready_func2_fix_length_and_dec
  - Item_func_between_fix_length_and_dec
  - Item_func_in_fix_comparator_compatible_types
2023-11-27 20:47:01 +04:00
..
audit_null
auth_dialog
auth_ed25519 Merge 10.3 into 10.4 2021-05-25 15:38:57 +03:00
auth_examples
auth_gssapi update C/C, fix srpm build failures on fedora 2022-09-26 11:17:53 +02:00
auth_pam Merge branch '10.4' into 10.5 2023-11-08 12:59:00 +01:00
auth_pipe
auth_socket Early return from auth_socket system checks on Windows 2021-09-11 01:33:29 +02:00
aws_key_management Merge branch '10.4' into 10.5 2021-07-31 23:19:51 +02:00
cracklib_password_check MDEV-18200 MariaBackup full backup failed with InnoDB: Failing assertion: success 2023-09-26 08:55:52 +10:00
daemon_example
debug_key_management
disks Merge 10.5 into 10.6 2022-09-20 16:53:20 +03:00
example_key_management
feedback Merge 10.5 into 10.6 2023-04-11 16:15:19 +03:00
file_key_management Merge 10.3 into 10.4 2022-10-25 10:04:37 +03:00
fulltext
func_test Added override to all releveant methods in Item (and a few other classes) 2021-05-19 22:27:53 +02:00
handler_socket move alloca() definition from all *.h files to one new header file 2023-03-07 11:13:20 +01:00
locale_info
metadata_lock_info remove mysql_declare_plugin declaration from some plugins 2020-07-04 01:44:47 +02:00
qc_info Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
query_response_time Merge 10.5 into 10.6 2023-02-10 13:03:01 +02:00
server_audit Merge branch '10.5' into 10.6 2022-05-10 14:01:23 +02:00
simple_password_check Merge branch '10.3' into 10.4 2022-08-02 14:15:39 +02:00
sql_errlog
test_sql_service MDEV-19275 Provide SQL service to plugins. 2020-10-02 10:19:00 +04:00
type_geom change buitin plugin types from Alpha to Stable as needed 2020-08-07 13:36:11 +02:00
type_inet MDEV-32879 Server crash in my_decimal::operator= or unexpected ER_DUP_ENTRY upon comparison with INET6 and similar types 2023-11-27 20:47:01 +04:00
type_mysql_json cleanup: remove Type_collection::handler_by_name() 2023-07-04 16:37:29 +02:00
type_mysql_timestamp cleanup: remove Type_collection::handler_by_name() 2023-07-04 16:37:29 +02:00
type_test Merge 10.5 into 10.6 2023-10-19 13:50:00 +03:00
user_variables Merge 10.5 into 10.6 2022-09-20 16:53:20 +03:00
userstat Merge 10.4 into 10.5 2021-04-14 11:35:39 +03:00
versioning Merge commit '10.4' into 10.5 2023-07-20 11:54:52 +02:00
win_auth_client Merge 10.2 into 10.3 2021-07-22 18:57:54 +03:00
wsrep_info Merge branch '10.4' into 10.5 2022-10-02 14:38:13 +02:00