Bug #1922 configure with-debug creates both DEBUG_ON and DEBUG_OFF
Submitted: 23 Nov 2003 9:10 Modified: 24 Nov 2003 7:16
Reporter: Pete Lancashire Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:mysql-4.1.1-alpha-nightly-20031118 OS:Solaris (solaris/gcc)
Assigned to: CPU Architecture:Any

[23 Nov 2003 9:10] Pete Lancashire
Description:
configure run as

CC=gcc  CFLAGS="-O3 -mcpu=v9 -fno-omit-frame-pointer" \
CXX=gcc CXXFLAGS="-O3 -mcpu=v9 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" \
LDFLAGS="-mcpu=v9" \
LDDFLAGS="-mpcu=v9" \
./configure --prefix=/usr/local/mysql_411 \
--with-debug \
--with-vio \
--without-openssl \
--with-extra-charsets=complex --enable-thread-safe-client \
--enable-local-infile --enable-assembler --with-named-z-libs=no \
--with-named-curses-libs=-lcurses --disable-shared

example make/complile line below has both -DDEBUG_ON and -DDEBUG_OFF
not all compiles are this way, maybe just in innobase ?

make[4]: Entering directory `/tmp/mysql-4.1.1-alpha-nightly-20031118/innobase/pars'
source='pars0grm.c' object='pars0grm.o' libtool=no \
depfile='.deps/pars0grm.Po' tmpdepfile='.deps/pars0grm.TPo' \
depmode=gcc3 /bin/bash ../.././innobase/../depcomp \
gcc -DHAVE_CONFIG_H -I. -I../.././innobase/pars -I.. -I../.././innobase/pars/../include -I../.././innobase/pars/../../include -I../../include    -DDBUG_OFF -g -O -DDBUG_ON -DSAFE_MUTEX -O3 -mcpu=v9 -fno-omit-frame-pointer  -D_FILE_OFFSET_BITS=64 -DHAVE_CURSES_H -I/usr/local/src/mysql-4.1.1-alpha-nightly-20031118/include -DHAVE_RWLOCK_T  -DDEBUG_OFF -c `test -f pars0grm.c || echo '../.././innobase/pars/'`pars0grm.c

How to repeat:
use above confuration
[24 Nov 2003 7:16] Sergei Golubchik
It's not a problem because of

#if defined(DBUG_ON) && defined(DBUG_OFF)
#undef DBUG_OFF
#endif

in my_global.h (which should always be included, and should be always included first).