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., 59 Temple
15
Place, Suite 330, Boston, MA 02111-1307 USA
17
*****************************************************************************/
19
/**************************************************//**
20
@file include/row0sel.ic
1
/******************************************************
23
6
Created 12/19/1997 Heikki Tuuri
24
7
*******************************************************/
26
9
#include "que0que.h"
28
/*********************************************************************//**
29
Gets the plan node for the nth table in a join.
11
/*************************************************************************
12
Gets the plan node for the nth table in a join. */
33
15
sel_node_get_nth_plan(
34
16
/*==================*/
35
sel_node_t* node, /*!< in: select node */
36
ulint i) /*!< in: get ith plan node */
18
sel_node_t* node, /* in: select node */
19
ulint i) /* in: get ith plan node */
38
21
ut_ad(i < node->n_tables);
40
23
return(node->plans + i);
43
/*********************************************************************//**
26
/*************************************************************************
44
27
Resets the cursor defined by sel_node to the SEL_NODE_OPEN state, which means
45
28
that it will start fetching from the start of the result set again, regardless
46
29
of where it was before, and it will set intention locks on the tables. */
49
32
sel_node_reset_cursor(
50
33
/*==================*/
51
sel_node_t* node) /*!< in: select node */
34
sel_node_t* node) /* in: select node */
53
36
node->state = SEL_NODE_OPEN;
56
/**********************************************************************//**
57
Performs an execution step of an open or close cursor statement node.
58
@return query thread to run next or NULL */
39
/**************************************************************************
40
Performs an execution step of an open or close cursor statement node. */
63
que_thr_t* thr) /*!< in: query thread */
45
/* out: query thread to run next or NULL */
46
que_thr_t* thr) /* in: query thread */
65
48
sel_node_t* sel_node;