WL#7315: Optimizer cost model: main memory management of cost constants

Affects: Parser-5.7   —   Status: Complete

The cost constants stored in the cost constant tables must be read into main
memory when the server starts and then be used by the optimizer cost model. 
This worklog will implement the
needed functionality of reading the cost constants from the cost
constant tables, maintaining these in a main memory cache and
providing the current version of them to the optimizer's cost model.
This "cost constant cache" will be shared by all running queries and
must support concurrent access and sharing of the cached cost
constants. It must also support that the cost constant tables can be
updated and re-loaded on a running server, and that after re-loading from the
cost tables, the updated version of the cost constants is used for queries on
new connections.

This worklog is implementing a part of "Replace hard-coded constants with
configurable cost constants"

User Documentation
==================

http://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-5.html
http://dev.mysql.com/doc/refman/5.7/en/cost-model.html