mirror of
https://github.com/MariaDB/server.git
synced 2025-12-19 10:45:46 +01:00
Thanks to Sergei Golubchik for the idea and a working prototype of this patch.
Problem:
Inside these methods:
- Item_splocal_assoc_array_element::append_for_log()
- Item_splocal_assoc_array_element_field::append_for_log()
an expression like this:
first_names(nick || CONVERT(' ' USING ucs2)
was converted to:
first_names(nick || CONVERT(CONVERT(' ' USING ucs2) USING latin1)
i.e. an automatic CONVERT(... USING latin1) was added, as expected.
In the end of append_for_log() the destructor of
Item_change_list_savepoint_raii restored the Item changes, so
the automatically added CONVERT(..USING latin1) was removed from
the tree and the tree changed back to:
first_names(nick || CONVERT(' ' USING ucs2)
But all Item_splocal_assoc_array_element* Items were left in the fixed state.
Later, duing the INSERT, a concatenation of the SP variable `nick`
and the space character in UCS2 evaluated 'Michael\x00\x20' instead
of the expected 'Michael\x20', so the assoc array
element with the given key was not found.
Note:
Item_change_list_savepoint_raii was needed to make this DBUG_ASSERT in
sp_lex_keeper::reset_lex_and_exec_core() happy:
DBUG_ASSERT(thd->Item_change_list::is_empty());
The fix:
- Removing Item_change_list_savepoint_raii from the implementations of
Item_splocal_assoc_array_element*::append_for_log()
Removing the class Item_change_list_savepoint_raii as it's not needed
any more.
- Relaxing the DBUG_ASSERT() in sp_lex_keeper::reset_lex_and_exec_core() to:
DBUG_ASSERT(dbug_rqp_are_fixed(instr) || thd->Item_change_list::is_empty());
where dbug_rqp_are_fixed() is a new debug function to check that
all Rewritable_query_parameter's in instr::free_list are fixed.
|
||
|---|---|---|
| .. | ||
| audit_null | ||
| auth_dialog | ||
| auth_ed25519 | ||
| auth_examples | ||
| auth_gssapi | ||
| auth_pam | ||
| auth_parsec | ||
| 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 | ||
| hashicorp_key_management | ||
| locale_info | ||
| metadata_lock_info | ||
| password_reuse_check | ||
| provider_bzip2 | ||
| provider_lz4 | ||
| provider_lzma | ||
| provider_lzo | ||
| provider_snappy | ||
| qc_info | ||
| query_response_time | ||
| server_audit | ||
| simple_password_check | ||
| sql_errlog | ||
| test_sql_service | ||
| type_assoc_array | ||
| type_cursor | ||
| type_geom | ||
| type_inet | ||
| type_mysql_json | ||
| type_mysql_timestamp | ||
| type_test | ||
| type_uuid | ||
| user_variables | ||
| userstat | ||
| versioning | ||
| win_auth_client | ||
| wsrep_info | ||