1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-14500 filesort to support engines with slow rnd_pos

If the engine wants to avoid rnd_pos() - force a temporary table
before a filesort. But don't do it if addon_fields are used.
This commit is contained in:
Sergei Golubchik
2018-11-16 18:28:01 +01:00
parent cd29aee50d
commit f0f0d07250
8 changed files with 142 additions and 25 deletions

View File

@ -308,6 +308,13 @@ enum enum_alter_inplace_result {
#define HA_SLOW_CMP_REF (1ULL << 54)
#define HA_CMP_REF_IS_EXPENSIVE HA_SLOW_CMP_REF
/**
Some engines are unable to provide an efficient implementation for rnd_pos().
Server will try to avoid it, if possible
TODO better to do it with cost estimates, not with an explicit flag
*/
#define HA_SLOW_RND_POS (1ULL << 55)
/* bits in index_flags(index_number) for what you can do with index */
#define HA_READ_NEXT 1 /* TODO really use this flag */