1 #ifndef FAKE_COSTMODEL_CC_INCLUDED
2 #define FAKE_COSTMODEL_CC_INCLUDED
3
4 /*
5 Copyright (c) 2014, 2021, Oracle and/or its affiliates.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License, version 2.0,
9 as published by the Free Software Foundation.
10
11 This program is also distributed with certain software (including
12 but not limited to OpenSSL) that is licensed under separate terms,
13 as designated in a particular file or component or in included license
14 documentation. The authors of MySQL hereby grant you an additional
15 permission to link the program and your derivative works with the
16 separately licensed software that they have included with MySQL.
17
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License, version 2.0, for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software Foundation,
25 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
26
27 #include "fake_costmodel.h"
28
~Cost_model_server()29 Cost_model_server::~Cost_model_server()
30 {
31 }
32
33 const double Server_cost_constants::KEY_COMPARE_COST= 0.1;
34 const double Server_cost_constants::MEMORY_TEMPTABLE_CREATE_COST= 2.0;
35 const double Server_cost_constants::MEMORY_TEMPTABLE_ROW_COST= 0.2;
36 const double Server_cost_constants::DISK_TEMPTABLE_CREATE_COST= 40.0;
37 const double Server_cost_constants::DISK_TEMPTABLE_ROW_COST= 1.0;
38 const double Server_cost_constants::ROW_EVALUATE_COST= 0.2;
39 const double SE_cost_constants::MEMORY_BLOCK_READ_COST= 1.0;
40 const double SE_cost_constants::IO_BLOCK_READ_COST= 1.0;
41
42 /* purecov: begin inspected */
43 const SE_cost_constants
get_se_cost_constants(const TABLE * table) const44 *Cost_model_constants::get_se_cost_constants(const TABLE *table) const
45 {
46 // This is only implemented in order to link the unit tests
47 assert(false);
48 return NULL;
49 }
50 /* purecov: end */
51
52 /* purecov: begin inspected */
set(const LEX_CSTRING & name,const double value,bool default_value)53 cost_constant_error SE_cost_constants::set(const LEX_CSTRING &name,
54 const double value,
55 bool default_value)
56 {
57 // This is only implemented in order to link the unit tests
58 assert(false);
59 return COST_CONSTANT_OK;
60 }
61 /* purecov: end */
62
63 /* purecov: begin inspected */
~Cost_model_se_info()64 Cost_model_se_info::~Cost_model_se_info()
65 {
66 // This is only implemented in order to link the unit tests
67 assert(false);
68 }
69 /* purecov: end */
70
71 /* purecov: begin inspected */
~Cost_model_constants()72 Cost_model_constants::~Cost_model_constants()
73 {
74 // This is only implemented in order to link the unit tests
75 assert(false);
76 }
77 /* purecov: end */
78
79 /* purecov: begin inspected */
find_handler_slot_from_name(THD * thd,const LEX_CSTRING & name) const80 uint Cost_model_constants::find_handler_slot_from_name(THD *thd,
81 const LEX_CSTRING &name) const
82 {
83 // This is only implemented in order to link the unit tests
84 assert(false);
85 return 0;
86 }
87 /* purecov: end */
88
89 #endif /* FAKE_COSTMODEL_CC_INCLUDED */
90