Valgrind warnings "Conditional jump or move depends on uninitialised value" in create_sort_index with small sort_buffer_size

Description

The failure happens in buildbot on main.order_by and main.filesort_debug tests.

The warning started appearing with the following revision:

Here is an excerpt from main.order_by which causes the failure (maybe it will be easier to debug, the whole test is rather big):

Stack trace from:

Environment

None

Assignee

Sergei Golubchik

Reporter

Elena Stepanova

Labels

Fix versions

Affects versions

Priority

Major
Configure