~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/pars/pars0sym.c

  • Committer: Monty Taylor
  • Date: 2009-08-12 06:25:19 UTC
  • mto: (1114.1.1 innodb-plugin-merge)
  • mto: This revision was merged to the branch mainline in revision 1183.
  • Revision ID: mordred@inaugust.com-20090812062519-cij02mrrunvnxblt
Tags: innodb-plugin-1.0.4
InnoDB Plugin 1.0.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
*****************************************************************************/
18
18
 
19
 
/******************************************************
 
19
/**************************************************//**
 
20
@file pars/pars0sym.c
20
21
SQL parser symbol table
21
22
 
22
23
Created 12/15/1997 Heikki Tuuri
37
38
#include "eval0eval.h"
38
39
#include "row0sel.h"
39
40
 
40
 
/**********************************************************************
41
 
Creates a symbol table for a single stored procedure or query. */
 
41
/******************************************************************//**
 
42
Creates a symbol table for a single stored procedure or query.
 
43
@return own: symbol table */
42
44
UNIV_INTERN
43
45
sym_tab_t*
44
46
sym_tab_create(
45
47
/*===========*/
46
 
                                /* out, own: symbol table */
47
 
        mem_heap_t*     heap)   /* in: memory heap where to create */
 
48
        mem_heap_t*     heap)   /*!< in: memory heap where to create */
48
49
{
49
50
        sym_tab_t*      sym_tab;
50
51
 
58
59
        return(sym_tab);
59
60
}
60
61
 
61
 
/**********************************************************************
 
62
/******************************************************************//**
62
63
Frees the memory allocated dynamically AFTER parsing phase for variables
63
64
etc. in the symbol table. Does not free the mem heap where the table was
64
65
originally created. Frees also SQL explicit cursor definitions. */
66
67
void
67
68
sym_tab_free_private(
68
69
/*=================*/
69
 
        sym_tab_t*      sym_tab)        /* in, own: symbol table */
 
70
        sym_tab_t*      sym_tab)        /*!< in, own: symbol table */
70
71
{
71
72
        sym_node_t*     sym;
72
73
        func_node_t*    func;
96
97
        }
97
98
}
98
99
 
99
 
/**********************************************************************
100
 
Adds an integer literal to a symbol table. */
 
100
/******************************************************************//**
 
101
Adds an integer literal to a symbol table.
 
102
@return symbol table node */
101
103
UNIV_INTERN
102
104
sym_node_t*
103
105
sym_tab_add_int_lit(
104
106
/*================*/
105
 
                                        /* out: symbol table node */
106
 
        sym_tab_t*      sym_tab,        /* in: symbol table */
107
 
        ulint           val)            /* in: integer value */
 
107
        sym_tab_t*      sym_tab,        /*!< in: symbol table */
 
108
        ulint           val)            /*!< in: integer value */
108
109
{
109
110
        sym_node_t*     node;
110
111
        byte*           data;
136
137
        return(node);
137
138
}
138
139
 
139
 
/**********************************************************************
140
 
Adds a string literal to a symbol table. */
 
140
/******************************************************************//**
 
141
Adds a string literal to a symbol table.
 
142
@return symbol table node */
141
143
UNIV_INTERN
142
144
sym_node_t*
143
145
sym_tab_add_str_lit(
144
146
/*================*/
145
 
                                        /* out: symbol table node */
146
 
        sym_tab_t*      sym_tab,        /* in: symbol table */
147
 
        byte*           str,            /* in: string with no quotes around
 
147
        sym_tab_t*      sym_tab,        /*!< in: symbol table */
 
148
        byte*           str,            /*!< in: string with no quotes around
148
149
                                        it */
149
 
        ulint           len)            /* in: string length */
 
150
        ulint           len)            /*!< in: string length */
150
151
{
151
152
        sym_node_t*     node;
152
153
        byte*           data;
183
184
        return(node);
184
185
}
185
186
 
186
 
/**********************************************************************
187
 
Add a bound literal to a symbol table. */
 
187
/******************************************************************//**
 
188
Add a bound literal to a symbol table.
 
189
@return symbol table node */
188
190
UNIV_INTERN
189
191
sym_node_t*
190
192
sym_tab_add_bound_lit(
191
193
/*==================*/
192
 
                                        /* out: symbol table node */
193
 
        sym_tab_t*      sym_tab,        /* in: symbol table */
194
 
        const char*     name,           /* in: name of bound literal */
195
 
        ulint*          lit_type)       /* out: type of literal (PARS_*_LIT) */
 
194
        sym_tab_t*      sym_tab,        /*!< in: symbol table */
 
195
        const char*     name,           /*!< in: name of bound literal */
 
196
        ulint*          lit_type)       /*!< out: type of literal (PARS_*_LIT) */
196
197
{
197
198
        sym_node_t*             node;
198
199
        pars_bound_lit_t*       blit;
259
260
        return(node);
260
261
}
261
262
 
262
 
/**********************************************************************
263
 
Adds an SQL null literal to a symbol table. */
 
263
/******************************************************************//**
 
264
Adds an SQL null literal to a symbol table.
 
265
@return symbol table node */
264
266
UNIV_INTERN
265
267
sym_node_t*
266
268
sym_tab_add_null_lit(
267
269
/*=================*/
268
 
                                        /* out: symbol table node */
269
 
        sym_tab_t*      sym_tab)        /* in: symbol table */
 
270
        sym_tab_t*      sym_tab)        /*!< in: symbol table */
270
271
{
271
272
        sym_node_t*     node;
272
273
 
294
295
        return(node);
295
296
}
296
297
 
297
 
/**********************************************************************
298
 
Adds an identifier to a symbol table. */
 
298
/******************************************************************//**
 
299
Adds an identifier to a symbol table.
 
300
@return symbol table node */
299
301
UNIV_INTERN
300
302
sym_node_t*
301
303
sym_tab_add_id(
302
304
/*===========*/
303
 
                                        /* out: symbol table node */
304
 
        sym_tab_t*      sym_tab,        /* in: symbol table */
305
 
        byte*           name,           /* in: identifier name */
306
 
        ulint           len)            /* in: identifier length */
 
305
        sym_tab_t*      sym_tab,        /*!< in: symbol table */
 
306
        byte*           name,           /*!< in: identifier name */
 
307
        ulint           len)            /*!< in: identifier length */
307
308
{
308
309
        sym_node_t*     node;
309
310
 
330
331
        return(node);
331
332
}
332
333
 
333
 
/**********************************************************************
334
 
Add a bound identifier to a symbol table. */
 
334
/******************************************************************//**
 
335
Add a bound identifier to a symbol table.
 
336
@return symbol table node */
335
337
UNIV_INTERN
336
338
sym_node_t*
337
339
sym_tab_add_bound_id(
338
340
/*===========*/
339
 
                                        /* out: symbol table node */
340
 
        sym_tab_t*      sym_tab,        /* in: symbol table */
341
 
        const char*     name)           /* in: name of bound id */
 
341
        sym_tab_t*      sym_tab,        /*!< in: symbol table */
 
342
        const char*     name)           /*!< in: name of bound id */
342
343
{
343
344
        sym_node_t*             node;
344
345
        pars_bound_id_t*        bid;