mariadb/libmysqld
Yuchen Pei e021770667
MDEV-34911 Sargable substr(col, 1, n) = str
Make Item_func_eq of the following forms sargable by updating the relevant range
analysis methods:

1. substr(col, 1, n) = str
2. str = substr(col, 1, n)
3. left(col, n) = str
4. str = left(col, n)

where col is a indexed column and str is a const and inexpensive item
of length n.

We do this by factoring out Item_func_like::get_mm_leaf() and apply it
to a string obtained from escaping str and then appending a wildcard
"%" to it.

The addition of the two Functype enums, LEFT_FUNC and SUBSTR_FUNC,
requires changes in the spider group by handler to continue handling
LEFT and SUBSTR correctly.

Co-authored-by: Yuchen Pei <ycp@mariadb.com>
Co-authored-by: Sergei Petrunia <sergey@mariadb.com>
2024-12-20 13:25:28 +11:00
..
examples
client_settings.h
CMakeLists.txt MDEV-34911 Sargable substr(col, 1, n) = str 2024-12-20 13:25:28 +11:00
emb_qcache.cc cleanup: remove unconditional #ifdef's 2024-11-05 14:00:47 -08:00
emb_qcache.h
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
libmysqld.rc
resource.h