Fixed (non crtitial) memory segment overrun

This was discovered as part of adding a protected memory area between
each area allocated by multi_alloc().

The patch that adds the protection will be pushed in 10.5.
This patch adds fixes that are unique for 10.10
This commit is contained in:
Monty 2023-02-26 18:25:31 +02:00
parent 6f6fa3bec2
commit 3b9e8dfa84

View file

@ -5312,7 +5312,7 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
/* Initialize POSITION objects */ /* Initialize POSITION objects */
for (i=0 ; i <= table_count ; i++) for (i=0 ; i <= table_count ; i++)
(void) new ((char*) (join->positions + i)) POSITION; (void) new ((char*) (join->positions + i)) POSITION;
for (i=0 ; i <= sort_space ; i++) for (i=0 ; i < sort_space ; i++)
(void) new ((char*) (join->sort_positions + i)) POSITION; (void) new ((char*) (join->sort_positions + i)) POSITION;
join->best_ref= stat_vector; join->best_ref= stat_vector;