mariadb/plugin
Alexander Barkov f436b4a523 MDEV-32879 Server crash in my_decimal::operator= or unexpected ER_DUP_ENTRY upon comparison with INET6 and similar types
During the 10.5->10.6 merge please use the 10.6 code on conflicts.

This is the 10.5 version of the patch (a backport of the 10.6 version).
Unlike 10.6 version, it makes changes in plugin/type_inet/sql_type_inet.*
rather than in sql/sql_type_fixedbin.h

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_inet6:
  - Item_bool_rowready_func2_fix_length_and_dec
  - Item_func_between_fix_length_and_dec
  - Item_func_in_fix_comparator_compatible_types
2023-11-28 07:26:39 +04:00
..
audit_null Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
auth_dialog Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
auth_ed25519 Merge 10.3 into 10.4 2021-05-25 15:38:57 +03:00
auth_examples Merge branch '10.3' into 10.4 2019-05-19 20:55:37 +02:00
auth_gssapi Merge 10.4 into 10.5 2021-11-29 11:16:20 +02:00
auth_pam Merge branch '10.4' into 10.5 2023-11-08 12:59:00 +01:00
auth_pipe Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
auth_socket Support of AIX for auth_socket plugin 2020-12-16 08:07:04 +11: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 perfschema memory related instrumentation changes 2020-03-10 19:24:22 +01:00
debug_key_management Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
disks Merge remote-tracking branch 'origin/10.4' into 10.5 2022-09-14 16:24:51 +04:00
example_key_management Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
feedback Merge remote-tracking branch '10.4' into 10.5 2023-03-31 21:32:41 +02:00
file_key_management Merge 10.3 into 10.4 2022-10-25 10:04:37 +03:00
fulltext Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
func_test Data type plugins - minor fixes 2019-10-31 11:19:35 +01: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 MDEV-22214 mariadbd.exe calls function mysqld.exe, and crashes 2020-04-10 19:05:26 +02:00
metadata_lock_info remove mysql_declare_plugin declaration from some plugins 2020-07-04 01:44:47 +02:00
qc_info MDEV-24487 Error after update to 10.5.8 on CentOS-8: DBD::mysql::st execute failed: Unknown MySQL error 2022-01-27 15:54:20 +04:00
query_response_time Merge 10.4 into 10.5 2023-02-10 12:02:11 +02:00
server_audit Merge branch '10.4' into 10.5 2022-05-09 22:04:06 +02:00
simple_password_check Merge branch '10.3' into 10.4 2022-08-02 14:15:39 +02:00
sql_errlog Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
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-28 07:26:39 +04:00
type_mysql_json MDEV-28234 Change maturity of plugins for July 2022 Releases 2022-07-05 19:07:36 +02:00
type_test MDEV-22243 type_test.type_test_double fails with 'NUMERIC_SCALE NULL' 2023-11-19 13:24:27 +01:00
user_variables Merge remote-tracking branch 'origin/10.4' into 10.5 2022-09-14 16:24:51 +04: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