mariadb/mysql-test/suite
Alexander Barkov 351a8eecf0 MDEV-32148 Inefficient WHERE timestamp_column=datetime_const_expr
Changing the way how a the following conditions are evaluated:

    WHERE timestamp_column=datetime_const_expr

(for all comparison operators: =, <=>, <, >, <=, >=, <> and for NULLIF)

Before the change it was always performed as DATETIME.
That was not efficient, as involved per-row TIMESTAMP->DATETIME conversion
for timestamp_column. For example, in case of the SYSTEM time zone
it involved a localtime_r() call, which is known to be slow.

After the change it's performed as TIMESTAMP in many cases.
This allows to avoid per-row conversion, as it works the other way around:
datetime_const_expr is converted to TIMESTAMP once before the execution stage.

Note, datetime_const_expr must be inside monotone continuous periods of
the current time zone, i.e. not near these anomalies:
- DST changes (spring forward, fall back)
- leap seconds
2024-01-12 15:24:05 +04:00
..
archive
atomic
binlog Merge branch '11.2' into 11.3 2023-12-21 02:14:59 +01:00
binlog_encryption Merge branch '11.2' into 11.3 2023-12-21 02:14:59 +01:00
client
compat Merge branch '10.11' into 11.0 2023-12-19 15:53:18 +01:00
csv
encryption Merge 11.2 into 11.3 2024-01-05 14:20:35 +02:00
engines Merge branch '11.2' into 11.3 2023-12-21 02:14:59 +01:00
events Merge branch '11.2' into 11.3 2023-12-21 02:14:59 +01:00
federated
funcs_1 Merge branch '11.2' into 11.3 2023-12-21 02:14:59 +01:00
funcs_2
galera Merge 11.2 into 11.3 2024-01-05 14:20:35 +02:00
galera_3nodes Merge 10.6 into 10.11 2024-01-03 15:37:57 +02:00
galera_3nodes_sr Merge 10.6 into 10.11 2024-01-03 15:37:57 +02:00
galera_sr Merge 10.6 into 10.11 2024-01-03 15:37:57 +02:00
gcol Merge branch '11.1' into 11.2 2023-12-20 23:43:05 +01:00
handler
heap
innodb Merge 11.2 into 11.3 2024-01-10 15:30:21 +02:00
innodb_fts Merge branch '11.2' into 11.3 2023-12-21 02:14:59 +01:00
innodb_gis Merge branch '11.2' into 11.3 2023-12-21 02:14:59 +01:00
innodb_i_s
innodb_zip Merge branch '11.0' into 11.1 2023-12-19 20:11:54 +01:00
jp
json
large_tests
maria
mariabackup Merge branch '11.2' into 11.3 2023-12-21 02:14:59 +01:00
merge
mtr/t
mtr2
multi_source Merge branch '10.6' into 10.11 2023-12-18 11:19:04 +01:00
optimizer_unfixed_bugs
parts Merge 10.11 into 11.0 2023-11-24 11:20:56 +02:00
perfschema Merge 11.2 into 11.3 2024-01-10 15:30:21 +02:00
perfschema_stress
period
plugins Merge branch '11.0' into 11.1 2023-12-19 20:11:54 +01:00
roles Merge 11.0 into 11.1 2023-11-24 15:58:35 +02:00
rpl Merge branch '11.2' into 11.3 2023-12-21 02:14:59 +01:00
s3 Merge branch '11.1' into 11.2 2023-12-20 23:43:05 +01:00
sql_sequence Merge 10.6 into 10.11 2023-12-20 15:58:36 +02:00
storage_engine
stress
sys_vars Merge branch '11.2' into 11.3 2023-12-21 02:14:59 +01:00
sysschema Merge 10.11 into 11.0 2023-12-20 16:05:20 +02:00
unit
vcol Merge branch '11.2' into 11.3 2023-12-21 02:14:59 +01:00
versioning MDEV-32148 Inefficient WHERE timestamp_column=datetime_const_expr 2024-01-12 15:24:05 +04:00
wsrep Merge 11.2 into 11.3 2024-01-05 14:20:35 +02:00