Debian Codegraph @

storage/innobase/include/pars0opt.h

raw
1 /*****************************************************************************
2
3 Copyright (c) 1997, 2026, Oracle and/or its affiliates.
4
5 This program is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License, version 2.0, as published by the
7 Free Software Foundation.
8
9 This program is designed to work with certain software (including
10 but not limited to OpenSSL) that is licensed under separate terms,
11 as designated in a particular file or component or in included license
12 documentation. The authors of MySQL hereby grant you an additional
13 permission to link the program and your derivative works with the
14 separately licensed software that they have either included with
15 the program or referenced in the documentation.
16
17 This program is distributed in the hope that it will be useful, but WITHOUT
18 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19 FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
20 for more details.
21
22 You should have received a copy of the GNU General Public License along with
23 this program; if not, write to the Free Software Foundation, Inc.,
24 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
26 *****************************************************************************/
27
28 /** @file include/pars0opt.h
29 Simple SQL optimizer
30
31 Created 12/21/1997 Heikki Tuuri
32 *******************************************************/
33
34 #ifndef pars0opt_h
35 #define pars0opt_h
36
37 #include "dict0types.h"
38 #include "pars0sym.h"
39 #include "que0types.h"
40 #include "row0sel.h"
41 #include "univ.i"
42 #include "usr0types.h"
43
44 /** Optimizes a select. Decides which indexes to tables to use. The tables
45 are accessed in the order that they were written to the FROM part in the
46 select statement. */
47 void opt_search_plan(sel_node_t *sel_node); /*!< in: parsed select node */
48 /** Looks for occurrences of the columns of the table in the query subgraph and
49 adds them to the list of columns if an occurrence of the same column does not
50 already exist in the list. If the column is already in the list, puts a value
51 indirection to point to the occurrence in the column list, except if the
52 column occurrence we are looking at is in the column list, in which case
53 nothing is done. */
54 void opt_find_all_cols(
55 bool copy_val, /*!< in: if true, new found columns are
56 added as columns to copy */
57 dict_index_t *index, /*!< in: index to use */
58 sym_node_list_t *col_list, /*!< in: base node of a list where
59 to add new found columns */
60 plan_t *plan, /*!< in: plan or NULL */
61 que_node_t *exp); /*!< in: expression or condition */
62
63 #endif