Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
a9c1508d
Commit
a9c1508d
authored
Aug 23, 2002
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
merge with 3.23 tree
parents
7dac7062
fb3f13aa
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1465 additions
and
6244 deletions
+1465
-6244
Docs/manual.texi
Docs/manual.texi
+2
-0
innobase/configure.in
innobase/configure.in
+2
-2
innobase/include/pars0grm.h
innobase/include/pars0grm.h
+84
-84
innobase/pars/lexyy.c
innobase/pars/lexyy.c
+889
-5777
innobase/pars/pars0grm.c
innobase/pars/pars0grm.c
+371
-291
innobase/pars/pars0grm.h
innobase/pars/pars0grm.h
+84
-84
innobase/pars/pars0grm.y
innobase/pars/pars0grm.y
+7
-3
innobase/pars/pars0lex.l
innobase/pars/pars0lex.l
+26
-3
No files found.
Docs/manual.texi
View file @
a9c1508d
...
@@ -51007,6 +51007,8 @@ not yet 100% confident in this code.
...
@@ -51007,6 +51007,8 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.53
@appendixsubsec Changes in release 3.23.53
@itemize @bullet
@itemize @bullet
@item
@item
Fixed problem with @code{configure ... --localstatedir=...}.
@item
Fixed problem with @code{UNSIGNED BIGINT} on AIX (again).
Fixed problem with @code{UNSIGNED BIGINT} on AIX (again).
@item
@item
Fixed bug in pthread_mutex_trylock() on HPUX 11.0
Fixed bug in pthread_mutex_trylock() on HPUX 11.0
innobase/configure.in
View file @
a9c1508d
...
@@ -97,8 +97,8 @@ case "$target_os" in
...
@@ -97,8 +97,8 @@ case "$target_os" in
sysv5uw7*)
sysv5uw7*)
# Problem when linking on SCO
# Problem when linking on SCO
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
openbsd*)
openbsd*)
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
esac
esac
case "$target" in
case "$target" in
...
...
innobase/include/pars0grm.h
View file @
a9c1508d
#ifndef YYSTYPE
#ifndef YYSTYPE
#define YYSTYPE int
#define YYSTYPE int
#endif
#endif
#define PARS_INT_LIT 25
8
#define PARS_INT_LIT 25
7
#define PARS_FLOAT_LIT 25
9
#define PARS_FLOAT_LIT 25
8
#define PARS_STR_LIT 2
60
#define PARS_STR_LIT 2
59
#define PARS_NULL_LIT 26
1
#define PARS_NULL_LIT 26
0
#define PARS_ID_TOKEN 26
2
#define PARS_ID_TOKEN 26
1
#define PARS_AND_TOKEN 26
3
#define PARS_AND_TOKEN 26
2
#define PARS_OR_TOKEN 26
4
#define PARS_OR_TOKEN 26
3
#define PARS_NOT_TOKEN 26
5
#define PARS_NOT_TOKEN 26
4
#define PARS_GE_TOKEN 26
6
#define PARS_GE_TOKEN 26
5
#define PARS_LE_TOKEN 26
7
#define PARS_LE_TOKEN 26
6
#define PARS_NE_TOKEN 26
8
#define PARS_NE_TOKEN 26
7
#define PARS_PROCEDURE_TOKEN 26
9
#define PARS_PROCEDURE_TOKEN 26
8
#define PARS_IN_TOKEN 2
70
#define PARS_IN_TOKEN 2
69
#define PARS_OUT_TOKEN 27
1
#define PARS_OUT_TOKEN 27
0
#define PARS_INT_TOKEN 27
2
#define PARS_INT_TOKEN 27
1
#define PARS_INTEGER_TOKEN 27
3
#define PARS_INTEGER_TOKEN 27
2
#define PARS_FLOAT_TOKEN 27
4
#define PARS_FLOAT_TOKEN 27
3
#define PARS_CHAR_TOKEN 27
5
#define PARS_CHAR_TOKEN 27
4
#define PARS_IS_TOKEN 27
6
#define PARS_IS_TOKEN 27
5
#define PARS_BEGIN_TOKEN 27
7
#define PARS_BEGIN_TOKEN 27
6
#define PARS_END_TOKEN 27
8
#define PARS_END_TOKEN 27
7
#define PARS_IF_TOKEN 27
9
#define PARS_IF_TOKEN 27
8
#define PARS_THEN_TOKEN 2
80
#define PARS_THEN_TOKEN 2
79
#define PARS_ELSE_TOKEN 28
1
#define PARS_ELSE_TOKEN 28
0
#define PARS_ELSIF_TOKEN 28
2
#define PARS_ELSIF_TOKEN 28
1
#define PARS_LOOP_TOKEN 28
3
#define PARS_LOOP_TOKEN 28
2
#define PARS_WHILE_TOKEN 28
4
#define PARS_WHILE_TOKEN 28
3
#define PARS_RETURN_TOKEN 28
5
#define PARS_RETURN_TOKEN 28
4
#define PARS_SELECT_TOKEN 28
6
#define PARS_SELECT_TOKEN 28
5
#define PARS_SUM_TOKEN 28
7
#define PARS_SUM_TOKEN 28
6
#define PARS_COUNT_TOKEN 28
8
#define PARS_COUNT_TOKEN 28
7
#define PARS_DISTINCT_TOKEN 28
9
#define PARS_DISTINCT_TOKEN 28
8
#define PARS_FROM_TOKEN 2
90
#define PARS_FROM_TOKEN 2
89
#define PARS_WHERE_TOKEN 29
1
#define PARS_WHERE_TOKEN 29
0
#define PARS_FOR_TOKEN 29
2
#define PARS_FOR_TOKEN 29
1
#define PARS_DDOT_TOKEN 29
3
#define PARS_DDOT_TOKEN 29
2
#define PARS_CONSISTENT_TOKEN 29
4
#define PARS_CONSISTENT_TOKEN 29
3
#define PARS_READ_TOKEN 29
5
#define PARS_READ_TOKEN 29
4
#define PARS_ORDER_TOKEN 29
6
#define PARS_ORDER_TOKEN 29
5
#define PARS_BY_TOKEN 29
7
#define PARS_BY_TOKEN 29
6
#define PARS_ASC_TOKEN 29
8
#define PARS_ASC_TOKEN 29
7
#define PARS_DESC_TOKEN 29
9
#define PARS_DESC_TOKEN 29
8
#define PARS_INSERT_TOKEN
300
#define PARS_INSERT_TOKEN
299
#define PARS_INTO_TOKEN 30
1
#define PARS_INTO_TOKEN 30
0
#define PARS_VALUES_TOKEN 30
2
#define PARS_VALUES_TOKEN 30
1
#define PARS_UPDATE_TOKEN 30
3
#define PARS_UPDATE_TOKEN 30
2
#define PARS_SET_TOKEN 30
4
#define PARS_SET_TOKEN 30
3
#define PARS_DELETE_TOKEN 30
5
#define PARS_DELETE_TOKEN 30
4
#define PARS_CURRENT_TOKEN 30
6
#define PARS_CURRENT_TOKEN 30
5
#define PARS_OF_TOKEN 30
7
#define PARS_OF_TOKEN 30
6
#define PARS_CREATE_TOKEN 30
8
#define PARS_CREATE_TOKEN 30
7
#define PARS_TABLE_TOKEN 30
9
#define PARS_TABLE_TOKEN 30
8
#define PARS_INDEX_TOKEN 3
10
#define PARS_INDEX_TOKEN 3
09
#define PARS_UNIQUE_TOKEN 31
1
#define PARS_UNIQUE_TOKEN 31
0
#define PARS_CLUSTERED_TOKEN 31
2
#define PARS_CLUSTERED_TOKEN 31
1
#define PARS_DOES_NOT_FIT_IN_MEM_TOKEN 31
3
#define PARS_DOES_NOT_FIT_IN_MEM_TOKEN 31
2
#define PARS_ON_TOKEN 31
4
#define PARS_ON_TOKEN 31
3
#define PARS_ASSIGN_TOKEN 31
5
#define PARS_ASSIGN_TOKEN 31
4
#define PARS_DECLARE_TOKEN 31
6
#define PARS_DECLARE_TOKEN 31
5
#define PARS_CURSOR_TOKEN 31
7
#define PARS_CURSOR_TOKEN 31
6
#define PARS_SQL_TOKEN 31
8
#define PARS_SQL_TOKEN 31
7
#define PARS_OPEN_TOKEN 31
9
#define PARS_OPEN_TOKEN 31
8
#define PARS_FETCH_TOKEN 3
20
#define PARS_FETCH_TOKEN 3
19
#define PARS_CLOSE_TOKEN 32
1
#define PARS_CLOSE_TOKEN 32
0
#define PARS_NOTFOUND_TOKEN 32
2
#define PARS_NOTFOUND_TOKEN 32
1
#define PARS_TO_CHAR_TOKEN 32
3
#define PARS_TO_CHAR_TOKEN 32
2
#define PARS_TO_NUMBER_TOKEN 32
4
#define PARS_TO_NUMBER_TOKEN 32
3
#define PARS_TO_BINARY_TOKEN 32
5
#define PARS_TO_BINARY_TOKEN 32
4
#define PARS_BINARY_TO_NUMBER_TOKEN 32
6
#define PARS_BINARY_TO_NUMBER_TOKEN 32
5
#define PARS_SUBSTR_TOKEN 32
7
#define PARS_SUBSTR_TOKEN 32
6
#define PARS_REPLSTR_TOKEN 32
8
#define PARS_REPLSTR_TOKEN 32
7
#define PARS_CONCAT_TOKEN 32
9
#define PARS_CONCAT_TOKEN 32
8
#define PARS_INSTR_TOKEN 3
30
#define PARS_INSTR_TOKEN 3
29
#define PARS_LENGTH_TOKEN 33
1
#define PARS_LENGTH_TOKEN 33
0
#define PARS_SYSDATE_TOKEN 33
2
#define PARS_SYSDATE_TOKEN 33
1
#define PARS_PRINTF_TOKEN 33
3
#define PARS_PRINTF_TOKEN 33
2
#define PARS_ASSERT_TOKEN 33
4
#define PARS_ASSERT_TOKEN 33
3
#define PARS_RND_TOKEN 33
5
#define PARS_RND_TOKEN 33
4
#define PARS_RND_STR_TOKEN 33
6
#define PARS_RND_STR_TOKEN 33
5
#define PARS_ROW_PRINTF_TOKEN 33
7
#define PARS_ROW_PRINTF_TOKEN 33
6
#define PARS_COMMIT_TOKEN 33
8
#define PARS_COMMIT_TOKEN 33
7
#define PARS_ROLLBACK_TOKEN 33
9
#define PARS_ROLLBACK_TOKEN 33
8
#define PARS_WORK_TOKEN 3
40
#define PARS_WORK_TOKEN 3
39
#define NEG 34
1
#define NEG 34
0
extern
YYSTYPE
yylval
;
extern
YYSTYPE
yylval
;
innobase/pars/lexyy.c
View file @
a9c1508d
This diff is collapsed.
Click to expand it.
innobase/pars/pars0grm.c
View file @
a9c1508d
This diff is collapsed.
Click to expand it.
innobase/pars/pars0grm.h
View file @
a9c1508d
#ifndef YYSTYPE
#ifndef YYSTYPE
#define YYSTYPE int
#define YYSTYPE int
#endif
#endif
#define PARS_INT_LIT 25
8
#define PARS_INT_LIT 25
7
#define PARS_FLOAT_LIT 25
9
#define PARS_FLOAT_LIT 25
8
#define PARS_STR_LIT 2
60
#define PARS_STR_LIT 2
59
#define PARS_NULL_LIT 26
1
#define PARS_NULL_LIT 26
0
#define PARS_ID_TOKEN 26
2
#define PARS_ID_TOKEN 26
1
#define PARS_AND_TOKEN 26
3
#define PARS_AND_TOKEN 26
2
#define PARS_OR_TOKEN 26
4
#define PARS_OR_TOKEN 26
3
#define PARS_NOT_TOKEN 26
5
#define PARS_NOT_TOKEN 26
4
#define PARS_GE_TOKEN 26
6
#define PARS_GE_TOKEN 26
5
#define PARS_LE_TOKEN 26
7
#define PARS_LE_TOKEN 26
6
#define PARS_NE_TOKEN 26
8
#define PARS_NE_TOKEN 26
7
#define PARS_PROCEDURE_TOKEN 26
9
#define PARS_PROCEDURE_TOKEN 26
8
#define PARS_IN_TOKEN 2
70
#define PARS_IN_TOKEN 2
69
#define PARS_OUT_TOKEN 27
1
#define PARS_OUT_TOKEN 27
0
#define PARS_INT_TOKEN 27
2
#define PARS_INT_TOKEN 27
1
#define PARS_INTEGER_TOKEN 27
3
#define PARS_INTEGER_TOKEN 27
2
#define PARS_FLOAT_TOKEN 27
4
#define PARS_FLOAT_TOKEN 27
3
#define PARS_CHAR_TOKEN 27
5
#define PARS_CHAR_TOKEN 27
4
#define PARS_IS_TOKEN 27
6
#define PARS_IS_TOKEN 27
5
#define PARS_BEGIN_TOKEN 27
7
#define PARS_BEGIN_TOKEN 27
6
#define PARS_END_TOKEN 27
8
#define PARS_END_TOKEN 27
7
#define PARS_IF_TOKEN 27
9
#define PARS_IF_TOKEN 27
8
#define PARS_THEN_TOKEN 2
80
#define PARS_THEN_TOKEN 2
79
#define PARS_ELSE_TOKEN 28
1
#define PARS_ELSE_TOKEN 28
0
#define PARS_ELSIF_TOKEN 28
2
#define PARS_ELSIF_TOKEN 28
1
#define PARS_LOOP_TOKEN 28
3
#define PARS_LOOP_TOKEN 28
2
#define PARS_WHILE_TOKEN 28
4
#define PARS_WHILE_TOKEN 28
3
#define PARS_RETURN_TOKEN 28
5
#define PARS_RETURN_TOKEN 28
4
#define PARS_SELECT_TOKEN 28
6
#define PARS_SELECT_TOKEN 28
5
#define PARS_SUM_TOKEN 28
7
#define PARS_SUM_TOKEN 28
6
#define PARS_COUNT_TOKEN 28
8
#define PARS_COUNT_TOKEN 28
7
#define PARS_DISTINCT_TOKEN 28
9
#define PARS_DISTINCT_TOKEN 28
8
#define PARS_FROM_TOKEN 2
90
#define PARS_FROM_TOKEN 2
89
#define PARS_WHERE_TOKEN 29
1
#define PARS_WHERE_TOKEN 29
0
#define PARS_FOR_TOKEN 29
2
#define PARS_FOR_TOKEN 29
1
#define PARS_DDOT_TOKEN 29
3
#define PARS_DDOT_TOKEN 29
2
#define PARS_CONSISTENT_TOKEN 29
4
#define PARS_CONSISTENT_TOKEN 29
3
#define PARS_READ_TOKEN 29
5
#define PARS_READ_TOKEN 29
4
#define PARS_ORDER_TOKEN 29
6
#define PARS_ORDER_TOKEN 29
5
#define PARS_BY_TOKEN 29
7
#define PARS_BY_TOKEN 29
6
#define PARS_ASC_TOKEN 29
8
#define PARS_ASC_TOKEN 29
7
#define PARS_DESC_TOKEN 29
9
#define PARS_DESC_TOKEN 29
8
#define PARS_INSERT_TOKEN
300
#define PARS_INSERT_TOKEN
299
#define PARS_INTO_TOKEN 30
1
#define PARS_INTO_TOKEN 30
0
#define PARS_VALUES_TOKEN 30
2
#define PARS_VALUES_TOKEN 30
1
#define PARS_UPDATE_TOKEN 30
3
#define PARS_UPDATE_TOKEN 30
2
#define PARS_SET_TOKEN 30
4
#define PARS_SET_TOKEN 30
3
#define PARS_DELETE_TOKEN 30
5
#define PARS_DELETE_TOKEN 30
4
#define PARS_CURRENT_TOKEN 30
6
#define PARS_CURRENT_TOKEN 30
5
#define PARS_OF_TOKEN 30
7
#define PARS_OF_TOKEN 30
6
#define PARS_CREATE_TOKEN 30
8
#define PARS_CREATE_TOKEN 30
7
#define PARS_TABLE_TOKEN 30
9
#define PARS_TABLE_TOKEN 30
8
#define PARS_INDEX_TOKEN 3
10
#define PARS_INDEX_TOKEN 3
09
#define PARS_UNIQUE_TOKEN 31
1
#define PARS_UNIQUE_TOKEN 31
0
#define PARS_CLUSTERED_TOKEN 31
2
#define PARS_CLUSTERED_TOKEN 31
1
#define PARS_DOES_NOT_FIT_IN_MEM_TOKEN 31
3
#define PARS_DOES_NOT_FIT_IN_MEM_TOKEN 31
2
#define PARS_ON_TOKEN 31
4
#define PARS_ON_TOKEN 31
3
#define PARS_ASSIGN_TOKEN 31
5
#define PARS_ASSIGN_TOKEN 31
4
#define PARS_DECLARE_TOKEN 31
6
#define PARS_DECLARE_TOKEN 31
5
#define PARS_CURSOR_TOKEN 31
7
#define PARS_CURSOR_TOKEN 31
6
#define PARS_SQL_TOKEN 31
8
#define PARS_SQL_TOKEN 31
7
#define PARS_OPEN_TOKEN 31
9
#define PARS_OPEN_TOKEN 31
8
#define PARS_FETCH_TOKEN 3
20
#define PARS_FETCH_TOKEN 3
19
#define PARS_CLOSE_TOKEN 32
1
#define PARS_CLOSE_TOKEN 32
0
#define PARS_NOTFOUND_TOKEN 32
2
#define PARS_NOTFOUND_TOKEN 32
1
#define PARS_TO_CHAR_TOKEN 32
3
#define PARS_TO_CHAR_TOKEN 32
2
#define PARS_TO_NUMBER_TOKEN 32
4
#define PARS_TO_NUMBER_TOKEN 32
3
#define PARS_TO_BINARY_TOKEN 32
5
#define PARS_TO_BINARY_TOKEN 32
4
#define PARS_BINARY_TO_NUMBER_TOKEN 32
6
#define PARS_BINARY_TO_NUMBER_TOKEN 32
5
#define PARS_SUBSTR_TOKEN 32
7
#define PARS_SUBSTR_TOKEN 32
6
#define PARS_REPLSTR_TOKEN 32
8
#define PARS_REPLSTR_TOKEN 32
7
#define PARS_CONCAT_TOKEN 32
9
#define PARS_CONCAT_TOKEN 32
8
#define PARS_INSTR_TOKEN 3
30
#define PARS_INSTR_TOKEN 3
29
#define PARS_LENGTH_TOKEN 33
1
#define PARS_LENGTH_TOKEN 33
0
#define PARS_SYSDATE_TOKEN 33
2
#define PARS_SYSDATE_TOKEN 33
1
#define PARS_PRINTF_TOKEN 33
3
#define PARS_PRINTF_TOKEN 33
2
#define PARS_ASSERT_TOKEN 33
4
#define PARS_ASSERT_TOKEN 33
3
#define PARS_RND_TOKEN 33
5
#define PARS_RND_TOKEN 33
4
#define PARS_RND_STR_TOKEN 33
6
#define PARS_RND_STR_TOKEN 33
5
#define PARS_ROW_PRINTF_TOKEN 33
7
#define PARS_ROW_PRINTF_TOKEN 33
6
#define PARS_COMMIT_TOKEN 33
8
#define PARS_COMMIT_TOKEN 33
7
#define PARS_ROLLBACK_TOKEN 33
9
#define PARS_ROLLBACK_TOKEN 33
8
#define PARS_WORK_TOKEN 3
40
#define PARS_WORK_TOKEN 3
39
#define NEG 34
1
#define NEG 34
0
extern
YYSTYPE
yylval
;
extern
YYSTYPE
yylval
;
innobase/pars/pars0grm.y
View file @
a9c1508d
...
@@ -4,17 +4,21 @@ SQL parser: input file for the GNU Bison parser generator
...
@@ -4,17 +4,21 @@ SQL parser: input file for the GNU Bison parser generator
(c) 1997 Innobase Oy
(c) 1997 Innobase Oy
Created 12/14/1997 Heikki Tuuri
Created 12/14/1997 Heikki Tuuri
Published under the GPL version 2
Look from pars0lex.l for instructions how to generate the C files for
the InnoDB parser.
*******************************************************/
*******************************************************/
%{
%{
/* The value of the semantic attribute is a pointer to a query tree node
/* The value of the semantic attribute is a pointer to a query tree node
que_node_t */
que_node_t */
#define YYSTYPE que_node_t*
#define YYSTYPE que_node_t*
#include "univ.i"
#undef alloca
#define alloca mem_alloc
#define alloca mem_alloc
#include <math.h>
#include <math.h>
#include "univ.i"
#include "pars0pars.h"
#include "pars0pars.h"
#include "mem0mem.h"
#include "mem0mem.h"
#include "que0types.h"
#include "que0types.h"
...
...
innobase/pars/pars0lex.l
View file @
a9c1508d
...
@@ -4,6 +4,30 @@ SQL parser lexical analyzer: input file for the GNU Flex lexer generator
...
@@ -4,6 +4,30 @@ SQL parser lexical analyzer: input file for the GNU Flex lexer generator
(c) 1997 Innobase Oy
(c) 1997 Innobase Oy
Created 12/14/1997 Heikki Tuuri
Created 12/14/1997 Heikki Tuuri
Published under the GPL version 2
The InnoDB parser is frozen because MySQL takes care of SQL parsing.
Therefore we normally keep the InnoDB parser C files as they are, and do
not automatically generate them from pars0grm.y and pars0lex.l.
How to make the InnoDB parser and lexer C files:
1. First do
bison -d pars0grm.y
That generates pars0grm.tab.c and pars0grm.tab.h.
2. Rename pars0grm.tab.c to pars0grm.c and pars0grm.tab.h to pars0grm.h.
3. Copy pars0grm.h also to /innobase/include
4. Do
flex pars0lex.l
That generates lex.yy.c.
5. Rename lex.yy.c to lexyy.c.
These instructions seem to work at least with bison-1.28 and flex-2.5.4 on
Linux.
*******************************************************/
*******************************************************/
%{
%{
...
@@ -19,11 +43,10 @@ Created 12/14/1997 Heikki Tuuri
...
@@ -19,11 +43,10 @@ Created 12/14/1997 Heikki Tuuri
#define isatty(A) 0
#define isatty(A) 0
#define malloc(A) mem_alloc(A)
#define malloc(A) mem_alloc(A)
#define free(A) mem_free(A)
#define free(A) mem_free(A)
#define realloc(P, A) mem_realloc(P, A)
#define realloc(P, A) mem_realloc(P, A
, __FILE__, __LINE__
)
#define exit(A) ut_a(0)
#define exit(A) ut_a(0)
#define YY_INPUT(buf, result, max_size) pars_get_lex_chars(buf, &result,\
#define YY_INPUT(buf, result, max_size) pars_get_lex_chars(buf, &result, max_size)
max_size)
%}
%}
DIGIT [0-9]
DIGIT [0-9]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment