mirror of
https://github.com/MariaDB/server.git
synced 2025-02-22 13:23:07 +01:00
![]() 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 |
||
---|---|---|
.. | ||
alter.result | ||
alter.test | ||
aria_log_dir_path.result | ||
aria_log_dir_path.test | ||
aria_pack_mdev14183.result | ||
aria_pack_mdev14183.test | ||
aria_sort_buffer.result | ||
aria_sort_buffer.test | ||
bulk_insert_crash.opt | ||
bulk_insert_crash.result | ||
bulk_insert_crash.test | ||
collations.result | ||
collations.test | ||
compat_aliases-master.opt | ||
concurrent.result | ||
concurrent.test | ||
crash-recursive.result | ||
crash-recursive.test | ||
create.opt | ||
create.result | ||
create.test | ||
ctype_utf8mb3_uca.result | ||
ctype_utf8mb3_uca.test | ||
disabled.def | ||
distinct.result | ||
distinct.test | ||
dynamic.result | ||
dynamic.test | ||
encrypt-no-key.result | ||
encrypt-no-key.test | ||
encrypt-wrong-key.result | ||
encrypt-wrong-key.test | ||
fulltext2.result | ||
fulltext2.test | ||
group_commit.result | ||
group_commit.test | ||
icp.result | ||
icp.test | ||
insert_select-7314.result | ||
insert_select-7314.test | ||
insert_select.result | ||
insert_select.test | ||
kill.result | ||
kill.test | ||
lock.result | ||
lock.test | ||
locking.result | ||
locking.test | ||
maria-64bit.result | ||
maria-64bit.test | ||
maria-autoinc.result | ||
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 | ||
maria-gis-recovery.test | ||
maria-gis-rtree-dynamic.result | ||
maria-gis-rtree-dynamic.test | ||
maria-gis-rtree-trans.result | ||
maria-gis-rtree-trans.test | ||
maria-gis-rtree.result | ||
maria-gis-rtree.test | ||
maria-mvcc.result | ||
maria-mvcc.test | ||
maria-no-logging.result | ||
maria-no-logging.test | ||
maria-page-checksum.result | ||
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 | ||
maria-recover.test | ||
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 | ||
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 | ||
maria-ucs2.test | ||
maria.result | ||
maria.test | ||
maria2.result | ||
maria2.test | ||
maria3.result | ||
maria3.test | ||
maria_notembedded.result | ||
maria_notembedded.test | ||
maria_partition.result | ||
maria_partition.test | ||
maria_showlog_error.result | ||
maria_showlog_error.test | ||
max_length.result | ||
max_length.test | ||
mrr.result | ||
mrr.test | ||
optimize.result | ||
optimize.test | ||
partition.result | ||
partition.test | ||
ps_maria.result | ||
ps_maria.test | ||
range.result | ||
range.test | ||
repair-big-sort.result | ||
repair-big-sort.test | ||
repair.result | ||
repair.test | ||
rollback.result | ||
rollback.test | ||
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 | ||
truncate.test |