Commit 03590c20 authored by tulin@dl145c.mysql.com's avatar tulin@dl145c.mysql.com

merge

parents 4a1d6f6a e7c62822
...@@ -1110,3 +1110,8 @@ VC++Files/client/mysql_amd64.dsp ...@@ -1110,3 +1110,8 @@ VC++Files/client/mysql_amd64.dsp
client/mysqltestmanager-pwgen client/mysqltestmanager-pwgen
client/mysqltestmanagerc client/mysqltestmanagerc
tools/mysqltestmanager tools/mysqltestmanager
config.guess
config.sub
install-sh
ltmain.sh
missing
...@@ -7,17 +7,8 @@ commands="\ ...@@ -7,17 +7,8 @@ commands="\
$make -k distclean || true $make -k distclean || true
/bin/rm -rf */.deps/*.P config.cache storage/innobase/config.cache storage/bdb/build_unix/config.cache bdb/dist/autom4te.cache autom4te.cache innobase/autom4te.cache; /bin/rm -rf */.deps/*.P config.cache storage/innobase/config.cache storage/bdb/build_unix/config.cache bdb/dist/autom4te.cache autom4te.cache innobase/autom4te.cache;
aclocal || (echo \"Can't execute aclocal\" && exit 1) path=`dirname $0`
autoheader || (echo \"Can't execute autoheader\" && exit 1) . \"$path/autorun.sh\""
aclocal || (echo \"Can't execute aclocal\" && exit 1)
automake || (echo \"Can't execute automake\" && exit 1)
autoconf || (echo \"Can't execute autoconf\" && exit 1)
(cd storage/bdb/dist && sh s_all)
(cd storage/innobase && aclocal && autoheader && aclocal && automake && autoconf)
if [ -d gemini ]
then
(cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
fi"
if [ -z "$just_clean" ] if [ -z "$just_clean" ]
then then
......
#!/bin/sh
# Create MySQL autotools infrastructure
aclocal || (echo "Can't execute aclocal" && exit 1)
autoheader || (echo "Can't execute autoheader" && exit 1)
# --force means overwrite ltmain.sh script if it already exists
libtoolize --automake --force \
|| (echo "Can't execute libtoolize" && exit 1)
# --add-missing instructs automake to install missing auxiliary files
# and --force to overwrite them if they already exist
automake --add-missing --force \
|| (echo "Can't execute automake" && exit 1)
autoconf || (echo "Can't execute autoconf" && exit 1)
(cd bdb/dist && sh s_all)
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
make -k clean make -k clean
/bin/rm -f */.deps/*.P */*.o /bin/rm -f */.deps/*.P */*.o
/bin/rm -f config.cache mysql-*.tar.gz /bin/rm -f config.cache mysql-*.tar.gz
aclocal; autoheader; aclocal; automake; autoconf
path=`dirname $0`
. "$path/autorun.sh"
CC=ccc CFLAGS="-fast -O3 -fomit-frame-pointer" CXX=gcc CXXFLAGS="-O6 -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti -mcpu=ev6 -Wa,-mev6" CXXLDFLAGS='/usr/lib/compaq/libots-2.2.7/libots.so /usr/lib/compaq/cpml-5.0.0/libcpml_ev6.a' ./configure --prefix=/usr/local/mysql --disable-shared --with-extra-charsets=complex --enable-thread-safe-client CC=ccc CFLAGS="-fast -O3 -fomit-frame-pointer" CXX=gcc CXXFLAGS="-O6 -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti -mcpu=ev6 -Wa,-mev6" CXXLDFLAGS='/usr/lib/compaq/libots-2.2.7/libots.so /usr/lib/compaq/cpml-5.0.0/libcpml_ev6.a' ./configure --prefix=/usr/local/mysql --disable-shared --with-extra-charsets=complex --enable-thread-safe-client
make make
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
make -k clean make -k clean
/bin/rm -f */.deps/*.P */*.o /bin/rm -f */.deps/*.P */*.o
/bin/rm -f */.deps/*.P config.cache storage/innobase/config.cache storage/bdb/build_unix/config.cache mysql-*.tar.gz /bin/rm -f */.deps/*.P config.cache storage/innobase/config.cache storage/bdb/build_unix/config.cache mysql-*.tar.gz
aclocal; autoheader; aclocal; automake; autoconf
path=`dirname $0`
. "$path/autorun.sh"
CC=ccc CFLAGS="-fast" CXX=cxx CXXFLAGS="-fast -noexceptions -nortti" ./configure --prefix=/usr/local/mysql --disable-shared --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-non_shared --with-client-ldflags=-non_shared --without-extra-tools --disable-dependency-tracking CC=ccc CFLAGS="-fast" CXX=cxx CXXFLAGS="-fast -noexceptions -nortti" ./configure --prefix=/usr/local/mysql --disable-shared --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-non_shared --with-client-ldflags=-non_shared --without-extra-tools --disable-dependency-tracking
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
make -k clean make -k clean
/bin/rm -f */.deps/*.P */*.o /bin/rm -f */.deps/*.P */*.o
/bin/rm -f */.deps/*.P config.cache storage/innobase/config.cache storage/bdb/build_unix/config.cache mysql-*.tar.gz /bin/rm -f */.deps/*.P config.cache storage/innobase/config.cache storage/bdb/build_unix/config.cache mysql-*.tar.gz
aclocal; autoheader; aclocal; automake; autoconf
path=`dirname $0`
. "$path/autorun.sh"
CFLAGS=-O1 CC=gcc CXX=gcc CXXFLAGS="-O1 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-debug --with-extra-charsets=complex --without-extra-tools CFLAGS=-O1 CC=gcc CXX=gcc CXXFLAGS="-O1 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-debug --with-extra-charsets=complex --without-extra-tools
make make
...@@ -62,14 +62,9 @@ done ...@@ -62,14 +62,9 @@ done
set -x set -x
make distclean make distclean
aclocal
autoheader
libtoolize --automake --force
automake --force --add-missing
autoconf
(cd storage/bdb/dist && sh s_all) path=`dirname $0`
(cd storage/innobase && aclocal && autoheader && aclocal && automake && autoconf) . "$path/autorun.sh"
CC=cc CXX=aCC CFLAGS="$cflags" CXXFLAGS="$cxxflags" \ CC=cc CXX=aCC CFLAGS="$cflags" CXXFLAGS="$cxxflags" \
./configure --prefix=/usr/local/mysql --disable-shared \ ./configure --prefix=/usr/local/mysql --disable-shared \
......
gmake -k clean || true gmake -k clean || true
/bin/rm -f */.deps/*.P config.cache storage/innobase/config.cache storage/bdb/build_unix/config.cache /bin/rm -f */.deps/*.P config.cache storage/innobase/config.cache storage/bdb/build_unix/config.cache
aclocal && autoheader && aclocal && automake && autoconf path=`dirname $0`
(cd storage/bdb/dist && sh s_all) . "$path/autorun.sh"
(cd storage/innobase && aclocal && autoheader && aclocal && automake && autoconf)
if [ -d gemini ]
then
(cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
fi
CC=ecc CFLAGS="-w1 -DEXTRA_DEBUG -DSAFEMALLOC -DSAFE_MUTEX -O2" CXX=ecc CXXFLAGS="-w1 -DEXTRA_DEBUG -DSAFEMALLOC -DSAFE_MUTEX -O2" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --with-debug --with-innodb --with-embedded-server --with-archive-storage-engine CC=ecc CFLAGS="-w1 -DEXTRA_DEBUG -DSAFEMALLOC -DSAFE_MUTEX -O2" CXX=ecc CXXFLAGS="-w1 -DEXTRA_DEBUG -DSAFEMALLOC -DSAFE_MUTEX -O2" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --with-debug --with-innodb --with-embedded-server --with-archive-storage-engine
gmake gmake
...@@ -34,14 +34,9 @@ fi ...@@ -34,14 +34,9 @@ fi
set -x set -x
make distclean make distclean
aclocal
autoheader
libtoolize --automake --force
automake --force --add-missing
autoconf
(cd storage/bdb/dist && sh s_all) path=`dirname $0`
(cd storage/innobase && aclocal && autoheader && aclocal && automake && autoconf) . "$path/autorun.sh"
# C options: # C options:
# -apo - auto-parallize for multiprocessors (implies -mp) # -apo - auto-parallize for multiprocessors (implies -mp)
......
#! /bin/sh
path=`dirname $0`
. "$path/SETUP.sh"
# Note that we can't use ccache with icc as the generated .deps file will
# then contain wrong information
CC=icc
CXX=icpc
CXXLD="$CXX -static-libcxa"
export CC CXX
extra_flags="$pentium_cflags $debug_cflags $max_cflags -USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify -DMYSQL_SERVER_SUFFIX=-valgrind-max"
# Disable following warnings as these are generated by header files:
# 161 unrecognized pragma
# 444 destructor for base class xxx is not virtual
# 279 controlling expression is constant
# 810 conversion from ulonglong to ulong with cast
# 981 operands are evaluated in unspecified order
# 1292 warning for unknown 'attribute' options
# 1469 "xxx" clobber ignored
# 1572 floating-point equality and inequality comparisons are unreliable
# In C++
# 869 parameter "xxx" was never referenced
# (Problem with virtual functions)
# 874 support for placement delete is disabled
c_warnings=""
cxx_warnings=""
extra_flags="-O3 -unroll2 -ip -mp -no-gcc -restrict"
base_cxxflags="-fno-exceptions -fno-rtti"
extra_configs="$pentium_configs $static_link"
. "$path/FINISH.sh"
#! /bin/sh
path=`dirname $0`
. "$path/SETUP.sh"
# Note that we can't use ccache with icc as the generated .deps file will
# then contain wrong information
CC=icc
CXX=icpc
export CC CXX
extra_flags="$pentium_cflags $debug_cflags $max_cflags -USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify -DMYSQL_SERVER_SUFFIX=-valgrind-max"
# Disable following warnings as these are generated by header files:
# 161 unrecognized pragma
# 444 destructor for base class xxx is not virtual
# 279 controlling expression is constant
# 810 conversion from ulonglong to ulong with cast
# 981 operands are evaluated in unspecified order
# 1292 warning for unknown 'attribute' options
# 1469 "xxx" clobber ignored
# 1572 floating-point equality and inequality comparisons are unreliable
# In C++
# 869 parameter "xxx" was never referenced
# (Problem with virtual functions)
# 874 support for placement delete is disabled
c_warnings="-Wall -Wcheck -wd161,444,279,810,981,1292,1469,1572"
cxx_warnings="$c_warnings -wd869,874"
base_cxxflags="-fno-exceptions -fno-rtti"
extra_configs="$pentium_configs $debug_configs"
. "$path/FINISH.sh"
...@@ -2,13 +2,8 @@ AM_MAKEFLAGS="-j 2" ...@@ -2,13 +2,8 @@ AM_MAKEFLAGS="-j 2"
gmake -k clean || true gmake -k clean || true
/bin/rm -f */.deps/*.P config.cache /bin/rm -f */.deps/*.P config.cache
aclocal && autoheader && aclocal && automake && autoconf path=`dirname $0`
(cd storage/bdb/dist && sh s_all) . "$path/autorun.sh"
(cd storage/innobase && aclocal && autoheader && aclocal && automake && autoconf)
if [ -d gemini ]
then
(cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
fi
export PATH=/usr/local/pgcc/bin:$PATH export PATH=/usr/local/pgcc/bin:$PATH
CFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O6 -mpentiumpro -fomit-frame-pointer -mstack-align-double" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O6 -fomit-frame-pointer -mpentiumpro -mstack-align-double" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static CFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O6 -mpentiumpro -fomit-frame-pointer -mstack-align-double" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O6 -fomit-frame-pointer -mpentiumpro -mstack-align-double" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static
......
#! /bin/sh
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags"
extra_configs="$pentium_configs --without-berkeley-db"
. "$path/FINISH.sh"
#! /bin/sh
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags"
extra_configs="$pentium_configs $debug_configs --without-berkeley-db $static_link"
. "$path/FINISH.sh"
...@@ -3,14 +3,9 @@ ...@@ -3,14 +3,9 @@
gmake -k clean || true gmake -k clean || true
/bin/rm -f */.deps/*.P config.cache /bin/rm -f */.deps/*.P config.cache
aclocal && autoheader && aclocal && automake && autoconf path=`dirname $0`
(cd storage/bdb/dist && sh s_all) . "$path/autorun.sh"
(cd storage/innobase && aclocal && autoheader && aclocal && automake && autoconf)
if [ -d gemini ]
then
(cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
fi
CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client
gmake -j 4 gmake -j 4
...@@ -3,13 +3,8 @@ ...@@ -3,13 +3,8 @@
gmake -k clean || true gmake -k clean || true
/bin/rm -f */.deps/*.P config.cache /bin/rm -f */.deps/*.P config.cache
aclocal && autoheader && aclocal && automake && autoconf path=`dirname $0`
(cd storage/bdb/dist && sh s_all) . "$path/autorun.sh"
(cd storage/innobase && aclocal && autoheader && aclocal && automake && autoconf)
if [ -d gemini ]
then
(cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
fi
CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-debug CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-debug
......
...@@ -3,13 +3,8 @@ ...@@ -3,13 +3,8 @@
gmake -k clean || true gmake -k clean || true
/bin/rm -f */.deps/*.P config.cache /bin/rm -f */.deps/*.P config.cache
aclocal && autoheader && aclocal && automake && autoconf path=`dirname $0`
(cd storage/bdb/dist && sh s_all) . "$path/autorun.sh"
(cd storage/innobase && aclocal && autoheader && aclocal && automake && autoconf)
if [ -d gemini ]
then
(cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
fi
# Assume Forte is installed in /opt/SUNWSpro # Assume Forte is installed in /opt/SUNWSpro
......
...@@ -33,9 +33,9 @@ done ...@@ -33,9 +33,9 @@ done
gmake -k clean || true gmake -k clean || true
/bin/rm -f */.deps/*.P config.cache /bin/rm -f */.deps/*.P config.cache
aclocal && autoheader && aclocal && automake && autoconf
(cd storage/bdb/dist && sh s_all) path=`dirname $0`
(cd storage/innobase && aclocal && autoheader && aclocal && automake && autoconf) . "$path/autorun.sh"
CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -DHAVE_purify -DEXTRA_DEBUG -O2" CXX=gcc CXXLD=g++ CXXFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -DHAVE_purify -DEXTRA_DEBUG -O2" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-berkeley-db --with-embedded-server --with-innodb $EXTRA_CONFIG_FLAGS CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -DHAVE_purify -DEXTRA_DEBUG -O2" CXX=gcc CXXLD=g++ CXXFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -DHAVE_purify -DEXTRA_DEBUG -O2" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-berkeley-db --with-embedded-server --with-innodb $EXTRA_CONFIG_FLAGS
......
...@@ -246,6 +246,8 @@ salle@geopard.online.bg ...@@ -246,6 +246,8 @@ salle@geopard.online.bg
salle@vafla.home salle@vafla.home
salle@vafla.online.bg salle@vafla.online.bg
sasha@mysql.sashanet.com sasha@mysql.sashanet.com
schwenke@lmy003.wdf.sap.corp
schwenke@lmy003.xl.local
serg@build.mysql.com serg@build.mysql.com
serg@build.mysql2.com serg@build.mysql2.com
serg@mysql.com serg@mysql.com
......
...@@ -203,7 +203,9 @@ static struct my_option my_long_options[] = ...@@ -203,7 +203,9 @@ static struct my_option my_long_options[] =
{"default-character-set", OPT_DEFAULT_CHARSET, {"default-character-set", OPT_DEFAULT_CHARSET,
"Set the default character set.", (gptr*) &default_charset, "Set the default character set.", (gptr*) &default_charset,
(gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"delayed-insert", OPT_DELAYED, "Insert rows with INSERT DELAYED.", {"delayed-insert", OPT_DELAYED, "Insert rows with INSERT DELAYED; "
"currently ignored because of http://bugs.mysql.com/bug.php?id=7815 "
"but will be re-enabled later",
(gptr*) &opt_delayed, (gptr*) &opt_delayed, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, (gptr*) &opt_delayed, (gptr*) &opt_delayed, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
{"delete-master-logs", OPT_DELETE_MASTER_LOGS, {"delete-master-logs", OPT_DELETE_MASTER_LOGS,
...@@ -708,6 +710,25 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -708,6 +710,25 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
} }
break; break;
} }
#ifndef REMOVE_THIS_CODE_WHEN_FIX_BUG_7815
case (int) OPT_DELAYED:
/*
Because of http://bugs.mysql.com/bug.php?id=7815, we disable
--delayed-insert; when the bug gets fixed by checking the storage engine
(using the table definition cache) before printing INSERT DELAYED, we
can correct the option's description and re-enable it again (scheduled
for later 5.0 or 5.1 versions).
It's ok to do the if() below as get_one_option is called after
opt_delayed is set.
*/
if (opt_delayed)
{
fprintf(stderr, "Warning: ignoring --delayed-insert (as explained "
"in the output of 'mysqldump --help').\n");
opt_delayed= 0;
}
break;
#endif
} }
return 0; return 0;
} }
......
...@@ -2024,11 +2024,11 @@ my_bool end_of_query(int c) ...@@ -2024,11 +2024,11 @@ my_bool end_of_query(int c)
int read_line(char* buf, int size) int read_line(char* buf, int size)
{ {
int c; int c;
char quote;
char* p= buf, *buf_end= buf + size - 1; char* p= buf, *buf_end= buf + size - 1;
int no_save= 0; int no_save= 0;
enum {R_NORMAL, R_Q1, R_ESC_Q_Q1, R_ESC_Q_Q2, enum {R_NORMAL, R_Q, R_Q_IN_Q, R_SLASH_IN_Q,
R_ESC_SLASH_Q1, R_ESC_SLASH_Q2, R_COMMENT, R_LINE_START} state= R_LINE_START;
R_Q2, R_COMMENT, R_LINE_START} state= R_LINE_START;
DBUG_ENTER("read_line"); DBUG_ENTER("read_line");
start_lineno= *lineno; start_lineno= *lineno;
...@@ -2063,10 +2063,11 @@ int read_line(char* buf, int size) ...@@ -2063,10 +2063,11 @@ int read_line(char* buf, int size)
*p= 0; *p= 0;
DBUG_RETURN(0); DBUG_RETURN(0);
} }
else if (c == '\'') else if (c == '\'' || c == '"' || c == '`')
state = R_Q1; {
else if (c == '"') quote= c;
state = R_Q2; state= R_Q;
}
else if (c == '\n') else if (c == '\n')
{ {
state = R_LINE_START; state = R_LINE_START;
...@@ -2101,55 +2102,36 @@ int read_line(char* buf, int size) ...@@ -2101,55 +2102,36 @@ int read_line(char* buf, int size)
*p= 0; *p= 0;
DBUG_RETURN(0); DBUG_RETURN(0);
} }
else if (c == '\'') else if (c == '\'' || c == '"' || c == '`')
state= R_Q1;
else if (c == '"')
state= R_Q2;
else
state= R_NORMAL;
break;
case R_Q1:
if (c == '\'')
state= R_ESC_Q_Q1;
else if (c == '\\')
state= R_ESC_SLASH_Q1;
break;
case R_ESC_Q_Q1:
if (end_of_query(c))
{ {
*p= 0; quote= c;
DBUG_RETURN(0); state= R_Q;
} }
if (c != '\'')
state= R_NORMAL;
else else
state= R_Q1; state= R_NORMAL;
break;
case R_ESC_SLASH_Q1:
state= R_Q1;
break; break;
case R_Q2: case R_Q:
if (c == '"') if (c == quote)
state= R_ESC_Q_Q2; state= R_Q_IN_Q;
else if (c == '\\') else if (c == '\\')
state= R_ESC_SLASH_Q2; state= R_SLASH_IN_Q;
break; break;
case R_ESC_Q_Q2: case R_Q_IN_Q:
if (end_of_query(c)) if (end_of_query(c))
{ {
*p= 0; *p= 0;
DBUG_RETURN(0); DBUG_RETURN(0);
} }
if (c != '"') if (c != quote)
state= R_NORMAL; state= R_NORMAL;
else else
state= R_Q2; state= R_Q;
break; break;
case R_ESC_SLASH_Q2: case R_SLASH_IN_Q:
state= R_Q2; state= R_Q;
break; break;
} }
if (!no_save) if (!no_save)
......
This diff is collapsed.
This diff is collapsed.
...@@ -38,7 +38,7 @@ AC_LANG_PUSH(C++) ...@@ -38,7 +38,7 @@ AC_LANG_PUSH(C++)
if test "$ac_cv_prog_gxx" = "yes" if test "$ac_cv_prog_gxx" = "yes"
then then
# Add -Werror, remove -fbranch-probabilities (Bug #268) # Add -Werror, remove -fbranch-probabilities (Bug #268)
CXXFLAGS=`echo $CXXFLAGS -Werror | sed 's/-fbranch-probabilities//'` CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-Wcheck//'`
fi fi
mysql_cv_btype_last_arg_accept=none mysql_cv_btype_last_arg_accept=none
[AC_TRY_COMPILE([#if defined(inline) [AC_TRY_COMPILE([#if defined(inline)
...@@ -98,7 +98,7 @@ AC_LANG_PUSH(C++) ...@@ -98,7 +98,7 @@ AC_LANG_PUSH(C++)
if test "$ac_cv_prog_gxx" = "yes" if test "$ac_cv_prog_gxx" = "yes"
then then
# Add -Werror, remove -fbranch-probabilities (Bug #268) # Add -Werror, remove -fbranch-probabilities (Bug #268)
CXXFLAGS=`echo $CXXFLAGS -Werror | sed 's/-fbranch-probabilities//'` CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-Wcheck//'`
fi fi
mysql_cv_btype_struct_rlimit=none mysql_cv_btype_struct_rlimit=none
[AC_TRY_COMPILE([#if defined(inline) [AC_TRY_COMPILE([#if defined(inline)
......
...@@ -1965,9 +1965,12 @@ AC_LANG_CPLUSPLUS ...@@ -1965,9 +1965,12 @@ AC_LANG_CPLUSPLUS
# with respect to ANSI C++ # with respect to ANSI C++
# We also remove the -fbranch-probabilities option as this will give warnings # We also remove the -fbranch-probabilities option as this will give warnings
# about not profiled code, which confuses configure # about not profiled code, which confuses configure
# We also must remove -W and -Wcheck which on icc produces warnings that
# we don't want to catch with -Werror
if test "$ac_cv_prog_gxx" = "yes" -a "$with_other_libc" = "no" if test "$ac_cv_prog_gxx" = "yes" -a "$with_other_libc" = "no"
then then
CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed 's/-fbranch-probabilities//'` CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-Wcheck//'`
fi fi
AC_TRY_COMPILE( AC_TRY_COMPILE(
...@@ -2002,7 +2005,7 @@ AC_LANG_SAVE ...@@ -2002,7 +2005,7 @@ AC_LANG_SAVE
AC_LANG_CPLUSPLUS AC_LANG_CPLUSPLUS
if test "$ac_cv_prog_gxx" = "yes" -a "$with_other_libc" = "no" if test "$ac_cv_prog_gxx" = "yes" -a "$with_other_libc" = "no"
then then
CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed 's/-fbranch-probabilities//'` CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-Wcheck//'`
fi fi
AC_TRY_COMPILE( AC_TRY_COMPILE(
[#undef inline [#undef inline
...@@ -2035,7 +2038,7 @@ AC_LANG_SAVE ...@@ -2035,7 +2038,7 @@ AC_LANG_SAVE
AC_LANG_CPLUSPLUS AC_LANG_CPLUSPLUS
if test "$ac_cv_prog_gxx" = "yes" -a "$with_other_libc" = "no" if test "$ac_cv_prog_gxx" = "yes" -a "$with_other_libc" = "no"
then then
CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed 's/-fbranch-probabilities//'` CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-Wcheck//'`
fi fi
AC_TRY_COMPILE( AC_TRY_COMPILE(
[#undef inline [#undef inline
......
This diff is collapsed.
...@@ -63,7 +63,7 @@ typedef struct st_pointer_array { /* when using array-strings */ ...@@ -63,7 +63,7 @@ typedef struct st_pointer_array { /* when using array-strings */
#define LAST_CHAR_CODE 259 #define LAST_CHAR_CODE 259
typedef struct st_replace { typedef struct st_replace {
bool found; my_bool found;
struct st_replace *next[256]; struct st_replace *next[256];
} REPLACE; } REPLACE;
...@@ -80,19 +80,18 @@ typedef struct st_replace_found { ...@@ -80,19 +80,18 @@ typedef struct st_replace_found {
/* functions defined in this file */ /* functions defined in this file */
extern int main(int argc,char * *argv);
static int static_get_options(int *argc,char * * *argv); static int static_get_options(int *argc,char * * *argv);
static int get_replace_strings(int *argc,char * * *argv, static int get_replace_strings(int *argc,char * * *argv,
POINTER_ARRAY *from_array, POINTER_ARRAY *from_array,
POINTER_ARRAY *to_array); POINTER_ARRAY *to_array);
int insert_pointer_name(POINTER_ARRAY *pa, my_string name); static int insert_pointer_name(POINTER_ARRAY *pa, my_string name);
void free_pointer_array(POINTER_ARRAY *pa); static void free_pointer_array(POINTER_ARRAY *pa);
static int convert_pipe(REPLACE *,FILE *,FILE *); static int convert_pipe(REPLACE *,FILE *,FILE *);
static int convert_file(REPLACE *, my_string); static int convert_file(REPLACE *, my_string);
REPLACE *init_replace(my_string *from, my_string *to,uint count, my_string static REPLACE *init_replace(my_string *from, my_string *to,uint count,
word_end_chars); my_string word_end_chars);
uint replace_strings(REPLACE *rep, my_string *start,uint *max_length, static uint replace_strings(REPLACE *rep, my_string *start,uint *max_length,
my_string from); my_string from);
static int initialize_buffer(void); static int initialize_buffer(void);
static void reset_buffer(void); static void reset_buffer(void);
static void free_buffer(void); static void free_buffer(void);
...@@ -101,9 +100,7 @@ static int silent=0,verbose=0,updated=0; ...@@ -101,9 +100,7 @@ static int silent=0,verbose=0,updated=0;
/* The main program */ /* The main program */
int main(argc,argv) int main(int argc, char *argv[])
int argc;
char *argv[];
{ {
int i,error; int i,error;
char word_end_chars[256],*pos; char word_end_chars[256],*pos;
...@@ -118,7 +115,7 @@ char *argv[]; ...@@ -118,7 +115,7 @@ char *argv[];
for (i=1,pos=word_end_chars ; i < 256 ; i++) for (i=1,pos=word_end_chars ; i < 256 ; i++)
if (my_isspace(&my_charset_latin1,i)) if (my_isspace(&my_charset_latin1,i))
*pos++=i; *pos++= (char) i;
*pos=0; *pos=0;
if (!(replace=init_replace((char**) from.typelib.type_names, if (!(replace=init_replace((char**) from.typelib.type_names,
(char**) to.typelib.type_names, (char**) to.typelib.type_names,
...@@ -153,7 +150,7 @@ static int static_get_options(argc,argv) ...@@ -153,7 +150,7 @@ static int static_get_options(argc,argv)
register int *argc; register int *argc;
register char **argv[]; register char **argv[];
{ {
int help,version,opt; int help,version;
char *pos; char *pos;
silent=verbose=help=0; silent=verbose=help=0;
...@@ -162,7 +159,7 @@ register char **argv[]; ...@@ -162,7 +159,7 @@ register char **argv[];
while (*++pos) while (*++pos)
{ {
version=0; version=0;
switch((opt= *pos)) { switch((*pos)) {
case 's': case 's':
silent=1; silent=1;
break; break;
...@@ -249,7 +246,7 @@ POINTER_ARRAY *from_array,*to_array; ...@@ -249,7 +246,7 @@ POINTER_ARRAY *from_array,*to_array;
return 0; return 0;
} }
int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name) static int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name)
{ {
uint i,length,old_count; uint i,length,old_count;
byte *new_pos; byte *new_pos;
...@@ -323,8 +320,7 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name) ...@@ -323,8 +320,7 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name)
/* free pointer array */ /* free pointer array */
void free_pointer_array(pa) static void free_pointer_array(reg1 POINTER_ARRAY *pa)
reg1 POINTER_ARRAY *pa;
{ {
if (pa->typelib.count) if (pa->typelib.count)
{ {
...@@ -382,9 +378,9 @@ static void or_bits(REP_SET *to,REP_SET *from); ...@@ -382,9 +378,9 @@ static void or_bits(REP_SET *to,REP_SET *from);
static void copy_bits(REP_SET *to,REP_SET *from); static void copy_bits(REP_SET *to,REP_SET *from);
static int cmp_bits(REP_SET *set1,REP_SET *set2); static int cmp_bits(REP_SET *set1,REP_SET *set2);
static int get_next_bit(REP_SET *set,uint lastpos); static int get_next_bit(REP_SET *set,uint lastpos);
static int find_set(REP_SETS *sets,REP_SET *find); static short find_set(REP_SETS *sets,REP_SET *find);
static int find_found(FOUND_SET *found_set,uint table_offset, static short find_found(FOUND_SET *found_set,uint table_offset,
int found_offset); int found_offset);
static uint start_at_word(my_string pos); static uint start_at_word(my_string pos);
static uint end_of_word(my_string pos); static uint end_of_word(my_string pos);
static uint replace_len(my_string pos); static uint replace_len(my_string pos);
...@@ -394,11 +390,12 @@ static uint found_sets=0; ...@@ -394,11 +390,12 @@ static uint found_sets=0;
/* Init a replace structure for further calls */ /* Init a replace structure for further calls */
REPLACE *init_replace(my_string *from, my_string *to,uint count, static REPLACE *init_replace(my_string *from, my_string *to,uint count,
my_string word_end_chars) my_string word_end_chars)
{ {
uint i,j,states,set_nr,len,result_len,max_length,found_end,bits_set,bit_nr; uint i,j,states,set_nr,len,result_len,max_length,found_end,bits_set,bit_nr;
int used_sets,chr,default_state; int used_sets,chr;
short default_state;
char used_chars[LAST_CHAR_CODE],is_word_end[256]; char used_chars[LAST_CHAR_CODE],is_word_end[256];
my_string pos,to_pos,*to_array; my_string pos,to_pos,*to_array;
REP_SETS sets; REP_SETS sets;
...@@ -561,7 +558,7 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count, ...@@ -561,7 +558,7 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
for (chr= 0 ; chr < 256 ; chr++) for (chr= 0 ; chr < 256 ; chr++)
{ {
if (! used_chars[chr]) if (! used_chars[chr])
set->next[chr]= chr ? default_state : -1; set->next[chr]= (short) (chr ? default_state : -1);
else else
{ {
new_set=make_new_set(&sets); new_set=make_new_set(&sets);
...@@ -652,7 +649,7 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count, ...@@ -652,7 +649,7 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
for (i=1 ; i <= found_sets ; i++) for (i=1 ; i <= found_sets ; i++)
{ {
pos=from[found_set[i-1].table_offset]; pos=from[found_set[i-1].table_offset];
rep_str[i].found= !bcmp(pos,"\\^",3) ? 2 : 1; rep_str[i].found= (my_bool) (!bcmp(pos,"\\^",3) ? 2 : 1);
rep_str[i].replace_string=to_array[found_set[i-1].table_offset]; rep_str[i].replace_string=to_array[found_set[i-1].table_offset];
rep_str[i].to_offset=found_set[i-1].found_offset-start_at_word(pos); rep_str[i].to_offset=found_set[i-1].found_offset-start_at_word(pos);
rep_str[i].from_offset=found_set[i-1].found_offset-replace_len(pos)+ rep_str[i].from_offset=found_set[i-1].found_offset-replace_len(pos)+
...@@ -812,7 +809,7 @@ static int get_next_bit(REP_SET *set,uint lastpos) ...@@ -812,7 +809,7 @@ static int get_next_bit(REP_SET *set,uint lastpos)
free given set, else put in given set in sets and return it's free given set, else put in given set in sets and return it's
position */ position */
static int find_set(REP_SETS *sets,REP_SET *find) static short find_set(REP_SETS *sets,REP_SET *find)
{ {
uint i; uint i;
for (i=0 ; i < sets->count-1 ; i++) for (i=0 ; i < sets->count-1 ; i++)
...@@ -820,30 +817,33 @@ static int find_set(REP_SETS *sets,REP_SET *find) ...@@ -820,30 +817,33 @@ static int find_set(REP_SETS *sets,REP_SET *find)
if (!cmp_bits(sets->set+i,find)) if (!cmp_bits(sets->set+i,find))
{ {
free_last_set(sets); free_last_set(sets);
return i; return (short) i;
} }
} }
return i; /* return new postion */ return (short) i; /* return new postion */
} }
/* find if there is a found_set with same table_offset & found_offset
If there is return offset to it, else add new offset and return pos.
Pos returned is -offset-2 in found_set_structure because it's is
saved in set->next and set->next[] >= 0 points to next set and
set->next[] == -1 is reserved for end without replaces.
*/
static int find_found(FOUND_SET *found_set,uint table_offset, int found_offset) /*
find if there is a found_set with same table_offset & found_offset
If there is return offset to it, else add new offset and return pos.
Pos returned is -offset-2 in found_set_structure because it's is
saved in set->next and set->next[] >= 0 points to next set and
set->next[] == -1 is reserved for end without replaces.
*/
static short find_found(FOUND_SET *found_set,uint table_offset,
int found_offset)
{ {
int i; int i;
for (i=0 ; (uint) i < found_sets ; i++) for (i=0 ; (uint) i < found_sets ; i++)
if (found_set[i].table_offset == table_offset && if (found_set[i].table_offset == table_offset &&
found_set[i].found_offset == found_offset) found_set[i].found_offset == found_offset)
return -i-2; return (short) (-i-2);
found_set[i].table_offset=table_offset; found_set[i].table_offset=table_offset;
found_set[i].found_offset=found_offset; found_set[i].found_offset=found_offset;
found_sets++; found_sets++;
return -i-2; /* return new postion */ return (short) (-i-2); /* return new postion */
} }
/* Return 1 if regexp starts with \b or ends with \b*/ /* Return 1 if regexp starts with \b or ends with \b*/
...@@ -878,7 +878,8 @@ static uint replace_len(my_string str) ...@@ -878,7 +878,8 @@ static uint replace_len(my_string str)
/* The actual loop */ /* The actual loop */
uint replace_strings(REPLACE *rep, my_string *start,uint *max_length, my_string from) static uint replace_strings(REPLACE *rep, my_string *start,uint *max_length,
my_string from)
{ {
reg1 REPLACE *rep_pos; reg1 REPLACE *rep_pos;
reg2 REPLACE_STRING *rep_str; reg2 REPLACE_STRING *rep_str;
......
...@@ -39,9 +39,9 @@ extern void _db_pargs_(uint _line_,const char *keyword); ...@@ -39,9 +39,9 @@ extern void _db_pargs_(uint _line_,const char *keyword);
extern void _db_doprnt_ _VARARGS((const char *format,...)); extern void _db_doprnt_ _VARARGS((const char *format,...));
extern void _db_dump_(uint _line_,const char *keyword,const char *memory, extern void _db_dump_(uint _line_,const char *keyword,const char *memory,
uint length); uint length);
extern void _db_output_(); extern void _db_output_(uint);
extern void _db_lock_file(); extern void _db_lock_file(void);
extern void _db_unlock_file(); extern void _db_unlock_file(void);
#define DBUG_ENTER(a) const char *_db_func_, *_db_file_; uint _db_level_; \ #define DBUG_ENTER(a) const char *_db_func_, *_db_file_; uint _db_level_; \
char **_db_framep_; \ char **_db_framep_; \
......
...@@ -778,15 +778,13 @@ extern void reset_root_defaults(MEM_ROOT *mem_root, uint block_size, ...@@ -778,15 +778,13 @@ extern void reset_root_defaults(MEM_ROOT *mem_root, uint block_size,
extern char *strdup_root(MEM_ROOT *root,const char *str); extern char *strdup_root(MEM_ROOT *root,const char *str);
extern char *strmake_root(MEM_ROOT *root,const char *str,uint len); extern char *strmake_root(MEM_ROOT *root,const char *str,uint len);
extern char *memdup_root(MEM_ROOT *root,const char *str,uint len); extern char *memdup_root(MEM_ROOT *root,const char *str,uint len);
extern int my_correct_defaults_file(const char *file_location,
const char *option,
const char *option_value,
const char *section_name,
int remove_option);
extern void get_defaults_files(int argc, char **argv, extern void get_defaults_files(int argc, char **argv,
char **defaults, char **extra_defaults); char **defaults, char **extra_defaults);
extern int load_defaults(const char *conf_file, const char **groups, extern int load_defaults(const char *conf_file, const char **groups,
int *argc, char ***argv); int *argc, char ***argv);
extern uint modify_defaults_file(const char *file_location, const char *option,
const char *option_value,
const char *section_name, int remove_option);
extern int my_search_option_files(const char *conf_file, int *argc, extern int my_search_option_files(const char *conf_file, int *argc,
char ***argv, uint *args_used, char ***argv, uint *args_used,
Process_option_func func, void *func_ctx); Process_option_func func, void *func_ctx);
......
...@@ -417,6 +417,9 @@ const char *mysql_errno_to_sqlstate(unsigned int mysql_errno); ...@@ -417,6 +417,9 @@ const char *mysql_errno_to_sqlstate(unsigned int mysql_errno);
/* Some other useful functions */ /* Some other useful functions */
my_bool my_init(void); my_bool my_init(void);
extern uint modify_defaults_file(const char *file_location, const char *option,
const char *option_value,
const char *section_name, int remove_option);
int load_defaults(const char *conf_file, const char **groups, int load_defaults(const char *conf_file, const char **groups,
int *argc, char ***argv); int *argc, char ***argv);
my_bool my_thread_init(void); my_bool my_thread_init(void);
......
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$cpprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
true
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
chmodcmd=""
else
instcmd=mkdir
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
true
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0
...@@ -61,7 +61,8 @@ mysysobjects1 = my_init.lo my_static.lo my_malloc.lo my_realloc.lo \ ...@@ -61,7 +61,8 @@ mysysobjects1 = my_init.lo my_static.lo my_malloc.lo my_realloc.lo \
mf_format.lo mf_path.lo mf_unixpath.lo my_fopen.lo \ mf_format.lo mf_path.lo mf_unixpath.lo my_fopen.lo \
my_symlink.lo my_fstream.lo \ my_symlink.lo my_fstream.lo \
mf_loadpath.lo my_pthread.lo my_thr_init.lo \ mf_loadpath.lo my_pthread.lo my_thr_init.lo \
thr_mutex.lo mulalloc.lo string.lo default.lo \ thr_mutex.lo mulalloc.lo string.lo \
default.lo default_modify.lo \
my_compress.lo array.lo my_once.lo list.lo my_net.lo \ my_compress.lo array.lo my_once.lo list.lo my_net.lo \
charset.lo charset-def.lo hash.lo mf_iocache.lo \ charset.lo charset-def.lo hash.lo mf_iocache.lo \
mf_iocache2.lo my_seek.lo my_sleep.lo \ mf_iocache2.lo my_seek.lo my_sleep.lo \
......
LIBRARY LIBMYSQL LIBRARY LIBMYSQL
DESCRIPTION 'MySQL 4.1 Client Library' DESCRIPTION 'MySQL 5.0 Client Library'
VERSION 6.0 VERSION 6.0
EXPORTS EXPORTS
_dig_vec_lower _dig_vec_lower
...@@ -150,6 +150,4 @@ EXPORTS ...@@ -150,6 +150,4 @@ EXPORTS
mysql_server_end mysql_server_end
mysql_set_character_set mysql_set_character_set
get_defaults_files get_defaults_files
get_charset_by_csname modify_defaults_file
get_charsets_dir
charsets_dir
...@@ -160,3 +160,4 @@ EXPORTS ...@@ -160,3 +160,4 @@ EXPORTS
get_defaults_files get_defaults_files
my_charset_bin my_charset_bin
my_charset_same my_charset_same
modify_defaults_file
This diff is collapsed.
This diff is collapsed.
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing 0.3 - GNU automake"
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
aclocal)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
# We have makeinfo, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
touch $file
;;
tar)
shift
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar ${1+"$@"} && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar ${1+"$@"} && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" ${1+"$@"} && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" ${1+"$@"} && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequirements for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
errstatus=0
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp" 1>&2
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# mkinstalldirs ends here
...@@ -679,7 +679,9 @@ CREATE TABLE `t1` ( ...@@ -679,7 +679,9 @@ CREATE TABLE `t1` (
/*!40000 ALTER TABLE `t1` DISABLE KEYS */; /*!40000 ALTER TABLE `t1` DISABLE KEYS */;
INSERT DELAYED IGNORE INTO `t1` VALUES (1),(2),(3),(4),(5),(6); LOCK TABLES `t1` WRITE;
INSERT IGNORE INTO `t1` VALUES (1),(2),(3),(4),(5),(6);
UNLOCK TABLES;
/*!40000 ALTER TABLE `t1` ENABLE KEYS */; /*!40000 ALTER TABLE `t1` ENABLE KEYS */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
......
...@@ -142,3 +142,9 @@ after_--enable_abort_on_error ...@@ -142,3 +142,9 @@ after_--enable_abort_on_error
1064 1064
select 3 from t1 ; select 3 from t1 ;
ERROR 42S02: Table 'test.t1' doesn't exist ERROR 42S02: Table 'test.t1' doesn't exist
select 1 as `a'b`, 2 as `a"b`;
a'b a"b
1 2
select 'aaa\\','aa''a',"aa""a";
aaa\ aa'a aa"a
aaa\ aa'a aa"a
...@@ -11,7 +11,7 @@ Variable_name Value ...@@ -11,7 +11,7 @@ Variable_name Value
slave_compressed_protocol OFF slave_compressed_protocol OFF
show variables like 'slave_load_tmpdir'; show variables like 'slave_load_tmpdir';
Variable_name Value Variable_name Value
slave_load_tmpdir MYSQL_TEST_DIR/var/tmp/ slave_load_tmpdir SLAVE_LOAD_TMPDIR
show variables like 'slave_skip_errors'; show variables like 'slave_skip_errors';
Variable_name Value Variable_name Value
slave_skip_errors 3,100,137,643,1752 slave_skip_errors 3,100,137,643,1752
...@@ -116,7 +116,7 @@ func CREATE TABLE `func` ( ...@@ -116,7 +116,7 @@ func CREATE TABLE `func` (
`name` char(64) collate utf8_bin NOT NULL default '', `name` char(64) collate utf8_bin NOT NULL default '',
`ret` tinyint(1) NOT NULL default '0', `ret` tinyint(1) NOT NULL default '0',
`dl` char(128) collate utf8_bin NOT NULL default '', `dl` char(128) collate utf8_bin NOT NULL default '',
`type` enum('function','aggregate') character set utf8 NOT NULL default 'function', `type` enum('function','aggregate') character set utf8 NOT NULL,
PRIMARY KEY (`name`) PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions'
show create table tables_priv; show create table tables_priv;
...@@ -152,7 +152,7 @@ procs_priv CREATE TABLE `procs_priv` ( ...@@ -152,7 +152,7 @@ procs_priv CREATE TABLE `procs_priv` (
`Db` char(64) collate utf8_bin NOT NULL default '', `Db` char(64) collate utf8_bin NOT NULL default '',
`User` char(16) collate utf8_bin NOT NULL default '', `User` char(16) collate utf8_bin NOT NULL default '',
`Routine_name` char(64) collate utf8_bin NOT NULL default '', `Routine_name` char(64) collate utf8_bin NOT NULL default '',
`Routine_type` enum('FUNCTION','PROCEDURE') collate utf8_bin NOT NULL default 'FUNCTION', `Routine_type` enum('FUNCTION','PROCEDURE') collate utf8_bin NOT NULL,
`Grantor` char(77) collate utf8_bin NOT NULL default '', `Grantor` char(77) collate utf8_bin NOT NULL default '',
`Proc_priv` set('Execute','Alter Routine','Grant') character set utf8 NOT NULL default '', `Proc_priv` set('Execute','Alter Routine','Grant') character set utf8 NOT NULL default '',
`Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
...@@ -164,7 +164,7 @@ Table Create Table ...@@ -164,7 +164,7 @@ Table Create Table
proc CREATE TABLE `proc` ( proc CREATE TABLE `proc` (
`db` char(64) character set latin1 collate latin1_bin NOT NULL default '', `db` char(64) character set latin1 collate latin1_bin NOT NULL default '',
`name` char(64) NOT NULL default '', `name` char(64) NOT NULL default '',
`type` enum('FUNCTION','PROCEDURE') NOT NULL default 'FUNCTION', `type` enum('FUNCTION','PROCEDURE') NOT NULL,
`specific_name` char(64) NOT NULL default '', `specific_name` char(64) NOT NULL default '',
`language` enum('SQL') NOT NULL default 'SQL', `language` enum('SQL') NOT NULL default 'SQL',
`sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL default 'CONTAINS_SQL', `sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL default 'CONTAINS_SQL',
......
...@@ -1626,7 +1626,7 @@ create table t1 (a enum (' ','a','b') not null); ...@@ -1626,7 +1626,7 @@ create table t1 (a enum (' ','a','b') not null);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` enum('','a','b') NOT NULL default '' `a` enum('','a','b') NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1; drop table t1;
create table t1 (a enum (' ','a','b ') not null default 'b '); create table t1 (a enum (' ','a','b ') not null default 'b ');
...@@ -1670,12 +1670,12 @@ show create table t1; ...@@ -1670,12 +1670,12 @@ show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` int(11) default '1', `a` int(11) default '1',
`b` enum('value','_value','') NOT NULL default 'value' `b` enum('value','_value','') NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
show columns from t1; show columns from t1;
Field Type Null Key Default Extra Field Type Null Key Default Extra
a int(11) YES 1 a int(11) YES 1
b enum('value','_value','') NO value b enum('value','_value','') NO
drop table t1; drop table t1;
CREATE TABLE t1 (c enum('a', 'A') BINARY); CREATE TABLE t1 (c enum('a', 'A') BINARY);
INSERT INTO t1 VALUES ('a'),('A'); INSERT INTO t1 VALUES ('a'),('A');
......
...@@ -62,7 +62,7 @@ blob_col blob NULL YES NULL # ...@@ -62,7 +62,7 @@ blob_col blob NULL YES NULL #
tinyblob_col tinyblob NULL YES NULL # tinyblob_col tinyblob NULL YES NULL #
mediumblob_col mediumblob NULL NO # mediumblob_col mediumblob NULL NO #
longblob_col longblob NULL NO # longblob_col longblob NULL NO #
options enum('one','two','tree') latin1_swedish_ci NO MUL one # options enum('one','two','tree') latin1_swedish_ci NO MUL #
flags set('one','two','tree') latin1_swedish_ci NO # flags set('one','two','tree') latin1_swedish_ci NO #
show keys from t1; show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
...@@ -231,7 +231,7 @@ date_time datetime NULL YES NULL # ...@@ -231,7 +231,7 @@ date_time datetime NULL YES NULL #
new_blob_col varchar(20) latin1_swedish_ci YES NULL # new_blob_col varchar(20) latin1_swedish_ci YES NULL #
tinyblob_col tinyblob NULL YES NULL # tinyblob_col tinyblob NULL YES NULL #
mediumblob_col mediumblob NULL NO # mediumblob_col mediumblob NULL NO #
options enum('one','two','tree') latin1_swedish_ci NO MUL one # options enum('one','two','tree') latin1_swedish_ci NO MUL #
flags set('one','two','tree') latin1_swedish_ci NO # flags set('one','two','tree') latin1_swedish_ci NO #
new_field char(10) latin1_swedish_ci NO new # new_field char(10) latin1_swedish_ci NO new #
show full columns from t2; show full columns from t2;
......
...@@ -180,6 +180,7 @@ select coercibility(@v1),coercibility(@v2),coercibility(@v3),coercibility(@v4); ...@@ -180,6 +180,7 @@ select coercibility(@v1),coercibility(@v2),coercibility(@v3),coercibility(@v4);
coercibility(@v1) coercibility(@v2) coercibility(@v3) coercibility(@v4) coercibility(@v1) coercibility(@v2) coercibility(@v3) coercibility(@v4)
2 2 2 2 2 2 2 2
set session @honk=99; set session @honk=99;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@honk=99' at line 1
set one_shot @honk=99; set one_shot @honk=99;
ERROR HY000: The 'SET ONE_SHOT' syntax is reserved for purposes internal to the MySQL server ERROR HY000: The 'SET ONE_SHOT' syntax is reserved for purposes internal to the MySQL server
set @first_var= NULL; set @first_var= NULL;
......
...@@ -515,3 +515,7 @@ show warnings; ...@@ -515,3 +515,7 @@ show warnings;
Level Code Message Level Code Message
Warning 1329 No data to FETCH Warning 1329 No data to FETCH
drop table t1; drop table t1;
set @@warning_count=1;
ERROR HY000: Variable 'warning_count' is a read only variable
set @@global.error_count=1;
ERROR HY000: Variable 'error_count' is a read only variable
...@@ -286,3 +286,12 @@ select 3 from t1 ; ...@@ -286,3 +286,12 @@ select 3 from t1 ;
#select 3 from t1 ; #select 3 from t1 ;
# #
#select 3 from t1 ; #select 3 from t1 ;
#
# Bug #10251: Identifiers containing quotes not handled correctly
#
select 1 as `a'b`, 2 as `a"b`;
# Test escaping of quotes
select 'aaa\\','aa''a',"aa""a";
...@@ -5,7 +5,7 @@ set global sql_slave_skip_counter=100; ...@@ -5,7 +5,7 @@ set global sql_slave_skip_counter=100;
# BUG #7800: Add various-slave related variables to SHOW VARIABLES # BUG #7800: Add various-slave related variables to SHOW VARIABLES
show variables like 'slave_compressed_protocol'; show variables like 'slave_compressed_protocol';
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_column 2 SLAVE_LOAD_TMPDIR
show variables like 'slave_load_tmpdir'; show variables like 'slave_load_tmpdir';
# We just set some arbitrary values in variables-master.opt so we can test # We just set some arbitrary values in variables-master.opt so we can test
# that a list of values works correctly # that a list of values works correctly
......
...@@ -116,6 +116,7 @@ select coercibility(@v1),coercibility(@v2),coercibility(@v3),coercibility(@v4); ...@@ -116,6 +116,7 @@ select coercibility(@v1),coercibility(@v2),coercibility(@v3),coercibility(@v4);
# #
# Bug #9286 SESSION/GLOBAL should be disallowed for user variables # Bug #9286 SESSION/GLOBAL should be disallowed for user variables
# #
--error 1064
set session @honk=99; set session @honk=99;
--error 1382 --error 1382
set one_shot @honk=99; set one_shot @honk=99;
......
...@@ -387,3 +387,11 @@ select a into @x from t1; ...@@ -387,3 +387,11 @@ select a into @x from t1;
show warnings; show warnings;
drop table t1; drop table t1;
#
# Bug #10339: read only variables.
#
--error 1238
set @@warning_count=1;
--error 1238
set @@global.error_count=1;
...@@ -48,7 +48,8 @@ libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \ ...@@ -48,7 +48,8 @@ libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \
my_chsize.c my_lread.c my_lwrite.c my_clock.c \ my_chsize.c my_lread.c my_lwrite.c my_clock.c \
my_quick.c my_lockmem.c my_static.c \ my_quick.c my_lockmem.c my_static.c \
my_sync.c my_getopt.c my_mkdir.c \ my_sync.c my_getopt.c my_mkdir.c \
default.c my_compress.c checksum.c raid.cc \ default_modify.c default.c \
my_compress.c checksum.c raid.cc \
my_net.c my_semaphore.c my_port.c my_sleep.c \ my_net.c my_semaphore.c my_port.c my_sleep.c \
charset.c charset-def.c my_bitmap.c my_bit.c md5.c \ charset.c charset-def.c my_bitmap.c my_bit.c md5.c \
my_gethostbyname.c rijndael.c my_aes.c sha1.c \ my_gethostbyname.c rijndael.c my_aes.c sha1.c \
......
...@@ -81,141 +81,6 @@ static void init_default_directories(); ...@@ -81,141 +81,6 @@ static void init_default_directories();
static char *remove_end_comment(char *ptr); static char *remove_end_comment(char *ptr);
/*
Add/remove option to the option file section.
SYNOPSYS
my_correct_file()
file_location The location of configuration file to edit
option option to look for
option value The value of the option we would like to set
section_name the name of the section
remove_option This is true if we want to remove the option.
False otherwise.
IMPLEMENTATION
We open the option file first, then read the file line-by-line,
looking for the section we need. At the same time we put these lines
into a buffer. Then we look for the option within this section and
change/remove it. In the end we get a buffer with modified version of the
file. Then we write it to the file, truncate it if needed and close it.
RETURN
0 - ok
1 - some error has occured. Probably due to the lack of resourses
-1 - cannot open the file
*/
int my_correct_defaults_file(const char *file_location, const char *option,
const char *option_value,
const char *section_name, int remove_option)
{
FILE *cnf_file;
struct stat file_stat;
char linebuff[512], *ptr;
uint optlen;
uint len;
char *file_buffer;
uint position= 0;
int is_found= FALSE;
DBUG_ENTER("my_correct_defaults_file");
optlen= strlen(option);
if (!(cnf_file= my_fopen(file_location, O_RDWR, MYF(0))))
goto err_fopen;
/* my_fstat doesn't use the flag parameter */
if (my_fstat(fileno(cnf_file), &file_stat, MYF(0)))
goto err;
/*
Reserve space to read the contents of the file and some more
for the option we want ot add.
*/
file_buffer= (char*) my_malloc(sizeof(char)*
(file_stat.st_size + /* current file size */
optlen + /* option name len */
2 + /* reserve space for newline */
1 + /* reserve for '=' char */
strlen(option_value)), /* option value len */
MYF(MY_WME));
if (!file_buffer)
goto malloc_err;
while (fgets(linebuff, sizeof(linebuff), cnf_file))
{
len= strlen(linebuff);
/* if the section is found traverse it */
if (is_found)
{
/* skip the old value of the option we are changing */
if (strncmp(linebuff, option, optlen))
{
/* copy all other lines */
strmake(file_buffer + position, linebuff, len);
position+= len;
}
}
else
{
strmake(file_buffer + position, linebuff, len);
position+= len;
}
/* looking for appropriate section */
for (ptr= linebuff ; my_isspace(&my_charset_latin1,*ptr) ; ptr++)
{}
if (*ptr == '[')
{
/* copy the line to the buffer */
if (!strncmp(++ptr, section_name, strlen(section_name)))
{
is_found= TRUE;
/* add option */
if (!remove_option)
{
strmake(file_buffer + position, option, optlen);
position+= optlen;
if (*option_value)
{
*(file_buffer + position++)= '=';
strmake(file_buffer + position, option_value,
strlen(option_value));
position+= strlen(option_value);
}
/* add a newline */
strcat(file_buffer + position, NEWLINE);
position+= strlen(NEWLINE);
}
}
else
is_found= FALSE; /* mark that this section is of no interest to us */
}
}
if (my_chsize(fileno(cnf_file), position, 0, MYF(MY_WME)) ||
my_fseek(cnf_file, 0, MY_SEEK_SET, MYF(0)) ||
my_fwrite(cnf_file, file_buffer, position, MYF(MY_NABP)) ||
my_fclose(cnf_file, MYF(MY_WME)))
goto err;
my_free(file_buffer, MYF(0));
DBUG_RETURN(0);
err:
my_free(file_buffer, MYF(0));
malloc_err:
my_fclose(cnf_file, MYF(0));
DBUG_RETURN(1); /* out of resources */
err_fopen:
DBUG_RETURN(-1); /* cannot access the option file */
}
/* /*
Process config files in default directories. Process config files in default directories.
......
This diff is collapsed.
...@@ -85,7 +85,7 @@ void init_thr_alarm(uint max_alarms) ...@@ -85,7 +85,7 @@ void init_thr_alarm(uint max_alarms)
#else #else
{ {
struct sigaction sact; struct sigaction sact;
sact.sa_flags = 0; bzero((char*) &sact, sizeof(sact));
sact.sa_handler = thread_alarm; sact.sa_handler = thread_alarm;
sigaction(THR_CLIENT_ALARM, &sact, (struct sigaction*) 0); sigaction(THR_CLIENT_ALARM, &sact, (struct sigaction*) 0);
} }
......
...@@ -315,8 +315,8 @@ system=`echo $system | sed -e 's/solaris2.\([0-9]*\)/solaris\1/g'` ...@@ -315,8 +315,8 @@ system=`echo $system | sed -e 's/solaris2.\([0-9]*\)/solaris\1/g'`
system=`echo $system | sed -e 's/sco3.2v\(.*\)/openserver\1/g'` system=`echo $system | sed -e 's/sco3.2v\(.*\)/openserver\1/g'`
# Use the override --machine if present # Use the override --machine if present
if [ $MACHINE != "" ] ; then if [ -n $MACHINE ] ; then
machine= $MACHINE machine=$MACHINE
fi fi
# Change the distribution to a long descriptive name # Change the distribution to a long descriptive name
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
INCLUDES= -I$(top_srcdir)/include -I$(top_builddir)/include INCLUDES= @ZLIB_INCLUDES@ -I$(top_srcdir)/include \
$(openssl_includes) -I$(top_builddir)/include
DEFS= -DMYSQL_INSTANCE_MANAGER -DMYSQL_SERVER DEFS= -DMYSQL_INSTANCE_MANAGER -DMYSQL_SERVER
......
...@@ -548,7 +548,7 @@ int Show_instance_log_files::execute(struct st_net *net, ulong connection_id) ...@@ -548,7 +548,7 @@ int Show_instance_log_files::execute(struct st_net *net, ulong connection_id)
path_field.name= (char*) "Path"; path_field.name= (char*) "Path";
path_field.length= DEFAULT_FIELD_LENGTH; path_field.length= DEFAULT_FIELD_LENGTH;
path.data= &path_field; path.data= &path_field;
size_field.name= (char*) "Filesize"; size_field.name= (char*) "File size";
size_field.length= DEFAULT_FIELD_LENGTH; size_field.length= DEFAULT_FIELD_LENGTH;
size.data= &size_field; size.data= &size_field;
field_list= list_add(NULL, &size); field_list= list_add(NULL, &size);
...@@ -689,8 +689,8 @@ int Set_option::correct_file(int skip) ...@@ -689,8 +689,8 @@ int Set_option::correct_file(int skip)
{ {
int error; int error;
error= my_correct_defaults_file("/etc/my.cnf", option, error= modify_defaults_file("/etc/my.cnf", option,
option_value, instance_name, skip); option_value, instance_name, skip);
if (error > 0) if (error > 0)
return ER_OUT_OF_RESOURCES; return ER_OUT_OF_RESOURCES;
else if (error < 0) else if (error < 0)
......
...@@ -300,7 +300,7 @@ void print_hash_map(const char *name) ...@@ -300,7 +300,7 @@ void print_hash_map(const char *name)
char *cur; char *cur;
int i; int i;
printf("uchar %s[%d]= {\n",name,size_hash_map); printf("static uchar %s[%d]= {\n",name,size_hash_map);
for (i=0, cur= hash_map; i<size_hash_map; i++, cur++) for (i=0, cur= hash_map; i<size_hash_map; i++, cur++)
{ {
switch(i%4){ switch(i%4){
...@@ -459,11 +459,11 @@ int main(int argc,char **argv) ...@@ -459,11 +459,11 @@ int main(int argc,char **argv)
generate_find_structs(); generate_find_structs();
print_find_structs(); print_find_structs();
printf("\nunsigned int sql_functions_max_len=%d;\n",max_len); printf("\static unsigned int sql_functions_max_len=%d;\n",max_len);
printf("\nunsigned int symbols_max_len=%d;\n\n",max_len2); printf("\static unsigned int symbols_max_len=%d;\n\n",max_len2);
printf("\ printf("\
inline SYMBOL *get_hash_symbol(const char *s,\n \ static inline SYMBOL *get_hash_symbol(const char *s,\n\
unsigned int len,bool function)\n\ unsigned int len,bool function)\n\
{\n\ {\n\
register uchar *hash_map;\n\ register uchar *hash_map;\n\
......
This diff is collapsed.
...@@ -506,7 +506,7 @@ class handler :public Sql_alloc ...@@ -506,7 +506,7 @@ class handler :public Sql_alloc
} }
virtual int ha_initialise(); virtual int ha_initialise();
int ha_open(const char *name, int mode, int test_if_locked); int ha_open(const char *name, int mode, int test_if_locked);
void update_auto_increment(); bool update_auto_increment();
virtual void print_error(int error, myf errflag); virtual void print_error(int error, myf errflag);
virtual bool get_error_message(int error, String *buf); virtual bool get_error_message(int error, String *buf);
uint get_dup_key(int error); uint get_dup_key(int error);
......
This diff is collapsed.
This diff is collapsed.
...@@ -1827,7 +1827,7 @@ void Item_func_round::fix_length_and_dec() ...@@ -1827,7 +1827,7 @@ void Item_func_round::fix_length_and_dec()
return; return;
} }
int decimals_to_set= max(args[1]->val_int(), 0); int decimals_to_set= max((int)args[1]->val_int(), 0);
if (args[0]->decimals == NOT_FIXED_DEC) if (args[0]->decimals == NOT_FIXED_DEC)
{ {
max_length= args[0]->max_length; max_length= args[0]->max_length;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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