Below is the list of changes that have just been committed into a local
5.0 repository of marcsql. When marcsql does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-08-17 16:08:51-07:00, malff@weblab.(none) +3 -0
WL#3432 (Compile the Parser with a --debug --verbose option)
Changed the automake build process :
- ./configure.in
- ./sql/Makefile.am
to compile an instrumented parser for debug=yes or debug=full builds
Changed the (primary) runtime invocation of the parser :
- sql/sql_parse.cc
to generate bison traces in stderr when the DBUG "parser_debug" flag is set.
configure.in@stripped, 2006-08-17 15:39:43-07:00, malff@weblab.(none) +1 -0
WL#3432 (Compile the Parser with a --debug --verbose option)
New Automake condition : MYSQL_CONF_DEBUG
sql/Makefile.am@stripped, 2006-08-17 15:39:44-07:00, malff@weblab.(none) +6 -1
WL#3432 (Compile the Parser with a --debug --verbose option)
In Debug mode, compile sql_yacc.yy with --debug --verbose
sql/sql_parse.cc@stripped, 2006-08-17 15:39:44-07:00, malff@weblab.(none) +23 -0
WL#3432 (Compile the Parser with a --debug --verbose option)
Conditionally turn the bison parser debug on at runtime.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: malff
# Host: weblab.(none)
# Root: /home/marcsql/TREE/mysql-5.0-WL3432
--- 1.406/configure.in 2006-08-17 16:08:55 -07:00
+++ 1.407/configure.in 2006-08-17 16:08:55 -07:00
@@ -1667,6 +1667,7 @@ 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,
--- 1.119/sql/Makefile.am 2006-08-17 16:08:55 -07:00
+++ 1.120/sql/Makefile.am 2006-08-17 16:08:55 -07:00
@@ -117,8 +117,13 @@ DEFS = -DMYSQL_SERVER \
BUILT_SOURCES = sql_yacc.cc sql_yacc.h lex_hash.h
EXTRA_DIST = $(BUILT_SOURCES)
-DISTCLEANFILES = lex_hash.h
+DISTCLEANFILES = lex_hash.h sql_yacc.output
+
AM_YFLAGS = -d
+
+if MYSQL_CONF_DEBUG
+AM_YFLAGS += --debug --verbose
+endif
mysql_tzinfo_to_sql.cc:
rm -f mysql_tzinfo_to_sql.cc
--- 1.563/sql/sql_parse.cc 2006-08-17 16:08:55 -07:00
+++ 1.564/sql/sql_parse.cc 2006-08-17 16:08:55 -07:00
@@ -5776,6 +5776,26 @@ 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
@@ -5785,6 +5805,9 @@ void mysql_init_multi_delete(LEX *lex)
void mysql_parse(THD *thd, char *inBuf, uint length)
{
DBUG_ENTER("mysql_parse");
+
+ DBUG_EXECUTE_IF("parser_debug", turn_parser_debug_on(););
+
mysql_init_query(thd, (uchar*) inBuf, length);
if (query_cache_send_result_to_client(thd, inBuf, length) <= 0)
{
| Thread |
|---|
| • bk commit into 5.0 tree (malff:1.2236) | marc.alff | 18 Aug |