MDEV-21110 Unify turn_parser_debug_on() in sql_yacc.yy and sql_yacc_ora.yy
The block defining turn_parser_debug_on() now looks similar in both sql_yacc.yy and sql_yacc_ora.yy.
This commit is contained in:
parent
747bed2e72
commit
e76edf700f
@ -7904,7 +7904,8 @@ void mysql_parse(THD *thd, char *rawbuf, uint length,
|
||||
{
|
||||
int error __attribute__((unused));
|
||||
DBUG_ENTER("mysql_parse");
|
||||
DBUG_EXECUTE_IF("parser_debug", turn_parser_debug_on(););
|
||||
DBUG_EXECUTE_IF("parser_debug", turn_parser_debug_on_MYSQLparse(););
|
||||
DBUG_EXECUTE_IF("parser_debug", turn_parser_debug_on_ORAparse(););
|
||||
|
||||
/*
|
||||
Warning.
|
||||
|
@ -390,7 +390,8 @@ enum enum_yes_no_unknown
|
||||
|
||||
/* sql_yacc.cc */
|
||||
#ifndef DBUG_OFF
|
||||
extern void turn_parser_debug_on();
|
||||
extern void turn_parser_debug_on_MYSQLparse();
|
||||
extern void turn_parser_debug_on_ORAparse();
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -153,7 +153,9 @@ static void yyerror(THD *thd, const char *s)
|
||||
|
||||
|
||||
#ifndef DBUG_OFF
|
||||
void turn_parser_debug_on()
|
||||
#define __CONCAT_UNDERSCORED(x,y) x ## _ ## y
|
||||
#define _CONCAT_UNDERSCORED(x,y) __CONCAT_UNDERSCORED(x,y)
|
||||
void _CONCAT_UNDERSCORED(turn_parser_debug_on,yyparse)()
|
||||
{
|
||||
/*
|
||||
MYSQLdebug is in sql/sql_yacc.cc, in bison generated code.
|
||||
|
@ -152,6 +152,31 @@ static void yyerror(THD *thd, const char *s)
|
||||
}
|
||||
|
||||
|
||||
#ifndef DBUG_OFF
|
||||
#define __CONCAT_UNDERSCORED(x,y) x ## _ ## y
|
||||
#define _CONCAT_UNDERSCORED(x,y) __CONCAT_UNDERSCORED(x,y)
|
||||
void _CONCAT_UNDERSCORED(turn_parser_debug_on,yyparse)()
|
||||
{
|
||||
/*
|
||||
MYSQLdebug is in sql/sql_yacc.cc, in bison generated code.
|
||||
Turning this option on is **VERY** verbose, and should be
|
||||
used when investigating a syntax error problem only.
|
||||
|
||||
The syntax to run with bison traces is as follows :
|
||||
- Starting a server manually :
|
||||
mysqld --debug-dbug="d,parser_debug" ...
|
||||
- Running a test :
|
||||
mysql-test-run.pl --mysqld="--debug-dbug=d,parser_debug" ...
|
||||
|
||||
The result will be in the process stderr (var/log/master.err)
|
||||
*/
|
||||
|
||||
extern int yydebug;
|
||||
yydebug= 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#define bincmp_collation(X,Y) \
|
||||
do \
|
||||
{ \
|
||||
|
Loading…
x
Reference in New Issue
Block a user