mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
405613ebb5
The `Item` class methods `get_copy()`, `build_clone()`, and `clone_item()` face an issue where they may be defined in a descendant class (e.g., `Item_func`) but not in a further descendant (e.g., `Item_func_child`). This can lead to scenarios where `build_clone()`, when operating on an instance of `Item_func_child` with a pointer to the base class (`Item`), returns an instance of `Item_func` instead of `Item_func_child`. Since this limitation cannot be resolved at compile time, this commit introduces runtime type checks for the copy/clone operations. A debug assertion will now trigger in case of a type mismatch. `get_copy()`, `build_clone()`, and `clone_item()` are no more virtual, but virtual `do_get_copy()`, `do_build_clone()`, and `do_clone_item()` are added to the protected section of the class `Item`. Additionally, const qualifiers have been added to certain methods to enhance code reliability. Reviewer: Oleksandr Byelkin <sanja@mariadb.com> |
||
---|---|---|
.. | ||
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_test | ||
user_variables | ||
userstat | ||
versioning | ||
win_auth_client | ||
wsrep_info |