MySQL  8.0.19
Source Code Documentation
sql_test.h
Go to the documentation of this file.
1 /* Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved.
2 
3  This program is free software; you can redistribute it and/or modify
4  it under the terms of the GNU General Public License, version 2.0,
5  as published by the Free Software Foundation.
6 
7  This program is also distributed with certain software (including
8  but not limited to OpenSSL) that is licensed under separate terms,
9  as designated in a particular file or component or in included license
10  documentation. The authors of MySQL hereby grant you an additional
11  permission to link the program and your derivative works with the
12  separately licensed software that they have included with MySQL.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License, version 2.0, for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22 
23 #ifndef SQL_TEST_INCLUDED
24 #define SQL_TEST_INCLUDED
25 
26 #include <sys/types.h>
27 
28 #include "sql/enum_query_type.h" // enum_query_type
29 #include "sql/mem_root_array.h" // Mem_root_array
30 #include "sql/sql_lex.h"
31 #include "sql/sql_select.h"
32 #include "thr_lock.h" // TL_WRITE_ONLY
33 
34 class Item;
35 class JOIN;
36 struct TABLE_LIST;
37 
39 
40 extern const char *lock_descriptions[TL_WRITE_ONLY + 1];
41 
42 #ifndef DBUG_OFF
43 void print_where(const THD *thd, const Item *cond, const char *info,
44  enum_query_type query_type);
45 void TEST_join(JOIN *join);
46 void print_plan(JOIN *join, uint idx, double record_count, double read_time,
47  double current_read_time, const char *info);
49 #endif
50 void mysql_print_status();
51 class Opt_trace_context;
52 
54  const Key_use_array *keyuse_array);
55 #endif /* SQL_TEST_INCLUDED */
Item
Definition: item.h:665
THD
Definition: sql_class.h:764
Key_use_array
Mem_root_array< Key_use > Key_use_array
Definition: sql_test.h:36
Mem_root_array< Key_use >
sql_lex.h
Opt_trace_context
Definition: opt_trace_context.h:88
dump_TABLE_LIST_graph
void dump_TABLE_LIST_graph(SELECT_LEX *select_lex, TABLE_LIST *tl)
mysql_harness::join
std::string join(Container cont, const std::string &delim)
join elements of an container into a string seperated by a delimiter.
Definition: string.h:144
print_plan
void print_plan(JOIN *join, uint idx, double record_count, double read_time, double current_read_time, const char *info)
Print the current state during query optimization.
Definition: sql_test.cc:228
enum_query_type.h
JOIN
Definition: sql_optimizer.h:174
TABLE_LIST::select_lex
SELECT_LEX * select_lex
Definition: table.h:3263
sql_select.h
uint
unsigned int uint
Definition: uca-dump.cc:29
TABLE_LIST
Definition: table.h:2467
TL_WRITE_ONLY
@ TL_WRITE_ONLY
Definition: thr_lock.h:93
print_keyuse_array
void print_keyuse_array(Opt_trace_context *trace, const Key_use_array *keyuse_array)
Definition: sql_test.cc:173
enum_query_type
enum_query_type
Query type constants (usable as bitmap flags).
Definition: enum_query_type.h:30
print_where
void print_where(const THD *thd, const Item *cond, const char *info, enum_query_type query_type)
Definition: sql_test.cc:93
TEST_join
void TEST_join(JOIN *join)
Definition: sql_test.cc:122
mysql_print_status
void mysql_print_status()
Definition: sql_test.cc:428
lock_descriptions
const char * lock_descriptions[TL_WRITE_ONLY+1]
Definition: sql_test.cc:76
thr_lock.h
SELECT_LEX
This class represents a query block, aka a query specification, which is a query consisting of a SELE...
Definition: sql_lex.h:986
mem_root_array.h
info
Log info(cout, "NOTE")