~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/include/row0sel.ic

  • Committer: Brian Aker
  • Date: 2009-01-06 23:40:50 UTC
  • mfrom: (642.1.69 drizzle-clean-code)
  • Revision ID: brian@tangent.org-20090106234050-w01lo5f4r3q62nik
Finished merge for Lee

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*****************************************************************************
2
 
 
3
 
Copyright (c) 1997, 2009, Innobase Oy. All Rights Reserved.
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 as published by the Free Software
7
 
Foundation; version 2 of the License.
8
 
 
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.
12
 
 
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
16
 
 
17
 
*****************************************************************************/
18
 
 
19
 
/**************************************************//**
20
 
@file include/row0sel.ic
 
1
/******************************************************
21
2
Select
22
3
 
 
4
(c) 1997 Innobase Oy
 
5
 
23
6
Created 12/19/1997 Heikki Tuuri
24
7
*******************************************************/
25
8
 
26
9
#include "que0que.h"
27
10
 
28
 
/*********************************************************************//**
29
 
Gets the plan node for the nth table in a join.
30
 
@return plan node */
 
11
/*************************************************************************
 
12
Gets the plan node for the nth table in a join. */
31
13
UNIV_INLINE
32
14
plan_t*
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 */
 
17
                                /* out: plan node */
 
18
        sel_node_t*     node,   /* in: select node */
 
19
        ulint           i)      /* in: get ith plan node */
37
20
{
38
21
        ut_ad(i < node->n_tables);
39
22
 
40
23
        return(node->plans + i);
41
24
}
42
25
 
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. */
48
31
void
49
32
sel_node_reset_cursor(
50
33
/*==================*/
51
 
        sel_node_t*     node)   /*!< in: select node */
 
34
        sel_node_t*     node)   /* in: select node */
52
35
{
53
36
        node->state = SEL_NODE_OPEN;
54
37
}
55
38
 
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. */
59
41
UNIV_INLINE
60
42
que_thr_t*
61
43
open_step(
62
44
/*======*/
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 */
64
47
{
65
48
        sel_node_t*     sel_node;
66
49
        open_node_t*    node;