Skip to content

Commit 05a0eae

Browse files
committed
MDEV-22380 Assertion `name.length == strlen(name.str)' failed .. w/optimizer_trace enabled
Adding 10.4 specific tests.
1 parent 7b75242 commit 05a0eae

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

mysql-test/main/opt_trace.result

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8599,5 +8599,40 @@ select count(*) from information_schema.optimizer_trace;
85998599
select * from information_schema.optimizer_trace;
86008600
set max_session_mem_used=default;
86018601
#
8602+
# MDEV-22380 Assertion `name.length == strlen(name.str)' failed in Item::print_item_w_name on SELECT w/ optimizer_trace enabled
8603+
#
8604+
SET optimizer_trace="enabled=on";
8605+
SELECT 'a\0' LIMIT 0;
8606+
a\x00
8607+
SELECT query, trace FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
8608+
query trace
8609+
SELECT 'a\0' LIMIT 0 {
8610+
"steps": [
8611+
{
8612+
"join_preparation": {
8613+
"select_id": 1,
8614+
"steps": [
8615+
{
8616+
"expanded_query": "select 'a\0' AS `a\x00` limit 0"
8617+
}
8618+
]
8619+
}
8620+
},
8621+
{
8622+
"join_optimization": {
8623+
"select_id": 1,
8624+
"steps": []
8625+
}
8626+
},
8627+
{
8628+
"join_execution": {
8629+
"select_id": 1,
8630+
"steps": []
8631+
}
8632+
}
8633+
]
8634+
}
8635+
SET optimizer_trace=DEFAULT;
8636+
#
86028637
# End of 10.4 tests
86038638
#

mysql-test/main/opt_trace.test

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,15 @@ select * from information_schema.optimizer_trace;
634634
--enable_result_log
635635
set max_session_mem_used=default;
636636

637+
--echo #
638+
--echo # MDEV-22380 Assertion `name.length == strlen(name.str)' failed in Item::print_item_w_name on SELECT w/ optimizer_trace enabled
639+
--echo #
640+
641+
SET optimizer_trace="enabled=on";
642+
SELECT 'a\0' LIMIT 0;
643+
SELECT query, trace FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
644+
SET optimizer_trace=DEFAULT;
645+
637646
--echo #
638647
--echo # End of 10.4 tests
639648
--echo #

0 commit comments

Comments
 (0)