mariadb/plugin
Alexander Barkov a931da82fa MDEV-34123 CONCAT Function Returns Unexpected Empty Set in Query
Search conditions were evaluated using val_int(), which was wrong.
Fixing the code to use val_bool() instead.

Details:
- Adding a new item_base_t::IS_COND flag which marks Items used
  as <search condition> in WHERE, HAVING, JOIN ON, CASE WHEN clauses.
  The flag is at the parse time.
  These expressions must be evaluated using val_bool() rather than val_int().

  Note, the optimizer creates more Items which are used as search conditions.
  Most of these items are not marked with IS_COND yet. This is OK for now,
  but eventually these Items can also be fixed to have the flag.

- Adding a method Item::is_cond() which tests if the Item has the IS_COND flag.

- Implementing Item_cache_bool. It evaluates the cached expression using
  val_bool() rather than val_int().
  Overriding Type_handler_bool::Item_get_cache() to create Item_cache_bool.

- Implementing Item::save_bool_in_field(). It uses val_bool() rather than
  val_int() to evaluate the expression.

- Implementing Type_handler_bool::Item_save_in_field()
  using Item::save_bool_in_field().

- Fixing all Item_bool_func descendants to implement a virtual val_bool()
  rather than a virtual val_int().

- To find places where val_int() should be fixed to val_bool(), a few
  DBUG_ASSERT(!is_cond()) where added into val_int() implementations
  of selected (most frequent) classes:

  Item_field
  Item_str_func
  Item_datefunc
  Item_timefunc
  Item_datetimefunc
  Item_cache_bool
  Item_bool_func
  Item_func_hybrid_field_type
  Item_basic_constant descendants

- Fixing all places where DBUG_ASSERT() happened during an "mtr" run
  to use val_bool() instead of val_int().
2024-10-08 11:58:46 +02: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 MDEV-31379 Undefined behavior in the reference Ed25519 implementation 2024-03-27 16:14:55 +01:00
auth_examples Merge branch '10.3' into 10.4 2019-05-19 20:55:37 +02:00
auth_gssapi Merge 10.5 into 10.6 2024-03-12 09:19:57 +02:00
auth_pam Fix g++-14 -Wcalloc-transposed-args 2024-03-19 08:07:41 +02:00
auth_pipe Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
auth_socket Early return from auth_socket system checks on Windows 2021-09-11 01:33:29 +02:00
aws_key_management MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
cracklib_password_check Fix ninja build for cracklib_password_check 2024-02-08 11:50:34 +11: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 branch '10.5' into 10.6 2024-01-31 18:04:03 +01:00
example_key_management Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
feedback MDEV-33091 pcre2 headers aren't found on Solaris 2024-09-05 12:14:06 +10:00
file_key_management Fixed some mtr tests that failed on windows 2024-01-23 13:03:12 +02:00
fulltext Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
func_test Merge branch '10.5' into 10.6 2024-07-16 15:54:22 +08:00
handler_socket MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04: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-33091 pcre2 headers aren't found on Solaris 2024-09-05 12:14:06 +10: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 2023-12-17 11:20:43 +01:00
simple_password_check Merge branch '10.3' into 10.4 2022-08-02 14:15:39 +02:00
sql_errlog fix failing test on buildbot for MDEV-27087 2024-01-26 16:56:07 +05:30
test_sql_service plugins.test_sql_service --valgrind 2024-03-27 16:14:55 +01:00
type_geom change buitin plugin types from Alpha to Stable as needed 2020-08-07 13:36:11 +02:00
type_inet MDEV-34123 CONCAT Function Returns Unexpected Empty Set in Query 2024-10-08 11:58:46 +02:00
type_mysql_json Merge 10.5 into 10.6 2024-06-24 13:09:47 +03:00
type_mysql_timestamp cleanup: remove Type_collection::handler_by_name() 2023-07-04 16:37:29 +02:00
type_test Merge branch '10.5' into 10.6 2024-07-03 13:27:23 +02:00
user_variables Merge 10.5 into 10.6 2024-01-17 13:35:05 +02:00
userstat Merge 10.4 into 10.5 2021-04-14 11:35:39 +03:00
versioning MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04: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