mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
a931da82fa
Search conditions were evaluated using val_int(), which was wrong. Fixing the code to use val_bool() instead. Details: - Adding a new item_base_t::IS_COND flag which marks Items used as <search condition> in WHERE, HAVING, JOIN ON, CASE WHEN clauses. The flag is at the parse time. These expressions must be evaluated using val_bool() rather than val_int(). Note, the optimizer creates more Items which are used as search conditions. Most of these items are not marked with IS_COND yet. This is OK for now, but eventually these Items can also be fixed to have the flag. - Adding a method Item::is_cond() which tests if the Item has the IS_COND flag. - Implementing Item_cache_bool. It evaluates the cached expression using val_bool() rather than val_int(). Overriding Type_handler_bool::Item_get_cache() to create Item_cache_bool. - Implementing Item::save_bool_in_field(). It uses val_bool() rather than val_int() to evaluate the expression. - Implementing Type_handler_bool::Item_save_in_field() using Item::save_bool_in_field(). - Fixing all Item_bool_func descendants to implement a virtual val_bool() rather than a virtual val_int(). - To find places where val_int() should be fixed to val_bool(), a few DBUG_ASSERT(!is_cond()) where added into val_int() implementations of selected (most frequent) classes: Item_field Item_str_func Item_datefunc Item_timefunc Item_datetimefunc Item_cache_bool Item_bool_func Item_func_hybrid_field_type Item_basic_constant descendants - Fixing all places where DBUG_ASSERT() happened during an "mtr" run to use val_bool() instead of val_int(). |
||
---|---|---|
.. | ||
audit_null | ||
auth_dialog | ||
auth_ed25519 | ||
auth_examples | ||
auth_gssapi | ||
auth_pam | ||
auth_pipe | ||
auth_socket | ||
aws_key_management | ||
cracklib_password_check | ||
daemon_example | ||
debug_key_management | ||
disks | ||
example_key_management | ||
feedback | ||
file_key_management | ||
fulltext | ||
func_test | ||
handler_socket | ||
locale_info | ||
metadata_lock_info | ||
qc_info | ||
query_response_time | ||
server_audit | ||
simple_password_check | ||
sql_errlog | ||
test_sql_service | ||
type_geom | ||
type_inet | ||
type_mysql_json | ||
type_mysql_timestamp | ||
type_test | ||
user_variables | ||
userstat | ||
versioning | ||
win_auth_client | ||
wsrep_info |