Commit cd2c9eec authored by unknown's avatar unknown

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.


configure.in:
  Rolling back previous change
sql/Makefile.am:
  Partially rolling back previous change.
  The build has to be unconditional, for the source .tar.gz distribution
sql/mysql_priv.h:
  WL#3432 (Compile the Parser with a --debug --verbose option)
sql/sql_parse.cc:
  WL#3432 (Compile the Parser with a --debug --verbose option)
  
  Moved turn_parser_debug_on to sql_yacc.yy
sql/sql_yacc.yy:
  WL#3432 (Compile the Parser with a --debug --verbose option)
  
  Moved turn_parser_debug_on to sql_yacc.yy
parent dec9116f
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment