diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-05-28 11:25:45 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-05-28 11:25:45 +0300 |
commit | bf8fe324d25e27eef6a587e385d45a8ce51fee65 (patch) | |
tree | 7b0d981dec21dcbb560543260bf751a59ed32427 /sql/sql_const.h | |
parent | 626f2a1c170e615c7866c1041746159dc3f709af (diff) | |
parent | 0955462d0aafab01def9c1a5ec131eb641cb9e68 (diff) | |
download | mariadb-git-bf8fe324d25e27eef6a587e385d45a8ce51fee65.tar.gz |
Merge 5.5 into 10.1
Diffstat (limited to 'sql/sql_const.h')
-rw-r--r-- | sql/sql_const.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_const.h b/sql/sql_const.h index d0448012260..2e5844f8e3e 100644 --- a/sql/sql_const.h +++ b/sql/sql_const.h @@ -234,6 +234,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). */ |