Commit 05a0eae3 authored by Alexander Barkov's avatar Alexander Barkov

MDEV-22380 Assertion `name.length == strlen(name.str)' failed .. w/optimizer_trace enabled

Adding 10.4 specific tests.
parent 7b752429
...@@ -8599,5 +8599,40 @@ select count(*) from information_schema.optimizer_trace; ...@@ -8599,5 +8599,40 @@ select count(*) from information_schema.optimizer_trace;
select * from information_schema.optimizer_trace; select * from information_schema.optimizer_trace;
set max_session_mem_used=default; set max_session_mem_used=default;
# #
# MDEV-22380 Assertion `name.length == strlen(name.str)' failed in Item::print_item_w_name on SELECT w/ optimizer_trace enabled
#
SET optimizer_trace="enabled=on";
SELECT 'a\0' LIMIT 0;
a\x00
SELECT query, trace FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
query trace
SELECT 'a\0' LIMIT 0 {
"steps": [
{
"join_preparation": {
"select_id": 1,
"steps": [
{
"expanded_query": "select 'a\0' AS `a\x00` limit 0"
}
]
}
},
{
"join_optimization": {
"select_id": 1,
"steps": []
}
},
{
"join_execution": {
"select_id": 1,
"steps": []
}
}
]
}
SET optimizer_trace=DEFAULT;
#
# End of 10.4 tests # End of 10.4 tests
# #
...@@ -634,6 +634,15 @@ select * from information_schema.optimizer_trace; ...@@ -634,6 +634,15 @@ select * from information_schema.optimizer_trace;
--enable_result_log --enable_result_log
set max_session_mem_used=default; set max_session_mem_used=default;
--echo #
--echo # MDEV-22380 Assertion `name.length == strlen(name.str)' failed in Item::print_item_w_name on SELECT w/ optimizer_trace enabled
--echo #
SET optimizer_trace="enabled=on";
SELECT 'a\0' LIMIT 0;
SELECT query, trace FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
SET optimizer_trace=DEFAULT;
--echo # --echo #
--echo # End of 10.4 tests --echo # End of 10.4 tests
--echo # --echo #
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment