mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
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:
@ -7904,7 +7904,8 @@ void mysql_parse(THD *thd, char *rawbuf, uint length,
|
|||||||
{
|
{
|
||||||
int error __attribute__((unused));
|
int error __attribute__((unused));
|
||||||
DBUG_ENTER("mysql_parse");
|
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.
|
Warning.
|
||||||
|
@ -390,7 +390,8 @@ enum enum_yes_no_unknown
|
|||||||
|
|
||||||
/* sql_yacc.cc */
|
/* sql_yacc.cc */
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
extern void turn_parser_debug_on();
|
extern void turn_parser_debug_on_MYSQLparse();
|
||||||
|
extern void turn_parser_debug_on_ORAparse();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -153,7 +153,9 @@ static void yyerror(THD *thd, const char *s)
|
|||||||
|
|
||||||
|
|
||||||
#ifndef DBUG_OFF
|
#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.
|
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) \
|
#define bincmp_collation(X,Y) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
|
Reference in New Issue
Block a user