mariadb/mysql-test/suite/maria
Alexander Barkov 5a8e6230d7 MDEV-34189 Unexpected error on WHERE inet6col
normalize_cond() translated `WHERE col` into `WHERE col<>0`

But the opetator "not equal to 0" does not necessarily exists
for all data types.

For example, the query:

  SELECT * FROM t1 WHERE inet6col;

was translated to:

  SELECT * FROM t1 WHERE inet6col<>0;

which further failed with this error:

  ERROR : Illegal parameter data types inet6 and bigint for operation '<>'

This patch changes the translation from `col<>0` to `col IS TRUE`.
So now
  SELECT * FROM t1 WHERE inet6col;
gets translated to:
  SELECT * FROM t1 WHERE inet6col IS TRUE;

Details:
1. Implementing methods:
   - Field_longstr::val_bool()
   - Field_string::val_bool()
   - Item::val_int_from_val_str()
   If the input contains bad data,
   these methods raise a better error message:
     Truncated incorrect BOOLEAN value
   Before the change, the error was:
     Truncated incorrect DOUBLE value

2. Fixing normalize_cond() to generate Item_func_istrue/Item_func_isfalse
   instances instead of Item_func_ne/Item_func_eq

3. Making Item_func_truth sargable, so it uses the range optimizer.
   Implementing the following methods:
   - get_mm_tree(), get_mm_leaf(), add_key_fields() in Item_func_truth.
   - get_func_mm_tree(), for all Item_func_truth descendants.

4. Implementing the method negated_item() for all Item_func_truth
   descendants, so the negated item has a chance to be sargable:
   For example,
     WHERE NOT col IS NOT FALSE    -- this notation is not sargable
   is now translated to:
     WHERE col IS FALSE            -- this notation is sargable
2025-01-29 09:08:19 +04:00
..
alter.result MariaDB 11.4.4 release 2024-11-08 07:17:00 +01:00
alter.test MDEV-25923: Aria parallel repair MY_THREAD_SPECIFIC mismatch in realloc 2024-03-15 15:55:07 +01:00
aria_log_dir_path.result MDEV-30971 Add a new system variable aria_data_home_dir 2023-04-04 16:05:55 +04:00
aria_log_dir_path.test MDEV-30971 Add a new system variable aria_data_home_dir 2023-04-04 16:05:55 +04:00
aria_pack_mdev14183.result
aria_pack_mdev14183.test
aria_sort_buffer.result MDEV-35469 Heap tables are calling mallocs to often 2025-01-05 16:40:11 +02:00
aria_sort_buffer.test
bulk_insert_crash.opt
bulk_insert_crash.result
bulk_insert_crash.test MDEV-16944 Fix file sharing issues on Windows in mysqltest 2024-04-17 16:52:37 +02:00
collations.result
collations.test
compat_aliases-master.opt
concurrent.result
concurrent.test
crash-recursive.result Fixed crashing bug in recursive SQL if write to tmp table would fail 2023-03-02 13:11:54 +02:00
crash-recursive.test Fixed crashing bug in recursive SQL if write to tmp table would fail 2023-03-02 13:11:54 +02:00
create.opt
create.result
create.test
ctype_utf8mb3_uca.result MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
ctype_utf8mb3_uca.test MDEV-30048 Prefix keys for CHAR work differently for MyISAM vs InnoDB 2023-10-24 03:35:48 +04:00
disabled.def
distinct.result
distinct.test
dynamic.result MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
dynamic.test MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
encrypt-no-key.result Merge branch '10.5' into 10.6 2023-08-01 15:08:52 +02:00
encrypt-no-key.test Merge 10.5 into 10.6 2024-04-18 07:14:56 +03:00
encrypt-wrong-key.result MDEV-26258 Various crashes/asserts/corruptions when Aria encryption is enabled/used, but the encryption plugin is not loaded 2023-05-02 23:37:10 +03:00
encrypt-wrong-key.test MDEV-16944 Fix file sharing issues on Windows in mysqltest 2024-04-17 16:52:37 +02:00
fulltext2.result MDEV-11241 Certain combining marks cause MariaDB to crash when doing Full-Text searches 2022-01-28 21:36:33 +01:00
fulltext2.test Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
group_commit.result
group_commit.test
icp.result MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
icp.test
insert_select-7314.result
insert_select-7314.test
insert_select.result
insert_select.test
kill.result
kill.test
lock.result MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
lock.test
locking.result
locking.test
maria-64bit.result Fix of4cb0d43ac63761174a39cea892c176b9cfa6edfc after merge in 10.5 2023-07-30 08:41:54 +02:00
maria-64bit.test Updated some test result for 32 bit systems 2023-05-24 19:22:08 +03:00
maria-autoinc.result MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
maria-autoinc.test
maria-autozerofill.result
maria-autozerofill.test
maria-big.result
maria-big.test
maria-big2.result
maria-big2.test
maria-connect.result
maria-connect.test
maria-gis-recovery.opt
maria-gis-recovery.result MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
maria-gis-recovery.test
maria-gis-rtree-dynamic.result MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
maria-gis-rtree-dynamic.test
maria-gis-rtree-trans.result MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
maria-gis-rtree-trans.test
maria-gis-rtree.result MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
maria-gis-rtree.test
maria-mvcc.result MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
maria-mvcc.test
maria-no-logging.result MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
maria-no-logging.test
maria-page-checksum.result MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
maria-page-checksum.test
maria-partitioning.result
maria-partitioning.test
maria-preload.result
maria-preload.test
maria-purge.result
maria-purge.test
maria-recover-master.opt
maria-recover.result MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
maria-recover.test Fixed maria.maria-recover and maria.encrypt-no-key test files 2022-06-13 16:10:41 +03:00
maria-recovery-big-master.opt
maria-recovery-big.result
maria-recovery-big.test
maria-recovery-bitmap-master.opt
maria-recovery-bitmap.result
maria-recovery-bitmap.test
maria-recovery-master.opt
maria-recovery-rtree-ft-master.opt
maria-recovery-rtree-ft.result
maria-recovery-rtree-ft.test
maria-recovery.result MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
maria-recovery.test
maria-recovery2-master.opt
maria-recovery2.result
maria-recovery2.test
maria-recovery3-master.opt
maria-recovery3.result
maria-recovery3.test
maria-ucs2.result MDEV-25829 Change default Unicode collation to uca1400_ai_ci 2024-05-24 15:50:05 +04:00
maria-ucs2.test
maria.result cleanup: key algorithm vs key flags 2024-11-05 14:00:47 -08:00
maria.test cleanup: key algorithm vs key flags 2024-11-05 14:00:47 -08:00
maria2.result
maria2.test
maria3.result MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
maria3.test MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
maria_notembedded.result
maria_notembedded.test
maria_partition.result
maria_partition.test
maria_showlog_error.result
maria_showlog_error.test
max_length.result MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
max_length.test Extend have_sanitizer with ASAN+UBSAN and MSAN 2022-02-23 15:48:08 +02:00
mrr.result MDEV-34189 Unexpected error on WHERE inet6col 2025-01-29 09:08:19 +04:00
mrr.test
optimize.result MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
optimize.test MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
partition.result
partition.test
ps_maria.result MariaDB 11.4.4 release 2024-11-08 07:17:00 +01:00
ps_maria.test
range.result MDEV-22935 Erroneous Aria Index / Optimizer behaviour 2024-06-05 10:29:49 +03:00
range.test MDEV-22935 Erroneous Aria Index / Optimizer behaviour 2024-06-05 10:29:49 +03:00
repair-big-sort.result MDEV-35469 Heap tables are calling mallocs to often 2025-01-05 16:40:11 +02:00
repair-big-sort.test MDEV-28054 Various crashes upon INSERT/UPDATE after changing Aria settings 2023-05-02 23:37:10 +03:00
repair.result MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
repair.test MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
rollback.result MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
rollback.test Merge 10.5 into 10.6 2022-11-10 17:30:15 +02:00
small_blocksize-master.opt
small_blocksize.result
small_blocksize.test
suite.pm
system_tables.result
system_tables.test
temporary.result
temporary.test
transaction.result
transaction.test
truncate.result MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
truncate.test