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
6a8e2a9c
Commit
6a8e2a9c
authored
Nov 30, 2002
by
pem@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass thd as an argument to yylex().
parent
87fbeb40
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
sql/sql_lex.cc
sql/sql_lex.cc
+2
-2
sql/sql_yacc.yy
sql/sql_yacc.yy
+5
-3
No files found.
sql/sql_lex.cc
View file @
6a8e2a9c
...
...
@@ -442,13 +442,13 @@ inline static uint int_token(const char *str,uint length)
// STATE_OPERATOR_OR_IDENT ; last state was an ident, text or number
// (which can't be followed by a signed number)
int
yylex
(
void
*
arg
)
int
yylex
(
void
*
arg
,
void
*
yythd
)
{
reg1
uchar
c
;
int
tokval
;
uint
length
;
enum
lex_states
state
,
prev_state
;
LEX
*
lex
=
current_lex
;
LEX
*
lex
=
&
(((
THD
*
)
yythd
)
->
lex
)
;
YYSTYPE
*
yylval
=
(
YYSTYPE
*
)
arg
;
lex
->
yylval
=
yylval
;
// The global state
...
...
sql/sql_yacc.yy
View file @
6a8e2a9c
...
...
@@ -17,10 +17,12 @@
/* sql_yacc.yy */
%{
/* Pass thd as an arg to yyparse(). The type will be void*, so it
** must be cast to (THD*) when used. Use the YYTHD macro for this.
/* thd is passed as an arg to yyparse(), and subsequently to yylex().
** The type will be void*, so it must be cast to (THD*) when used.
** Use the YYTHD macro for this.
*/
#define YYPARSE_PARAM yythd
#define YYLEX_PARAM yythd
#define YYTHD ((THD *)yythd)
#define MYSQL_YACC
...
...
@@ -37,7 +39,7 @@
#include <myisammrg.h>
extern void yyerror(const char*);
int yylex(void *yylval);
int yylex(void *yylval
, void *yythd
);
#define yyoverflow(A,B,C,D,E,F) if (my_yyoverflow((B),(D),(int*) (F))) { yyerror((char*) (A)); return 2; }
...
...
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