mariadb/mysql-test/suite/versioning
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
..
r MDEV-32148 Inefficient WHERE timestamp_column=datetime_const_expr 2024-01-12 15:24:05 +04:00
t MDEV-32148 Inefficient WHERE timestamp_column=datetime_const_expr 2024-01-12 15:24:05 +04:00
common.inc Merge branch '10.6' into 10.9 2023-08-04 08:01:06 +02:00
common.opt
common_finish.inc Merge branch '10.6' into 10.9 2023-08-04 08:01:06 +02:00
disabled.def
engines.combinations MDEV-16937 Strict SQL with system versioned tables causes issues (10.4) 2020-05-29 11:45:19 +03:00
engines.inc
innodb.combinations
innodb.inc
key_type.combinations versioning test suite fixes 2019-10-10 00:20:34 +03:00
key_type.inc versioning test suite fixes 2019-10-10 00:20:34 +03:00
wait_system_clock.inc