mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
WL#3432 (Compile the Parser with a --debug --verbose option)
Corrected build issues : the build can not be conditional. to keep a unique source .tar.gz distribution.
This commit is contained in:
parent
4a22b07ed5
commit
b8a1ba1215
5 changed files with 32 additions and 27 deletions
|
@ -1667,7 +1667,6 @@ else
|
|||
CFLAGS="$OPTIMIZE_CFLAGS -DDBUG_OFF $CFLAGS"
|
||||
CXXFLAGS="$OPTIMIZE_CXXFLAGS -DDBUG_OFF $CXXFLAGS"
|
||||
fi
|
||||
AM_CONDITIONAL(MYSQL_CONF_DEBUG, test "x$with_debug" != "xno")
|
||||
|
||||
# Force static compilation to avoid linking problems/get more speed
|
||||
AC_ARG_WITH(mysqld-ldflags,
|
||||
|
|
|
@ -119,11 +119,7 @@ BUILT_SOURCES = sql_yacc.cc sql_yacc.h lex_hash.h
|
|||
EXTRA_DIST = $(BUILT_SOURCES)
|
||||
DISTCLEANFILES = lex_hash.h sql_yacc.output
|
||||
|
||||
AM_YFLAGS = -d
|
||||
|
||||
if MYSQL_CONF_DEBUG
|
||||
AM_YFLAGS += --debug --verbose
|
||||
endif
|
||||
AM_YFLAGS = -d --debug --verbose
|
||||
|
||||
mysql_tzinfo_to_sql.cc:
|
||||
rm -f mysql_tzinfo_to_sql.cc
|
||||
|
|
|
@ -1501,6 +1501,9 @@ void free_list(I_List <i_string> *list);
|
|||
|
||||
/* sql_yacc.cc */
|
||||
extern int MYSQLparse(void *thd);
|
||||
#ifndef DBUG_OFF
|
||||
extern void turn_parser_debug_on();
|
||||
#endif
|
||||
|
||||
/* frm_crypt.cc */
|
||||
#ifdef HAVE_CRYPTED_FRM
|
||||
|
|
|
@ -5776,27 +5776,6 @@ void mysql_init_multi_delete(LEX *lex)
|
|||
lex->query_tables_last= &lex->query_tables;
|
||||
}
|
||||
|
||||
#ifndef DBUG_OFF
|
||||
static void turn_parser_debug_on()
|
||||
{
|
||||
/*
|
||||
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="d,parser_debug" ...
|
||||
- Running a test :
|
||||
mysql-test-run.pl --mysqld="--debug=d,parser_debug" ...
|
||||
|
||||
The result will be in the process stderr (var/log/master.err)
|
||||
*/
|
||||
extern int MYSQLdebug;
|
||||
MYSQLdebug= 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
When you modify mysql_parse(), you may need to mofify
|
||||
mysql_test_parse_for_slave() in this same file.
|
||||
|
|
|
@ -68,6 +68,34 @@ inline Item *is_truth_value(Item *A, bool v1, bool v2)
|
|||
new Item_int((char *) (v1 ? "FALSE" : "TRUE"),!v1, 1));
|
||||
}
|
||||
|
||||
#ifndef DBUG_OFF
|
||||
#define YYDEBUG 1
|
||||
#else
|
||||
#define YYDEBUG 0
|
||||
#endif
|
||||
|
||||
#ifndef DBUG_OFF
|
||||
void turn_parser_debug_on()
|
||||
{
|
||||
/*
|
||||
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="d,parser_debug" ...
|
||||
- Running a test :
|
||||
mysql-test-run.pl --mysqld="--debug=d,parser_debug" ...
|
||||
|
||||
The result will be in the process stderr (var/log/master.err)
|
||||
*/
|
||||
|
||||
extern int yydebug;
|
||||
yydebug= 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
%}
|
||||
%union {
|
||||
int num;
|
||||
|
|
Loading…
Reference in a new issue