mariadb/libmysqld
Sergei Petrunia 1c2a83179d MDEV-35616: Add basic optimizer support for virtual column
(Review input addressed)

After this patch, the optimizer can handle virtual column expressions
in WHERE/ON clauses. If the table has an indexed virtual column:

  ALTER TABLE t1
    ADD COLUMN vcol INT AS (col1+1),
    ADD INDEX idx1(vcol);

and the query uses the exact virtual column expression:

  SELECT * FROM t1 WHERE col1+1 <= 100

then the optimizer will be able use index idx1 for it.

This is achieved by walking the WHERE/ON clauses and replacing instances
of virtual column expression (like "col1+1" above) with virtual column's
Item_field (like "vcol"). The latter can be processed by the optimizer.

Replacement is considered (and done) only in items that are potentially
usable to the range optimizer.
2025-01-25 10:50:52 +02:00
..
examples MDEV-33091 pcre2 headers aren't found on Solaris 2024-01-19 20:23:45 +01:00
client_settings.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
CMakeLists.txt MDEV-35616: Add basic optimizer support for virtual column 2025-01-25 10:50:52 +02:00
emb_qcache.cc cleanup: remove unconditional #ifdef's 2024-11-05 14:00:47 -08:00
emb_qcache.h MDEV-19275 Provide SQL service to plugins. 2020-08-14 21:04:25 +04:00
embedded_priv.h Fixed crash in connect.misc with embedded server 2024-02-27 14:55:47 +02:00
lib_sql.cc Fixed memory leaks in embedded server and mysqltest 2024-04-05 12:40:49 +02:00
libmysql.c cleanup: get_float convenience helper 2024-11-05 14:00:47 -08:00
libmysqld.c Fixed crash in connect.misc with embedded server 2024-02-27 14:55:47 +02:00
libmysqld.def merge with 5.3 2011-10-19 21:45:18 +02:00
libmysqld.rc
resource.h