1
/*****************************************************************************
3
Copyright (C) 1997, 2009, Innobase Oy. All Rights Reserved.
5
This program is free software; you can redistribute it and/or modify it under
6
the terms of the GNU General Public License as published by the Free Software
7
Foundation; version 2 of the License.
9
This program is distributed in the hope that it will be useful, but WITHOUT
10
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
13
You should have received a copy of the GNU General Public License along with
14
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15
St, Fifth Floor, Boston, MA 02110-1301 USA
17
*****************************************************************************/
19
/**************************************************//**
20
@file include/pars0opt.h
23
Created 12/21/1997 Heikki Tuuri
24
*******************************************************/
30
#include "que0types.h"
31
#include "usr0types.h"
33
#include "dict0types.h"
36
/*******************************************************************//**
37
Optimizes a select. Decides which indexes to tables to use. The tables
38
are accessed in the order that they were written to the FROM part in the
44
sel_node_t* sel_node); /*!< in: parsed select node */
45
/*******************************************************************//**
46
Looks for occurrences of the columns of the table in the query subgraph and
47
adds them to the list of columns if an occurrence of the same column does not
48
already exist in the list. If the column is already in the list, puts a value
49
indirection to point to the occurrence in the column list, except if the
50
column occurrence we are looking at is in the column list, in which case
56
ibool copy_val, /*!< in: if TRUE, new found columns are
57
added as columns to copy */
58
dict_index_t* index, /*!< in: index to use */
59
sym_node_list_t* col_list, /*!< in: base node of a list where
60
to add new found columns */
61
plan_t* plan, /*!< in: plan or NULL */
62
que_node_t* exp); /*!< in: expression or condition */
63
/********************************************************************//**
64
Prints info of a query plan. */
69
sel_node_t* sel_node); /*!< in: select node */
72
#include "pars0opt.ic"