Commit 5245f98c authored by msvensson@neptunus.(none)'s avatar msvensson@neptunus.(none)

Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0-ndb

into neptunus.(none):/home/msvensson/mysql/bug9626
parents acb83c67 b85c5ee2
......@@ -1110,3 +1110,8 @@ VC++Files/client/mysql_amd64.dsp
client/mysqltestmanager-pwgen
client/mysqltestmanagerc
tools/mysqltestmanager
config.guess
config.sub
install-sh
ltmain.sh
missing
......@@ -7,17 +7,9 @@ commands="\
$make -k distclean || true
/bin/rm -rf */.deps/*.P config.cache innobase/config.cache bdb/build_unix/config.cache bdb/dist/autom4te.cache autom4te.cache innobase/autom4te.cache;
aclocal || (echo \"Can't execute aclocal\" && exit 1)
autoheader || (echo \"Can't execute autoheader\" && exit 1)
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 bdb/dist && sh s_all)
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
if [ -d gemini ]
then
(cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
fi"
path=`dirname $0`
. \"$path/autorun.sh\""
if [ -z "$just_clean" ]
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 @@
make -k clean
/bin/rm -f */.deps/*.P */*.o
/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
make
......
......@@ -2,7 +2,9 @@
make -k clean
/bin/rm -f */.deps/*.P */*.o
/bin/rm -f */.deps/*.P config.cache innobase/config.cache 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
......
......@@ -2,7 +2,9 @@
make -k clean
/bin/rm -f */.deps/*.P */*.o
/bin/rm -f */.deps/*.P config.cache innobase/config.cache 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
make
......@@ -62,14 +62,9 @@ done
set -x
make distclean
aclocal
autoheader
libtoolize --automake --force
automake --force --add-missing
autoconf
(cd bdb/dist && sh s_all)
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
path=`dirname $0`
. "$path/autorun.sh"
CC=cc CXX=aCC CFLAGS="$cflags" CXXFLAGS="$cxxflags" \
./configure --prefix=/usr/local/mysql --disable-shared \
......
gmake -k clean || true
/bin/rm -f */.deps/*.P config.cache innobase/config.cache bdb/build_unix/config.cache
aclocal && autoheader && aclocal && automake && autoconf
(cd bdb/dist && sh s_all)
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
if [ -d gemini ]
then
(cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
fi
path=`dirname $0`
. "$path/autorun.sh"
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
......@@ -34,14 +34,9 @@ fi
set -x
make distclean
aclocal
autoheader
libtoolize --automake --force
automake --force --add-missing
autoconf
(cd bdb/dist && sh s_all)
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
path=`dirname $0`
. "$path/autorun.sh"
# C options:
# -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,9 @@ AM_MAKEFLAGS="-j 2"
gmake -k clean || true
/bin/rm -f */.deps/*.P config.cache
aclocal && autoheader && aclocal && automake && autoconf
(cd bdb/dist && sh s_all)
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
if [ -d gemini ]
then
(cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
fi
path=`dirname $0`
. "$path/autorun.sh"
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
......
#! /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 @@
gmake -k clean || true
/bin/rm -f */.deps/*.P config.cache
aclocal && autoheader && aclocal && automake && autoconf
(cd bdb/dist && sh s_all)
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
if [ -d gemini ]
then
(cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
fi
path=`dirname $0`
. "$path/autorun.sh"
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
......@@ -3,13 +3,8 @@
gmake -k clean || true
/bin/rm -f */.deps/*.P config.cache
aclocal && autoheader && aclocal && automake && autoconf
(cd bdb/dist && sh s_all)
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
if [ -d gemini ]
then
(cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
fi
path=`dirname $0`
. "$path/autorun.sh"
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 @@
gmake -k clean || true
/bin/rm -f */.deps/*.P config.cache
aclocal && autoheader && aclocal && automake && autoconf
(cd bdb/dist && sh s_all)
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
if [ -d gemini ]
then
(cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
fi
path=`dirname $0`
. "$path/autorun.sh"
# Assume Forte is installed in /opt/SUNWSpro
......
......@@ -33,9 +33,9 @@ done
gmake -k clean || true
/bin/rm -f */.deps/*.P config.cache
aclocal && autoheader && aclocal && automake && autoconf
(cd bdb/dist && sh s_all)
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
path=`dirname $0`
. "$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
......
......@@ -57,6 +57,7 @@ evgen@moonbone.local
gbichot@production.mysql.com
gbichot@quadita2.mysql.com
gbichot@quadxeon.mysql.com
geert@kriem.kemuri.org
georg@beethoven.local
georg@beethoven.site
georg@lmy002.wdf.sap.corp
......@@ -242,6 +243,8 @@ salle@geopard.online.bg
salle@vafla.home
salle@vafla.online.bg
sasha@mysql.sashanet.com
schwenke@lmy003.wdf.sap.corp
schwenke@lmy003.xl.local
serg@build.mysql.com
serg@build.mysql2.com
serg@mysql.com
......@@ -279,6 +282,7 @@ tonu@x3.internalnet
tsmith@build.mysql.com
tulin@build.mysql.com
tulin@dl145b.mysql.com
tulin@dl145c.mysql.com
tulin@mysql.com
ulli@morbus.(none)
venu@hundin.mysql.fi
......
......@@ -330,6 +330,10 @@ SOURCE=..\mysys\my_alloc.c
# End Source File
# Begin Source File
SOURCE=..\mysys\my_chsize.c
# End Source File
# Begin Source File
SOURCE=..\mysys\my_compress.c
# ADD CPP /I "../zlib"
# End Source File
......
......@@ -219,6 +219,10 @@ SOURCE=..\mysys\default.c
# End Source File
# Begin Source File
SOURCE=..\mysys\default_modify.c
# End Source File
# Begin Source File
SOURCE=.\dll.c
# End Source File
# Begin Source File
......@@ -303,6 +307,10 @@ SOURCE=..\mysys\my_alloc.c
# End Source File
# Begin Source File
SOURCE=..\mysys\my_chsize.c
# End Source File
# Begin Source File
SOURCE=..\mysys\my_compress.c
# End Source File
# Begin Source File
......@@ -387,6 +395,10 @@ SOURCE=..\mysys\my_rename.c
# End Source File
# Begin Source File
SOURCE=..\mysys\my_seek.c
# End Source File
# Begin Source File
SOURCE=..\mysys\my_static.c
# End Source File
# Begin Source File
......
......@@ -180,6 +180,10 @@ SOURCE=..\mysys\default.c
# End Source File
# Begin Source File
SOURCE=..\mysys\default_modify.c
# End Source File
# Begin Source File
SOURCE=..\sql\derror.cpp
# End Source File
# Begin Source File
......
......@@ -204,6 +204,10 @@ SOURCE=.\default.c
# End Source File
# Begin Source File
SOURCE=.\default_modify.c
# End Source File
# Begin Source File
SOURCE=.\errors.c
# End Source File
# Begin Source File
......
......@@ -49,5 +49,5 @@ enum options_client
#ifdef HAVE_NDBCLUSTER_DB
OPT_NDBCLUSTER, OPT_NDB_CONNECTSTRING,
#endif
OPT_IGNORE_TABLE,OPT_INSERT_IGNORE
OPT_IGNORE_TABLE,OPT_INSERT_IGNORE,OPT_SHOW_WARNINGS
};
......@@ -135,7 +135,8 @@ static my_bool info_flag=0,ignore_errors=0,wait_flag=0,quick=0,
opt_xml=0,opt_nopager=1, opt_outfile=0, named_cmds= 0,
tty_password= 0, opt_nobeep=0, opt_reconnect=1,
default_charset_used= 0, opt_secure_auth= 0,
default_pager_set= 0, opt_sigint_ignore= 0;
default_pager_set= 0, opt_sigint_ignore= 0,
show_warnings = 0;
static ulong opt_max_allowed_packet, opt_net_buffer_length;
static uint verbose=0,opt_silent=0,opt_mysql_port=0, opt_local_infile=0;
static my_string opt_mysql_unix_port=0;
......@@ -194,7 +195,8 @@ static int com_quit(String *str,char*),
com_use(String *str,char*), com_source(String *str, char*),
com_rehash(String *str, char*), com_tee(String *str, char*),
com_notee(String *str, char*),
com_prompt(String *str, char*), com_delimiter(String *str, char*);
com_prompt(String *str, char*), com_delimiter(String *str, char*),
com_warnings(String *str, char*), com_nowarnings(String *str, char*);
#ifdef USE_POPEN
static int com_nopager(String *str, char*), com_pager(String *str, char*),
......@@ -266,6 +268,10 @@ static COMMANDS commands[] = {
"Set outfile [to_outfile]. Append everything into given outfile." },
{ "use", 'u', com_use, 1,
"Use another database. Takes database name as argument." },
{ "warnings", 'W', com_warnings, 0,
"Show warnings after every statement." },
{ "nowarning", 'w', com_nowarnings, 0,
"Don't show warnings after every statement." },
/* Get bash-like expansion for some commands */
{ "create table", 0, 0, 0, ""},
{ "create database", 0, 0, 0, ""},
......@@ -323,6 +329,7 @@ static void print_table_data_html(MYSQL_RES *result);
static void print_table_data_xml(MYSQL_RES *result);
static void print_tab_data(MYSQL_RES *result);
static void print_table_data_vertically(MYSQL_RES *result);
static void print_warnings(void);
static ulong start_timer(void);
static void end_timer(ulong start_time,char *buff);
static void mysql_end_timer(ulong start_time,char *buff);
......@@ -693,6 +700,9 @@ static struct my_option my_long_options[] =
{"secure-auth", OPT_SECURE_AUTH, "Refuse client connecting to server if it"
" uses old (pre-4.1.1) protocol", (gptr*) &opt_secure_auth,
(gptr*) &opt_secure_auth, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"show-warnings", OPT_SHOW_WARNINGS, "Show warnings after every statement.",
(gptr*) &show_warnings, (gptr*) &show_warnings, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
......@@ -1962,6 +1972,13 @@ com_go(String *buffer,char *line __attribute__((unused)))
if (err >= 1)
error= put_error(&mysql);
if (show_warnings == 1 && warnings >= 1) /* Show warnings if any */
{
init_pager();
print_warnings();
end_pager();
}
if (!error && !status.batch &&
(mysql.server_status & SERVER_STATUS_DB_DROPPED))
get_current_db();
......@@ -2077,7 +2094,8 @@ print_table_data(MYSQL_RES *result)
separator.fill(separator.length()+length+2,'-');
separator.append('+');
}
tee_puts(separator.c_ptr_safe(), PAGER);
separator.append('\0'); // End marker for \0
tee_puts((char*) separator.ptr(), PAGER);
if (column_names)
{
mysql_field_seek(result,0);
......@@ -2090,7 +2108,7 @@ print_table_data(MYSQL_RES *result)
num_flag[off]= IS_NUM(field->type);
}
(void) tee_fputs("\n", PAGER);
tee_puts(separator.c_ptr(), PAGER);
tee_puts((char*) separator.ptr(), PAGER);
}
while ((cur= mysql_fetch_row(result)))
......@@ -2119,7 +2137,7 @@ print_table_data(MYSQL_RES *result)
}
(void) tee_fputs("\n", PAGER);
}
tee_puts(separator.c_ptr(), PAGER);
tee_puts((char*) separator.ptr(), PAGER);
my_afree((gptr) num_flag);
}
......@@ -2219,6 +2237,34 @@ print_table_data_vertically(MYSQL_RES *result)
}
}
/* print_warnings should be called right after executing a statement */
static void
print_warnings()
{
char query[30];
MYSQL_RES *result;
MYSQL_ROW cur;
/* Get the warnings */
strmov(query,"show warnings");
mysql_real_query_for_lazy(query,strlen(query));
mysql_store_result_for_lazy(&result);
/* Bail out when no warnings */
my_ulonglong num_rows = mysql_num_rows(result);
if (num_rows == 0)
{
mysql_free_result(result);
return;
}
/* Print the warnings */
while ((cur= mysql_fetch_row(result)))
{
tee_fprintf(PAGER, "%s (Code %s): %s\n", cur[0], cur[1], cur[2]);
}
mysql_free_result(result);
}
static const char
*array_value(const char **array, char key)
......@@ -2715,6 +2761,23 @@ com_use(String *buffer __attribute__((unused)), char *line)
return 0;
}
static int
com_warnings(String *buffer __attribute__((unused)),
char *line __attribute__((unused)))
{
show_warnings = 1;
put_info("Show warnings enabled.",INFO_INFO);
return 0;
}
static int
com_nowarnings(String *buffer __attribute__((unused)),
char *line __attribute__((unused)))
{
show_warnings = 0;
put_info("Show warnings disabled.",INFO_INFO);
return 0;
}
/*
Gets argument from a command on the command line. If get_next_arg is
......
This diff is collapsed.
......@@ -2024,11 +2024,11 @@ my_bool end_of_query(int c)
int read_line(char* buf, int size)
{
int c;
char quote;
char* p= buf, *buf_end= buf + size - 1;
int no_save= 0;
enum {R_NORMAL, R_Q1, R_ESC_Q_Q1, R_ESC_Q_Q2,
R_ESC_SLASH_Q1, R_ESC_SLASH_Q2,
R_Q2, R_COMMENT, R_LINE_START} state= R_LINE_START;
enum {R_NORMAL, R_Q, R_Q_IN_Q, R_SLASH_IN_Q,
R_COMMENT, R_LINE_START} state= R_LINE_START;
DBUG_ENTER("read_line");
start_lineno= *lineno;
......@@ -2063,10 +2063,11 @@ int read_line(char* buf, int size)
*p= 0;
DBUG_RETURN(0);
}
else if (c == '\'')
state = R_Q1;
else if (c == '"')
state = R_Q2;
else if (c == '\'' || c == '"' || c == '`')
{
quote= c;
state= R_Q;
}
else if (c == '\n')
{
state = R_LINE_START;
......@@ -2101,55 +2102,36 @@ int read_line(char* buf, int size)
*p= 0;
DBUG_RETURN(0);
}
else if (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))
else if (c == '\'' || c == '"' || c == '`')
{
*p= 0;
DBUG_RETURN(0);
quote= c;
state= R_Q;
}
if (c != '\'')
state= R_NORMAL;
else
state= R_Q1;
break;
case R_ESC_SLASH_Q1:
state= R_Q1;
state= R_NORMAL;
break;
case R_Q2:
if (c == '"')
state= R_ESC_Q_Q2;
case R_Q:
if (c == quote)
state= R_Q_IN_Q;
else if (c == '\\')
state= R_ESC_SLASH_Q2;
state= R_SLASH_IN_Q;
break;
case R_ESC_Q_Q2:
case R_Q_IN_Q:
if (end_of_query(c))
{
*p= 0;
DBUG_RETURN(0);
}
if (c != '"')
if (c != quote)
state= R_NORMAL;
else
state= R_Q2;
state= R_Q;
break;
case R_ESC_SLASH_Q2:
state= R_Q2;
case R_SLASH_IN_Q:
state= R_Q;
break;
}
if (!no_save)
......
......@@ -87,7 +87,7 @@ case $FLAG in
cat $FILES | $AWK '
BEGIN {
printf("/* Automatically generated file, do not edit */\n");
printf("#include \"sys.h\"\n#include \"el.h\"\n");
printf("#include \"config.h\"\n#include \"el.h\"\n");
printf("private const struct el_bindings_t el_func_help[] = {\n");
low = "abcdefghijklmnopqrstuvwxyz_";
high = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_";
......@@ -170,7 +170,7 @@ case $FLAG in
cat $FILES | $AWK '/el_action_t/ { print $3 }' | sort | $AWK '
BEGIN {
printf("/* Automatically generated file, do not edit */\n");
printf("#include \"sys.h\"\n#include \"el.h\"\n");
printf("#include \"config.h\"\n#include \"el.h\"\n");
printf("private const el_func_t el_func[] = {");
maxlen = 80;
needn = 1;
......
......@@ -70,10 +70,10 @@ extern char *alloca ();
#include <fcntl.h>
#include <vis.h>
#include "readline/readline.h"
#include "el.h"
#include "fcns.h" /* for EL_NUM_FCNS */
#include "histedit.h"
#include "readline/readline.h"
/* for rl_complete() */
#define TAB '\r'
......
......@@ -73,7 +73,7 @@ typedef KEYMAP_ENTRY *Keymap;
#ifndef CTRL
#include <sys/ioctl.h>
#ifdef __GLIBC__
#if defined(__GLIBC__) || defined(__MWERKS__)
#include <sys/ttydefaults.h>
#endif
#ifndef CTRL
......
......@@ -37,6 +37,7 @@
/*
* search.c: History and character search functions
*/
#include <sys/types.h>
#include <stdlib.h>
#if defined(REGEX)
#include <regex.h>
......
This diff is collapsed.
This diff is collapsed.
......@@ -38,7 +38,7 @@ AC_LANG_PUSH(C++)
if test "$ac_cv_prog_gxx" = "yes"
then
# 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
mysql_cv_btype_last_arg_accept=none
[AC_TRY_COMPILE([#if defined(inline)
......@@ -98,7 +98,7 @@ AC_LANG_PUSH(C++)
if test "$ac_cv_prog_gxx" = "yes"
then
# 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
mysql_cv_btype_struct_rlimit=none
[AC_TRY_COMPILE([#if defined(inline)
......
......@@ -359,6 +359,14 @@ AC_SUBST(INSTALL_SCRIPT)
export CC CXX CFLAGS LD LDFLAGS AR
if test "$GCC" = "yes"
then
# mysqld requires -fno-implicit-templates.
# Disable exceptions as they seams to create problems with gcc and threads.
# mysqld doesn't use run-time-type-checking, so we disable it.
CXXFLAGS="$CXXFLAGS -fno-implicit-templates -fno-exceptions -fno-rtti"
fi
# Avoid bug in fcntl on some versions of linux
AC_MSG_CHECKING("if we should use 'skip-locking' as default for $target_os")
# Any variation of Linux
......@@ -1374,20 +1382,20 @@ then
AC_MSG_CHECKING("for gcc")
if expr "$CC" : ".*gcc.*"
then
CC="$CC -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
CXX="$CXX -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
CC="$CC -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"
CXX="$CXX -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"
else
CC="$CC -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
CXX="$CXX -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
CC="$CC -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"
CXX="$CXX -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"
fi
else
{ AC_MSG_ERROR([configure: error: Can't find thread libs on SCO UnixWare7. See the Installation chapter in the Reference Manual.]) };
AC_MSG_ERROR([configure: error: Can't find thread libs on SCO UnixWare7. See the Installation chapter in the Reference Manual.])
fi
else
AC_MSG_RESULT("no")
fi
else
AC_MSG_ERROR([On SCO UNIX MySQL requires that the FSUThreads package is installed. See the Installation chapter in the Reference Manual.]);
AC_MSG_ERROR([On SCO UNIX MySQL requires that the FSUThreads package is installed. See the Installation chapter in the Reference Manual.])
fi
else
AC_MSG_RESULT("no")
......@@ -1419,15 +1427,15 @@ then
AC_MSG_CHECKING("for gcc")
if expr "$CC" : ".*gcc.*"
then
CC="$CC -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
CXX="$CXX -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
CC="$CC -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"
CXX="$CXX -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"
else
CC="$CC -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
CXX="$CXX -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
CC="$CC -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"
CXX="$CXX -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"
fi
AC_MSG_RESULT("yes")
else
{ AC_MSG_ERROR([configure: error: Can't find thread libs on SCO UnixWare7. See the Installation chapter in the Reference Manual.]) };
AC_MSG_ERROR([configure: error: Can't find thread libs on SCO UnixWare7. See the Installation chapter in the Reference Manual.])
fi
else
AC_MSG_RESULT("no")
......@@ -1462,15 +1470,15 @@ then
AC_MSG_CHECKING("for gcc")
if expr "$CC" : ".*gcc.*"
then
CC="$CC -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
CXX="$CXX -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
CC="$CC -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"
CXX="$CXX -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"
else
CC="$CC -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
CXX="$CXX -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
CC="$CC -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"
CXX="$CXX -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"
fi
AC_MSG_RESULT("yes")
else
{ AC_MSG_ERROR([configure: error: Can't find thread libs on Caldera OpenUNIX 8. See the Installation chapter in the Reference Manual.]) };
AC_MSG_ERROR([configure: error: Can't find thread libs on Caldera OpenUNIX 8. See the Installation chapter in the Reference Manual.])
fi
else
AC_MSG_RESULT("no")
......@@ -1804,6 +1812,7 @@ fi
fi
AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>])
AC_CHECK_TYPES([size_t], [], [], [#include <stdio.h>])
AC_CHECK_TYPES([u_int32_t])
MYSQL_PTHREAD_YIELD
......@@ -1957,9 +1966,12 @@ AC_LANG_CPLUSPLUS
# with respect to ANSI C++
# We also remove the -fbranch-probabilities option as this will give warnings
# 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"
then
CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed 's/-fbranch-probabilities//'`
CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-Wcheck//'`
fi
AC_TRY_COMPILE(
......@@ -1994,7 +2006,7 @@ AC_LANG_SAVE
AC_LANG_CPLUSPLUS
if test "$ac_cv_prog_gxx" = "yes" -a "$with_other_libc" = "no"
then
CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed 's/-fbranch-probabilities//'`
CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-Wcheck//'`
fi
AC_TRY_COMPILE(
[#undef inline
......@@ -2027,7 +2039,7 @@ AC_LANG_SAVE
AC_LANG_CPLUSPLUS
if test "$ac_cv_prog_gxx" = "yes" -a "$with_other_libc" = "no"
then
CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed 's/-fbranch-probabilities//'`
CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-Wcheck//'`
fi
AC_TRY_COMPILE(
[#undef inline
......
This diff is collapsed.
......@@ -63,7 +63,7 @@ typedef struct st_pointer_array { /* when using array-strings */
#define LAST_CHAR_CODE 259
typedef struct st_replace {
bool found;
my_bool found;
struct st_replace *next[256];
} REPLACE;
......@@ -80,19 +80,18 @@ typedef struct st_replace_found {
/* functions defined in this file */
extern int main(int argc,char * *argv);
static int static_get_options(int *argc,char * * *argv);
static int get_replace_strings(int *argc,char * * *argv,
POINTER_ARRAY *from_array,
POINTER_ARRAY *to_array);
int insert_pointer_name(POINTER_ARRAY *pa, my_string name);
void free_pointer_array(POINTER_ARRAY *pa);
static int insert_pointer_name(POINTER_ARRAY *pa, my_string name);
static void free_pointer_array(POINTER_ARRAY *pa);
static int convert_pipe(REPLACE *,FILE *,FILE *);
static int convert_file(REPLACE *, my_string);
REPLACE *init_replace(my_string *from, my_string *to,uint count, my_string
word_end_chars);
uint replace_strings(REPLACE *rep, my_string *start,uint *max_length,
my_string from);
static REPLACE *init_replace(my_string *from, my_string *to,uint count,
my_string word_end_chars);
static uint replace_strings(REPLACE *rep, my_string *start,uint *max_length,
my_string from);
static int initialize_buffer(void);
static void reset_buffer(void);
static void free_buffer(void);
......@@ -101,9 +100,7 @@ static int silent=0,verbose=0,updated=0;
/* The main program */
int main(argc,argv)
int argc;
char *argv[];
int main(int argc, char *argv[])
{
int i,error;
char word_end_chars[256],*pos;
......@@ -118,7 +115,7 @@ char *argv[];
for (i=1,pos=word_end_chars ; i < 256 ; i++)
if (my_isspace(&my_charset_latin1,i))
*pos++=i;
*pos++= (char) i;
*pos=0;
if (!(replace=init_replace((char**) from.typelib.type_names,
(char**) to.typelib.type_names,
......@@ -153,7 +150,7 @@ static int static_get_options(argc,argv)
register int *argc;
register char **argv[];
{
int help,version,opt;
int help,version;
char *pos;
silent=verbose=help=0;
......@@ -162,7 +159,7 @@ register char **argv[];
while (*++pos)
{
version=0;
switch((opt= *pos)) {
switch((*pos)) {
case 's':
silent=1;
break;
......@@ -249,7 +246,7 @@ POINTER_ARRAY *from_array,*to_array;
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;
byte *new_pos;
......@@ -323,8 +320,7 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name)
/* free pointer array */
void free_pointer_array(pa)
reg1 POINTER_ARRAY *pa;
static void free_pointer_array(reg1 POINTER_ARRAY *pa)
{
if (pa->typelib.count)
{
......@@ -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 int cmp_bits(REP_SET *set1,REP_SET *set2);
static int get_next_bit(REP_SET *set,uint lastpos);
static int find_set(REP_SETS *sets,REP_SET *find);
static int find_found(FOUND_SET *found_set,uint table_offset,
int found_offset);
static short find_set(REP_SETS *sets,REP_SET *find);
static short find_found(FOUND_SET *found_set,uint table_offset,
int found_offset);
static uint start_at_word(my_string pos);
static uint end_of_word(my_string pos);
static uint replace_len(my_string pos);
......@@ -394,11 +390,12 @@ static uint found_sets=0;
/* Init a replace structure for further calls */
REPLACE *init_replace(my_string *from, my_string *to,uint count,
my_string word_end_chars)
static REPLACE *init_replace(my_string *from, my_string *to,uint count,
my_string word_end_chars)
{
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];
my_string pos,to_pos,*to_array;
REP_SETS sets;
......@@ -561,7 +558,7 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
for (chr= 0 ; chr < 256 ; chr++)
{
if (! used_chars[chr])
set->next[chr]= chr ? default_state : -1;
set->next[chr]= (short) (chr ? default_state : -1);
else
{
new_set=make_new_set(&sets);
......@@ -652,7 +649,7 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
for (i=1 ; i <= found_sets ; i++)
{
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].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)+
......@@ -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
position */
static int find_set(REP_SETS *sets,REP_SET *find)
static short find_set(REP_SETS *sets,REP_SET *find)
{
uint i;
for (i=0 ; i < sets->count-1 ; i++)
......@@ -820,30 +817,33 @@ static int find_set(REP_SETS *sets,REP_SET *find)
if (!cmp_bits(sets->set+i,find))
{
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;
for (i=0 ; (uint) i < found_sets ; i++)
if (found_set[i].table_offset == table_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].found_offset=found_offset;
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*/
......@@ -878,7 +878,8 @@ static uint replace_len(my_string str)
/* 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;
reg2 REPLACE_STRING *rep_str;
......
......@@ -27,7 +27,7 @@
#ifndef yaSSL_BUFFER_HPP
#define yaSSL_BUFFER_HPP
#include <cassert> // assert
#include <assert.h> // assert
#include "yassl_error.hpp" // Error
#include "memory.hpp" // mySTL::auto_ptr
#include "algorithm.hpp" // mySTL::swap
......
......@@ -30,7 +30,7 @@
#include "socket_wrapper.hpp"
#ifdef YASSL_LOG
#include <cstdio>
#include <stdio.h>
#endif
namespace yaSSL {
......
......@@ -149,7 +149,7 @@ enum { /* X509 Constants */
X509_V_ERR_CRL_SIGNATURE_FAILURE = 10,
X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD = 11,
X509_V_ERR_CRL_HAS_EXPIRED = 12,
X509_V_ERR_CERT_REVOKED = 13,
X509_V_ERR_CERT_REVOKED = 13
};
......@@ -166,7 +166,7 @@ int ERR_GET_REASON(int);
enum { /* ERR Constants */
ERR_TXT_STRING = 1,
EVP_R_BAD_DECRYPT = 2,
EVP_R_BAD_DECRYPT = 2
};
......@@ -263,8 +263,8 @@ enum { /* ssl Constants */
SSL_UNKNOWN = -2,
SSL_FATAL_ERROR = -1,
SSL_NORMAL_SHUTDOWN = 0,
SSL_ERROR_NONE = 0, // for most functions
SSL_FAILURE = 0, // for some functions
SSL_ERROR_NONE = 0, /* for most functions */
SSL_FAILURE = 0, /* for some functions */
SSL_SUCCESS = 1,
SSL_FILETYPE_ASN1 = 10,
......@@ -320,7 +320,7 @@ enum { /* ssl Constants */
SSL_ST_ACCEPT = 94,
SSL_CB_ALERT = 95,
SSL_CB_READ = 96,
SSL_CB_HANDSHAKE_DONE = 97,
SSL_CB_HANDSHAKE_DONE = 97
};
......
......@@ -29,7 +29,7 @@
#ifndef yaSSL_SOCKET_WRAPPER_HPP
#define yaSSL_SOCKET_WRAPPER_HPP
#include <cassert>
#include <assert.h>
#ifdef WIN32
#include <winsock2.h>
......
......@@ -51,7 +51,7 @@ enum YasslError {
verify_error = 112,
send_error = 113,
receive_error = 114,
certificate_error = 115,
certificate_error = 115
// 1000+ from TaoCrypt error.hpp
......
......@@ -27,7 +27,7 @@
#ifndef yaSSL_TYPES_HPP
#define yaSSL_TYPES_HPP
#include<cstddef>
#include <stddef.h>
namespace yaSSL {
......@@ -129,7 +129,7 @@ enum PublicValueEncoding { implicit_encoding, explicit_encoding };
enum ConnectionEnd { server_end, client_end };
enum AlertLevel { warning = 1, fatal = 2, };
enum AlertLevel { warning = 1, fatal = 2 };
......@@ -381,7 +381,7 @@ const char* const cipher_names[128] =
"DES-CBC3-RMD", // TLS_RSA_WITH_3DES_EDE_CBC_RMD160 = 124
"AES128-RMD", // TLS_RSA_WITH_AES_128_CBC_RMD160 = 125
"AES256-RMD", // TLS_RSA_WITH_AES_256_CBC_RMD160 = 126
null_str, // 127
null_str // 127
};
// fill with MD5 pad size since biggest required
......
......@@ -27,16 +27,28 @@
#ifndef mySTL_HELPERS_HPP
#define mySTL_HELPERS_HPP
#include <cstdlib>
#include <stdlib.h>
#ifdef __IBMCPP__
/*
Workaround for the lack of operator new(size_t, void*)
in IBM VA C++ 6.0
*/
struct Dummy {};
inline void *operator new(size_t size, Dummy *d) { return (void*) d; }
typedef Dummy *yassl_pointer;
#else
typedef void *yassl_pointer;
#endif
namespace mySTL {
template <typename T, typename T2>
inline void construct(T* p, const T2& value)
{
new (static_cast<void*>(p)) T(value);
new ((yassl_pointer) p) T(value);
}
......
......@@ -38,6 +38,13 @@ namespace mySTL {
template<typename T>
class list {
#ifdef __SUNPRO_CC
/*
Sun Forte 7 C++ v. 5.4 needs class 'node' be public to be visible to
the nested class 'iterator' (a non-standard behaviour).
*/
public:
#endif
struct node {
node(T t) : prev_(0), next_(0), value_(t) {}
......
......@@ -28,7 +28,7 @@
#define mySTL_STDEXCEPT_HPP
#include <cstring> // strncpy
#include <string.h> // strncpy
namespace mySTL {
......
......@@ -31,7 +31,7 @@
#include "helpers.hpp" // construct, destory, fill, etc.
#include "algorithm.hpp" // swap
#include <new> // ::operator new and delete, placement too
#include <cassert> // assert
#include <assert.h> // assert
namespace mySTL {
......
......@@ -273,8 +273,8 @@ int CertManager::SetPrivateKey(const x509& key)
privateKey_.assign(key.get_buffer(), key.get_length());
// set key type
if (x509* cert = list_.front()) {
TaoCrypt::Source source(cert->get_buffer(), cert->get_length());
if (x509* cert509 = list_.front()) {
TaoCrypt::Source source(cert509->get_buffer(), cert509->get_length());
TaoCrypt::CertDecoder cert(source, false);
cert.DecodeToKey();
if (int err = cert.GetError().What())
......
/*
To make libtool always use a C++ linker when compiling with yaSSL we need
to add a dummy C++ file to the source list.
*/
......@@ -36,7 +36,7 @@
#include "openssl/ssl.h"
#include "handshake.hpp"
#include "yassl_int.hpp"
#include <cstdio>
#include <stdio.h>
namespace yaSSL {
......
......@@ -79,7 +79,7 @@ enum ASNIdFlag
enum DNTags
{
COMMON_NAME = 0x03,
COMMON_NAME = 0x03
};
......@@ -92,7 +92,7 @@ enum Constants
MAX_SEQ_SZ = 5, // enum(seq|con) + length(4)
MAX_ALGO_SIZE = 9,
MAX_DIGEST_SZ = 25, // SHA + enum(Bit or Octet) + length(4)
DSA_SIG_SZ = 40,
DSA_SIG_SZ = 40
};
......
......@@ -31,7 +31,7 @@
#include "stdexcept.hpp" // mySTL::runtime_error
#include "misc.hpp"
#include <string.h> // memcpy
#include <cstddef> // ptrdiff_t
#include <stddef.h> // ptrdiff_t
#if defined(_MSC_VER) && defined(_CRTAPI1)
......@@ -49,11 +49,7 @@ class AllocatorBase
public:
typedef T value_type;
typedef size_t size_type;
#ifdef TAOCRYPT_MSVCRT6
typedef ptrdiff_t difference_type;
#else
typedef std::ptrdiff_t difference_type;
#endif
typedef T* pointer;
typedef const T* const_pointer;
typedef T& reference;
......
......@@ -65,7 +65,7 @@ UNKOWN_HASH_E = 1034, // "unknown hash OID"
DSA_SZ_E = 1035, // "bad DSA r or s size"
BEFORE_DATE_E = 1036, // "before date in the future"
AFTER_DATE_E = 1037, // "after date in the past"
SIG_CONFIRM_E = 1038, // "bad signature confirmation"
SIG_CONFIRM_E = 1038 // "bad signature confirmation"
};
......
......@@ -29,7 +29,7 @@
#include "misc.hpp"
#include "block.hpp"
#include "error.hpp"
#include <cstdio>
#include <stdio.h>
namespace TaoCrypt {
......
......@@ -29,7 +29,7 @@
#include "block.hpp"
#include "random.hpp"
#include "file.hpp"
#include <cstring>
#include <string.h>
#include "algorithm.hpp" // mySTL::swap
......
......@@ -59,7 +59,7 @@ typedef unsigned char byte;
typedef unsigned short word16;
typedef unsigned int word32;
#if defined(__GNUC__) || defined(__MWERKS__)
#if defined(__GNUC__) || defined(__MWERKS__) || defined(_LONGLONG_TYPE)
#define WORD64_AVAILABLE
typedef unsigned long long word64;
#define W64LIT(x) x##LL
......@@ -79,8 +79,10 @@ typedef unsigned int word32;
typedef word32 lword;
#endif
// FIXME the !defined(__sun) is a temporarely solution until asm for
// __x86_64__ and Solaris is written
#if defined(__alpha__) || defined(__ia64__) || defined(_ARCH_PPC64) || \
defined(__x86_64__) || defined(__mips64)
defined(__mips64) || (defined(__x86_64__) && !defined(__sun))
// These platforms have 64-bit CPU registers. Unfortunately most C++ compilers
// don't allow any way to access the 64-bit by 64-bit multiply instruction
// without using assembly, so in order to use word64 as word, the assembly
......@@ -97,7 +99,7 @@ typedef unsigned int word32;
typedef word32 word;
typedef word64 dword;
#else
typedef word8 hword;
typedef byte hword;
typedef word16 word;
typedef word32 dword;
#endif
......
......@@ -31,7 +31,7 @@
#if __GNUC__ > 2
#include <cstdlib>
#include <stdlib.h>
static void* operator new (size_t sz)
......
......@@ -26,7 +26,7 @@
#include "runtime.hpp"
#include "dh.hpp"
#include "asn.hpp"
#include <cmath>
#include <math.h>
namespace TaoCrypt {
......
......@@ -96,6 +96,7 @@ extern const char *client_errors[]; /* Error messages */
#define CR_NO_DATA 2051
#define CR_NO_STMT_METADATA 2052
#define CR_NO_RESULT_SET 2053
#define CR_ERROR_LAST /*Copy last error nr:*/ 2053
#define CR_NOT_IMPLEMENTED 2054
#define CR_ERROR_LAST /*Copy last error nr:*/ 2054
/* Add error numbers before CR_ERROR_LAST and change it accordingly. */
......@@ -39,9 +39,9 @@ extern void _db_pargs_(uint _line_,const char *keyword);
extern void _db_doprnt_ _VARARGS((const char *format,...));
extern void _db_dump_(uint _line_,const char *keyword,const char *memory,
uint length);
extern void _db_output_();
extern void _db_lock_file();
extern void _db_unlock_file();
extern void _db_output_(uint flag);
extern void _db_lock_file(void);
extern void _db_unlock_file(void);
#define DBUG_ENTER(a) const char *_db_func_, *_db_file_; uint _db_level_; \
char **_db_framep_; \
......
......@@ -44,7 +44,7 @@
#endif /* __CYGWIN__ */
/* Determine when to use "#pragma interface" */
#if !defined(__CYGWIN__) && !defined(__ICC) && defined(__GNUC__) && (__GNUC__ < 3)
#if !defined(__CYGWIN__) && !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ < 3)
#define USE_PRAGMA_INTERFACE
#endif
......
......@@ -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 *strmake_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,
char **defaults, char **extra_defaults);
extern int load_defaults(const char *conf_file, const char **groups,
int *argc, char ***argv);
extern int 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,
char ***argv, uint *args_used,
Process_option_func func, void *func_ctx);
......
......@@ -664,6 +664,7 @@ typedef struct st_mysql_stmt
unsigned char **row);
unsigned long stmt_id; /* Id for prepared statement */
unsigned long flags; /* i.e. type of cursor to open */
unsigned long prefetch_rows; /* number of rows per one COM_FETCH */
/*
Copied from mysql->server_status after execute/fetch to know
server-side cursor status for this statement.
......@@ -702,7 +703,12 @@ enum enum_stmt_attr_type
unsigned long with combination of cursor flags (read only, for update,
etc)
*/
STMT_ATTR_CURSOR_TYPE
STMT_ATTR_CURSOR_TYPE,
/*
Amount of rows to retrieve from server per one fetch if using cursors.
Accepts unsigned long attribute in the range 1 - ulong_max
*/
STMT_ATTR_PREFETCH_ROWS
};
......
......@@ -417,6 +417,9 @@ const char *mysql_errno_to_sqlstate(unsigned int mysql_errno);
/* Some other useful functions */
my_bool my_init(void);
extern int 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 *argc, char ***argv);
my_bool my_thread_init(void);
......
This diff is collapsed.
......@@ -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 \
my_symlink.lo my_fstream.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 \
charset.lo charset-def.lo hash.lo mf_iocache.lo \
mf_iocache2.lo my_seek.lo my_sleep.lo \
......
......@@ -81,6 +81,7 @@ const char *client_errors[]=
"Attempt to read column without prior row fetch",
"Prepared statement contains no metadata",
"Attempt to read a row while there is no result set associated with the statement",
"This feature is not implemented yet",
""
};
......@@ -143,6 +144,7 @@ const char *client_errors[]=
"Attempt to read column without prior row fetch",
"Prepared statement contains no metadata",
"Attempt to read a row while there is no result set associated with the statement",
"This feature is not implemented yet",
""
};
......@@ -203,6 +205,7 @@ const char *client_errors[]=
"Attempt to read column without prior row fetch",
"Prepared statement contains no metadata",
"Attempt to read a row while there is no result set associated with the statement",
"This feature is not implemented yet",
""
};
#endif
......
This diff is collapsed.
LIBRARY LIBMYSQL
DESCRIPTION 'MySQL 4.1 Client Library'
DESCRIPTION 'MySQL 5.0 Client Library'
VERSION 6.0
EXPORTS
_dig_vec_lower
......@@ -150,6 +150,4 @@ EXPORTS
mysql_server_end
mysql_set_character_set
get_defaults_files
get_charset_by_csname
get_charsets_dir
charsets_dir
modify_defaults_file
......@@ -160,3 +160,4 @@ EXPORTS
get_defaults_files
my_charset_bin
my_charset_same
modify_defaults_file
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.
eval select "Outfile OK" into outfile "$MYSQL_TEST_DIR/var/tmp/outfile.test";
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.
load_file(concat(@tmpdir,"/outfile.test"))
Outfile OK
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.
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.
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.
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.
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.
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.
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.
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