summaryrefslogtreecommitdiff
path: root/sql/sql_const.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-05-29 22:17:00 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-05-29 22:17:00 +0300
commitf98bb23168ee9bc0da8aa7111f35cf2539986387 (patch)
treeb7e9c3dc28e9d1fd82eebea077f3ca0aac640218 /sql/sql_const.h
parente35676f5557d68c7b51ba47aa73dcdf72eafa436 (diff)
parente99ed820d790617a029b03d9c4ab437c246c956a (diff)
downloadmariadb-git-f98bb23168ee9bc0da8aa7111f35cf2539986387.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'sql/sql_const.h')
-rw-r--r--sql/sql_const.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_const.h b/sql/sql_const.h
index 1f9353cdef3..7aa4249f5ad 100644
--- a/sql/sql_const.h
+++ b/sql/sql_const.h
@@ -247,6 +247,14 @@
#define DISK_TEMPTABLE_LOOKUP_COST 1.0
#define SORT_INDEX_CMP_COST 0.02
+
+#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). */