mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-18479 Assertion `join->best_read < double(1.79769313486231570815e+308L)'
or server crashes in JOIN::fix_all_splittings_in_plan after EXPLAIN This patch resolves the problem of overflowing when performing calculations to estimate the cost of an evaluated query execution plan. The overflowing in a non-debug build could cause different kind of problems uncluding crashes of the server.
This commit is contained in:
@ -214,6 +214,14 @@
|
||||
#define HEAP_TEMPTABLE_LOOKUP_COST 0.05
|
||||
#define DISK_TEMPTABLE_LOOKUP_COST 1.0
|
||||
|
||||
|
||||
#define COST_MAX (DBL_MAX * (1.0 - DBL_EPSILON))
|
||||
|
||||
#define COST_ADD(c,d) (COST_MAX - (d) > (c) ? (c) + (d) : COST_MAX)
|
||||
|
||||
#define COST_MULT(c,f) (COST_MAX / (f) > (c) ? (c) * (f) : COST_MAX)
|
||||
|
||||
|
||||
#define MY_CHARSET_BIN_MB_MAXLEN 1
|
||||
|
||||
/** Don't pack string keys shorter than this (if PACK_KEYS=1 isn't used). */
|
||||
|
Reference in New Issue
Block a user