MDEV-14494 Move set_param_xxx() in sql_prepare.cc to methods in Item_param and Type_handler
- sql_prepare.cc: Moving functions set_param_xxx() as methods to Item_param - Replacing a pointer to a function Item_param::set_param_func to Type_handler based implementation: Item_param::value now derives from Type_handler_hybrid_field_type. Adding new virtual methods Type_handler::Item_param_setup_conversion() and Type_handler::Item_param_set_param_func() - Moving declaration of some Item_param members from "public:" to "private:" (CONVERSION_INFO, value, decimal_value) - Adding a new method Item_param::set_limit_clause_param(), to share duplicate code, as well as to encapsulate Item_param::value. - Adding Item_param::setup_conversion_string() and Item_param::setup_conversion_blob() to share the code for binding from a client value (mysql_stmt_bind_param), and for binding from an expression (Item). - Removing two different functions set_param_str_or_null() and set_param_str(). Adding a common method Item_param::set_param_str(). Item_param::m_empty_string_is_null, used by Item_param::set_param_str(). - Removing the call for setup_one_conversion_function() from insert_params_from_actual_params_with_log(). It's not needed, because the call for ps_param->save_in_param() makes sure to initialized all data type dependent members properly, by calling setup_conversion_string() from Type_handler_string_result::Item_param_set_from_value() and by calling setup_conversion_blob() from Type_handler_blob_common::Item_param_set_from_value() - Cleanup: removing multiplication to MY_CHARSET_BIN_MB_MAXLEN in a few places. It's 1 anyway, and will never change.
Showing
This diff is collapsed.
Please register or sign in to comment