mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
merge from trunk
This commit is contained in:
@@ -90,22 +90,19 @@ SSL_LIBRARY=--with-ssl
|
||||
|
||||
if [ "x$warning_mode" != "xpedantic" ]; then
|
||||
# Both C and C++ warnings
|
||||
warnings="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W"
|
||||
warnings="$warnings -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare"
|
||||
warnings="$warnings -Wwrite-strings -Wunused-function -Wunused-label -Wunused-value -Wunused-variable"
|
||||
warnings="-Wall -Wextra -Wunused -Wwrite-strings"
|
||||
|
||||
# For more warnings, uncomment the following line
|
||||
# warnings="$global_warnings -Wshadow"
|
||||
# warnings="$warnings -Wshadow"
|
||||
|
||||
# C warnings
|
||||
c_warnings="$warnings -Wunused-parameter"
|
||||
c_warnings="$warnings"
|
||||
# C++ warnings
|
||||
cxx_warnings="$warnings"
|
||||
cxx_warnings="$warnings -Wno-unused-parameter"
|
||||
# cxx_warnings="$cxx_warnings -Woverloaded-virtual -Wsign-promo"
|
||||
cxx_warnings="$cxx_warnings -Wreorder"
|
||||
cxx_warnings="$cxx_warnings -Wctor-dtor-privacy -Wnon-virtual-dtor"
|
||||
# Added unless --with-debug=full
|
||||
debug_extra_cflags="-O0 -g3 -gdwarf-2" #1 -Wuninitialized"
|
||||
debug_extra_cflags="-O0 -g3 -gdwarf-2"
|
||||
else
|
||||
warnings="-W -Wall -ansi -pedantic -Wno-long-long -Wno-unused -D_POSIX_SOURCE"
|
||||
c_warnings="$warnings"
|
||||
@@ -122,13 +119,13 @@ fi
|
||||
# Override -DFORCE_INIT_OF_VARS from debug_cflags. It enables the macro
|
||||
# LINT_INIT(), which is only useful for silencing spurious warnings
|
||||
# of static analysis tools. We want LINT_INIT() to be a no-op in Valgrind.
|
||||
valgrind_flags="-USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify "
|
||||
valgrind_flags="-UFORCE_INIT_OF_VARS -DHAVE_purify "
|
||||
valgrind_flags="$valgrind_flags -DMYSQL_SERVER_SUFFIX=-valgrind-max"
|
||||
valgrind_configs="--with-valgrind"
|
||||
#
|
||||
# Used in -debug builds
|
||||
debug_cflags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS "
|
||||
debug_cflags="$debug_cflags -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX"
|
||||
debug_cflags="$debug_cflags -DSAFE_MUTEX"
|
||||
error_inject="--with-error-inject "
|
||||
#
|
||||
# Base C++ flags for all builds
|
||||
|
@@ -1010,7 +1010,7 @@ set_ccache_usage()
|
||||
set_valgrind_flags()
|
||||
{
|
||||
if test "x$valgrind_flag" = "xyes" ; then
|
||||
loc_valgrind_flags="-USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify "
|
||||
loc_valgrind_flags="-UFORCE_INIT_OF_VARS -DHAVE_purify "
|
||||
loc_valgrind_flags="$loc_valgrind_flags -DMYSQL_SERVER_SUFFIX=-valgrind-max"
|
||||
compiler_flags="$compiler_flags $loc_valgrind_flags"
|
||||
with_flags="$with_flags --with-valgrind"
|
||||
@@ -1066,7 +1066,6 @@ set_with_debug_flags()
|
||||
if test "x$with_debug_flag" = "xyes" ; then
|
||||
if test "x$developer_flag" = "xyes" ; then
|
||||
loc_debug_flags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS "
|
||||
loc_debug_flags="$loc_debug_flags -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC"
|
||||
compiler_flags="$compiler_flags $loc_debug_flags"
|
||||
fi
|
||||
fi
|
||||
|
115
BUILD/check-cpu
115
BUILD/check-cpu
@@ -187,68 +187,75 @@ check_cpu () {
|
||||
cc=$CC
|
||||
fi
|
||||
|
||||
if test "x$compiler" = "x" ; then
|
||||
cc_ver=`$cc --version | sed 1q`
|
||||
cc_verno=`echo $cc_ver | sed -e 's/^.*(GCC)//g; s/[^0-9. ]//g; s/^ *//g; s/ .*//g'`
|
||||
if test "x$core2" = "xyes" ; then
|
||||
cpu_arg="core2"
|
||||
fi
|
||||
|
||||
if test "x$compiler" != "x" ; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# check if compiler is gcc and dump its version
|
||||
cc_verno=`$cc -dumpversion 2>/dev/null`
|
||||
if test "x$?" = "x0" ; then
|
||||
set -- `echo $cc_verno | tr '.' ' '`
|
||||
cc_ver="GCC"
|
||||
cc_major=$1
|
||||
cc_minor=$2
|
||||
cc_patch=$3
|
||||
cc_comp=`expr $cc_major '*' 100 '+' $cc_minor`
|
||||
fi
|
||||
|
||||
case "$cc_ver--$cc_verno" in
|
||||
*GCC*)
|
||||
# different gcc backends (and versions) have different CPU flags
|
||||
case `gcc -dumpmachine` in
|
||||
i?86-* | x86_64-*)
|
||||
if test "$cc_comp" -lt 304 ; then
|
||||
check_cpu_cflags="-mcpu=${cpu_arg}"
|
||||
elif test "$cc_comp" -ge 402 ; then
|
||||
check_cpu_cflags="-mtune=native"
|
||||
else
|
||||
check_cpu_cflags="-mtune=${cpu_arg}"
|
||||
fi
|
||||
;;
|
||||
ppc-*)
|
||||
check_cpu_cflags="-mcpu=${cpu_arg} -mtune=${cpu_arg}"
|
||||
;;
|
||||
*)
|
||||
check_cpu_cflags=""
|
||||
return
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
2.95.*)
|
||||
# GCC 2.95 doesn't expose its name in --version output
|
||||
check_cpu_cflags="-m${cpu_arg}"
|
||||
;;
|
||||
*)
|
||||
check_cpu_cflags=""
|
||||
return
|
||||
;;
|
||||
esac
|
||||
# now we check whether the compiler really understands the cpu type
|
||||
touch __test.c
|
||||
|
||||
while [ "$cpu_arg" ] ; do
|
||||
printf "testing $cpu_arg ... " >&2
|
||||
|
||||
# compile check
|
||||
eval "$cc -c $check_cpu_cflags __test.c" 2>/dev/null
|
||||
if test "x$?" = "x0" ; then
|
||||
echo ok >&2
|
||||
break;
|
||||
fi
|
||||
|
||||
echo failed >&2
|
||||
case "$cc_ver--$cc_verno" in
|
||||
*GCC*)
|
||||
# different gcc backends (and versions) have different CPU flags
|
||||
case `gcc -dumpmachine` in
|
||||
i?86-* | x86_64-*)
|
||||
if test "$cc_comp" -lt 304 ; then
|
||||
check_cpu_cflags="-mcpu=${cpu_arg}"
|
||||
elif test "$cc_comp" -ge 402 ; then
|
||||
check_cpu_cflags="-mtune=native"
|
||||
else
|
||||
check_cpu_cflags="-mtune=${cpu_arg}"
|
||||
fi
|
||||
;;
|
||||
ppc-*)
|
||||
check_cpu_cflags="-mcpu=${cpu_arg} -mtune=${cpu_arg}"
|
||||
;;
|
||||
*)
|
||||
check_cpu_cflags=""
|
||||
return
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
2.95.*)
|
||||
# GCC 2.95 doesn't expose its name in --version output
|
||||
check_cpu_cflags="-m${cpu_arg}"
|
||||
;;
|
||||
*)
|
||||
check_cpu_cflags=""
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
# now we check whether the compiler really understands the cpu type
|
||||
touch __test.c
|
||||
|
||||
while [ "$cpu_arg" ] ; do
|
||||
printf "testing $cpu_arg ... " >&2
|
||||
|
||||
# compile check
|
||||
eval "$cc -c $check_cpu_cflags __test.c" 2>/dev/null
|
||||
if test "x$?" = "x0" ; then
|
||||
echo ok >&2
|
||||
break;
|
||||
done
|
||||
rm __test.*
|
||||
fi
|
||||
if test "x$core2" = "xyes" ; then
|
||||
cpu_arg="core2"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo failed >&2
|
||||
check_cpu_cflags=""
|
||||
break;
|
||||
done
|
||||
rm __test.*
|
||||
return 0
|
||||
}
|
||||
|
||||
|
@@ -4,5 +4,5 @@ gmake -k maintainer-clean || true
|
||||
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
|
||||
CC=ecc CFLAGS="-w1 -DEXTRA_DEBUG -DSAFE_MUTEX -O2" CXX=ecc CXXFLAGS="-w1 -DEXTRA_DEBUG -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
|
||||
|
47
CMakeLists.txt
Executable file → Normal file
47
CMakeLists.txt
Executable file → Normal file
@@ -34,7 +34,7 @@ ENDIF()
|
||||
SET(CUSTOM_C_FLAGS $ENV{CFLAGS})
|
||||
|
||||
OPTION(WITH_DEBUG "Use dbug/safemutex" OFF)
|
||||
OPTION(WITH_DEBUG_FULL "Use dbug and safemalloc/safemutex. Slow" OFF)
|
||||
OPTION(WITH_DEBUG_FULL "Use dbug and safemutex. Slow." OFF)
|
||||
|
||||
# Distinguish between community and non-community builds, with the
|
||||
# default being a community build. This does not impact the feature
|
||||
@@ -104,6 +104,27 @@ IF(DEFINED ENV{CPPFLAGS})
|
||||
ADD_DEFINITIONS($ENV{CPPFLAGS})
|
||||
ENDIF()
|
||||
|
||||
#
|
||||
# Control aspects of the development environment which are
|
||||
# specific to MySQL maintainers and developers.
|
||||
#
|
||||
OPTION(MYSQL_MAINTAINER_MODE "MySQL maintainer-specific development environment" OFF)
|
||||
# Whether the maintainer mode should be enabled.
|
||||
IF(MYSQL_MAINTAINER_MODE)
|
||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
SET(MY_MAINTAINER_C_WARNINGS "-Wall -Wextra -Wunused -Wwrite-strings -Werror"
|
||||
CACHE STRING "C warning options used in maintainer builds.")
|
||||
ENDIF()
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
SET(MY_MAINTAINER_CXX_WARNINGS "${MY_MAINTAINER_C_WARNINGS} -Wno-unused-parameter"
|
||||
CACHE STRING "C++ warning options used in maintainer builds.")
|
||||
ENDIF()
|
||||
# Do not make warnings in checks into errors.
|
||||
IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX)
|
||||
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Wno-error")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# Add macros
|
||||
INCLUDE(character_sets)
|
||||
INCLUDE(zlib)
|
||||
@@ -144,9 +165,9 @@ IF(WITH_ERROR_INJECT)
|
||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DERROR_INJECT_SUPPORT")
|
||||
ENDIF()
|
||||
|
||||
OPTION(ENABLE_LOCAL_INFILE
|
||||
OPTION(ENABLED_LOCAL_INFILE
|
||||
"If we should should enable LOAD DATA LOCAL by default" ${IF_WIN})
|
||||
MARK_AS_ADVANCED(ENABLE_LOCAL_INFILE)
|
||||
MARK_AS_ADVANCED(ENABLED_LOCAL_INFILE)
|
||||
|
||||
OPTION(WITH_FAST_MUTEXES "Compile with fast mutexes" OFF)
|
||||
MARK_AS_ADVANCED(WITH_FAST_MUTEXES)
|
||||
@@ -175,14 +196,13 @@ IF(NOT CMAKE_BUILD_TYPE
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# Add safemalloc and safemutex for debug condifurations, except on Windows
|
||||
# (C runtime library provides safemalloc functionality and safemutex has never
|
||||
# worked there)
|
||||
# Add safemutex for debug configurations, except on Windows
|
||||
# (safemutex has never worked on Windows)
|
||||
IF(WITH_DEBUG OR WITH_DEBUG_FULL AND NOT WIN32)
|
||||
FOREACH(LANG C CXX)
|
||||
IF(WITH_DEBUG_FULL)
|
||||
SET(CMAKE_${LANG}_FLAGS_DEBUG
|
||||
"${CMAKE_${LANG}_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
|
||||
"${CMAKE_${LANG}_FLAGS_DEBUG} -DSAFE_MUTEX")
|
||||
ELSE()
|
||||
SET(CMAKE_${LANG}_FLAGS_DEBUG
|
||||
"${CMAKE_${LANG}_FLAGS_DEBUG} -DSAFE_MUTEX")
|
||||
@@ -227,6 +247,19 @@ MYSQL_CHECK_SSL()
|
||||
# Add readline or libedit.
|
||||
MYSQL_CHECK_READLINE()
|
||||
|
||||
#
|
||||
# Setup maintainer mode options by the end. Platform checks are
|
||||
# not run with the warning options as to not perturb fragile checks
|
||||
# (i.e. do not make warnings into errors).
|
||||
#
|
||||
IF(MYSQL_MAINTAINER_MODE)
|
||||
# Set compiler flags required under maintainer mode.
|
||||
MESSAGE(STATUS "C warning options: ${MY_MAINTAINER_C_WARNINGS}")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MY_MAINTAINER_C_WARNINGS}")
|
||||
MESSAGE(STATUS "C++ warning options: ${MY_MAINTAINER_CXX_WARNINGS}")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MY_MAINTAINER_CXX_WARNINGS}")
|
||||
ENDIF()
|
||||
|
||||
IF(NOT WITHOUT_SERVER)
|
||||
SET (MYSQLD_STATIC_PLUGIN_LIBS "" CACHE INTERNAL "")
|
||||
# Add storage engines and plugins.
|
||||
|
@@ -27,7 +27,7 @@ SUBDIRS = . include @docs_dirs@ @zlib_dir@ \
|
||||
@pstack_dir@ libservices \
|
||||
@sql_union_dirs@ unittest \
|
||||
@sql_server@ @man_dirs@ tests \
|
||||
netware @libmysqld_dirs@ \
|
||||
@libmysqld_dirs@ \
|
||||
mysql-test support-files sql-bench \
|
||||
win \
|
||||
cmake
|
||||
@@ -36,7 +36,7 @@ DIST_SUBDIRS = . include Docs zlib \
|
||||
pstack libservices \
|
||||
strings mysys dbug extra regex libmysql libmysql_r client unittest storage plugin \
|
||||
vio sql man tests \
|
||||
netware libmysqld \
|
||||
libmysqld \
|
||||
mysql-test support-files sql-bench \
|
||||
win \
|
||||
cmake \
|
||||
|
0
client/CMakeLists.txt
Executable file → Normal file
0
client/CMakeLists.txt
Executable file → Normal file
@@ -60,7 +60,7 @@ enum options_client
|
||||
OPT_IMPORT_USE_THREADS,
|
||||
OPT_MYSQL_NUMBER_OF_QUERY,
|
||||
OPT_IGNORE_TABLE,OPT_INSERT_IGNORE,OPT_SHOW_WARNINGS,OPT_DROP_DATABASE,
|
||||
OPT_TZ_UTC, OPT_AUTO_CLOSE, OPT_CREATE_SLAP_SCHEMA,
|
||||
OPT_TZ_UTC, OPT_CREATE_SLAP_SCHEMA,
|
||||
OPT_MYSQLDUMP_SLAVE_APPLY,
|
||||
OPT_MYSQLDUMP_SLAVE_DATA,
|
||||
OPT_MYSQLDUMP_INCLUDE_MASTER_HOST_PORT,
|
||||
|
@@ -22,7 +22,6 @@
|
||||
|
||||
#include <my_global.h>
|
||||
#include <m_string.h>
|
||||
#undef SAFEMALLOC // Speed things up
|
||||
#include <my_sys.h>
|
||||
#include "completion_hash.h"
|
||||
|
||||
@@ -213,7 +212,7 @@ void completion_hash_clean(HashTable *ht)
|
||||
void completion_hash_free(HashTable *ht)
|
||||
{
|
||||
completion_hash_clean(ht);
|
||||
my_free(ht->arBuckets, MYF(0));
|
||||
my_free(ht->arBuckets);
|
||||
}
|
||||
|
||||
|
||||
|
105
client/mysql.cc
105
client/mysql.cc
@@ -88,10 +88,9 @@ extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#undef bcmp // Fix problem with new readline
|
||||
#if defined(__WIN__)
|
||||
#include <conio.h>
|
||||
#elif !defined(__NETWARE__)
|
||||
#else
|
||||
#include <readline/readline.h>
|
||||
#define HAVE_READLINE
|
||||
#endif
|
||||
@@ -109,7 +108,7 @@ extern "C" {
|
||||
#define cmp_database(cs,A,B) strcmp((A),(B))
|
||||
#endif
|
||||
|
||||
#if !defined(__WIN__) && !defined(__NETWARE__) && !defined(THREAD)
|
||||
#if !defined(__WIN__) && !defined(THREAD)
|
||||
#define USE_POPEN
|
||||
#endif
|
||||
|
||||
@@ -1205,7 +1204,7 @@ int main(int argc,char *argv[])
|
||||
strncmp(link_name, "/dev/null", 10) == 0)
|
||||
{
|
||||
/* The .mysql_history file is a symlink to /dev/null, don't use it */
|
||||
my_free(histfile, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(histfile);
|
||||
histfile= 0;
|
||||
}
|
||||
}
|
||||
@@ -1266,23 +1265,23 @@ sig_handler mysql_end(int sig)
|
||||
glob_buffer.free();
|
||||
old_buffer.free();
|
||||
processed_prompt.free();
|
||||
my_free(server_version,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(opt_password,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(opt_mysql_unix_port,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(histfile,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(histfile_tmp,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(current_db,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(current_host,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(current_user,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(full_username,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(part_username,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(default_prompt,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(server_version);
|
||||
my_free(opt_password);
|
||||
my_free(opt_mysql_unix_port);
|
||||
my_free(histfile);
|
||||
my_free(histfile_tmp);
|
||||
my_free(current_db);
|
||||
my_free(current_host);
|
||||
my_free(current_user);
|
||||
my_free(full_username);
|
||||
my_free(part_username);
|
||||
my_free(default_prompt);
|
||||
#ifdef HAVE_SMEM
|
||||
my_free(shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(shared_memory_base_name);
|
||||
#endif
|
||||
my_free(current_prompt,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(current_prompt);
|
||||
while (embedded_server_arg_count > 1)
|
||||
my_free(embedded_server_args[--embedded_server_arg_count],MYF(0));
|
||||
my_free(embedded_server_args[--embedded_server_arg_count]);
|
||||
mysql_server_end();
|
||||
free_defaults(defaults_argv);
|
||||
my_end(my_end_arg);
|
||||
@@ -1365,10 +1364,6 @@ static struct my_option my_long_options[] =
|
||||
0, 0, 0, 0, 0},
|
||||
{"help", 'I', "Synonym for -?", 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
|
||||
0, 0, 0, 0, 0},
|
||||
#ifdef __NETWARE__
|
||||
{"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for Netware.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"auto-rehash", OPT_AUTO_REHASH,
|
||||
"Enable automatic rehashing. One doesn't need to use 'rehash' to get table "
|
||||
"and field completion, but startup and reconnecting may take a longer time. "
|
||||
@@ -1582,11 +1577,6 @@ static struct my_option my_long_options[] =
|
||||
|
||||
static void usage(int version)
|
||||
{
|
||||
/* Divert all help information on NetWare to logger screen. */
|
||||
#ifdef __NETWARE__
|
||||
#define printf consoleprintf
|
||||
#endif
|
||||
|
||||
#if defined(USE_LIBEDIT_INTERFACE)
|
||||
const char* readline= "";
|
||||
#else
|
||||
@@ -1609,10 +1599,6 @@ static void usage(int version)
|
||||
my_print_help(my_long_options);
|
||||
print_defaults("my", load_default_groups);
|
||||
my_print_variables(my_long_options);
|
||||
NETWARE_SET_SCREEN_MODE(1);
|
||||
#ifdef __NETWARE__
|
||||
#undef printf
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -1621,11 +1607,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
char *argument)
|
||||
{
|
||||
switch(optid) {
|
||||
#ifdef __NETWARE__
|
||||
case OPT_AUTO_CLOSE:
|
||||
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
|
||||
break;
|
||||
#endif
|
||||
case OPT_CHARSETS_DIR:
|
||||
strmake(mysql_charsets_dir, argument, sizeof(mysql_charsets_dir) - 1);
|
||||
charsets_dir = mysql_charsets_dir;
|
||||
@@ -1736,7 +1717,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
if (argument)
|
||||
{
|
||||
char *start= argument;
|
||||
my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(opt_password);
|
||||
opt_password= my_strdup(argument, MYF(MY_FAE));
|
||||
while (*argument) *argument++= 'x'; // Destroy argument
|
||||
if (*start)
|
||||
@@ -1833,7 +1814,7 @@ static int get_options(int argc, char **argv)
|
||||
if (argc == 1)
|
||||
{
|
||||
skip_updates= 0;
|
||||
my_free(current_db, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(current_db);
|
||||
current_db= my_strdup(*argv, MYF(MY_WME));
|
||||
}
|
||||
if (tty_password)
|
||||
@@ -1851,10 +1832,6 @@ static int get_options(int argc, char **argv)
|
||||
|
||||
static int read_and_execute(bool interactive)
|
||||
{
|
||||
#if defined(__NETWARE__)
|
||||
char linebuffer[254];
|
||||
String buffer;
|
||||
#endif
|
||||
#if defined(__WIN__)
|
||||
String tmpbuf;
|
||||
String buffer;
|
||||
@@ -1900,18 +1877,8 @@ static int read_and_execute(bool interactive)
|
||||
if (opt_outfile && glob_buffer.is_empty())
|
||||
fflush(OUTFILE);
|
||||
|
||||
#if defined(__WIN__) || defined(__NETWARE__)
|
||||
#if defined(__WIN__)
|
||||
tee_fputs(prompt, stdout);
|
||||
#if defined(__NETWARE__)
|
||||
line=fgets(linebuffer, sizeof(linebuffer)-1, stdin);
|
||||
/* Remove the '\n' */
|
||||
if (line)
|
||||
{
|
||||
char *p = strrchr(line, '\n');
|
||||
if (p != NULL)
|
||||
*p = '\0';
|
||||
}
|
||||
#else
|
||||
if (!tmpbuf.is_alloced())
|
||||
tmpbuf.alloc(65535);
|
||||
tmpbuf.length(0);
|
||||
@@ -1932,12 +1899,11 @@ static int read_and_execute(bool interactive)
|
||||
*/
|
||||
if (line)
|
||||
line= buffer.c_ptr();
|
||||
#endif /* __NETWARE__ */
|
||||
#else
|
||||
if (opt_outfile)
|
||||
fputs(prompt, OUTFILE);
|
||||
line= readline(prompt);
|
||||
#endif /* defined(__WIN__) || defined(__NETWARE__) */
|
||||
#endif /* defined(__WIN__) */
|
||||
|
||||
/*
|
||||
When Ctrl+d or Ctrl+z is pressed, the line may be NULL on some OS
|
||||
@@ -1985,10 +1951,8 @@ static int read_and_execute(bool interactive)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(__WIN__) || defined(__NETWARE__)
|
||||
buffer.free();
|
||||
#endif
|
||||
#if defined(__WIN__)
|
||||
buffer.free();
|
||||
tmpbuf.free();
|
||||
#endif
|
||||
|
||||
@@ -2731,7 +2695,7 @@ static void get_current_db()
|
||||
{
|
||||
MYSQL_RES *res;
|
||||
|
||||
my_free(current_db, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(current_db);
|
||||
current_db= NULL;
|
||||
/* In case of error below current_db will be NULL */
|
||||
if (!mysql_query(&mysql, "SELECT DATABASE()") &&
|
||||
@@ -3945,8 +3909,6 @@ static int
|
||||
com_quit(String *buffer __attribute__((unused)),
|
||||
char *line __attribute__((unused)))
|
||||
{
|
||||
/* let the screen auto close on a normal shutdown */
|
||||
NETWARE_SET_SCREEN_MODE(SCR_AUTOCLOSE_ON_EXIT);
|
||||
status.exit_status=0;
|
||||
return 1;
|
||||
}
|
||||
@@ -4023,12 +3985,12 @@ com_connect(String *buffer, char *line)
|
||||
tmp= get_arg(buff, 0);
|
||||
if (tmp && *tmp)
|
||||
{
|
||||
my_free(current_db, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(current_db);
|
||||
current_db= my_strdup(tmp, MYF(MY_WME));
|
||||
tmp= get_arg(buff, 1);
|
||||
if (tmp)
|
||||
{
|
||||
my_free(current_host,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(current_host);
|
||||
current_host=my_strdup(tmp,MYF(MY_WME));
|
||||
}
|
||||
}
|
||||
@@ -4200,7 +4162,7 @@ com_use(String *buffer __attribute__((unused)), char *line)
|
||||
if (mysql_select_db(&mysql,tmp))
|
||||
return put_error(&mysql);
|
||||
}
|
||||
my_free(current_db,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(current_db);
|
||||
current_db=my_strdup(tmp,MYF(MY_WME));
|
||||
#ifdef HAVE_READLINE
|
||||
if (select_db > 1)
|
||||
@@ -4664,7 +4626,6 @@ void tee_fprintf(FILE *file, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
NETWARE_YIELD;
|
||||
va_start(args, fmt);
|
||||
(void) vfprintf(file, fmt, args);
|
||||
va_end(args);
|
||||
@@ -4680,7 +4641,6 @@ void tee_fprintf(FILE *file, const char *fmt, ...)
|
||||
|
||||
void tee_fputs(const char *s, FILE *file)
|
||||
{
|
||||
NETWARE_YIELD;
|
||||
fputs(s, file);
|
||||
if (opt_outfile)
|
||||
fputs(s, OUTFILE);
|
||||
@@ -4689,7 +4649,6 @@ void tee_fputs(const char *s, FILE *file)
|
||||
|
||||
void tee_puts(const char *s, FILE *file)
|
||||
{
|
||||
NETWARE_YIELD;
|
||||
fputs(s, file);
|
||||
fputc('\n', file);
|
||||
if (opt_outfile)
|
||||
@@ -4706,7 +4665,7 @@ void tee_putc(int c, FILE *file)
|
||||
putc(c, OUTFILE);
|
||||
}
|
||||
|
||||
#if defined(__WIN__) || defined(__NETWARE__)
|
||||
#if defined(__WIN__)
|
||||
#include <time.h>
|
||||
#else
|
||||
#include <sys/times.h>
|
||||
@@ -4718,8 +4677,8 @@ void tee_putc(int c, FILE *file)
|
||||
|
||||
static ulong start_timer(void)
|
||||
{
|
||||
#if defined(__WIN__) || defined(__NETWARE__)
|
||||
return clock();
|
||||
#if defined(__WIN__)
|
||||
return clock();
|
||||
#else
|
||||
struct tms tms_tmp;
|
||||
return times(&tms_tmp);
|
||||
@@ -4952,8 +4911,8 @@ static void add_int_to_prompt(int toadd)
|
||||
|
||||
static void init_username()
|
||||
{
|
||||
my_free(full_username,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(part_username,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(full_username);
|
||||
my_free(part_username);
|
||||
|
||||
MYSQL_RES *result;
|
||||
LINT_INIT(result);
|
||||
@@ -4971,7 +4930,7 @@ static int com_prompt(String *buffer, char *line)
|
||||
{
|
||||
char *ptr=strchr(line, ' ');
|
||||
prompt_counter = 0;
|
||||
my_free(current_prompt,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(current_prompt);
|
||||
current_prompt=my_strdup(ptr ? ptr+1 : default_prompt,MYF(MY_WME));
|
||||
if (!ptr)
|
||||
tee_fprintf(stdout, "Returning to default PROMPT of %s\n", default_prompt);
|
||||
|
@@ -57,8 +57,6 @@ static my_bool not_used; /* Can't use GET_BOOL without a value pointer */
|
||||
|
||||
static my_bool opt_write_binlog;
|
||||
|
||||
#include <help_start.h>
|
||||
|
||||
static struct my_option my_long_options[]=
|
||||
{
|
||||
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
|
||||
@@ -139,8 +137,6 @@ static struct my_option my_long_options[]=
|
||||
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
|
||||
#include <help_end.h>
|
||||
|
||||
|
||||
static void free_used_memory(void)
|
||||
{
|
||||
@@ -809,9 +805,6 @@ int main(int argc, char **argv)
|
||||
char self_name[FN_REFLEN];
|
||||
|
||||
MY_INIT(argv[0]);
|
||||
#ifdef __NETWARE__
|
||||
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
|
||||
#endif
|
||||
|
||||
#if __WIN__
|
||||
if (GetModuleFileName(NULL, self_name, FN_REFLEN) == 0)
|
||||
|
@@ -116,10 +116,6 @@ static TYPELIB command_typelib=
|
||||
|
||||
static struct my_option my_long_options[] =
|
||||
{
|
||||
#ifdef __NETWARE__
|
||||
{"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for Netware.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"count", 'c',
|
||||
"Number of iterations to make. This works with -i (--sleep) only.",
|
||||
&nr_iterations, &nr_iterations, 0, GET_UINT,
|
||||
@@ -222,11 +218,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
int error = 0;
|
||||
|
||||
switch(optid) {
|
||||
#ifdef __NETWARE__
|
||||
case OPT_AUTO_CLOSE:
|
||||
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
|
||||
break;
|
||||
#endif
|
||||
case 'c':
|
||||
opt_count_iterations= 1;
|
||||
break;
|
||||
@@ -236,7 +227,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
if (argument)
|
||||
{
|
||||
char *start=argument;
|
||||
my_free(opt_password,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(opt_password);
|
||||
opt_password=my_strdup(argument,MYF(MY_FAE));
|
||||
while (*argument) *argument++= 'x'; /* Destroy argument */
|
||||
if (*start)
|
||||
@@ -448,10 +439,10 @@ int main(int argc,char *argv[])
|
||||
} /* got connection */
|
||||
|
||||
mysql_close(&mysql);
|
||||
my_free(opt_password,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(user,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(opt_password);
|
||||
my_free(user);
|
||||
#ifdef HAVE_SMEM
|
||||
my_free(shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(shared_memory_base_name);
|
||||
#endif
|
||||
free_defaults(save_argv);
|
||||
my_end(my_end_arg);
|
||||
@@ -1008,8 +999,8 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
||||
/* free up memory from prompted password */
|
||||
if (typed_password != argv[1])
|
||||
{
|
||||
my_free(typed_password,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(verified,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(typed_password);
|
||||
my_free(verified);
|
||||
}
|
||||
argc--; argv++;
|
||||
break;
|
||||
@@ -1068,13 +1059,11 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#include <help_start.h>
|
||||
|
||||
static void print_version(void)
|
||||
{
|
||||
printf("%s Ver %s Distrib %s, for %s on %s\n",my_progname,ADMIN_VERSION,
|
||||
MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
|
||||
NETWARE_SET_SCREEN_MODE(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -1118,7 +1107,6 @@ static void usage(void)
|
||||
version Get version info from server");
|
||||
}
|
||||
|
||||
#include <help_end.h>
|
||||
|
||||
static int drop_db(MYSQL *mysql, const char *db)
|
||||
{
|
||||
|
@@ -68,20 +68,20 @@ TYPELIB base64_output_mode_typelib=
|
||||
{ array_elements(base64_output_mode_names) - 1, "",
|
||||
base64_output_mode_names, NULL };
|
||||
static enum_base64_output_mode opt_base64_output_mode= BASE64_OUTPUT_UNSPEC;
|
||||
static const char *opt_base64_output_mode_str= NullS;
|
||||
static const char* database= 0;
|
||||
static char *opt_base64_output_mode_str= NullS;
|
||||
static char* database= 0;
|
||||
static my_bool force_opt= 0, short_form= 0, remote_opt= 0;
|
||||
static my_bool debug_info_flag, debug_check_flag;
|
||||
static my_bool force_if_open_opt= 1;
|
||||
static ulonglong offset = 0;
|
||||
static const char* host = 0;
|
||||
static char* host = 0;
|
||||
static int port= 0;
|
||||
static uint my_end_arg;
|
||||
static const char* sock= 0;
|
||||
#ifdef HAVE_SMEM
|
||||
static char *shared_memory_base_name= 0;
|
||||
#endif
|
||||
static const char* user = 0;
|
||||
static char* user = 0;
|
||||
static char* pass = 0;
|
||||
static char *charset= 0;
|
||||
|
||||
@@ -96,7 +96,7 @@ static my_time_t start_datetime= 0, stop_datetime= MY_TIME_T_MAX;
|
||||
static ulonglong rec_count= 0;
|
||||
static short binlog_flags = 0;
|
||||
static MYSQL* mysql = NULL;
|
||||
static const char* dirname_for_local_load= 0;
|
||||
static char* dirname_for_local_load= 0;
|
||||
|
||||
/**
|
||||
Pointer to the Format_description_log_event of the currently active binlog.
|
||||
@@ -191,7 +191,7 @@ public:
|
||||
int init()
|
||||
{
|
||||
return init_dynamic_array(&file_names, sizeof(File_name_record),
|
||||
100,100 CALLER_INFO);
|
||||
100, 100);
|
||||
}
|
||||
|
||||
void init_by_dir_name(const char *dir)
|
||||
@@ -213,7 +213,7 @@ public:
|
||||
{
|
||||
if (ptr->fname)
|
||||
{
|
||||
my_free(ptr->fname, MYF(MY_WME));
|
||||
my_free(ptr->fname);
|
||||
delete ptr->event;
|
||||
bzero((char *)ptr, sizeof(File_name_record));
|
||||
}
|
||||
@@ -436,13 +436,13 @@ Exit_status Load_log_processor::process_first_event(const char *bname,
|
||||
ptr= fname + target_dir_name_len;
|
||||
memcpy(ptr,bname,blen);
|
||||
ptr+= blen;
|
||||
ptr+= my_sprintf(ptr, (ptr, "-%x", file_id));
|
||||
ptr+= sprintf(ptr, "-%x", file_id);
|
||||
|
||||
if ((file= create_unique_file(fname,ptr)) < 0)
|
||||
{
|
||||
error("Could not construct local filename %s%s.",
|
||||
target_dir_name,bname);
|
||||
my_free(fname, MYF(0));
|
||||
my_free(fname);
|
||||
delete ce;
|
||||
DBUG_RETURN(ERROR_STOP);
|
||||
}
|
||||
@@ -458,7 +458,7 @@ Exit_status Load_log_processor::process_first_event(const char *bname,
|
||||
if (set_dynamic(&file_names, (uchar*)&rec, file_id))
|
||||
{
|
||||
error("Out of memory.");
|
||||
my_free(fname, MYF(0));
|
||||
my_free(fname);
|
||||
delete ce;
|
||||
DBUG_RETURN(ERROR_STOP);
|
||||
}
|
||||
@@ -822,7 +822,7 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
|
||||
*/
|
||||
convert_path_to_forward_slashes((char*) ce->fname);
|
||||
ce->print(result_file, print_event_info, TRUE);
|
||||
my_free((char*)ce->fname,MYF(MY_WME));
|
||||
my_free((void*)ce->fname);
|
||||
delete ce;
|
||||
}
|
||||
else
|
||||
@@ -887,7 +887,7 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
|
||||
}
|
||||
|
||||
if (fname)
|
||||
my_free(fname, MYF(MY_WME));
|
||||
my_free(fname);
|
||||
break;
|
||||
}
|
||||
case TABLE_MAP_EVENT:
|
||||
@@ -1002,10 +1002,6 @@ static struct my_option my_long_options[] =
|
||||
{
|
||||
{"help", '?', "Display this help and exit.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef __NETWARE__
|
||||
{"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for Netware.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"base64-output", OPT_BASE64_OUTPUT_MODE,
|
||||
/* 'unspec' is not mentioned because it is just a placeholder. */
|
||||
"Determine when the output statements should be base64-encoded BINLOG "
|
||||
@@ -1222,23 +1218,21 @@ static void warning(const char *format,...)
|
||||
*/
|
||||
static void cleanup()
|
||||
{
|
||||
my_free(pass,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free((char*) database, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free((char*) host, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free((char*) user, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free((char*) dirname_for_local_load, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(pass);
|
||||
my_free(database);
|
||||
my_free(host);
|
||||
my_free(user);
|
||||
my_free(dirname_for_local_load);
|
||||
|
||||
delete glob_description_event;
|
||||
if (mysql)
|
||||
mysql_close(mysql);
|
||||
}
|
||||
|
||||
#include <help_start.h>
|
||||
|
||||
static void print_version()
|
||||
{
|
||||
printf("%s Ver 3.3 for %s at %s\n", my_progname, SYSTEM_TYPE, MACHINE_TYPE);
|
||||
NETWARE_SET_SCREEN_MODE(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -1280,7 +1274,6 @@ static my_time_t convert_str_to_timestamp(const char* str)
|
||||
my_system_gmt_sec(&l_time, &dummy_my_timezone, &dummy_in_dst_time_gap);
|
||||
}
|
||||
|
||||
#include <help_end.h>
|
||||
|
||||
extern "C" my_bool
|
||||
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
@@ -1288,11 +1281,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
{
|
||||
bool tty_password=0;
|
||||
switch (optid) {
|
||||
#ifdef __NETWARE__
|
||||
case OPT_AUTO_CLOSE:
|
||||
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
|
||||
break;
|
||||
#endif
|
||||
#ifndef DBUG_OFF
|
||||
case '#':
|
||||
DBUG_PUSH(argument ? argument : default_dbug_option);
|
||||
@@ -1306,7 +1294,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
argument= (char*) ""; // Don't require password
|
||||
if (argument)
|
||||
{
|
||||
my_free(pass,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(pass);
|
||||
char *start=argument;
|
||||
pass= my_strdup(argument,MYF(MY_FAE));
|
||||
while (*argument) *argument++= 'x'; /* Destroy argument */
|
||||
@@ -2032,6 +2020,7 @@ int main(int argc, char** argv)
|
||||
{
|
||||
usage();
|
||||
free_defaults(defaults_argv);
|
||||
my_end(my_end_arg);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@@ -62,10 +62,6 @@ static struct my_option my_long_options[] =
|
||||
"Instead of issuing one query for each table, use one query per database, naming all tables in the database in a comma-separated list.",
|
||||
&opt_all_in_1, &opt_all_in_1, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||
0, 0, 0},
|
||||
#ifdef __NETWARE__
|
||||
{"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for Netware.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"auto-repair", OPT_AUTO_REPAIR,
|
||||
"If a checked table is corrupted, automatically fix it. Repairing will be done after all tables have been checked, if corrupted ones were found.",
|
||||
&opt_auto_repair, &opt_auto_repair, 0, GET_BOOL, NO_ARG, 0,
|
||||
@@ -208,13 +204,11 @@ static uint fixed_name_length(const char *name);
|
||||
static char *fix_table_name(char *dest, char *src);
|
||||
int what_to_do = 0;
|
||||
|
||||
#include <help_start.h>
|
||||
|
||||
static void print_version(void)
|
||||
{
|
||||
printf("%s Ver %s Distrib %s, for %s (%s)\n", my_progname, CHECK_VERSION,
|
||||
MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
|
||||
NETWARE_SET_SCREEN_MODE(1);
|
||||
} /* print_version */
|
||||
|
||||
|
||||
@@ -245,18 +239,12 @@ static void usage(void)
|
||||
my_print_variables(my_long_options);
|
||||
} /* usage */
|
||||
|
||||
#include <help_end.h>
|
||||
|
||||
static my_bool
|
||||
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
char *argument)
|
||||
{
|
||||
switch(optid) {
|
||||
#ifdef __NETWARE__
|
||||
case OPT_AUTO_CLOSE:
|
||||
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
|
||||
break;
|
||||
#endif
|
||||
case 'a':
|
||||
what_to_do = DO_ANALYZE;
|
||||
break;
|
||||
@@ -291,7 +279,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
if (argument)
|
||||
{
|
||||
char *start = argument;
|
||||
my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(opt_password);
|
||||
opt_password = my_strdup(argument, MYF(MY_FAE));
|
||||
while (*argument) *argument++= 'x'; /* Destroy argument */
|
||||
if (*start)
|
||||
@@ -470,7 +458,7 @@ static int process_selected_tables(char *db, char **table_names, int tables)
|
||||
}
|
||||
*--end = 0;
|
||||
handle_request_for_tables(table_names_comma_sep + 1, (uint) (tot_length - 1));
|
||||
my_free(table_names_comma_sep, MYF(0));
|
||||
my_free(table_names_comma_sep);
|
||||
}
|
||||
else
|
||||
for (; tables > 0; tables--, table_names++)
|
||||
@@ -569,7 +557,7 @@ static int process_all_tables_in_db(char *database)
|
||||
*--end = 0;
|
||||
if (tot_length)
|
||||
handle_request_for_tables(tables + 1, tot_length - 1);
|
||||
my_free(tables, MYF(0));
|
||||
my_free(tables);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -708,8 +696,7 @@ static int handle_request_for_tables(char *tables, uint length)
|
||||
if (opt_all_in_1)
|
||||
{
|
||||
/* No backticks here as we added them before */
|
||||
query_length= my_sprintf(query,
|
||||
(query, "%s TABLE %s %s", op, tables, options));
|
||||
query_length= sprintf(query, "%s TABLE %s %s", op, tables, options);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -727,7 +714,7 @@ static int handle_request_for_tables(char *tables, uint length)
|
||||
return 1;
|
||||
}
|
||||
print_result();
|
||||
my_free(query, MYF(0));
|
||||
my_free(query);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -899,9 +886,9 @@ int main(int argc, char **argv)
|
||||
dbDisconnect(current_host);
|
||||
if (opt_auto_repair)
|
||||
delete_dynamic(&tables4repair);
|
||||
my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(opt_password);
|
||||
#ifdef HAVE_SMEM
|
||||
my_free(shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(shared_memory_base_name);
|
||||
#endif
|
||||
my_end(my_end_arg);
|
||||
return(first_error!=0);
|
||||
|
@@ -212,10 +212,6 @@ static struct my_option my_long_options[] =
|
||||
"Adds 'STOP SLAVE' prior to 'CHANGE MASTER' and 'START SLAVE' to bottom of dump.",
|
||||
&opt_slave_apply, &opt_slave_apply, 0, GET_BOOL, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
#ifdef __NETWARE__
|
||||
{"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for Netware.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory for character set files.", &charsets_dir,
|
||||
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
@@ -433,10 +429,10 @@ static struct my_option my_long_options[] =
|
||||
&opt_replace_into, &opt_replace_into, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"result-file", 'r',
|
||||
"Direct output to a given file. This option should be used in MSDOS, "
|
||||
"because it prevents new line '\\n' from being converted to '\\r\\n' "
|
||||
"(carriage return + line feed).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Direct output to a given file. This option should be used in systems "
|
||||
"(e.g., DOS, Windows) that use carriage-return linefeed pairs (\\r\\n) "
|
||||
"to separate text lines. This option ensures that only a single newline "
|
||||
"is used.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"routines", 'R', "Dump stored routines (functions and procedures).",
|
||||
&opt_routines, &opt_routines, 0, GET_BOOL,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
@@ -531,7 +527,6 @@ static int dump_tablespaces_for_tables(char *db, char **table_names, int tables)
|
||||
static int dump_tablespaces_for_databases(char** databases);
|
||||
static int dump_tablespaces(char* ts_where);
|
||||
|
||||
#include <help_start.h>
|
||||
|
||||
/*
|
||||
Print the supplied message if in verbose mode
|
||||
@@ -575,7 +570,6 @@ static void print_version(void)
|
||||
{
|
||||
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,DUMP_VERSION,
|
||||
MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
|
||||
NETWARE_SET_SCREEN_MODE(1);
|
||||
} /* print_version */
|
||||
|
||||
|
||||
@@ -585,7 +579,6 @@ static void short_usage_sub(void)
|
||||
printf("OR %s [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]\n",
|
||||
my_progname);
|
||||
printf("OR %s [OPTIONS] --all-databases [OPTIONS]\n", my_progname);
|
||||
NETWARE_SET_SCREEN_MODE(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -608,8 +601,6 @@ static void short_usage(void)
|
||||
printf("For more options, use %s --help\n", my_progname);
|
||||
}
|
||||
|
||||
#include <help_end.h>
|
||||
|
||||
|
||||
static void write_header(FILE *sql_file, char *db_name)
|
||||
{
|
||||
@@ -715,12 +706,6 @@ static void write_footer(FILE *sql_file)
|
||||
} /* write_footer */
|
||||
|
||||
|
||||
static void free_table_ent(char *key)
|
||||
{
|
||||
my_free(key, MYF(0));
|
||||
}
|
||||
|
||||
|
||||
uchar* get_table_key(const char *entry, size_t *length,
|
||||
my_bool not_used __attribute__((unused)))
|
||||
{
|
||||
@@ -734,18 +719,13 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
char *argument)
|
||||
{
|
||||
switch (optid) {
|
||||
#ifdef __NETWARE__
|
||||
case OPT_AUTO_CLOSE:
|
||||
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
|
||||
break;
|
||||
#endif
|
||||
case 'p':
|
||||
if (argument == disabled_my_option)
|
||||
argument= (char*) ""; /* Don't require password */
|
||||
if (argument)
|
||||
{
|
||||
char *start=argument;
|
||||
my_free(opt_password,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(opt_password);
|
||||
opt_password=my_strdup(argument,MYF(MY_FAE));
|
||||
while (*argument) *argument++= 'x'; /* Destroy argument */
|
||||
if (*start)
|
||||
@@ -905,8 +885,7 @@ static int get_options(int *argc, char ***argv)
|
||||
defaults_argv= *argv;
|
||||
|
||||
if (my_hash_init(&ignore_table, charset_info, 16, 0, 0,
|
||||
(my_hash_get_key) get_table_key,
|
||||
(my_hash_free_key) free_table_ent, 0))
|
||||
(my_hash_get_key) get_table_key, my_free, 0))
|
||||
return(EX_EOM);
|
||||
/* Don't copy internal log tables */
|
||||
if (my_hash_insert(&ignore_table,
|
||||
@@ -1420,7 +1399,7 @@ static void free_resources()
|
||||
{
|
||||
if (md_result_file && md_result_file != stdout)
|
||||
my_fclose(md_result_file, MYF(0));
|
||||
my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(opt_password);
|
||||
if (my_hash_inited(&ignore_table))
|
||||
my_hash_free(&ignore_table);
|
||||
if (extended_insert)
|
||||
@@ -1534,7 +1513,7 @@ static void unescape(FILE *file,char *pos,uint length)
|
||||
fputs(tmp, file);
|
||||
fputc('\'', file);
|
||||
check_io(file);
|
||||
my_free(tmp, MYF(MY_WME));
|
||||
my_free(tmp);
|
||||
DBUG_VOID_RETURN;
|
||||
} /* unescape */
|
||||
|
||||
@@ -2201,7 +2180,7 @@ static uint dump_routines_for_db(char *db)
|
||||
}
|
||||
}
|
||||
|
||||
my_free(query_str, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(query_str);
|
||||
}
|
||||
} /* end of routine printing */
|
||||
mysql_free_result(routine_res);
|
||||
@@ -2374,12 +2353,12 @@ static uint get_table_structure(char *table, char *db, char *table_type,
|
||||
if (mysql_errno(mysql) == ER_VIEW_INVALID)
|
||||
fprintf(sql_file, "\n-- failed on view %s: %s\n\n", result_table, scv_buff ? scv_buff : "");
|
||||
|
||||
my_free(scv_buff, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(scv_buff);
|
||||
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
else
|
||||
my_free(scv_buff, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(scv_buff);
|
||||
|
||||
if (mysql_num_rows(result))
|
||||
{
|
||||
@@ -2855,7 +2834,7 @@ static int dump_trigger(FILE *sql_file, MYSQL_RES *show_create_trigger_rs,
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
|
||||
my_free(query_str, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(query_str);
|
||||
}
|
||||
|
||||
DBUG_RETURN(FALSE);
|
||||
@@ -4073,7 +4052,7 @@ static int dump_all_tables_in_db(char *database)
|
||||
if (include_table((uchar*) hash_key, end - hash_key))
|
||||
{
|
||||
dump_table(table,database);
|
||||
my_free(order_by, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(order_by);
|
||||
order_by= 0;
|
||||
if (opt_dump_triggers && ! opt_xml &&
|
||||
mysql_get_server_version(mysql) >= 50009)
|
||||
@@ -4345,7 +4324,7 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
|
||||
dump_routines_for_db(db);
|
||||
}
|
||||
free_root(&root, MYF(0));
|
||||
my_free(order_by, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(order_by);
|
||||
order_by= 0;
|
||||
if (opt_xml)
|
||||
{
|
||||
@@ -5258,7 +5237,7 @@ int main(int argc, char **argv)
|
||||
goto err;
|
||||
|
||||
#ifdef HAVE_SMEM
|
||||
my_free(shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(shared_memory_base_name);
|
||||
#endif
|
||||
/*
|
||||
No reason to explicitely COMMIT the transaction, neither to explicitely
|
||||
|
@@ -67,10 +67,6 @@ static char *shared_memory_base_name=0;
|
||||
|
||||
static struct my_option my_long_options[] =
|
||||
{
|
||||
#ifdef __NETWARE__
|
||||
{"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for Netware.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory for character set files.", &charsets_dir,
|
||||
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
@@ -184,13 +180,11 @@ static struct my_option my_long_options[] =
|
||||
|
||||
static const char *load_default_groups[]= { "mysqlimport","client",0 };
|
||||
|
||||
#include <help_start.h>
|
||||
|
||||
static void print_version(void)
|
||||
{
|
||||
printf("%s Ver %s Distrib %s, for %s (%s)\n" ,my_progname,
|
||||
IMPORT_VERSION, MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
|
||||
NETWARE_SET_SCREEN_MODE(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -212,25 +206,19 @@ file. The SQL command 'LOAD DATA INFILE' is used to import the rows.\n");
|
||||
my_print_variables(my_long_options);
|
||||
}
|
||||
|
||||
#include <help_end.h>
|
||||
|
||||
static my_bool
|
||||
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
char *argument)
|
||||
{
|
||||
switch(optid) {
|
||||
#ifdef __NETWARE__
|
||||
case OPT_AUTO_CLOSE:
|
||||
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
|
||||
break;
|
||||
#endif
|
||||
case 'p':
|
||||
if (argument == disabled_my_option)
|
||||
argument= (char*) ""; /* Don't require password */
|
||||
if (argument)
|
||||
{
|
||||
char *start=argument;
|
||||
my_free(opt_password,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(opt_password);
|
||||
opt_password=my_strdup(argument,MYF(MY_FAE));
|
||||
while (*argument) *argument++= 'x'; /* Destroy argument */
|
||||
if (*start)
|
||||
@@ -684,9 +672,9 @@ int main(int argc, char **argv)
|
||||
exitcode= error;
|
||||
db_disconnect(current_host, mysql);
|
||||
}
|
||||
my_free(opt_password,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(opt_password);
|
||||
#ifdef HAVE_SMEM
|
||||
my_free(shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(shared_memory_base_name);
|
||||
#endif
|
||||
free_defaults(argv_to_free);
|
||||
my_end(my_end_arg);
|
||||
|
@@ -149,10 +149,9 @@ int main(int argc, char **argv)
|
||||
break;
|
||||
}
|
||||
mysql_close(&mysql); /* Close & free connection */
|
||||
if (opt_password)
|
||||
my_free(opt_password,MYF(0));
|
||||
my_free(opt_password);
|
||||
#ifdef HAVE_SMEM
|
||||
my_free(shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(shared_memory_base_name);
|
||||
#endif
|
||||
my_end(my_end_arg);
|
||||
exit(error ? 1 : 0);
|
||||
@@ -161,10 +160,6 @@ int main(int argc, char **argv)
|
||||
|
||||
static struct my_option my_long_options[] =
|
||||
{
|
||||
#ifdef __NETWARE__
|
||||
{"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for Netware.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"character-sets-dir", 'c', "Directory for character set files.",
|
||||
&charsets_dir, &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0,
|
||||
0, 0, 0, 0, 0},
|
||||
@@ -242,13 +237,10 @@ static struct my_option my_long_options[] =
|
||||
};
|
||||
|
||||
|
||||
#include <help_start.h>
|
||||
|
||||
static void print_version(void)
|
||||
{
|
||||
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,SHOW_VERSION,
|
||||
MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
|
||||
NETWARE_SET_SCREEN_MODE(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -271,18 +263,12 @@ are shown.");
|
||||
my_print_variables(my_long_options);
|
||||
}
|
||||
|
||||
#include <help_end.h>
|
||||
|
||||
static my_bool
|
||||
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
char *argument)
|
||||
{
|
||||
switch(optid) {
|
||||
#ifdef __NETWARE__
|
||||
case OPT_AUTO_CLOSE:
|
||||
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
|
||||
break;
|
||||
#endif
|
||||
case 'v':
|
||||
opt_verbose++;
|
||||
break;
|
||||
@@ -292,7 +278,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
if (argument)
|
||||
{
|
||||
char *start=argument;
|
||||
my_free(opt_password,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(opt_password);
|
||||
opt_password=my_strdup(argument,MYF(MY_FAE));
|
||||
while (*argument) *argument++= 'x'; /* Destroy argument */
|
||||
if (*start)
|
||||
@@ -671,8 +657,7 @@ list_fields(MYSQL *mysql,const char *db,const char *table,
|
||||
char query[1024],*end;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
ulong rows;
|
||||
LINT_INIT(rows);
|
||||
ulong UNINIT_VAR(rows);
|
||||
|
||||
if (mysql_select_db(mysql,db))
|
||||
{
|
||||
|
@@ -399,10 +399,8 @@ int main(int argc, char **argv)
|
||||
mysql_close(&mysql); /* Close & free connection */
|
||||
|
||||
/* now free all the strings we created */
|
||||
if (opt_password)
|
||||
my_free(opt_password, MYF(0));
|
||||
|
||||
my_free(concurrency, MYF(0));
|
||||
my_free(opt_password);
|
||||
my_free(concurrency);
|
||||
|
||||
statement_cleanup(create_statements);
|
||||
statement_cleanup(query_statements);
|
||||
@@ -411,8 +409,7 @@ int main(int argc, char **argv)
|
||||
option_cleanup(engine_options);
|
||||
|
||||
#ifdef HAVE_SMEM
|
||||
if (shared_memory_base_name)
|
||||
my_free(shared_memory_base_name, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(shared_memory_base_name);
|
||||
#endif
|
||||
free_defaults(defaults_argv);
|
||||
my_end(my_end_arg);
|
||||
@@ -504,7 +501,7 @@ void concurrency_loop(MYSQL *mysql, uint current, option_string *eptr)
|
||||
if (opt_csv_str)
|
||||
print_conclusions_csv(&conclusion);
|
||||
|
||||
my_free(head_sptr, MYF(0));
|
||||
my_free(head_sptr);
|
||||
|
||||
}
|
||||
|
||||
@@ -679,8 +676,6 @@ static struct my_option my_long_options[] =
|
||||
};
|
||||
|
||||
|
||||
#include <help_start.h>
|
||||
|
||||
static void print_version(void)
|
||||
{
|
||||
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname, SLAP_VERSION,
|
||||
@@ -699,7 +694,6 @@ static void usage(void)
|
||||
my_print_help(my_long_options);
|
||||
}
|
||||
|
||||
#include <help_end.h>
|
||||
|
||||
static my_bool
|
||||
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
@@ -707,11 +701,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
{
|
||||
DBUG_ENTER("get_one_option");
|
||||
switch(optid) {
|
||||
#ifdef __NETWARE__
|
||||
case OPT_AUTO_CLOSE:
|
||||
setscreenmode(SCR_AUTOCLOSE_ON_EXIT);
|
||||
break;
|
||||
#endif
|
||||
case 'v':
|
||||
verbose++;
|
||||
break;
|
||||
@@ -721,7 +710,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
if (argument)
|
||||
{
|
||||
char *start= argument;
|
||||
my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(opt_password);
|
||||
opt_password= my_strdup(argument,MYF(MY_FAE));
|
||||
while (*argument) *argument++= 'x'; /* Destroy argument */
|
||||
if (*start)
|
||||
@@ -1367,7 +1356,7 @@ get_options(int *argc,char ***argv)
|
||||
tmp_string[sbuf.st_size]= '\0';
|
||||
my_close(data_file,MYF(0));
|
||||
parse_delimiter(tmp_string, &create_statements, delimiter[0]);
|
||||
my_free(tmp_string, MYF(0));
|
||||
my_free(tmp_string);
|
||||
}
|
||||
else if (create_string)
|
||||
{
|
||||
@@ -1396,7 +1385,7 @@ get_options(int *argc,char ***argv)
|
||||
if (user_supplied_query)
|
||||
actual_queries= parse_delimiter(tmp_string, &query_statements,
|
||||
delimiter[0]);
|
||||
my_free(tmp_string, MYF(0));
|
||||
my_free(tmp_string);
|
||||
}
|
||||
else if (user_supplied_query)
|
||||
{
|
||||
@@ -1427,7 +1416,7 @@ get_options(int *argc,char ***argv)
|
||||
if (user_supplied_pre_statements)
|
||||
(void)parse_delimiter(tmp_string, &pre_statements,
|
||||
delimiter[0]);
|
||||
my_free(tmp_string, MYF(0));
|
||||
my_free(tmp_string);
|
||||
}
|
||||
else if (user_supplied_pre_statements)
|
||||
{
|
||||
@@ -1458,7 +1447,7 @@ get_options(int *argc,char ***argv)
|
||||
if (user_supplied_post_statements)
|
||||
(void)parse_delimiter(tmp_string, &post_statements,
|
||||
delimiter[0]);
|
||||
my_free(tmp_string, MYF(0));
|
||||
my_free(tmp_string);
|
||||
}
|
||||
else if (user_supplied_post_statements)
|
||||
{
|
||||
@@ -1555,9 +1544,9 @@ drop_primary_key_list(void)
|
||||
if (primary_keys_number_of)
|
||||
{
|
||||
for (counter= 0; counter < primary_keys_number_of; counter++)
|
||||
my_free(primary_keys[counter], MYF(0));
|
||||
my_free(primary_keys[counter]);
|
||||
|
||||
my_free(primary_keys, MYF(0));
|
||||
my_free(primary_keys);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -2154,11 +2143,9 @@ option_cleanup(option_string *stmt)
|
||||
for (ptr= stmt; ptr; ptr= nptr)
|
||||
{
|
||||
nptr= ptr->next;
|
||||
if (ptr->string)
|
||||
my_free(ptr->string, MYF(0));
|
||||
if (ptr->option)
|
||||
my_free(ptr->option, MYF(0));
|
||||
my_free(ptr, MYF(0));
|
||||
my_free(ptr->string);
|
||||
my_free(ptr->option);
|
||||
my_free(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2172,9 +2159,8 @@ statement_cleanup(statement *stmt)
|
||||
for (ptr= stmt; ptr; ptr= nptr)
|
||||
{
|
||||
nptr= ptr->next;
|
||||
if (ptr->string)
|
||||
my_free(ptr->string, MYF(0));
|
||||
my_free(ptr, MYF(0));
|
||||
my_free(ptr->string);
|
||||
my_free(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -84,10 +84,10 @@ static my_bool get_one_option(int optid, const struct my_option *,
|
||||
C_MODE_END
|
||||
|
||||
enum {
|
||||
OPT_SKIP_SAFEMALLOC=OPT_MAX_CLIENT_OPTION,
|
||||
OPT_PS_PROTOCOL, OPT_SP_PROTOCOL, OPT_CURSOR_PROTOCOL, OPT_VIEW_PROTOCOL,
|
||||
OPT_MAX_CONNECT_RETRIES, OPT_MAX_CONNECTIONS, OPT_MARK_PROGRESS,
|
||||
OPT_LOG_DIR, OPT_TAIL_LINES, OPT_RESULT_FORMAT_VERSION
|
||||
OPT_PS_PROTOCOL=OPT_MAX_CLIENT_OPTION, OPT_SP_PROTOCOL,
|
||||
OPT_CURSOR_PROTOCOL, OPT_VIEW_PROTOCOL, OPT_MAX_CONNECT_RETRIES,
|
||||
OPT_MAX_CONNECTIONS, OPT_MARK_PROGRESS, OPT_LOG_DIR,
|
||||
OPT_TAIL_LINES, OPT_RESULT_FORMAT_VERSION
|
||||
};
|
||||
|
||||
static int record= 0, opt_sleep= -1;
|
||||
@@ -156,7 +156,7 @@ static struct st_block *cur_block, *block_stack_end;
|
||||
struct st_test_file
|
||||
{
|
||||
FILE* file;
|
||||
const char *file_name;
|
||||
char *file_name;
|
||||
uint lineno; /* Current line in file */
|
||||
};
|
||||
|
||||
@@ -1112,9 +1112,9 @@ void close_connections()
|
||||
mysql_close(&next_con->mysql);
|
||||
if (next_con->util_mysql)
|
||||
mysql_close(next_con->util_mysql);
|
||||
my_free(next_con->name, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(next_con->name);
|
||||
}
|
||||
my_free(connections, MYF(MY_WME));
|
||||
my_free(connections);
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
@@ -1143,7 +1143,7 @@ void close_files()
|
||||
DBUG_PRINT("info", ("closing file: %s", cur_file->file_name));
|
||||
fclose(cur_file->file);
|
||||
}
|
||||
my_free((uchar*) cur_file->file_name, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(cur_file->file_name);
|
||||
cur_file->file_name= 0;
|
||||
}
|
||||
DBUG_VOID_RETURN;
|
||||
@@ -1163,22 +1163,22 @@ void free_used_memory()
|
||||
for (i= 0 ; i < q_lines.elements ; i++)
|
||||
{
|
||||
struct st_command **q= dynamic_element(&q_lines, i, struct st_command**);
|
||||
my_free((*q)->query_buf,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free((*q)->query_buf);
|
||||
if ((*q)->content.str)
|
||||
dynstr_free(&(*q)->content);
|
||||
my_free((*q),MYF(0));
|
||||
my_free((*q));
|
||||
}
|
||||
for (i= 0; i < 10; i++)
|
||||
{
|
||||
if (var_reg[i].alloced_len)
|
||||
my_free(var_reg[i].str_val, MYF(MY_WME));
|
||||
my_free(var_reg[i].str_val);
|
||||
}
|
||||
while (embedded_server_arg_count > 1)
|
||||
my_free(embedded_server_args[--embedded_server_arg_count],MYF(0));
|
||||
my_free(embedded_server_args[--embedded_server_arg_count]);
|
||||
delete_dynamic(&q_lines);
|
||||
dynstr_free(&ds_res);
|
||||
free_all_replace();
|
||||
my_free(opt_pass,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(opt_pass);
|
||||
free_defaults(default_argv);
|
||||
free_re();
|
||||
#ifdef __WIN__
|
||||
@@ -1940,9 +1940,10 @@ static uchar *get_var_key(const uchar* var, size_t *len,
|
||||
|
||||
static void var_free(void *v)
|
||||
{
|
||||
my_free(((VAR*) v)->str_val, MYF(MY_WME));
|
||||
if (((VAR*)v)->alloced)
|
||||
my_free(v, MYF(MY_WME));
|
||||
VAR *var= (VAR*) v;
|
||||
my_free(var->str_val);
|
||||
if (var->alloced)
|
||||
my_free(var);
|
||||
}
|
||||
|
||||
C_MODE_END
|
||||
@@ -3757,7 +3758,6 @@ void do_send_quit(struct st_command *command)
|
||||
void do_change_user(struct st_command *command)
|
||||
{
|
||||
MYSQL *mysql = &cur_con->mysql;
|
||||
/* static keyword to make the NetWare compiler happy. */
|
||||
static DYNAMIC_STRING ds_user, ds_passwd, ds_db;
|
||||
const struct command_arg change_user_args[] = {
|
||||
{ "user", ARG_STRING, FALSE, &ds_user, "User to connect as" },
|
||||
@@ -4876,7 +4876,7 @@ void do_close_connection(struct st_command *command)
|
||||
con->util_mysql= 0;
|
||||
con->pending= FALSE;
|
||||
|
||||
my_free(con->name, MYF(0));
|
||||
my_free(con->name);
|
||||
|
||||
/*
|
||||
When the connection is closed set name to "-closed_connection-"
|
||||
@@ -5545,7 +5545,7 @@ int read_line(char *buf, int size)
|
||||
fclose(cur_file->file);
|
||||
cur_file->file= 0;
|
||||
}
|
||||
my_free((uchar*) cur_file->file_name, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(cur_file->file_name);
|
||||
cur_file->file_name= 0;
|
||||
if (cur_file == file_stack)
|
||||
{
|
||||
@@ -5881,7 +5881,7 @@ int read_command(struct st_command** command_ptr)
|
||||
(struct st_command*) my_malloc(sizeof(*command),
|
||||
MYF(MY_WME|MY_ZEROFILL))) ||
|
||||
insert_dynamic(&q_lines, (uchar*) &command))
|
||||
die(NullS);
|
||||
die("Out of memory");
|
||||
command->type= Q_UNKNOWN;
|
||||
|
||||
read_command_buf[0]= 0;
|
||||
@@ -6023,9 +6023,6 @@ static struct my_option my_long_options[] =
|
||||
0, 0, 0},
|
||||
{"silent", 's', "Suppress all normal output. Synonym for --quiet.",
|
||||
&silent, &silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"skip-safemalloc", OPT_SKIP_SAFEMALLOC,
|
||||
"Don't use the memory allocation checking.", 0, 0, 0, GET_NO_ARG, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"sleep", 'T', "Always sleep this many seconds on sleep commands.",
|
||||
&opt_sleep, &opt_sleep, 0, GET_INT, REQUIRED_ARG, -1, -1, 0,
|
||||
0, 0, 0},
|
||||
@@ -6064,8 +6061,6 @@ static struct my_option my_long_options[] =
|
||||
};
|
||||
|
||||
|
||||
#include <help_start.h>
|
||||
|
||||
void print_version(void)
|
||||
{
|
||||
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,MTEST_VERSION,
|
||||
@@ -6084,8 +6079,6 @@ void usage()
|
||||
my_print_variables(my_long_options);
|
||||
}
|
||||
|
||||
#include <help_end.h>
|
||||
|
||||
|
||||
/*
|
||||
Read arguments for embedded server and put them into
|
||||
@@ -6181,7 +6174,7 @@ get_one_option(int optid, const struct my_option *opt, char *argument)
|
||||
argument= (char*) ""; // Don't require password
|
||||
if (argument)
|
||||
{
|
||||
my_free(opt_pass, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(opt_pass);
|
||||
opt_pass= my_strdup(argument, MYF(MY_FAE));
|
||||
while (*argument) *argument++= 'x'; /* Destroy argument */
|
||||
tty_password= 0;
|
||||
@@ -6214,11 +6207,6 @@ get_one_option(int optid, const struct my_option *opt, char *argument)
|
||||
case 'F':
|
||||
read_embedded_server_arguments(argument);
|
||||
break;
|
||||
case OPT_SKIP_SAFEMALLOC:
|
||||
#ifdef SAFEMALLOC
|
||||
sf_malloc_quick=1;
|
||||
#endif
|
||||
break;
|
||||
case OPT_RESULT_FORMAT_VERSION:
|
||||
set_result_format_version(opt_result_format_version);
|
||||
break;
|
||||
@@ -6381,12 +6369,12 @@ void init_win_path_patterns()
|
||||
/* Don't insert zero length strings in patterns array */
|
||||
if (strlen(p) == 0)
|
||||
{
|
||||
my_free(p, MYF(0));
|
||||
my_free(p);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (insert_dynamic(&patterns, (uchar*) &p))
|
||||
die(NullS);
|
||||
die("Out of memory");
|
||||
|
||||
DBUG_PRINT("info", ("p: %s", p));
|
||||
while (*p)
|
||||
@@ -6405,7 +6393,7 @@ void free_win_path_patterns()
|
||||
for (i=0 ; i < patterns.elements ; i++)
|
||||
{
|
||||
const char** pattern= dynamic_element(&patterns, i, const char**);
|
||||
my_free((char*) *pattern, MYF(0));
|
||||
my_free((void *) *pattern);
|
||||
}
|
||||
delete_dynamic(&patterns);
|
||||
}
|
||||
@@ -6598,12 +6586,12 @@ void append_stmt_result(DYNAMIC_STRING *ds, MYSQL_STMT *stmt,
|
||||
for (i= 0; i < num_fields; i++)
|
||||
{
|
||||
/* Free data for output */
|
||||
my_free(my_bind[i].buffer, MYF(MY_WME | MY_FAE));
|
||||
my_free(my_bind[i].buffer);
|
||||
}
|
||||
/* Free array with bind structs, lengths and NULL flags */
|
||||
my_free(my_bind , MYF(MY_WME | MY_FAE));
|
||||
my_free(length , MYF(MY_WME | MY_FAE));
|
||||
my_free(is_null , MYF(MY_WME | MY_FAE));
|
||||
my_free(my_bind);
|
||||
my_free(length);
|
||||
my_free(is_null);
|
||||
}
|
||||
|
||||
|
||||
@@ -8543,11 +8531,11 @@ void do_get_replace_column(struct st_command *command)
|
||||
if (!*from)
|
||||
die("Wrong number of arguments to replace_column in '%s'", command->query);
|
||||
to= get_string(&buff, &from, command);
|
||||
my_free(replace_column[column_number-1], MY_ALLOW_ZERO_PTR);
|
||||
my_free(replace_column[column_number-1]);
|
||||
replace_column[column_number-1]= my_strdup(to, MYF(MY_WME | MY_FAE));
|
||||
set_if_bigger(max_replace_column, column_number);
|
||||
}
|
||||
my_free(start, MYF(0));
|
||||
my_free(start);
|
||||
command->last_argument= command->end;
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
@@ -8561,7 +8549,7 @@ void free_replace_column()
|
||||
{
|
||||
if (replace_column[i])
|
||||
{
|
||||
my_free(replace_column[i], 0);
|
||||
my_free(replace_column[i]);
|
||||
replace_column[i]= 0;
|
||||
}
|
||||
}
|
||||
@@ -8642,7 +8630,7 @@ void do_get_replace(struct st_command *command)
|
||||
die("Can't initialize replace from '%s'", command->query);
|
||||
free_pointer_array(&from_array);
|
||||
free_pointer_array(&to_array);
|
||||
my_free(start, MYF(0));
|
||||
my_free(start);
|
||||
command->last_argument= command->end;
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
@@ -8651,11 +8639,8 @@ void do_get_replace(struct st_command *command)
|
||||
void free_replace()
|
||||
{
|
||||
DBUG_ENTER("free_replace");
|
||||
if (glob_replace)
|
||||
{
|
||||
my_free(glob_replace,MYF(0));
|
||||
glob_replace=0;
|
||||
}
|
||||
my_free(glob_replace);
|
||||
glob_replace= NULL;
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
@@ -8875,7 +8860,7 @@ struct st_replace_regex* init_replace_regex(char* expr)
|
||||
return res;
|
||||
|
||||
err:
|
||||
my_free(res,0);
|
||||
my_free(res);
|
||||
die("Error parsing replace_regex \"%s\"", expr);
|
||||
return 0;
|
||||
}
|
||||
@@ -8967,9 +8952,9 @@ void free_replace_regex()
|
||||
if (glob_replace_regex)
|
||||
{
|
||||
delete_dynamic(&glob_replace_regex->regex_arr);
|
||||
my_free(glob_replace_regex->even_buf,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(glob_replace_regex->odd_buf,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(glob_replace_regex,MYF(0));
|
||||
my_free(glob_replace_regex->even_buf);
|
||||
my_free(glob_replace_regex->odd_buf);
|
||||
my_free(glob_replace_regex);
|
||||
glob_replace_regex=0;
|
||||
}
|
||||
}
|
||||
@@ -9164,7 +9149,7 @@ int reg_replace(char** buf_p, int* buf_len_p, char *pattern,
|
||||
str_p= str_end;
|
||||
}
|
||||
}
|
||||
my_free(subs, MYF(0));
|
||||
my_free(subs);
|
||||
my_regfree(&r);
|
||||
*res_p= 0;
|
||||
*buf_p= buf;
|
||||
@@ -9296,7 +9281,7 @@ REPLACE *init_replace(char * *from, char * *to,uint count,
|
||||
if (!(follow=(FOLLOWS*) my_malloc((states+2)*sizeof(FOLLOWS),MYF(MY_WME))))
|
||||
{
|
||||
free_sets(&sets);
|
||||
my_free(found_set,MYF(0));
|
||||
my_free(found_set);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
@@ -9475,8 +9460,7 @@ REPLACE *init_replace(char * *from, char * *to,uint count,
|
||||
for (i=1 ; i <= found_sets ; i++)
|
||||
{
|
||||
pos=from[found_set[i-1].table_offset];
|
||||
rep_str[i].found= !bcmp((const uchar*) pos,
|
||||
(const uchar*) "\\^", 3) ? 2 : 1;
|
||||
rep_str[i].found= !memcmp(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)+
|
||||
@@ -9491,9 +9475,9 @@ REPLACE *init_replace(char * *from, char * *to,uint count,
|
||||
replace[i].next[j]=(REPLACE*) (rep_str+(-sets.set[i].next[j]-1));
|
||||
}
|
||||
}
|
||||
my_free(follow,MYF(0));
|
||||
my_free(follow);
|
||||
free_sets(&sets);
|
||||
my_free(found_set,MYF(0));
|
||||
my_free(found_set);
|
||||
DBUG_PRINT("exit",("Replace table has %d states",sets.count));
|
||||
DBUG_RETURN(replace);
|
||||
}
|
||||
@@ -9509,7 +9493,7 @@ int init_sets(REP_SETS *sets,uint states)
|
||||
if (!(sets->bit_buffer=(uint*) my_malloc(sizeof(uint)*sets->size_of_bits*
|
||||
SET_MALLOC_HUNC,MYF(MY_WME))))
|
||||
{
|
||||
my_free(sets->set,MYF(0));
|
||||
my_free(sets->set);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@@ -9570,8 +9554,8 @@ void free_last_set(REP_SETS *sets)
|
||||
|
||||
void free_sets(REP_SETS *sets)
|
||||
{
|
||||
my_free(sets->set_buffer,MYF(0));
|
||||
my_free(sets->bit_buffer,MYF(0));
|
||||
my_free(sets->set_buffer);
|
||||
my_free(sets->bit_buffer);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -9604,8 +9588,8 @@ void copy_bits(REP_SET *to,REP_SET *from)
|
||||
|
||||
int cmp_bits(REP_SET *set1,REP_SET *set2)
|
||||
{
|
||||
return bcmp((uchar*) set1->bits,(uchar*) set2->bits,
|
||||
sizeof(uint) * set1->size_of_bits);
|
||||
return memcmp(set1->bits, set2->bits,
|
||||
sizeof(uint) * set1->size_of_bits);
|
||||
}
|
||||
|
||||
|
||||
@@ -9674,17 +9658,15 @@ int find_found(FOUND_SET *found_set,uint table_offset, int found_offset)
|
||||
|
||||
uint start_at_word(char * pos)
|
||||
{
|
||||
return (((!bcmp((const uchar*) pos, (const uchar*) "\\b",2) && pos[2]) ||
|
||||
!bcmp((const uchar*) pos, (const uchar*) "\\^", 2)) ? 1 : 0);
|
||||
return (((!memcmp(pos, "\\b",2) && pos[2]) ||
|
||||
!memcmp(pos, "\\^", 2)) ? 1 : 0);
|
||||
}
|
||||
|
||||
uint end_of_word(char * pos)
|
||||
{
|
||||
char * end=strend(pos);
|
||||
return ((end > pos+2 && !bcmp((const uchar*) end-2,
|
||||
(const uchar*) "\\b", 2)) ||
|
||||
(end >= pos+2 && !bcmp((const uchar*) end-2,
|
||||
(const uchar*) "\\$",2))) ? 1 : 0;
|
||||
return ((end > pos+2 && !memcmp(end-2, "\\b", 2)) ||
|
||||
(end >= pos+2 && !memcmp(end-2, "\\$",2))) ? 1 : 0;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@@ -9711,7 +9693,7 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name)
|
||||
if (!(pa->str= (uchar*) my_malloc((uint) (PS_MALLOC-MALLOC_OVERHEAD),
|
||||
MYF(MY_WME))))
|
||||
{
|
||||
my_free((char*) pa->typelib.type_names,MYF(0));
|
||||
my_free(pa->typelib.type_names);
|
||||
DBUG_RETURN (-1);
|
||||
}
|
||||
pa->max_count=(PC_MALLOC-MALLOC_OVERHEAD)/(sizeof(uchar*)+
|
||||
@@ -9772,9 +9754,9 @@ void free_pointer_array(POINTER_ARRAY *pa)
|
||||
if (pa->typelib.count)
|
||||
{
|
||||
pa->typelib.count=0;
|
||||
my_free((char*) pa->typelib.type_names,MYF(0));
|
||||
my_free(pa->typelib.type_names);
|
||||
pa->typelib.type_names=0;
|
||||
my_free(pa->str,MYF(0));
|
||||
my_free(pa->str);
|
||||
}
|
||||
} /* free_pointer_array */
|
||||
|
||||
|
@@ -35,7 +35,7 @@ LINE_BUFFER *batch_readline_init(ulong max_size,FILE *file)
|
||||
return 0;
|
||||
if (init_line_buffer(line_buff,my_fileno(file),IO_SIZE,max_size))
|
||||
{
|
||||
my_free(line_buff,MYF(0));
|
||||
my_free(line_buff);
|
||||
return 0;
|
||||
}
|
||||
return line_buff;
|
||||
@@ -63,8 +63,8 @@ void batch_readline_end(LINE_BUFFER *line_buff)
|
||||
{
|
||||
if (line_buff)
|
||||
{
|
||||
my_free(line_buff->buffer,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(line_buff,MYF(0));
|
||||
my_free(line_buff->buffer);
|
||||
my_free(line_buff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ LINE_BUFFER *batch_readline_command(LINE_BUFFER *line_buff, char * str)
|
||||
return 0;
|
||||
if (init_line_buffer_from_string(line_buff,str))
|
||||
{
|
||||
my_free(line_buff,MYF(0));
|
||||
my_free(line_buff);
|
||||
return 0;
|
||||
}
|
||||
return line_buff;
|
||||
|
@@ -175,7 +175,7 @@ public:
|
||||
{
|
||||
alloced=0;
|
||||
Alloced_length=0;
|
||||
my_free(Ptr,MYF(0));
|
||||
my_free(Ptr);
|
||||
Ptr=0;
|
||||
str_length=0; /* Safety */
|
||||
}
|
||||
|
@@ -15,6 +15,18 @@
|
||||
|
||||
# This file includes build settings used for MySQL release
|
||||
|
||||
INCLUDE(CheckIncludeFiles)
|
||||
INCLUDE(CheckLibraryExists)
|
||||
INCLUDE(CheckTypeSize)
|
||||
|
||||
# XXX package_name.cmake uses this too, move it somewhere global
|
||||
CHECK_TYPE_SIZE("void *" SIZEOF_VOIDP)
|
||||
IF(SIZEOF_VOIDP EQUAL 4)
|
||||
SET(32BIT 1)
|
||||
ENDIF()
|
||||
IF(SIZEOF_VOIDP EQUAL 8)
|
||||
SET(64BIT 1)
|
||||
ENDIF()
|
||||
|
||||
SET(FEATURE_SET "community" CACHE STRING
|
||||
" Selection of features. Options are
|
||||
@@ -76,15 +88,14 @@ IF(FEATURE_SET)
|
||||
SET(WITH_${eng}_STORAGE_ENGINE OFF CACHE BOOL "")
|
||||
ELSE()
|
||||
SET(WITH_${eng}_STORAGE_ENGINE ON CACHE BOOL "")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
ENDIF()
|
||||
|
||||
OPTION(ENABLE_LOCAL_INFILE "" ON)
|
||||
OPTION(ENABLED_LOCAL_INFILE "" ON)
|
||||
SET(WITH_SSL bundled CACHE STRING "")
|
||||
SET(WITH_ZLIB bundled CACHE STRING "")
|
||||
|
||||
|
||||
IF(NOT COMPILATION_COMMENT)
|
||||
SET(COMPILATION_COMMENT "MySQL Community Server (GPL)")
|
||||
ENDIF()
|
||||
@@ -103,46 +114,75 @@ IF(UNIX)
|
||||
ENDIF()
|
||||
|
||||
OPTION(WITH_PIC "" ON) # Why?
|
||||
ENDIF()
|
||||
|
||||
# Ensure aio is available on Linux (required by InnoDB)
|
||||
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
CHECK_INCLUDE_FILES(libaio.h HAVE_LIBAIO_H)
|
||||
CHECK_LIBRARY_EXISTS(aio io_queue_init "" HAVE_LIBAIO)
|
||||
IF(NOT HAVE_LIBAIO_H OR NOT HAVE_LIBAIO)
|
||||
MESSAGE(FATAL_ERROR "aio is required on Linux")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
ENDIF()
|
||||
|
||||
# Compiler options
|
||||
IF(UNIX)
|
||||
# Default GCC flags
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O3 -static-libgcc -fno-omit-frame-pointer")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O3 -static-libgcc -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti")
|
||||
ENDIF()
|
||||
|
||||
# Default GCC flags
|
||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
SET(COMMON_C_FLAGS "-g -static-libgcc -fno-omit-frame-pointer")
|
||||
SET(CMAKE_C_FLAGS_DEBUG "-O ${COMMON_C_FLAGS}")
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}")
|
||||
ENDIF()
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
SET(COMMON_CXX_FLAGS "-g -static-libgcc -fno-omit-frame-pointer")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "-O ${COMMON_CXX_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_CXX_FLAGS}")
|
||||
ENDIF()
|
||||
|
||||
# HPUX flags
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
|
||||
IF(CMAKE_C_COMPILER_ID MATCHES "HP")
|
||||
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ia64")
|
||||
SET(CMAKE_C_FLAGS
|
||||
"${CMAKE_C_FLAGS} +DD64 +DSitanium2 -mt -AC99")
|
||||
SET(CMAKE_CXX_FLAGS
|
||||
"${CMAKE_CXX_FLAGS} +DD64 +DSitanium2 -mt -Aa")
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} +O2")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS} +O2")
|
||||
SET(COMMON_C_FLAGS "+DSitanium2 -mt -AC99")
|
||||
SET(COMMON_CXX_FLAGS "+DSitanium2 -mt -Aa")
|
||||
SET(CMAKE_C_FLAGS_DEBUG "+O0 -g ${COMMON_C_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "+O0 -g ${COMMON_CXX_FLAGS}")
|
||||
# We have seen compiler bugs with optimisation and -g, so disabled for now
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "+O2 ${COMMON_C_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "+O2 ${COMMON_CXX_FLAGS}")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
SET(WITH_SSL)
|
||||
SET(WITH_SSL no)
|
||||
ENDIF()
|
||||
|
||||
# Linux flags
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
IF(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-static-intel -static-libgcc -g -O3 -unroll2 -ip -mp -restrict -no-ftz -no-prefetch")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-static-intel -static-libgcc -g -O3 -unroll2 -ip -mp -restrict -no-ftz -no-prefetch")
|
||||
SET(COMMON_C_FLAGS "-static-intel -static-libgcc -g -mp -restrict")
|
||||
SET(COMMON_CXX_FLAGS "-static-intel -static-libgcc -g -mp -restrict -fno-exceptions -fno-rtti")
|
||||
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ia64")
|
||||
SET(COMMON_C_FLAGS "${COMMON_C_FLAGS} -no-ftz -no-prefetch")
|
||||
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} -no-ftz -no-prefetch")
|
||||
ENDIF()
|
||||
SET(CMAKE_C_FLAGS_DEBUG "${COMMON_C_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${COMMON_CXX_FLAGS}")
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -unroll2 -ip ${COMMON_C_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -unroll2 -ip ${COMMON_CXX_FLAGS}")
|
||||
SET(WITH_SSL no)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# OSX flags
|
||||
IF(APPLE)
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -Os -fno-common")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -Os -felide-constructors -fno-common")
|
||||
SET(COMMON_C_FLAGS "-g -fno-common")
|
||||
# XXX: why are we using -felide-constructors on OSX?
|
||||
SET(COMMON_CXX_FLAGS "-g -fno-common -felide-constructors")
|
||||
SET(CMAKE_C_FLAGS_DEBUG "-O ${COMMON_C_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "-O ${COMMON_CXX_FLAGS}")
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-Os ${COMMON_C_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Os ${COMMON_CXX_FLAGS}")
|
||||
ENDIF()
|
||||
|
||||
# Solaris flags
|
||||
@@ -153,37 +193,48 @@ IF(UNIX)
|
||||
ENDIF()
|
||||
IF(CMAKE_C_COMPILER_ID MATCHES "SunPro")
|
||||
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "i386")
|
||||
IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
# Solaris x86
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
"-g -xO2 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
"-g0 -xO2 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic")
|
||||
ELSE()
|
||||
# Solaris x64
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
"-g -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
"-g0 -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic")
|
||||
ENDIF()
|
||||
ELSE()
|
||||
IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
# Solaris sparc 32 bit
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -xO3 -Xa -xstrconst -mt -xarch=sparc")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g0 -xO3 -noex -mt -xarch=sparc")
|
||||
ELSE()
|
||||
# Solaris sparc 64 bit
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -xO3 -Xa -xstrconst -mt")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g0 -xO3 -noex -mt")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
SET(COMMON_C_FLAGS "-g -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic")
|
||||
SET(COMMON_CXX_FLAGS "-g0 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic")
|
||||
SET(CMAKE_C_FLAGS_DEBUG "${COMMON_C_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${COMMON_CXX_FLAGS}")
|
||||
IF(32BIT)
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-xO2 ${COMMON_C_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-xO2 ${COMMON_CXX_FLAGS}")
|
||||
ELSEIF(64BIT)
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-xO3 ${COMMON_C_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-xO3 ${COMMON_CXX_FLAGS}")
|
||||
ENDIF()
|
||||
ELSE()
|
||||
# Assume !x86 is SPARC
|
||||
SET(COMMON_C_FLAGS "-g -Xa -xstrconst -mt")
|
||||
SET(COMMON_CXX_FLAGS "-g0 -noex -mt")
|
||||
IF(32BIT)
|
||||
SET(COMMON_C_FLAGS "${COMMON_C_FLAGS} -xarch=sparc")
|
||||
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} -xarch=sparc")
|
||||
ENDIF()
|
||||
SET(CMAKE_C_FLAGS_DEBUG "${COMMON_C_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${COMMON_CXX_FLAGS}")
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-xO3 ${COMMON_C_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-xO3 ${COMMON_CXX_FLAGS}")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(CMAKE_C_FLAGS_DEBUG)
|
||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}"
|
||||
CACHE STRING "Debug C compile flags")
|
||||
ENDIF()
|
||||
IF(CMAKE_CXX_FLAGS_DEBUG)
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}"
|
||||
CACHE STRING "Debug C++ compile flags")
|
||||
ENDIF()
|
||||
IF(CMAKE_C_FLAGS_RELWITHDEBINFO)
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}"
|
||||
CACHE STRING "RelWithDebInfo C compile flags")
|
||||
ENDIF()
|
||||
IF(CMAKE_CXX_FLAGS_RELWITHDEBINFO)
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}"
|
||||
CACHE STRING "Compile flags")
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}"
|
||||
CACHE STRING "Compile flags")
|
||||
CACHE STRING "RelWithDebInfo C++ compile flags")
|
||||
ENDIF()
|
||||
|
||||
ENDIF()
|
||||
|
@@ -184,6 +184,12 @@ foreach my $option (@ARGV)
|
||||
$cmakeargs = $cmakeargs." -DWITH_DEBUG_FULL=1";
|
||||
next;
|
||||
}
|
||||
if ($option =~ /mysql-maintainer-mode/)
|
||||
{
|
||||
$cmakeargs = $cmakeargs." -DMYSQL_MAINTAINER_MODE=" .
|
||||
($option =~ /enable/ ? "1" : "0");
|
||||
next;
|
||||
}
|
||||
|
||||
$option = uc($option);
|
||||
$option =~ s/-/_/g;
|
||||
|
0
cmake/install_layout.cmake
Executable file → Normal file
0
cmake/install_layout.cmake
Executable file → Normal file
@@ -250,7 +250,7 @@ SET(DEBUGBUILDDIR "${BINARY_PARENTDIR}/debug" CACHE INTERNAL "Directory of debug
|
||||
|
||||
FUNCTION(INSTALL_DEBUG_TARGET target)
|
||||
CMAKE_PARSE_ARGUMENTS(ARG
|
||||
"DESTINATION;RENAME"
|
||||
"DESTINATION;RENAME;PDB_DESTINATION;COMPONENT"
|
||||
""
|
||||
${ARGN}
|
||||
)
|
||||
@@ -269,6 +269,9 @@ FUNCTION(INSTALL_DEBUG_TARGET target)
|
||||
ELSE()
|
||||
STRING(REPLACE "${CMAKE_CFG_INTDIR}" "Debug" debug_target_location "${target_location}" )
|
||||
ENDIF()
|
||||
IF(NOT ARG_COMPONENT)
|
||||
SET(ARG_COMPONENT DebugBinaries)
|
||||
ENDIF()
|
||||
|
||||
# Define permissions
|
||||
# For executable files
|
||||
@@ -305,19 +308,26 @@ FUNCTION(INSTALL_DEBUG_TARGET target)
|
||||
${RENAME_PARAM}
|
||||
${PERMISSIONS_${target_type}}
|
||||
CONFIGURATIONS Release RelWithDebInfo
|
||||
COMPONENT ${ARG_COMPONENT}
|
||||
OPTIONAL)
|
||||
|
||||
IF(MSVC)
|
||||
GET_FILENAME_COMPONENT(ext ${debug_target_location} EXT)
|
||||
STRING(REPLACE "${ext}" ".pdb" debug_pdb_target_location "${debug_target_location}" )
|
||||
IF(RENAME_PARAM)
|
||||
STRING(REPLACE "${ext}" ".pdb" "${ARG_RENAME}" pdb_rename)
|
||||
SET(PDB_RENAME_PARAM RENAME ${pdb_rename})
|
||||
IF (RENAME_PARAM)
|
||||
IF(NOT ARG_PDB_DESTINATION)
|
||||
STRING(REPLACE "${ext}" ".pdb" "${ARG_RENAME}" pdb_rename)
|
||||
SET(PDB_RENAME_PARAM RENAME "${pdb_rename}")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
IF(NOT ARG_PDB_DESTINATION)
|
||||
SET(ARG_PDB_DESTINATION "${ARG_DESTINATION}")
|
||||
ENDIF()
|
||||
INSTALL(FILES ${debug_pdb_target_location}
|
||||
DESTINATION ${ARG_DESTINATION}
|
||||
${RPDB_RENAME_PARAM}
|
||||
DESTINATION ${ARG_PDB_DESTINATION}
|
||||
${PDB_RENAME_PARAM}
|
||||
CONFIGURATIONS Release RelWithDebInfo
|
||||
COMPONENT ${ARG_COMPONENT}
|
||||
OPTIONAL)
|
||||
ENDIF()
|
||||
ENDFUNCTION()
|
||||
|
@@ -28,6 +28,6 @@ INCLUDE(CheckCXXCompilerFlag)
|
||||
# The following is required to export all symbols
|
||||
# (also with leading underscore)
|
||||
STRING(REPLACE "-bexpall" "-bexpfull" CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS
|
||||
${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS}")
|
||||
"${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS}")
|
||||
STRING(REPLACE "-bexpall" "-bexpfull" CMAKE_SHARED_LIBRARY_LINK_C_FLAGS
|
||||
"${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}")
|
@@ -20,4 +20,5 @@
|
||||
# #Legacy option, maybe not needed anymore , taken as is from autotools build
|
||||
# ADD_DEFINITIONS(-DNET_RETRY_COUNT=1000000)
|
||||
|
||||
ADD_DEFINITIONS(-DHAVE_BROKEN_REALPATH)
|
||||
# The below was used for really old versions of FreeBSD, roughly: before 5.1.9
|
||||
# ADD_DEFINITIONS(-DHAVE_BROKEN_REALPATH)
|
||||
|
@@ -110,6 +110,10 @@ IF(MSVC)
|
||||
ADD_DEFINITIONS(/wd4996)
|
||||
ENDIF()
|
||||
|
||||
# Make class/struct definition mismatch an error (overseen too often,
|
||||
# adds tons of new warnings)
|
||||
ADD_DEFINITIONS(/we4099)
|
||||
|
||||
IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
|
||||
# _WIN64 is defined by the compiler itself.
|
||||
# Yet, we define it here again to work around a bug with Intellisense
|
||||
|
@@ -30,7 +30,6 @@ SET(HAVE_ASM_MSR_H CACHE INTERNAL "")
|
||||
SET(HAVE_BACKTRACE CACHE INTERNAL "")
|
||||
SET(HAVE_BACKTRACE_SYMBOLS CACHE INTERNAL "")
|
||||
SET(HAVE_BACKTRACE_SYMBOLS_FD CACHE INTERNAL "")
|
||||
SET(HAVE_BCMP CACHE INTERNAL "")
|
||||
SET(HAVE_BFILL CACHE INTERNAL "")
|
||||
SET(HAVE_BMOVE CACHE INTERNAL "")
|
||||
SET(HAVE_BSD_SIGNALS CACHE INTERNAL "")
|
||||
@@ -263,7 +262,6 @@ SET(HAVE_SYS_DIR_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_ERRLIST CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_FILE_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_FPU_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_IOCTL CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_IOCTL_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_IPC_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_MALLOC_H CACHE INTERNAL "")
|
||||
|
@@ -26,7 +26,6 @@ IF(NOT VERSION)
|
||||
SET(NEED_DASH_BETWEEN_PLATFORM_AND_MACHINE 1)
|
||||
SET(DEFAULT_PLATFORM ${CMAKE_SYSTEM_NAME})
|
||||
SET(DEFAULT_MACHINE ${CMAKE_SYSTEM_PROCESSOR})
|
||||
MESSAGE("SIZEOF_VOIDP=${SIZEOF_VOIDP}")
|
||||
IF(SIZEOF_VOIDP EQUAL 8)
|
||||
SET(64BIT 1)
|
||||
ENDIF()
|
||||
|
@@ -29,14 +29,14 @@ MACRO (MYSQL_USE_BUNDLED_SSL)
|
||||
CHANGE_SSL_SETTINGS("bundled")
|
||||
#Remove -fno-implicit-templates
|
||||
#(yassl sources cannot be compiled with it)
|
||||
SET(SAVE_CXX_FLAGS ${CXX_FLAGS})
|
||||
SET(SAVE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
IF(CMAKE_CXX_FLAGS)
|
||||
STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS
|
||||
${CMAKE_CXX_FLAGS})
|
||||
ENDIF()
|
||||
ADD_SUBDIRECTORY(extra/yassl)
|
||||
ADD_SUBDIRECTORY(extra/yassl/taocrypt)
|
||||
SET(CXX_FLAGS ${SAVE_CXX_FLAGS})
|
||||
SET(CMAKE_CXX_FLAGS ${SAVE_CXX_FLAGS})
|
||||
GET_TARGET_PROPERTY(src yassl SOURCES)
|
||||
FOREACH(file ${src})
|
||||
SET(SSL_SOURCES ${SSL_SOURCES} ${CMAKE_SOURCE_DIR}/extra/yassl/${file})
|
||||
|
@@ -31,4 +31,4 @@ noinst_HEADERS = readline.h chardefs.h keymaps.h \
|
||||
|
||||
EXTRA_DIST= emacs_keymap.c vi_keymap.c CMakeLists.txt
|
||||
|
||||
DEFS = -DMYSQL_CLIENT_NO_THREADS -DHAVE_CONFIG_H -DNO_KILL_INTR
|
||||
DEFS = -DMYSQL_CLIENT_NO_THREADS -DHAVE_CONFIG_H -DNO_KILL_INTR -D_GNU_SOURCE=1
|
||||
|
@@ -22,11 +22,14 @@
|
||||
#cmakedefine HAVE_ALLOCA_H 1
|
||||
#cmakedefine HAVE_AIO_H 1
|
||||
#cmakedefine HAVE_ARPA_INET_H 1
|
||||
#cmakedefine HAVE_ASM_MSR_H 1
|
||||
#cmakedefine HAVE_ASM_TERMBITS_H 1
|
||||
#cmakedefine HAVE_BSEARCH 1
|
||||
#cmakedefine HAVE_CRYPT_H 1
|
||||
#cmakedefine HAVE_CURSES_H 1
|
||||
#cmakedefine HAVE_CXXABI_H 1
|
||||
#cmakedefine HAVE_NCURSES_H 1
|
||||
#cmakedefine HAVE_NDIR_H 1
|
||||
#cmakedefine HAVE_DIRENT_H 1
|
||||
#cmakedefine HAVE_DLFCN_H 1
|
||||
#cmakedefine HAVE_EXECINFO_H 1
|
||||
@@ -70,6 +73,7 @@
|
||||
#cmakedefine HAVE_SYS_IPC_H 1
|
||||
#cmakedefine HAVE_SYS_MALLOC_H 1
|
||||
#cmakedefine HAVE_SYS_MMAN_H 1
|
||||
#cmakedefine HAVE_SYS_NDIR_H 1
|
||||
#cmakedefine HAVE_SYS_PTE_H 1
|
||||
#cmakedefine HAVE_SYS_PTEM_H 1
|
||||
#cmakedefine HAVE_SYS_PRCTL_H 1
|
||||
@@ -87,6 +91,7 @@
|
||||
#cmakedefine HAVE_SYS_UN_H 1
|
||||
#cmakedefine HAVE_SYS_VADVISE_H 1
|
||||
#cmakedefine HAVE_TERM_H 1
|
||||
#cmakedefine HAVE_TERMBITS_H 1
|
||||
#cmakedefine HAVE_TERMIOS_H 1
|
||||
#cmakedefine HAVE_TERMIO_H 1
|
||||
#cmakedefine HAVE_TERMCAP_H 1
|
||||
@@ -98,6 +103,7 @@
|
||||
#cmakedefine HAVE_SYS_UTIME_H 1
|
||||
#cmakedefine HAVE_SYS_WAIT_H 1
|
||||
#cmakedefine HAVE_SYS_PARAM_H 1
|
||||
#cmakedefine HAVE_XFS_XFS_H 1
|
||||
|
||||
/* Libraries */
|
||||
#cmakedefine HAVE_LIBPTHREAD 1
|
||||
@@ -125,14 +131,15 @@
|
||||
#cmakedefine HAVE_AIOWAIT 1
|
||||
#cmakedefine HAVE_ALARM 1
|
||||
#cmakedefine HAVE_ALLOCA 1
|
||||
#cmakedefine HAVE_BCMP 1
|
||||
#cmakedefine HAVE_BFILL 1
|
||||
#cmakedefine HAVE_BMOVE 1
|
||||
#cmakedefine HAVE_BZERO 1
|
||||
#cmakedefine HAVE_INDEX 1
|
||||
#cmakedefine HAVE_CHOWN 1
|
||||
#cmakedefine HAVE_CLOCK_GETTIME 1
|
||||
#cmakedefine HAVE_CRYPT 1
|
||||
#cmakedefine HAVE_CUSERID 1
|
||||
#cmakedefine HAVE_CXX_NEW 1
|
||||
#cmakedefine HAVE_DIRECTIO 1
|
||||
#cmakedefine HAVE_DLERROR 1
|
||||
#cmakedefine HAVE_DLOPEN 1
|
||||
@@ -147,6 +154,7 @@
|
||||
#cmakedefine HAVE_FPSETMASK 1
|
||||
#cmakedefine HAVE_FSEEKO 1
|
||||
#cmakedefine HAVE_FSYNC 1
|
||||
#cmakedefine HAVE_FTIME 1
|
||||
#cmakedefine HAVE_GETADDRINFO 1
|
||||
#cmakedefine HAVE_GETCWD 1
|
||||
#cmakedefine HAVE_GETHOSTBYADDR_R 1
|
||||
@@ -176,6 +184,8 @@
|
||||
#cmakedefine HAVE_LOG2 1
|
||||
#cmakedefine HAVE_LONGJMP 1
|
||||
#cmakedefine HAVE_LSTAT 1
|
||||
#cmakedefine HAVE_MEMALIGN 1
|
||||
/* #cmakedefine HAVE_MLOCK 1 see Bug#54662 */
|
||||
#cmakedefine HAVE_NPTL 1
|
||||
#cmakedefine HAVE_NL_LANGINFO 1
|
||||
#cmakedefine HAVE_MADVISE 1
|
||||
@@ -196,6 +206,8 @@
|
||||
#cmakedefine HAVE_PREAD 1
|
||||
#cmakedefine HAVE_PAUSE_INSTRUCTION 1
|
||||
#cmakedefine HAVE_FAKE_PAUSE_INSTRUCTION 1
|
||||
#cmakedefine HAVE_RDTSCLL 1
|
||||
#cmakedefine HAVE_READ_REAL_TIME 1
|
||||
#cmakedefine HAVE_PTHREAD_ATTR_CREATE 1
|
||||
#cmakedefine HAVE_PTHREAD_ATTR_GETSTACKSIZE 1
|
||||
#cmakedefine HAVE_PTHREAD_ATTR_SETPRIO 1
|
||||
@@ -240,6 +252,15 @@
|
||||
#cmakedefine HAVE_SIGWAIT 1
|
||||
#cmakedefine HAVE_SLEEP 1
|
||||
#cmakedefine HAVE_SNPRINTF 1
|
||||
/* Some that currently are not real defines, internal to CMake setup */
|
||||
/* #cmakedefine HAVE_FCNTL_NONBLOCK 1 */
|
||||
/* #cmakedefine HAVE_FINITE_IN_MATH_H 1 */
|
||||
/* #cmakedefine HAVE_SOCKADDR_STORAGE_SS_FAMILY 1 */
|
||||
/* #cmakedefine HAVE_SOCKADDR_STORAGE___SS_FAMILY 1 */
|
||||
/* #cmakedefine HAVE_SOCKET_SIZE_T_AS_int 1 */
|
||||
/* #cmakedefine HAVE_SOCKET_SIZE_T_AS_size_t 1 */
|
||||
/* #cmakedefine HAVE_SOCKET_SIZE_T_AS_socklen_t */
|
||||
/* #cmakedefine HAVE_SOCKET_TIMEOUT */
|
||||
#cmakedefine HAVE_STPCPY 1
|
||||
#cmakedefine HAVE_STRERROR 1
|
||||
#cmakedefine HAVE_STRCOLL 1
|
||||
@@ -560,6 +581,23 @@
|
||||
#cmakedefine HAVE_UCA_COLLATIONS 1
|
||||
#cmakedefine HAVE_COMPRESS 1
|
||||
|
||||
/*
|
||||
Hard coded platform settings
|
||||
*/
|
||||
|
||||
/* This is ugly, but we need lots of tweaks for HP-UX */
|
||||
#cmakedefine HPUX11 1
|
||||
#cmakedefine DO_NOT_REMOVE_THREAD_WRAPPERS 1
|
||||
#cmakedefine HAVE_BROKEN_PREAD 1
|
||||
#cmakedefine HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT 1
|
||||
#cmakedefine SNPRINTF_RETURN_TRUNC 1
|
||||
#cmakedefine _INCLUDE_LONGLONG 1
|
||||
|
||||
/* Mac OS X */
|
||||
#cmakedefine SIGNALS_DONT_BREAK_READ 1
|
||||
#cmakedefine IGNORE_SIGHUP_SIGQUIT 1
|
||||
#cmakedefine _P1003_1B_VISIBLE 1
|
||||
#cmakedefine DONT_DECLARE_CXA_PURE_VIRTUAL 1
|
||||
|
||||
/*
|
||||
Stuff that always need to be defined (compile breaks without it)
|
||||
|
64
config/ac-macros/maintainer.m4
Normal file
64
config/ac-macros/maintainer.m4
Normal file
@@ -0,0 +1,64 @@
|
||||
#
|
||||
# Control aspects of the development environment which are
|
||||
# specific to MySQL maintainers and developers.
|
||||
#
|
||||
AC_DEFUN([MY_MAINTAINER_MODE], [
|
||||
AC_MSG_CHECKING([whether to enable the maintainer-specific development environment])
|
||||
AC_ARG_ENABLE([mysql-maintainer-mode],
|
||||
[AS_HELP_STRING([--enable-mysql-maintainer-mode],
|
||||
[Enable a MySQL maintainer-specific development environment])],
|
||||
[USE_MYSQL_MAINTAINER_MODE=$enableval],
|
||||
[USE_MYSQL_MAINTAINER_MODE=no])
|
||||
AC_MSG_RESULT([$USE_MYSQL_MAINTAINER_MODE])
|
||||
])
|
||||
|
||||
# Set warning options required under maintainer mode.
|
||||
AC_DEFUN([MY_MAINTAINER_MODE_WARNINGS], [
|
||||
# Setup GCC warning options.
|
||||
AS_IF([test "$GCC" = "yes"], [
|
||||
C_WARNINGS="-Wall -Wextra -Wunused -Wwrite-strings -Werror"
|
||||
CXX_WARNINGS="${C_WARNINGS} -Wno-unused-parameter"
|
||||
])
|
||||
|
||||
# Test whether the warning options work.
|
||||
# Test C options
|
||||
AS_IF([test -n "$C_WARNINGS"], [
|
||||
save_CFLAGS="$CFLAGS"
|
||||
AC_MSG_CHECKING([whether to use C warning options ${C_WARNINGS}])
|
||||
AC_LANG_PUSH(C)
|
||||
CFLAGS="$CFLAGS ${C_WARNINGS}"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [myac_c_warning_flags=yes],
|
||||
[myac_c_warning_flags=no])
|
||||
AC_LANG_POP()
|
||||
AC_MSG_RESULT([$myac_c_warning_flags])
|
||||
CFLAGS="$save_CFLAGS"
|
||||
])
|
||||
|
||||
# Test C++ options
|
||||
AS_IF([test -n "$CXX_WARNINGS"], [
|
||||
save_CXXFLAGS="$CXXFLAGS"
|
||||
AC_MSG_CHECKING([whether to use C++ warning options ${CXX_WARNINGS}])
|
||||
AC_LANG_PUSH(C++)
|
||||
CXXFLAGS="$CXXFLAGS ${CXX_WARNINGS}"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [myac_cxx_warning_flags=yes],
|
||||
[myac_cxx_warning_flags=no])
|
||||
AC_LANG_POP()
|
||||
AC_MSG_RESULT([$myac_cxx_warning_flags])
|
||||
CXXFLAGS="$save_CXXFLAGS"
|
||||
])
|
||||
|
||||
# Set compile flag variables.
|
||||
AS_IF([test "$myac_c_warning_flags" = "yes"], [
|
||||
AM_CFLAGS="${AM_CFLAGS} ${C_WARNINGS}"
|
||||
AC_SUBST([AM_CFLAGS])])
|
||||
AS_IF([test "$myac_cxx_warning_flags" = "yes"], [
|
||||
AM_CXXFLAGS="${AM_CXXFLAGS} ${CXX_WARNINGS}"
|
||||
AC_SUBST([AM_CXXFLAGS])])
|
||||
])
|
||||
|
||||
|
||||
# Set compiler flags required under maintainer mode.
|
||||
AC_DEFUN([MY_MAINTAINER_MODE_SETUP], [
|
||||
AS_IF([test "$USE_MYSQL_MAINTAINER_MODE" = "yes"],
|
||||
[MY_MAINTAINER_MODE_WARNINGS])
|
||||
])
|
@@ -617,25 +617,19 @@ fi
|
||||
|
||||
|
||||
AC_DEFUN([MYSQL_CHECK_CXX_VERSION], [
|
||||
case $SYSTEM_TYPE in
|
||||
*netware*)
|
||||
CXX_VERSION=`$CXX -version | grep -i version`
|
||||
;;
|
||||
*)
|
||||
CXX_VERSION=`$CXX --version | sed 1q`
|
||||
if test $? -ne "0" -o -z "$CXX_VERSION"
|
||||
then
|
||||
CXX_VERSION=`$CXX -V 2>&1|sed 1q` # trying harder for Sun and SGI
|
||||
fi
|
||||
if test $? -ne "0" -o -z "$CXX_VERSION"
|
||||
then
|
||||
CXX_VERSION=`$CXX -v 2>&1|sed 1q` # even harder for Alpha
|
||||
fi
|
||||
if test $? -ne "0" -o -z "$CXX_VERSION"
|
||||
then
|
||||
CXX_VERSION=""
|
||||
fi
|
||||
esac
|
||||
CXX_VERSION=`$CXX --version | sed 1q`
|
||||
if test $? -ne "0" -o -z "$CXX_VERSION"
|
||||
then
|
||||
CXX_VERSION=`$CXX -V 2>&1|sed 1q` # trying harder for Sun and SGI
|
||||
fi
|
||||
if test $? -ne "0" -o -z "$CXX_VERSION"
|
||||
then
|
||||
CXX_VERSION=`$CXX -v 2>&1|sed 1q` # even harder for Alpha
|
||||
fi
|
||||
if test $? -ne "0" -o -z "$CXX_VERSION"
|
||||
then
|
||||
CXX_VERSION=""
|
||||
fi
|
||||
if test "$CXX_VERSION"
|
||||
then
|
||||
AC_MSG_CHECKING("C++ compiler version")
|
||||
|
@@ -202,6 +202,7 @@ CHECK_INCLUDE_FILES (limits.h HAVE_LIMITS_H)
|
||||
CHECK_INCLUDE_FILES (locale.h HAVE_LOCALE_H)
|
||||
CHECK_INCLUDE_FILES (malloc.h HAVE_MALLOC_H)
|
||||
CHECK_INCLUDE_FILES (memory.h HAVE_MEMORY_H)
|
||||
CHECK_INCLUDE_FILES (ndir.h HAVE_NDIR_H)
|
||||
CHECK_INCLUDE_FILES (netinet/in.h HAVE_NETINET_IN_H)
|
||||
CHECK_INCLUDE_FILES (paths.h HAVE_PATHS_H)
|
||||
CHECK_INCLUDE_FILES (port.h HAVE_PORT_H)
|
||||
@@ -210,7 +211,8 @@ CHECK_INCLUDE_FILES (pwd.h HAVE_PWD_H)
|
||||
CHECK_INCLUDE_FILES (sched.h HAVE_SCHED_H)
|
||||
CHECK_INCLUDE_FILES (select.h HAVE_SELECT_H)
|
||||
CHECK_INCLUDE_FILES (semaphore.h HAVE_SEMAPHORE_H)
|
||||
CHECK_INCLUDE_FILES (sys/dir.h HAVE_SYS_DIR_H)
|
||||
CHECK_INCLUDE_FILES ("sys/types.h;sys/dir.h" HAVE_SYS_DIR_H)
|
||||
CHECK_INCLUDE_FILES (sys/ndir.h HAVE_SYS_NDIR_H)
|
||||
CHECK_INCLUDE_FILES (sys/pte.h HAVE_SYS_PTE_H)
|
||||
CHECK_INCLUDE_FILES (stddef.h HAVE_STDDEF_H)
|
||||
CHECK_INCLUDE_FILES (stdint.h HAVE_STDINT_H)
|
||||
@@ -236,6 +238,8 @@ CHECK_INCLUDE_FILES (sys/stream.h HAVE_SYS_STREAM_H)
|
||||
CHECK_INCLUDE_FILES (sys/termcap.h HAVE_SYS_TERMCAP_H)
|
||||
CHECK_INCLUDE_FILES ("time.h;sys/timeb.h" HAVE_SYS_TIMEB_H)
|
||||
CHECK_INCLUDE_FILES ("curses.h;term.h" HAVE_TERM_H)
|
||||
CHECK_INCLUDE_FILES (asm/termbits.h HAVE_ASM_TERMBITS_H)
|
||||
CHECK_INCLUDE_FILES (termbits.h HAVE_TERMBITS_H)
|
||||
CHECK_INCLUDE_FILES (termios.h HAVE_TERMIOS_H)
|
||||
CHECK_INCLUDE_FILES (termio.h HAVE_TERMIO_H)
|
||||
CHECK_INCLUDE_FILES (termcap.h HAVE_TERMCAP_H)
|
||||
@@ -249,11 +253,15 @@ CHECK_INCLUDE_FILES (sys/param.h HAVE_SYS_PARAM_H)
|
||||
CHECK_INCLUDE_FILES (sys/vadvise.h HAVE_SYS_VADVISE_H)
|
||||
CHECK_INCLUDE_FILES (fnmatch.h HAVE_FNMATCH_H)
|
||||
CHECK_INCLUDE_FILES (stdarg.h HAVE_STDARG_H)
|
||||
CHECK_INCLUDE_FILES("stdlib.h;sys/un.h" HAVE_SYS_UN_H)
|
||||
CHECK_INCLUDE_FILES ("stdlib.h;sys/un.h" HAVE_SYS_UN_H)
|
||||
CHECK_INCLUDE_FILES (vis.h HAVE_VIS_H)
|
||||
CHECK_INCLUDE_FILES (wchar.h HAVE_WCHAR_H)
|
||||
CHECK_INCLUDE_FILES (wctype.h HAVE_WCTYPE_H)
|
||||
CHECK_INCLUDE_FILES (xfs/xfs.h HAVE_XFS_XFS_H)
|
||||
|
||||
IF(HAVE_SYS_STREAM_H)
|
||||
# Needs sys/stream.h on Solaris
|
||||
CHECK_INCLUDE_FILES (sys/stream.h sys/ptem.h HAVE_SYS_PTEM_H)
|
||||
CHECK_INCLUDE_FILES ("sys/stream.h;sys/ptem.h" HAVE_SYS_PTEM_H)
|
||||
ELSE()
|
||||
CHECK_INCLUDE_FILES (sys/ptem.h HAVE_SYS_PTEM_H)
|
||||
ENDIF()
|
||||
@@ -273,7 +281,6 @@ CHECK_FUNCTION_EXISTS (backtrace HAVE_BACKTRACE)
|
||||
CHECK_FUNCTION_EXISTS (backtrace_symbols HAVE_BACKTRACE_SYMBOLS)
|
||||
CHECK_FUNCTION_EXISTS (backtrace_symbols_fd HAVE_BACKTRACE_SYMBOLS_FD)
|
||||
CHECK_FUNCTION_EXISTS (printstack HAVE_PRINTSTACK)
|
||||
CHECK_FUNCTION_EXISTS (bcmp HAVE_BCMP)
|
||||
CHECK_FUNCTION_EXISTS (bfill HAVE_BFILL)
|
||||
CHECK_FUNCTION_EXISTS (bmove HAVE_BMOVE)
|
||||
CHECK_FUNCTION_EXISTS (bsearch HAVE_BSEARCH)
|
||||
@@ -495,14 +502,15 @@ IF(HAVE_STDINT_H)
|
||||
SET(CMAKE_EXTRA_INCLUDE_FILES stdint.h)
|
||||
ENDIF(HAVE_STDINT_H)
|
||||
|
||||
IF(NOT APPLE)
|
||||
# Prevent some checks on OSX, they return ambigious results
|
||||
# on universal 32/64 bit binariess
|
||||
MY_CHECK_TYPE_SIZE("void *" VOIDP)
|
||||
MY_CHECK_TYPE_SIZE("char *" CHARP)
|
||||
MY_CHECK_TYPE_SIZE(long LONG)
|
||||
MY_CHECK_TYPE_SIZE(size_t SIZE_T)
|
||||
ENDIF()
|
||||
# These first four SIZE_* values are not really used on Mac OS X,
|
||||
# as we only know at comile time what architecture to build for,
|
||||
# see "config.h.cmake". But as same macro MY_CHECK_TYPE_SIZE also
|
||||
# sets HAVE_* macros, we run the check here, doesn't hurt.
|
||||
MY_CHECK_TYPE_SIZE("void *" VOIDP)
|
||||
MY_CHECK_TYPE_SIZE("char *" CHARP)
|
||||
MY_CHECK_TYPE_SIZE(long LONG)
|
||||
MY_CHECK_TYPE_SIZE(size_t SIZE_T)
|
||||
|
||||
MY_CHECK_TYPE_SIZE(char CHAR)
|
||||
MY_CHECK_TYPE_SIZE(short SHORT)
|
||||
MY_CHECK_TYPE_SIZE(int INT)
|
||||
@@ -750,7 +758,6 @@ IF(NOT CMAKE_CROSSCOMPILING AND NOT MSVC)
|
||||
ENDIF()
|
||||
|
||||
CHECK_SYMBOL_EXISTS(tcgetattr "termios.h" HAVE_TCGETATTR 1)
|
||||
CHECK_INCLUDE_FILES(sys/ioctl.h HAVE_SYS_IOCTL 1)
|
||||
|
||||
#
|
||||
# Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7)
|
||||
@@ -1040,3 +1047,25 @@ CHECK_STRUCT_HAS_MEMBER("struct dirent" d_ino "dirent.h" STRUCT_DIRENT_HAS_D_IN
|
||||
CHECK_STRUCT_HAS_MEMBER("struct dirent" d_namlen "dirent.h" STRUCT_DIRENT_HAS_D_NAMLEN)
|
||||
SET(SPRINTF_RETURNS_INT 1)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Hard coded platform settings
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
# This is ugly, but we need lots of tweaks for HP-UX
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
|
||||
SET(HPUX11 1)
|
||||
SET(DO_NOT_REMOVE_THREAD_WRAPPERS 1)
|
||||
SET(HAVE_BROKEN_PREAD 1)
|
||||
SET(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT 1)
|
||||
SET(NO_FCNTL_NONBLOCK 1) # Set conditionally in code above
|
||||
SET(SNPRINTF_RETURN_TRUNC 1)
|
||||
SET(_INCLUDE_LONGLONG 1)
|
||||
ENDIF()
|
||||
|
||||
IF(APPLE)
|
||||
SET(DONT_DECLARE_CXA_PURE_VIRTUAL 1)
|
||||
SET(IGNORE_SIGHUP_SIGQUIT 1)
|
||||
SET(SIGNALS_DONT_BREAK_READ 1)
|
||||
SET(SIGNAL_WITH_VIO_CLOSE 1) # FIXME better handled in mysql-trunk
|
||||
SET(_P1003_1B_VISIBLE 1)
|
||||
ENDIF()
|
||||
|
336
configure.in
336
configure.in
@@ -80,6 +80,7 @@ MYSQL_TCP_PORT_DEFAULT=3306
|
||||
MYSQL_UNIX_ADDR_DEFAULT="/tmp/mysql.sock"
|
||||
|
||||
dnl Include m4
|
||||
sinclude(config/ac-macros/maintainer.m4)
|
||||
sinclude(config/ac-macros/alloca.m4)
|
||||
sinclude(config/ac-macros/check_cpu.m4)
|
||||
sinclude(config/ac-macros/character_sets.m4)
|
||||
@@ -118,6 +119,8 @@ AC_SUBST(SHARED_LIB_MAJOR_VERSION)
|
||||
AC_SUBST(SHARED_LIB_VERSION)
|
||||
AC_SUBST(AVAILABLE_LANGUAGES)
|
||||
|
||||
# Whether the maintainer mode should be enabled.
|
||||
MY_MAINTAINER_MODE
|
||||
|
||||
# Canonicalize the configuration name.
|
||||
|
||||
@@ -226,14 +229,7 @@ AC_PROG_CXX
|
||||
AC_PROG_CPP
|
||||
|
||||
# Print version of CC and CXX compiler (if they support --version)
|
||||
case $SYSTEM_TYPE in
|
||||
*netware*)
|
||||
CC_VERSION=`$CC -version | grep -i version`
|
||||
;;
|
||||
*)
|
||||
CC_VERSION=`$CC --version | sed 1q`
|
||||
;;
|
||||
esac
|
||||
if test $? -eq "0"
|
||||
then
|
||||
AC_MSG_CHECKING("C Compiler version")
|
||||
@@ -291,40 +287,6 @@ AC_CHECK_PROGS(YACC, ['bison -y -p MYSQL'])
|
||||
AC_CHECK_PROG(PDFMANUAL, pdftex, manual.pdf)
|
||||
AC_CHECK_PROG(DVIS, tex, manual.dvi)
|
||||
|
||||
#check the return type of sprintf
|
||||
AC_MSG_CHECKING("return type of sprintf")
|
||||
AC_TRY_RUN([
|
||||
int main()
|
||||
{
|
||||
char* s = "hello";
|
||||
char buf[6];
|
||||
if((int)sprintf(buf, s) == strlen(s))
|
||||
return 0;
|
||||
|
||||
return -1;
|
||||
}
|
||||
],
|
||||
[AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf])
|
||||
AC_MSG_RESULT("int")],
|
||||
[AC_TRY_RUN([
|
||||
int main()
|
||||
{
|
||||
char* s = "hello";
|
||||
char buf[6];
|
||||
if((char*)sprintf(buf,s) == buf + strlen(s))
|
||||
return 0;
|
||||
return -1;
|
||||
} ],
|
||||
[AC_DEFINE(SPRINTF_RETURNS_PTR, [1], [Broken sprintf])
|
||||
AC_MSG_RESULT("ptr")],
|
||||
[AC_DEFINE(SPRINTF_RETURNS_GARBAGE, [1], [Broken sprintf])
|
||||
AC_MSG_RESULT("garbage")]
|
||||
)],
|
||||
# Cross compile, assume POSIX
|
||||
[AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf])
|
||||
AC_MSG_RESULT("int (we assume)")]
|
||||
)
|
||||
|
||||
AC_PATH_PROG(uname_prog, uname, no)
|
||||
|
||||
# We should go through this and put all the explictly system dependent
|
||||
@@ -458,15 +420,10 @@ dnl Find paths to some shell programs
|
||||
AC_PATH_PROG(LN, ln, ln)
|
||||
# This must be able to take a -f flag like normal unix ln.
|
||||
AC_PATH_PROG(LN_CP_F, ln, ln)
|
||||
case $SYSTEM_TYPE in
|
||||
*netware*) ;;
|
||||
*)
|
||||
# If ln -f does not exists use -s (AFS systems)
|
||||
if test -n "$LN_CP_F"; then
|
||||
LN_CP_F="$LN_CP_F -s"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
# If ln -f does not exists use -s (AFS systems)
|
||||
if test -n "$LN_CP_F"; then
|
||||
LN_CP_F="$LN_CP_F -s"
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(MV, mv, mv)
|
||||
AC_PATH_PROG(RM, rm, rm)
|
||||
@@ -506,7 +463,16 @@ if test "$GCC" != "yes" || expr "$CC" : ".*icc.*"
|
||||
then
|
||||
ABI_CHECK=""
|
||||
else
|
||||
ABI_CHECK="abi_check"
|
||||
# Workaround GCC >= 4.5 - See Bug#52514
|
||||
case `$CC -dumpversion` in
|
||||
[[4-9]].[[5-9]]*)
|
||||
AC_MSG_WARN([ABI check disabled (GCC >= 4.5)])
|
||||
ABI_CHECK=""
|
||||
;;
|
||||
*)
|
||||
ABI_CHECK="abi_check"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
AC_SUBST(ABI_CHECK)
|
||||
@@ -550,9 +516,6 @@ else
|
||||
*cygwin*)
|
||||
FIND_PROC="$PS -e | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
|
||||
;;
|
||||
*netware*)
|
||||
FIND_PROC=
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Could not find the right ps and/or grep switches. Which OS is this? See the Installation chapter in the Reference Manual.])
|
||||
esac
|
||||
@@ -1301,9 +1264,7 @@ case $SYSTEM_TYPE in
|
||||
if test "$OSVERSION" -gt "600000"
|
||||
then
|
||||
# Post user-level threads, MYSQLD_NET_RETRY_COUNT is not needed any more
|
||||
AC_MSG_WARN([Adding fix for broken realpath])
|
||||
CFLAGS="$CFLAGS -DHAVE_BROKEN_REALPATH"
|
||||
CXXFLAGS="$CXXFLAGS -DHAVE_BROKEN_REALPATH"
|
||||
:
|
||||
elif test "$OSVERSION" -gt "480100" && \
|
||||
test "$OSVERSION" -lt "500000" || \
|
||||
test "$OSVERSION" -gt "500109"
|
||||
@@ -1356,98 +1317,6 @@ dnl Is this the right match for DEC OSF on alpha?
|
||||
# fix to handle include of <stdint.h> correctly on OSF1 with cxx compiler
|
||||
CXXFLAGS="$CXXFLAGS -I/usr/include/cxx -I/usr/include/cxx_cname -I/usr/include -I/usr/include.dtk"
|
||||
;;
|
||||
*netware*)
|
||||
# No need for curses library so set it to null
|
||||
with_named_curses=""
|
||||
|
||||
# No thread library - in LibC
|
||||
with_named_thread=""
|
||||
|
||||
#
|
||||
# Edit Makefile.in files.
|
||||
#
|
||||
echo -n "configuring Makefile.in files for NetWare... "
|
||||
for file in sql/Makefile.in extra/Makefile.in client/Makefile.in
|
||||
do
|
||||
# echo "#### $file ####"
|
||||
filedir="`dirname $file`"
|
||||
filebase="`basename $file`"
|
||||
filesed=$filedir/$filebase.sed
|
||||
#
|
||||
# Backup and always use original file
|
||||
#
|
||||
if test -f $file.bk
|
||||
then
|
||||
cp -fp $file.bk $file
|
||||
else
|
||||
cp -fp $file $file.bk
|
||||
fi
|
||||
case $file in
|
||||
sql/Makefile.in)
|
||||
# Use gen_lex_hash.linux instead of gen_lex_hash
|
||||
# Add library dependencies to mysqld_DEPENDENCIES
|
||||
lib_DEPENDENCIES="\$(pstack_libs) \$(openssl_libs) \$(yassl_libs)"
|
||||
cat > $filesed << EOF
|
||||
s,\(\./gen_lex_hash\)\$(EXEEXT),\1.linux,
|
||||
s%\(mysqld_DEPENDENCIES = \)%\1$lib_DEPENDENCIES %
|
||||
EOF
|
||||
;;
|
||||
extra/Makefile.in)
|
||||
cat > $filesed << EOF
|
||||
s,\(extra/comp_err\)\$(EXEEXT),\1.linux,
|
||||
EOF
|
||||
;;
|
||||
libmysql/Makefile.in)
|
||||
cat > $filesed << EOF
|
||||
s,libyassl.la,.libs/libyassl.a,
|
||||
s,libtaocrypt.la,.libs/libtaocrypt.a,
|
||||
EOF
|
||||
;;
|
||||
libmysql_r/Makefile.in)
|
||||
cat > $filesed << EOF
|
||||
s,libyassl.la,.libs/libyassl.a,
|
||||
s,libtaocrypt.la,.libs/libtaocrypt.a,
|
||||
EOF
|
||||
;;
|
||||
client/Makefile.in)
|
||||
#
|
||||
cat > $filesed << EOF
|
||||
s,libmysqlclient.la,.libs/libmysqlclient.a,
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
if `sed -f $filesed $file > $file.nw`;\
|
||||
then
|
||||
mv -f $file.nw $file
|
||||
rm -f $filesed
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
# wait for file system changes to complete
|
||||
sleep 1
|
||||
done
|
||||
echo "done"
|
||||
|
||||
#
|
||||
# Make sure the following files are writable.
|
||||
#
|
||||
# When the files are retrieved from some source code control systems they are read-only.
|
||||
#
|
||||
echo -n "making sure specific build files are writable... "
|
||||
for file in \
|
||||
Docs/manual.chm \
|
||||
Docs/mysql.info \
|
||||
Docs/INSTALL-BINARY \
|
||||
INSTALL-SOURCE \
|
||||
COPYING
|
||||
do
|
||||
if test -e $file; then
|
||||
chmod +w $file
|
||||
fi
|
||||
done
|
||||
echo "done"
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
@@ -1820,12 +1689,7 @@ esac
|
||||
|
||||
|
||||
# System characteristics
|
||||
case $SYSTEM_TYPE in
|
||||
*netware*) ;;
|
||||
*)
|
||||
AC_SYS_RESTARTABLE_SYSCALLS
|
||||
;;
|
||||
esac
|
||||
|
||||
# Build optimized or debug version ?
|
||||
# First check for gcc and g++
|
||||
@@ -1865,17 +1729,6 @@ else
|
||||
esac
|
||||
fi
|
||||
|
||||
case $SYSTEM_TYPE in
|
||||
*netware*)
|
||||
DEBUG_CFLAGS="-g -DDEBUG -sym internal,codeview4"
|
||||
DEBUG_CXXFLAGS="-g -DDEBUG -sym internal,codeview4"
|
||||
DEBUG_OPTIMIZE_CC="-DDEBUG"
|
||||
DEBUG_OPTIMIZE_CXX="-DDEBUG"
|
||||
OPTIMIZE_CFLAGS="-O3 -DNDEBUG"
|
||||
OPTIMIZE_CXXFLAGS="-O3 -DNDEBUG"
|
||||
;;
|
||||
esac
|
||||
|
||||
# If the user specified CFLAGS, we won't add any optimizations
|
||||
if test -n "$SAVE_CFLAGS"
|
||||
then
|
||||
@@ -1904,8 +1757,8 @@ elif test "$with_debug" = "full"
|
||||
then
|
||||
# Full debug. Very slow in some cases
|
||||
AC_DEFINE([DBUG_ON], [1], [Use libdbug])
|
||||
CFLAGS="$DEBUG_CFLAGS -DSAFE_MUTEX -DSAFEMALLOC $CFLAGS"
|
||||
CXXFLAGS="$DEBUG_CXXFLAGS -DSAFE_MUTEX -DSAFEMALLOC $CXXFLAGS"
|
||||
CFLAGS="$DEBUG_CFLAGS -DSAFE_MUTEX $CFLAGS"
|
||||
CXXFLAGS="$DEBUG_CXXFLAGS -DSAFE_MUTEX $CXXFLAGS"
|
||||
else
|
||||
# Optimized version. No debug
|
||||
AC_DEFINE([DBUG_OFF], [1], [Don't use libdbug])
|
||||
@@ -2223,18 +2076,13 @@ MYSQL_TZNAME
|
||||
# Do the c++ compiler have a bool type
|
||||
MYSQL_CXX_BOOL
|
||||
# Check some common bugs with gcc 2.8.# on sparc
|
||||
case $SYSTEM_TYPE in
|
||||
*netware*) ;;
|
||||
*)
|
||||
MYSQL_CHECK_LONGLONG_TO_FLOAT
|
||||
if test "$ac_cv_conv_longlong_to_float" != "yes"
|
||||
then
|
||||
AC_MSG_ERROR([Your compiler cannot convert a longlong value to a float!
|
||||
If you are using gcc 2.8.# you should upgrade to egcs 1.0.3 or newer and try
|
||||
again])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
MYSQL_CHECK_LONGLONG_TO_FLOAT
|
||||
if test "$ac_cv_conv_longlong_to_float" != "yes"
|
||||
then
|
||||
AC_MSG_ERROR([Your compiler cannot convert a longlong value to a float!
|
||||
If you are using gcc 2.8.# you should upgrade to egcs 1.0.3
|
||||
or newer and try again])
|
||||
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])
|
||||
@@ -2342,7 +2190,7 @@ MYSQL_TYPE_QSORT
|
||||
AC_FUNC_UTIME_NULL
|
||||
AC_FUNC_VPRINTF
|
||||
|
||||
AC_CHECK_FUNCS(alarm bcmp bfill bmove bsearch bzero \
|
||||
AC_CHECK_FUNCS(alarm bfill bmove bsearch bzero \
|
||||
chsize cuserid fchmod fcntl \
|
||||
fdatasync fesetround finite fpresetsticky fpsetmask fsync ftruncate \
|
||||
getcwd gethostbyaddr_r gethostbyname_r getpass getpassphrase getpwnam \
|
||||
@@ -2932,66 +2780,58 @@ readline_h_ln_cmd=""
|
||||
readline_link=""
|
||||
want_to_use_readline="no"
|
||||
|
||||
case $SYSTEM_TYPE in
|
||||
*netware*)
|
||||
# For NetWare, do not need readline
|
||||
echo "Skipping readline"
|
||||
;;
|
||||
*)
|
||||
if [test "$with_libedit" = "yes"] || [test "$with_libedit" = "undefined"] && [test "$with_readline" = "undefined"]
|
||||
if [test "$with_libedit" = "yes"] || [test "$with_libedit" = "undefined"] && [test "$with_readline" = "undefined"]
|
||||
then
|
||||
readline_topdir="cmd-line-utils"
|
||||
readline_basedir="libedit"
|
||||
readline_dir="$readline_topdir/$readline_basedir"
|
||||
readline_link="\$(top_builddir)/cmd-line-utils/libedit/libedit.a"
|
||||
readline_h_ln_cmd="\$(LN) -s \$(top_srcdir)/cmd-line-utils/libedit/readline readline"
|
||||
compile_libedit=yes
|
||||
AC_DEFINE_UNQUOTED(HAVE_HIST_ENTRY, 1)
|
||||
AC_DEFINE_UNQUOTED(USE_LIBEDIT_INTERFACE, 1)
|
||||
elif test "$with_readline" = "yes"
|
||||
then
|
||||
readline_topdir="cmd-line-utils"
|
||||
readline_basedir="readline"
|
||||
readline_dir="$readline_topdir/$readline_basedir"
|
||||
readline_link="\$(top_builddir)/cmd-line-utils/readline/libreadline.a"
|
||||
readline_h_ln_cmd="\$(LN) -s \$(top_srcdir)/cmd-line-utils/readline readline"
|
||||
compile_readline=yes
|
||||
want_to_use_readline="yes"
|
||||
AC_DEFINE_UNQUOTED(USE_NEW_READLINE_INTERFACE, 1)
|
||||
else
|
||||
# Use system readline library
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
MYSQL_CHECK_LIBEDIT_INTERFACE
|
||||
MYSQL_CHECK_NEW_RL_INTERFACE
|
||||
MYSQL_CHECK_READLINE_DECLARES_HIST_ENTRY
|
||||
AC_LANG_RESTORE
|
||||
if [test "$mysql_cv_new_rl_interface" = "yes"] && [test -d "$srcdir/cmd-line-utils/readline"]
|
||||
then
|
||||
readline_topdir="cmd-line-utils"
|
||||
readline_basedir="libedit"
|
||||
readline_dir="$readline_topdir/$readline_basedir"
|
||||
readline_link="\$(top_builddir)/cmd-line-utils/libedit/libedit.a"
|
||||
readline_h_ln_cmd="\$(LN) -s \$(top_srcdir)/cmd-line-utils/libedit/readline readline"
|
||||
compile_libedit=yes
|
||||
AC_DEFINE_UNQUOTED(HAVE_HIST_ENTRY, 1)
|
||||
AC_DEFINE_UNQUOTED(USE_LIBEDIT_INTERFACE, 1)
|
||||
elif test "$with_readline" = "yes"
|
||||
# Use the new readline interface, but only if the package includes a bundled libreadline
|
||||
# this way we avoid linking commercial source with GPL readline
|
||||
readline_link="-lreadline"
|
||||
want_to_use_readline="yes"
|
||||
elif [test "$mysql_cv_libedit_interface" = "yes"]
|
||||
then
|
||||
readline_topdir="cmd-line-utils"
|
||||
readline_basedir="readline"
|
||||
readline_dir="$readline_topdir/$readline_basedir"
|
||||
readline_link="\$(top_builddir)/cmd-line-utils/readline/libreadline.a"
|
||||
readline_h_ln_cmd="\$(LN) -s \$(top_srcdir)/cmd-line-utils/readline readline"
|
||||
compile_readline=yes
|
||||
want_to_use_readline="yes"
|
||||
AC_DEFINE_UNQUOTED(USE_NEW_READLINE_INTERFACE, 1)
|
||||
# Use libedit
|
||||
readline_link="-ledit"
|
||||
else
|
||||
# Use system readline library
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
MYSQL_CHECK_LIBEDIT_INTERFACE
|
||||
MYSQL_CHECK_NEW_RL_INTERFACE
|
||||
MYSQL_CHECK_READLINE_DECLARES_HIST_ENTRY
|
||||
AC_LANG_RESTORE
|
||||
if [test "$mysql_cv_new_rl_interface" = "yes"] && [test -d "$srcdir/cmd-line-utils/readline"]
|
||||
then
|
||||
# Use the new readline interface, but only if the package includes a bundled libreadline
|
||||
# this way we avoid linking commercial source with GPL readline
|
||||
readline_link="-lreadline"
|
||||
want_to_use_readline="yes"
|
||||
elif [test "$mysql_cv_libedit_interface" = "yes"]
|
||||
then
|
||||
# Use libedit
|
||||
readline_link="-ledit"
|
||||
else
|
||||
AC_MSG_ERROR([Could not find system readline or libedit libraries
|
||||
Use --with-readline or --with-libedit to use the bundled
|
||||
versions of libedit or readline])
|
||||
fi
|
||||
AC_MSG_ERROR([Could not find system readline or libedit libraries
|
||||
Use --with-readline or --with-libedit to use the bundled
|
||||
versions of libedit or readline])
|
||||
fi
|
||||
fi
|
||||
|
||||
# if there is no readline, but we want to build with readline, we fail
|
||||
if [test "$want_to_use_readline" = "yes"] && [test ! -d "$srcdir/cmd-line-utils/readline"]
|
||||
then
|
||||
AC_MSG_ERROR([This commercially licensed MySQL source package can't
|
||||
be built with libreadline. Please use --with-libedit to use
|
||||
the bundled version of libedit instead.])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
# if there is no readline, but we want to build with readline, we fail
|
||||
if [test "$want_to_use_readline" = "yes"] && [test ! -d "$srcdir/cmd-line-utils/readline"]
|
||||
then
|
||||
AC_MSG_ERROR([This commercially licensed MySQL source package can't
|
||||
be built with libreadline. Please use --with-libedit to use
|
||||
the bundled version of libedit instead.])
|
||||
fi
|
||||
|
||||
AC_SUBST(readline_dir)
|
||||
AC_SUBST(readline_topdir)
|
||||
@@ -3081,15 +2921,6 @@ AC_SUBST(NON_THREADED_LIBS)
|
||||
AC_SUBST(STATIC_NSS_FLAGS)
|
||||
AC_SUBST(sql_client_dirs)
|
||||
|
||||
# If configuring for NetWare, build the netware directory
|
||||
netware_dir=
|
||||
if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null
|
||||
then
|
||||
netware_dir="netware"
|
||||
fi
|
||||
AC_SUBST(netware_dir)
|
||||
AM_CONDITIONAL(HAVE_NETWARE, test "$netware_dir" = "netware")
|
||||
|
||||
if test "$with_server" != "no" -o "$THREAD_SAFE_CLIENT" != "no"
|
||||
then
|
||||
AC_DEFINE([THREAD], [1],
|
||||
@@ -3142,19 +2973,17 @@ do
|
||||
done
|
||||
AC_SUBST(sql_union_dirs)
|
||||
|
||||
#
|
||||
# Setup maintainer mode options by the end to not disturb
|
||||
# system and other checks.
|
||||
#
|
||||
MY_MAINTAINER_MODE_SETUP
|
||||
|
||||
# Some usefull subst
|
||||
AC_SUBST(CC)
|
||||
AC_SUBST(GXX)
|
||||
|
||||
# Set configuration options for make_binary_distribution
|
||||
case $SYSTEM_TYPE in
|
||||
*netware*)
|
||||
MAKE_BINARY_DISTRIBUTION_OPTIONS="$MAKE_BINARY_DISTRIBUTION_OPTIONS --no-strip"
|
||||
;;
|
||||
*)
|
||||
: # no change for other platforms yet
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
@@ -3227,8 +3056,7 @@ AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
|
||||
cmd-line-utils/Makefile cmd-line-utils/libedit/Makefile dnl
|
||||
libmysqld/Makefile libmysqld/examples/Makefile dnl
|
||||
mysql-test/Makefile mysql-test/lib/My/SafeProcess/Makefile dnl
|
||||
netware/Makefile sql-bench/Makefile dnl
|
||||
include/mysql_version.h plugin/Makefile win/Makefile
|
||||
sql-bench/Makefile include/mysql_version.h plugin/Makefile win/Makefile dnl
|
||||
cmake/Makefile
|
||||
)
|
||||
|
||||
|
2
dbug/CMakeLists.txt
Executable file → Normal file
2
dbug/CMakeLists.txt
Executable file → Normal file
@@ -17,6 +17,6 @@ INCLUDE_DIRECTORIES(
|
||||
${CMAKE_SOURCE_DIR}/dbug
|
||||
${CMAKE_SOURCE_DIR}/include
|
||||
)
|
||||
SET(DBUG_SOURCES dbug.c sanity.c)
|
||||
SET(DBUG_SOURCES dbug.c)
|
||||
ADD_CONVENIENCE_LIBRARY(dbug ${DBUG_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(dbug mysys)
|
||||
|
@@ -19,7 +19,7 @@ INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
|
||||
LDADD = libdbug.a ../mysys/libmysys.a ../strings/libmystrings.a
|
||||
pkglib_LIBRARIES = libdbug.a
|
||||
noinst_HEADERS = dbug_long.h
|
||||
libdbug_a_SOURCES = dbug.c sanity.c
|
||||
libdbug_a_SOURCES = dbug.c
|
||||
EXTRA_DIST = CMakeLists.txt example1.c example2.c example3.c \
|
||||
user.r monty.doc dbug_add_tags.pl \
|
||||
my_main.c main.c factorial.c dbug_analyze.c \
|
||||
|
110
dbug/dbug.c
110
dbug/dbug.c
@@ -95,7 +95,7 @@
|
||||
#define fnmatch(A,B,C) strcmp(A,B)
|
||||
#endif
|
||||
|
||||
#if defined(MSDOS) || defined(__WIN__)
|
||||
#if defined(__WIN__)
|
||||
#include <process.h>
|
||||
#endif
|
||||
|
||||
@@ -128,9 +128,8 @@
|
||||
#define PROFILE_ON (1 << 7) /* Print out profiling code */
|
||||
#define PID_ON (1 << 8) /* Identify each line with process id */
|
||||
#define TIMESTAMP_ON (1 << 9) /* timestamp every line of output */
|
||||
#define SANITY_CHECK_ON (1 << 10) /* Check safemalloc on DBUG_ENTER */
|
||||
#define FLUSH_ON_WRITE (1 << 11) /* Flush on every write */
|
||||
#define OPEN_APPEND (1 << 12) /* Open for append */
|
||||
#define FLUSH_ON_WRITE (1 << 10) /* Flush on every write */
|
||||
#define OPEN_APPEND (1 << 11) /* Open for append */
|
||||
#define TRACE_ON ((uint)1 << 31) /* Trace enabled. MUST be the highest bit!*/
|
||||
|
||||
#define TRACING (cs->stack->flags & TRACE_ON)
|
||||
@@ -184,12 +183,6 @@
|
||||
static void perror(); /* Fake system/library error print routine */
|
||||
#endif
|
||||
|
||||
#ifdef SAFEMALLOC
|
||||
IMPORT int _sanity(const char *file,uint line); /* safemalloc sanity checker */
|
||||
#else
|
||||
#define _sanity(X,Y) (1)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The user may specify a list of functions to trace or
|
||||
* debug. These lists are kept in a linear linked list,
|
||||
@@ -309,7 +302,7 @@ static int DoTrace(CODE_STATE *cs);
|
||||
#define DISABLE_TRACE 4
|
||||
|
||||
/* Test to see if file is writable */
|
||||
#if defined(HAVE_ACCESS) && !defined(MSDOS)
|
||||
#if defined(HAVE_ACCESS)
|
||||
static BOOLEAN Writable(const char *pathname);
|
||||
/* Change file owner and group */
|
||||
static void ChangeOwner(CODE_STATE *cs, char *pathname);
|
||||
@@ -343,23 +336,19 @@ static unsigned long Clock(void);
|
||||
#define ERR_OPEN "%s: can't open debug output stream \"%s\": "
|
||||
#define ERR_CLOSE "%s: can't close debug file: "
|
||||
#define ERR_ABORT "%s: debugger aborting because %s\n"
|
||||
#define ERR_CHOWN "%s: can't change owner/group of \"%s\": "
|
||||
|
||||
/*
|
||||
* Macros and defines for testing file accessibility under UNIX and MSDOS.
|
||||
*/
|
||||
|
||||
#undef EXISTS
|
||||
#if !defined(HAVE_ACCESS) || defined(MSDOS)
|
||||
#if !defined(HAVE_ACCESS)
|
||||
#define EXISTS(pathname) (FALSE) /* Assume no existance */
|
||||
#define Writable(name) (TRUE)
|
||||
#else
|
||||
#define EXISTS(pathname) (access(pathname, F_OK) == 0)
|
||||
#define WRITABLE(pathname) (access(pathname, W_OK) == 0)
|
||||
#endif
|
||||
#ifndef MSDOS
|
||||
#define ChangeOwner(cs,name)
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
@@ -705,12 +694,6 @@ int DbugParse(CODE_STATE *cs, const char *control)
|
||||
else
|
||||
stack->flags |= TIMESTAMP_ON;
|
||||
break;
|
||||
case 'S':
|
||||
if (sign < 0)
|
||||
stack->flags &= ~SANITY_CHECK_ON;
|
||||
else
|
||||
stack->flags |= SANITY_CHECK_ON;
|
||||
break;
|
||||
}
|
||||
if (!*end)
|
||||
break;
|
||||
@@ -1069,7 +1052,6 @@ int _db_explain_ (CODE_STATE *cs, char *buf, size_t len)
|
||||
op_bool_to_buf('r', cs->stack->sub_level != 0);
|
||||
op_intf_to_buf('t', cs->stack->maxdepth, MAXDEPTH, TRACING);
|
||||
op_bool_to_buf('T', cs->stack->flags & TIMESTAMP_ON);
|
||||
op_bool_to_buf('S', cs->stack->flags & SANITY_CHECK_ON);
|
||||
|
||||
*buf= '\0';
|
||||
return 0;
|
||||
@@ -1187,8 +1169,6 @@ void _db_enter_(const char *_func_, const char *_file_,
|
||||
if (!TRACING) break;
|
||||
/* fall through */
|
||||
case DO_TRACE:
|
||||
if ((cs->stack->flags & SANITY_CHECK_ON) && _sanity(_file_,_line_))
|
||||
cs->stack->flags &= ~SANITY_CHECK_ON;
|
||||
if (TRACING)
|
||||
{
|
||||
if (!cs->locked)
|
||||
@@ -1247,9 +1227,6 @@ void _db_return_(uint _line_, struct _db_stack_frame_ *_stack_frame_)
|
||||
#endif
|
||||
if (DoTrace(cs) & DO_TRACE)
|
||||
{
|
||||
if ((cs->stack->flags & SANITY_CHECK_ON) &&
|
||||
_sanity(_stack_frame_->file,_line_))
|
||||
cs->stack->flags &= ~SANITY_CHECK_ON;
|
||||
if (TRACING)
|
||||
{
|
||||
if (!cs->locked)
|
||||
@@ -2027,10 +2004,6 @@ static void DBUGOpenFile(CODE_STATE *cs,
|
||||
else
|
||||
{
|
||||
cs->stack->out_file= fp;
|
||||
if (newfile)
|
||||
{
|
||||
ChangeOwner(cs, name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2088,10 +2061,6 @@ static FILE *OpenProfile(CODE_STATE *cs, const char *name)
|
||||
else
|
||||
{
|
||||
cs->stack->prof_file= fp;
|
||||
if (newfile)
|
||||
{
|
||||
ChangeOwner(cs, name);
|
||||
}
|
||||
}
|
||||
}
|
||||
return fp;
|
||||
@@ -2282,42 +2251,6 @@ static BOOLEAN Writable(const char *pathname)
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* FUNCTION
|
||||
*
|
||||
* ChangeOwner change owner to real user for suid programs
|
||||
*
|
||||
* SYNOPSIS
|
||||
*
|
||||
* static VOID ChangeOwner(pathname)
|
||||
*
|
||||
* DESCRIPTION
|
||||
*
|
||||
* For unix systems, change the owner of the newly created debug
|
||||
* file to the real owner. This is strictly for the benefit of
|
||||
* programs that are running with the set-user-id bit set.
|
||||
*
|
||||
* Note that at this point, the fact that pathname represents
|
||||
* a newly created file has already been established. If the
|
||||
* program that the debugger is linked to is not running with
|
||||
* the suid bit set, then this operation is redundant (but
|
||||
* harmless).
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ChangeOwner
|
||||
static void ChangeOwner(CODE_STATE *cs, char *pathname)
|
||||
{
|
||||
if (chown(pathname, getuid(), getgid()) == -1)
|
||||
{
|
||||
(void) fprintf(stderr, ERR_CHOWN, cs->process, pathname);
|
||||
perror("");
|
||||
(void) fflush(stderr);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* FUNCTION
|
||||
*
|
||||
@@ -2489,7 +2422,7 @@ static unsigned long Clock()
|
||||
return ru.ru_utime.tv_sec*1000 + ru.ru_utime.tv_usec/1000;
|
||||
}
|
||||
|
||||
#elif defined(MSDOS) || defined(__WIN__)
|
||||
#elif defined(__WIN__)
|
||||
|
||||
static ulong Clock()
|
||||
{
|
||||
@@ -2538,37 +2471,6 @@ static unsigned long Clock()
|
||||
#endif /* RUSAGE */
|
||||
#endif /* THREADS */
|
||||
|
||||
#ifdef NO_VARARGS
|
||||
|
||||
/*
|
||||
* Fake vfprintf for systems that don't support it. If this
|
||||
* doesn't work, you are probably SOL...
|
||||
*/
|
||||
|
||||
static int vfprintf(stream, format, ap)
|
||||
FILE *stream;
|
||||
char *format;
|
||||
va_list ap;
|
||||
{
|
||||
int rtnval;
|
||||
ARGS_DCL;
|
||||
|
||||
ARG0= va_arg(ap, ARGS_TYPE);
|
||||
ARG1= va_arg(ap, ARGS_TYPE);
|
||||
ARG2= va_arg(ap, ARGS_TYPE);
|
||||
ARG3= va_arg(ap, ARGS_TYPE);
|
||||
ARG4= va_arg(ap, ARGS_TYPE);
|
||||
ARG5= va_arg(ap, ARGS_TYPE);
|
||||
ARG6= va_arg(ap, ARGS_TYPE);
|
||||
ARG7= va_arg(ap, ARGS_TYPE);
|
||||
ARG8= va_arg(ap, ARGS_TYPE);
|
||||
ARG9= va_arg(ap, ARGS_TYPE);
|
||||
rtnval= fprintf(stream, format, ARGS_LIST);
|
||||
return rtnval;
|
||||
}
|
||||
|
||||
#endif /* NO_VARARGS */
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
|
@@ -561,9 +561,6 @@ FILE *outf;
|
||||
|
||||
#define usage() fprintf (DBUG_FILE,"Usage: %s [-v] [prof-file]\n",my_name)
|
||||
|
||||
#ifdef MSDOS
|
||||
extern int getopt(int argc, char **argv, char *opts);
|
||||
#endif
|
||||
extern int optind;
|
||||
extern char *optarg;
|
||||
|
||||
@@ -609,118 +606,5 @@ int main (int argc, char **argv)
|
||||
process (infile);
|
||||
output (outfile);
|
||||
DBUG_RETURN (EX_OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MSDOS
|
||||
|
||||
/*
|
||||
* From std-unix@ut-sally.UUCP (Moderator, John Quarterman) Sun Nov 3 14:34:15 1985
|
||||
* Relay-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site gatech.CSNET
|
||||
* Posting-Version: version B 2.10.2 9/18/84; site ut-sally.UUCP
|
||||
* Path: gatech!akgua!mhuxv!mhuxt!mhuxr!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!ut-sally!std-unix
|
||||
* From: std-unix@ut-sally.UUCP (Moderator, John Quarterman)
|
||||
* Newsgroups: mod.std.unix
|
||||
* Subject: public domain AT&T getopt source
|
||||
* Message-ID: <3352@ut-sally.UUCP>
|
||||
* Date: 3 Nov 85 19:34:15 GMT
|
||||
* Date-Received: 4 Nov 85 12:25:09 GMT
|
||||
* Organization: IEEE/P1003 Portable Operating System Environment Committee
|
||||
* Lines: 91
|
||||
* Approved: jsq@ut-sally.UUCP
|
||||
*
|
||||
* Here's something you've all been waiting for: the AT&T public domain
|
||||
* source for getopt(3). It is the code which was given out at the 1985
|
||||
* UNIFORUM conference in Dallas. I obtained it by electronic mail
|
||||
* directly from AT&T. The people there assure me that it is indeed
|
||||
* in the public domain.
|
||||
*
|
||||
* There is no manual page. That is because the one they gave out at
|
||||
* UNIFORUM was slightly different from the current System V Release 2
|
||||
* manual page. The difference apparently involved a note about the
|
||||
* famous rules 5 and 6, recommending using white space between an option
|
||||
* and its first argument, and not grouping options that have arguments.
|
||||
* Getopt itself is currently lenient about both of these things White
|
||||
* space is allowed, but not mandatory, and the last option in a group can
|
||||
* have an argument. That particular version of the man page evidently
|
||||
* has no official existence, and my source at AT&T did not send a copy.
|
||||
* The current SVR2 man page reflects the actual behavor of this getopt.
|
||||
* However, I am not about to post a copy of anything licensed by AT&T.
|
||||
*
|
||||
* I will submit this source to Berkeley as a bug fix.
|
||||
*
|
||||
* I, personally, make no claims or guarantees of any kind about the
|
||||
* following source. I did compile it to get some confidence that
|
||||
* it arrived whole, but beyond that you're on your own.
|
||||
*
|
||||
*/
|
||||
|
||||
/*LINTLIBRARY*/
|
||||
|
||||
int opterr = 1;
|
||||
int optind = 1;
|
||||
int optopt;
|
||||
char *optarg;
|
||||
|
||||
static void _ERR(s,c,argv)
|
||||
char *s;
|
||||
int c;
|
||||
char *argv[];
|
||||
{
|
||||
char errbuf[3];
|
||||
|
||||
if (opterr) {
|
||||
errbuf[0] = c;
|
||||
errbuf[1] = '\n';
|
||||
(void) fprintf(stderr, "%s", argv[0]);
|
||||
(void) fprintf(stderr, "%s", s);
|
||||
(void) fprintf(stderr, "%s", errbuf);
|
||||
}
|
||||
}
|
||||
|
||||
int getopt(argc, argv, opts)
|
||||
int argc;
|
||||
char **argv, *opts;
|
||||
{
|
||||
static int sp = 1;
|
||||
register int c;
|
||||
register char *cp;
|
||||
|
||||
if(sp == 1)
|
||||
if(optind >= argc ||
|
||||
argv[optind][0] != '-' || argv[optind][1] == '\0')
|
||||
return(EOF);
|
||||
else if(strcmp(argv[optind], "--") == 0) {
|
||||
optind++;
|
||||
return(EOF);
|
||||
}
|
||||
optopt = c = argv[optind][sp];
|
||||
if(c == ':' || (cp=strchr(opts, c)) == NULL) {
|
||||
_ERR(": illegal option -- ", c, argv);
|
||||
if(argv[optind][++sp] == '\0') {
|
||||
optind++;
|
||||
sp = 1;
|
||||
}
|
||||
return('?');
|
||||
}
|
||||
if(*++cp == ':') {
|
||||
if(argv[optind][sp+1] != '\0')
|
||||
optarg = &argv[optind++][sp+1];
|
||||
else if(++optind >= argc) {
|
||||
_ERR(": option requires an argument -- ", c, argv);
|
||||
sp = 1;
|
||||
return('?');
|
||||
} else
|
||||
optarg = argv[optind++];
|
||||
sp = 1;
|
||||
} else {
|
||||
if(argv[optind][++sp] == '\0') {
|
||||
sp = 1;
|
||||
optind++;
|
||||
}
|
||||
optarg = NULL;
|
||||
}
|
||||
return(c);
|
||||
}
|
||||
|
||||
#endif /* !unix && !xenix */
|
||||
|
@@ -1,13 +0,0 @@
|
||||
/* Declarate _sanity() if not declared in main program */
|
||||
|
||||
#include <my_global.h>
|
||||
|
||||
extern int _sanity(const char *file,uint line);
|
||||
|
||||
#if defined(SAFEMALLOC) && !defined(MASTER) /* Avoid errors in MySQL */
|
||||
int _sanity(const char * file __attribute__((unused)),
|
||||
uint line __attribute__((unused)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
@@ -1019,14 +1019,6 @@ Most useful with
|
||||
.B DBUG_PUSH
|
||||
macros used to temporarily alter the
|
||||
debugger state.
|
||||
.LI S
|
||||
When compiled with
|
||||
.I safemalloc
|
||||
this flag forces "sanity" memory checks (for overwrites/underwrites)
|
||||
on each
|
||||
.B DBUG_ENTER
|
||||
and
|
||||
.B DBUG_RETURN.
|
||||
.LI t[,N]
|
||||
Enable function control flow tracing.
|
||||
The maximum nesting depth is specified by N, and defaults to
|
||||
|
0
extra/CMakeLists.txt
Executable file → Normal file
0
extra/CMakeLists.txt
Executable file → Normal file
@@ -387,15 +387,15 @@ static void clean_up(struct languages *lang_head, struct errors *error_head)
|
||||
struct errors *tmp_error, *next_error;
|
||||
uint count, i;
|
||||
|
||||
my_free((uchar*) default_language, MYF(0));
|
||||
my_free((void*) default_language);
|
||||
|
||||
for (tmp_lang= lang_head; tmp_lang; tmp_lang= next_language)
|
||||
{
|
||||
next_language= tmp_lang->next_lang;
|
||||
my_free(tmp_lang->lang_short_name, MYF(0));
|
||||
my_free(tmp_lang->lang_long_name, MYF(0));
|
||||
my_free(tmp_lang->charset, MYF(0));
|
||||
my_free((uchar*) tmp_lang, MYF(0));
|
||||
my_free(tmp_lang->lang_short_name);
|
||||
my_free(tmp_lang->lang_long_name);
|
||||
my_free(tmp_lang->charset);
|
||||
my_free(tmp_lang);
|
||||
}
|
||||
|
||||
for (tmp_error= error_head; tmp_error; tmp_error= next_error)
|
||||
@@ -406,17 +406,17 @@ static void clean_up(struct languages *lang_head, struct errors *error_head)
|
||||
{
|
||||
struct message *tmp;
|
||||
tmp= dynamic_element(&tmp_error->msg, i, struct message*);
|
||||
my_free((uchar*) tmp->lang_short_name, MYF(0));
|
||||
my_free((uchar*) tmp->text, MYF(0));
|
||||
my_free(tmp->lang_short_name);
|
||||
my_free(tmp->text);
|
||||
}
|
||||
|
||||
delete_dynamic(&tmp_error->msg);
|
||||
if (tmp_error->sql_code1[0])
|
||||
my_free((uchar*) tmp_error->sql_code1, MYF(0));
|
||||
my_free((void*) tmp_error->sql_code1);
|
||||
if (tmp_error->sql_code2[0])
|
||||
my_free((uchar*) tmp_error->sql_code2, MYF(0));
|
||||
my_free((uchar*) tmp_error->er_name, MYF(0));
|
||||
my_free((uchar*) tmp_error, MYF(0));
|
||||
my_free((void*) tmp_error->sql_code2);
|
||||
my_free((void*) tmp_error->er_name);
|
||||
my_free(tmp_error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -559,7 +559,7 @@ static uint parse_error_offset(char *str)
|
||||
|
||||
end= 0;
|
||||
ioffset= (uint) my_strtoll10(soffset, &end, &error);
|
||||
my_free((uchar*) soffset, MYF(0));
|
||||
my_free(soffset);
|
||||
DBUG_RETURN(ioffset);
|
||||
}
|
||||
|
||||
@@ -665,9 +665,9 @@ static struct message *find_message(struct errors *err, const char *lang,
|
||||
static ha_checksum checksum_format_specifier(const char* msg)
|
||||
{
|
||||
ha_checksum chksum= 0;
|
||||
const char* p= msg;
|
||||
const char* start= 0;
|
||||
int num_format_specifiers= 0;
|
||||
const uchar* p= (const uchar*) msg;
|
||||
const uchar* start= NULL;
|
||||
uint32 num_format_specifiers= 0;
|
||||
while (*p)
|
||||
{
|
||||
|
||||
|
@@ -89,9 +89,6 @@ static struct my_option my_long_options[] =
|
||||
};
|
||||
|
||||
|
||||
|
||||
#include <help_start.h>
|
||||
|
||||
static void usage(my_bool version)
|
||||
{
|
||||
printf("%s Ver 1.6 for %s at %s\n",my_progname,SYSTEM_TYPE,
|
||||
@@ -107,8 +104,6 @@ static void usage(my_bool version)
|
||||
printf("\nExample usage:\n%s --defaults-file=example.cnf client mysql\n", my_progname);
|
||||
}
|
||||
|
||||
#include <help_end.h>
|
||||
|
||||
|
||||
static my_bool
|
||||
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
@@ -200,7 +195,7 @@ int main(int argc, char **argv)
|
||||
for (argument= arguments+1 ; *argument ; argument++)
|
||||
if (*argument != args_separator) /* skip arguments separator */
|
||||
puts(*argument);
|
||||
my_free((char*) load_default_groups,MYF(0));
|
||||
my_free(load_default_groups);
|
||||
free_defaults(arguments);
|
||||
|
||||
exit(0);
|
||||
|
@@ -15,8 +15,6 @@
|
||||
|
||||
/* Wait until a program dies */
|
||||
|
||||
#ifndef __NETWARE__
|
||||
|
||||
#include <my_global.h>
|
||||
#include <m_string.h>
|
||||
#include <my_sys.h>
|
||||
@@ -103,15 +101,3 @@ void usage(void)
|
||||
my_print_help(my_long_options);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
main()
|
||||
{
|
||||
fprintf(stderr,"This tool has not been ported to NetWare\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* __NETWARE__ */
|
||||
|
@@ -102,8 +102,6 @@ static HA_ERRORS ha_errlist[]=
|
||||
};
|
||||
|
||||
|
||||
#include <help_start.h>
|
||||
|
||||
static void print_version(void)
|
||||
{
|
||||
printf("%s Ver %s, for %s (%s)\n",my_progname,PERROR_VERSION,
|
||||
@@ -122,8 +120,6 @@ static void usage(void)
|
||||
my_print_variables(my_long_options);
|
||||
}
|
||||
|
||||
#include <help_end.h>
|
||||
|
||||
|
||||
static my_bool
|
||||
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
@@ -281,7 +277,7 @@ int main(int argc,char *argv[])
|
||||
#endif
|
||||
{
|
||||
/*
|
||||
On some system, like NETWARE, strerror(unknown_error) returns a
|
||||
On some system, like Linux, strerror(unknown_error) returns a
|
||||
string 'Unknown Error'. To avoid printing it we try to find the
|
||||
error string by asking for an impossible big error message.
|
||||
|
||||
|
@@ -262,7 +262,7 @@ static int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name)
|
||||
if (!(pa->str= (uchar*) my_malloc((uint) (PS_MALLOC-MALLOC_OVERHEAD),
|
||||
MYF(MY_WME))))
|
||||
{
|
||||
my_free((uchar*) pa->typelib.type_names,MYF(0));
|
||||
my_free(pa->typelib.type_names);
|
||||
DBUG_RETURN (-1);
|
||||
}
|
||||
pa->max_count=(PC_MALLOC-MALLOC_OVERHEAD)/(sizeof(uchar*)+
|
||||
@@ -324,9 +324,9 @@ static void free_pointer_array(reg1 POINTER_ARRAY *pa)
|
||||
if (pa->typelib.count)
|
||||
{
|
||||
pa->typelib.count=0;
|
||||
my_free((uchar*) pa->typelib.type_names,MYF(0));
|
||||
my_free(pa->typelib.type_names);
|
||||
pa->typelib.type_names=0;
|
||||
my_free((uchar*) pa->str,MYF(0));
|
||||
my_free(pa->str);
|
||||
}
|
||||
return;
|
||||
} /* free_pointer_array */
|
||||
@@ -441,7 +441,7 @@ static REPLACE *init_replace(char * *from, char * *to,uint count,
|
||||
if (!(follow=(FOLLOWS*) my_malloc((states+2)*sizeof(FOLLOWS),MYF(MY_WME))))
|
||||
{
|
||||
free_sets(&sets);
|
||||
my_free((uchar*) found_set,MYF(0));
|
||||
my_free(found_set);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
@@ -648,7 +648,7 @@ static REPLACE *init_replace(char * *from, char * *to,uint count,
|
||||
for (i=1 ; i <= found_sets ; i++)
|
||||
{
|
||||
pos=from[found_set[i-1].table_offset];
|
||||
rep_str[i].found= (my_bool) (!bcmp(pos,"\\^",3) ? 2 : 1);
|
||||
rep_str[i].found= (my_bool) (!memcmp(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)+
|
||||
@@ -663,9 +663,9 @@ static REPLACE *init_replace(char * *from, char * *to,uint count,
|
||||
replace[i].next[j]=(REPLACE*) (rep_str+(-sets.set[i].next[j]-1));
|
||||
}
|
||||
}
|
||||
my_free((uchar*) follow,MYF(0));
|
||||
my_free(follow);
|
||||
free_sets(&sets);
|
||||
my_free((uchar*) found_set,MYF(0));
|
||||
my_free(found_set);
|
||||
DBUG_PRINT("exit",("Replace table has %d states",sets.count));
|
||||
DBUG_RETURN(replace);
|
||||
}
|
||||
@@ -681,7 +681,7 @@ static int init_sets(REP_SETS *sets,uint states)
|
||||
if (!(sets->bit_buffer=(uint*) my_malloc(sizeof(uint)*sets->size_of_bits*
|
||||
SET_MALLOC_HUNC,MYF(MY_WME))))
|
||||
{
|
||||
my_free((uchar*) sets->set,MYF(0));
|
||||
my_free(sets->set);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@@ -742,8 +742,8 @@ static void free_last_set(REP_SETS *sets)
|
||||
|
||||
static void free_sets(REP_SETS *sets)
|
||||
{
|
||||
my_free((uchar*)sets->set_buffer,MYF(0));
|
||||
my_free((uchar*)sets->bit_buffer,MYF(0));
|
||||
my_free(sets->set_buffer);
|
||||
my_free(sets->bit_buffer);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -776,8 +776,8 @@ static void copy_bits(REP_SET *to,REP_SET *from)
|
||||
|
||||
static int cmp_bits(REP_SET *set1,REP_SET *set2)
|
||||
{
|
||||
return bcmp((uchar*) set1->bits,(uchar*) set2->bits,
|
||||
sizeof(uint) * set1->size_of_bits);
|
||||
return memcmp(set1->bits, set2->bits,
|
||||
sizeof(uint) * set1->size_of_bits);
|
||||
}
|
||||
|
||||
|
||||
@@ -849,14 +849,14 @@ static short find_found(FOUND_SET *found_set,uint table_offset,
|
||||
|
||||
static uint start_at_word(char * pos)
|
||||
{
|
||||
return (((!bcmp(pos,"\\b",2) && pos[2]) || !bcmp(pos,"\\^",2)) ? 1 : 0);
|
||||
return (((!memcmp(pos,"\\b",2) && pos[2]) || !memcmp(pos,"\\^",2)) ? 1 : 0);
|
||||
}
|
||||
|
||||
static uint end_of_word(char * pos)
|
||||
{
|
||||
char * end=strend(pos);
|
||||
return ((end > pos+2 && !bcmp(end-2,"\\b",2)) ||
|
||||
(end >= pos+2 && !bcmp(end-2,"\\$",2))) ?
|
||||
return ((end > pos+2 && !memcmp(end-2,"\\b",2)) ||
|
||||
(end >= pos+2 && !memcmp(end-2,"\\$",2))) ?
|
||||
1 : 0;
|
||||
}
|
||||
|
||||
@@ -950,8 +950,8 @@ static void reset_buffer()
|
||||
|
||||
static void free_buffer()
|
||||
{
|
||||
my_free(buffer,MYF(MY_WME));
|
||||
my_free(out_buff,MYF(MY_WME));
|
||||
my_free(buffer);
|
||||
my_free(out_buff);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -65,8 +65,6 @@ static struct my_option my_long_options[] =
|
||||
static void verify_sort();
|
||||
|
||||
|
||||
#include <help_start.h>
|
||||
|
||||
static void print_version(void)
|
||||
{
|
||||
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,DUMP_VERSION,
|
||||
@@ -90,8 +88,6 @@ The numeric-dump-file should contain a numeric stack trace from mysqld.\n\
|
||||
If the numeric-dump-file is not given, the stack trace is read from stdin.\n");
|
||||
}
|
||||
|
||||
#include <help_end.h>
|
||||
|
||||
|
||||
static void die(const char* fmt, ...)
|
||||
{
|
||||
|
@@ -155,11 +155,8 @@ int main(int argc, char **argv)
|
||||
else
|
||||
{
|
||||
printf ("Host name of %s is %s", ip,hpaddr->h_name);
|
||||
#ifndef __NETWARE__
|
||||
/* this information is not available on NetWare */
|
||||
for (q = hpaddr->h_aliases; *q != 0; q++)
|
||||
(void) printf(", %s", *q);
|
||||
#endif /* __NETWARE__ */
|
||||
puts("");
|
||||
}
|
||||
}
|
||||
|
2
extra/yassl/CMakeLists.txt
Executable file → Normal file
2
extra/yassl/CMakeLists.txt
Executable file → Normal file
@@ -28,7 +28,7 @@ ${CMAKE_CXX_FLAGS})
|
||||
ENDIF()
|
||||
SET(YASSL_SOURCES src/buffer.cpp src/cert_wrapper.cpp src/crypto_wrapper.cpp src/handshake.cpp src/lock.cpp
|
||||
src/log.cpp src/socket_wrapper.cpp src/ssl.cpp src/timer.cpp src/yassl_error.cpp
|
||||
src/yassl_imp.cpp src/yassl_int.cpp)
|
||||
src/yassl_imp.cpp src/yassl_int.cpp src/template_instnt.cpp)
|
||||
ADD_CONVENIENCE_LIBRARY(yassl ${YASSL_SOURCES})
|
||||
RESTRICT_SYMBOL_EXPORTS(yassl)
|
||||
|
||||
|
@@ -34,9 +34,8 @@
|
||||
#include "openssl/ssl.h" // ASN1_STRING and DH
|
||||
|
||||
// Check if _POSIX_THREADS should be forced
|
||||
#if !defined(_POSIX_THREADS) && (defined(__NETWARE__) || defined(__hpux))
|
||||
#if !defined(_POSIX_THREADS) && defined(__hpux)
|
||||
// HPUX does not define _POSIX_THREADS as it's not _fully_ implemented
|
||||
// Netware supports pthreads but does not announce it
|
||||
#define _POSIX_THREADS
|
||||
#endif
|
||||
|
||||
|
@@ -953,8 +953,9 @@ x509* PemToDer(FILE* file, CertType type, EncryptedInfo* info)
|
||||
info->set = true;
|
||||
}
|
||||
}
|
||||
fgets(line,sizeof(line), file); // get blank line
|
||||
begin = ftell(file);
|
||||
// get blank line
|
||||
if (fgets(line, sizeof(line), file))
|
||||
begin = ftell(file);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -37,7 +37,7 @@
|
||||
#include <fcntl.h>
|
||||
#endif // _WIN32
|
||||
|
||||
#if defined(__sun) || defined(__SCO_VERSION__) || defined(__NETWARE__)
|
||||
#if defined(__sun) || defined(__SCO_VERSION__)
|
||||
#include <sys/filio.h>
|
||||
#endif
|
||||
|
||||
|
1
extra/yassl/taocrypt/CMakeLists.txt
Executable file → Normal file
1
extra/yassl/taocrypt/CMakeLists.txt
Executable file → Normal file
@@ -21,6 +21,7 @@ ADD_DEFINITIONS(${SSL_DEFINES})
|
||||
SET(TAOCRYPT_SOURCES src/aes.cpp src/aestables.cpp src/algebra.cpp src/arc4.cpp src/asn.cpp src/coding.cpp
|
||||
src/des.cpp src/dh.cpp src/dsa.cpp src/file.cpp src/hash.cpp src/integer.cpp src/md2.cpp
|
||||
src/md4.cpp src/md5.cpp src/misc.cpp src/random.cpp src/ripemd.cpp src/rsa.cpp src/sha.cpp
|
||||
src/template_instnt.cpp
|
||||
include/aes.hpp include/algebra.hpp include/arc4.hpp include/asn.hpp include/block.hpp
|
||||
include/coding.hpp include/des.hpp include/dh.hpp include/dsa.hpp include/dsa.hpp
|
||||
include/error.hpp include/file.hpp include/hash.hpp include/hmac.hpp include/integer.hpp
|
||||
|
@@ -51,7 +51,7 @@ public:
|
||||
enum { BLOCK_SIZE = BLOWFISH_BLOCK_SIZE, ROUNDS = 16 };
|
||||
|
||||
Blowfish(CipherDir DIR, Mode MODE)
|
||||
: Mode_BASE(BLOCK_SIZE, DIR, MODE) {}
|
||||
: Mode_BASE(BLOCK_SIZE, DIR, MODE), sbox_(pbox_ + ROUNDS + 2) {}
|
||||
|
||||
#ifdef DO_BLOWFISH_ASM
|
||||
void Process(byte*, const byte*, word32);
|
||||
@@ -62,8 +62,8 @@ private:
|
||||
static const word32 p_init_[ROUNDS + 2];
|
||||
static const word32 s_init_[4 * 256];
|
||||
|
||||
word32 pbox_[ROUNDS + 2];
|
||||
word32 sbox_[4 * 256];
|
||||
word32 pbox_[ROUNDS + 2 + 4 * 256];
|
||||
word32* sbox_;
|
||||
|
||||
void crypt_block(const word32 in[2], word32 out[2]) const;
|
||||
void AsmProcess(const byte* in, byte* out) const;
|
||||
|
@@ -125,7 +125,7 @@ void CleanUp();
|
||||
|
||||
|
||||
// no gas on these systems ?, disable for now
|
||||
#if defined(__sun__) || defined (__QNX__) || defined (__APPLE__)
|
||||
#if defined(__sun__) || defined (__APPLE__)
|
||||
#define TAOCRYPT_DISABLE_X86ASM
|
||||
#endif
|
||||
|
||||
|
@@ -35,10 +35,7 @@
|
||||
|
||||
// Handler for pure virtual functions
|
||||
namespace __Crun {
|
||||
static void pure_error(void)
|
||||
{
|
||||
assert("Pure virtual method called." == "Aborted");
|
||||
}
|
||||
void pure_error(void);
|
||||
} // namespace __Crun
|
||||
|
||||
#endif // __sun
|
||||
@@ -54,16 +51,7 @@ extern "C" {
|
||||
#else
|
||||
#include "kernelc.hpp"
|
||||
#endif
|
||||
|
||||
/* Disallow inline __cxa_pure_virtual() */
|
||||
static int __cxa_pure_virtual() __attribute__((noinline, used));
|
||||
static int __cxa_pure_virtual()
|
||||
{
|
||||
// oops, pure virtual called!
|
||||
assert(!"Pure virtual method called. Aborted");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int __cxa_pure_virtual () __attribute__ ((weak));
|
||||
} // extern "C"
|
||||
|
||||
#endif // __GNUC__ > 2
|
||||
|
@@ -51,7 +51,7 @@ void AES::Process(byte* out, const byte* in, word32 sz)
|
||||
out += BLOCK_SIZE;
|
||||
in += BLOCK_SIZE;
|
||||
}
|
||||
else if (mode_ == CBC)
|
||||
else if (mode_ == CBC) {
|
||||
if (dir_ == ENCRYPTION)
|
||||
while (blocks--) {
|
||||
r_[0] ^= *(word32*)in;
|
||||
@@ -78,6 +78,7 @@ void AES::Process(byte* out, const byte* in, word32 sz)
|
||||
out += BLOCK_SIZE;
|
||||
in += BLOCK_SIZE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // DO_AES_ASM
|
||||
|
@@ -186,10 +186,10 @@ Integer AbstractGroup::CascadeScalarMultiply(const Element &x,
|
||||
|
||||
struct WindowSlider
|
||||
{
|
||||
WindowSlider(const Integer &exp, bool fastNegate,
|
||||
WindowSlider(const Integer &expIn, bool fastNegateIn,
|
||||
unsigned int windowSizeIn=0)
|
||||
: exp(exp), windowModulus(Integer::One()), windowSize(windowSizeIn),
|
||||
windowBegin(0), fastNegate(fastNegate), firstTime(true),
|
||||
: exp(expIn), windowModulus(Integer::One()), windowSize(windowSizeIn),
|
||||
windowBegin(0), fastNegate(fastNegateIn), firstTime(true),
|
||||
finished(false)
|
||||
{
|
||||
if (windowSize == 0)
|
||||
|
@@ -53,7 +53,7 @@ void Blowfish::Process(byte* out, const byte* in, word32 sz)
|
||||
out += BLOCK_SIZE;
|
||||
in += BLOCK_SIZE;
|
||||
}
|
||||
else if (mode_ == CBC)
|
||||
else if (mode_ == CBC) {
|
||||
if (dir_ == ENCRYPTION)
|
||||
while (blocks--) {
|
||||
r_[0] ^= *(word32*)in;
|
||||
@@ -78,6 +78,7 @@ void Blowfish::Process(byte* out, const byte* in, word32 sz)
|
||||
out += BLOCK_SIZE;
|
||||
in += BLOCK_SIZE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // DO_BLOWFISH_ASM
|
||||
|
@@ -283,21 +283,23 @@ DWord() {}
|
||||
word GetHighHalfAsBorrow() const {return 0-halfs_.high;}
|
||||
|
||||
private:
|
||||
struct dword_struct
|
||||
{
|
||||
#ifdef LITTLE_ENDIAN_ORDER
|
||||
word low;
|
||||
word high;
|
||||
#else
|
||||
word high;
|
||||
word low;
|
||||
#endif
|
||||
};
|
||||
|
||||
union
|
||||
{
|
||||
#ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE
|
||||
dword whole_;
|
||||
#endif
|
||||
struct
|
||||
{
|
||||
#ifdef LITTLE_ENDIAN_ORDER
|
||||
word low;
|
||||
word high;
|
||||
#else
|
||||
word high;
|
||||
word low;
|
||||
#endif
|
||||
} halfs_;
|
||||
struct dword_struct halfs_;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1214,20 +1216,24 @@ public:
|
||||
#define AS1(x) #x ";"
|
||||
#define AS2(x, y) #x ", " #y ";"
|
||||
#define AddPrologue \
|
||||
word res; \
|
||||
__asm__ __volatile__ \
|
||||
( \
|
||||
"push %%ebx;" /* save this manually, in case of -fPIC */ \
|
||||
"mov %2, %%ebx;" \
|
||||
"mov %3, %%ebx;" \
|
||||
".intel_syntax noprefix;" \
|
||||
"push ebp;"
|
||||
#define AddEpilogue \
|
||||
"pop ebp;" \
|
||||
".att_syntax prefix;" \
|
||||
"pop %%ebx;" \
|
||||
: \
|
||||
"mov %%eax, %0;" \
|
||||
: "=g" (res) \
|
||||
: "c" (C), "d" (A), "m" (B), "S" (N) \
|
||||
: "%edi", "memory", "cc" \
|
||||
);
|
||||
); \
|
||||
return res;
|
||||
|
||||
#define MulPrologue \
|
||||
__asm__ __volatile__ \
|
||||
( \
|
||||
|
@@ -84,12 +84,23 @@ namespace STL = STL_NAMESPACE;
|
||||
|
||||
}
|
||||
|
||||
#if defined(__ICC) || defined(__INTEL_COMPILER)
|
||||
#ifdef __sun
|
||||
|
||||
// Handler for pure virtual functions
|
||||
namespace __Crun {
|
||||
void pure_error() {
|
||||
assert(!"Aborted: pure virtual method called.");
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__ICC) || defined(__INTEL_COMPILER) || (__GNUC__ > 2)
|
||||
|
||||
extern "C" {
|
||||
|
||||
int __cxa_pure_virtual() {
|
||||
assert("Pure virtual method called." == "Aborted");
|
||||
assert(!"Aborted: pure virtual method called.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -166,14 +177,6 @@ word Crop(word value, unsigned int size)
|
||||
|
||||
#ifdef TAOCRYPT_X86ASM_AVAILABLE
|
||||
|
||||
#ifndef _MSC_VER
|
||||
static jmp_buf s_env;
|
||||
static void SigIllHandler(int)
|
||||
{
|
||||
longjmp(s_env, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
bool HaveCpuId()
|
||||
{
|
||||
|
@@ -92,67 +92,6 @@ void OS_Seed::GenerateSeed(byte* output, word32 sz)
|
||||
}
|
||||
|
||||
|
||||
#elif defined(__NETWARE__)
|
||||
|
||||
/* The OS_Seed implementation for Netware */
|
||||
|
||||
#include <nks/thread.h>
|
||||
#include <nks/plat.h>
|
||||
|
||||
// Loop on high resulution Read Time Stamp Counter
|
||||
static void NetwareSeed(byte* output, word32 sz)
|
||||
{
|
||||
word32 tscResult;
|
||||
|
||||
for (word32 i = 0; i < sz; i += sizeof(tscResult)) {
|
||||
#if defined(__GNUC__)
|
||||
asm volatile("rdtsc" : "=A" (tscResult));
|
||||
#else
|
||||
#ifdef __MWERKS__
|
||||
asm {
|
||||
#else
|
||||
__asm {
|
||||
#endif
|
||||
rdtsc
|
||||
mov tscResult, eax
|
||||
}
|
||||
#endif
|
||||
|
||||
memcpy(output, &tscResult, sizeof(tscResult));
|
||||
output += sizeof(tscResult);
|
||||
|
||||
NXThreadYield(); // induce more variance
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
OS_Seed::OS_Seed()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
OS_Seed::~OS_Seed()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void OS_Seed::GenerateSeed(byte* output, word32 sz)
|
||||
{
|
||||
/*
|
||||
Try to use NXSeedRandom as it will generate a strong
|
||||
seed using the onboard 82802 chip
|
||||
|
||||
As it's not always supported, fallback to default
|
||||
implementation if an error is returned
|
||||
*/
|
||||
|
||||
if (NXSeedRandom(sz, output) != 0)
|
||||
{
|
||||
NetwareSeed(output, sz);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
|
||||
/* The default OS_Seed implementation */
|
||||
|
@@ -54,7 +54,7 @@ void Twofish::Process(byte* out, const byte* in, word32 sz)
|
||||
out += BLOCK_SIZE;
|
||||
in += BLOCK_SIZE;
|
||||
}
|
||||
else if (mode_ == CBC)
|
||||
else if (mode_ == CBC) {
|
||||
if (dir_ == ENCRYPTION)
|
||||
while (blocks--) {
|
||||
r_[0] ^= *(word32*)in;
|
||||
@@ -82,6 +82,7 @@ void Twofish::Process(byte* out, const byte* in, word32 sz)
|
||||
out += BLOCK_SIZE;
|
||||
in += BLOCK_SIZE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // DO_TWOFISH_ASM
|
||||
|
@@ -32,8 +32,7 @@
|
||||
#endif /* _WIN32 */
|
||||
|
||||
|
||||
#if !defined(_SOCKLEN_T) && \
|
||||
(defined(_WIN32) || defined(__NETWARE__) || defined(__APPLE__))
|
||||
#if !defined(_SOCKLEN_T) && (defined(_WIN32) || defined(__APPLE__))
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
|
||||
@@ -42,18 +41,14 @@
|
||||
#if defined(__hpux)
|
||||
// HPUX uses int* for third parameter to accept
|
||||
typedef int* ACCEPT_THIRD_T;
|
||||
#elif defined(__NETWARE__)
|
||||
// NetWare uses size_t* for third parameter to accept
|
||||
typedef size_t* ACCEPT_THIRD_T;
|
||||
#else
|
||||
typedef socklen_t* ACCEPT_THIRD_T;
|
||||
#endif
|
||||
|
||||
|
||||
// Check if _POSIX_THREADS should be forced
|
||||
#if !defined(_POSIX_THREADS) && (defined(__NETWARE__) || defined(__hpux))
|
||||
#if !defined(_POSIX_THREADS) && defined(__hpux)
|
||||
// HPUX does not define _POSIX_THREADS as it's not _fully_ implemented
|
||||
// Netware supports pthreads but does not announce it
|
||||
#define _POSIX_THREADS
|
||||
#endif
|
||||
|
||||
@@ -160,6 +155,11 @@ inline void err_sys(const char* msg)
|
||||
}
|
||||
|
||||
|
||||
extern "C" {
|
||||
static int PasswordCallBack(char*, int, int, void*);
|
||||
}
|
||||
|
||||
|
||||
static int PasswordCallBack(char* passwd, int sz, int rw, void* userdata)
|
||||
{
|
||||
strncpy(passwd, "12345678", sz);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2000-2006 MySQL AB, 2009 Sun Microsystems, Inc
|
||||
# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Library General Public
|
||||
@@ -15,6 +15,8 @@
|
||||
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
# MA 02111-1307, USA
|
||||
|
||||
pkgpsiincludedir = $(pkgincludedir)/psi
|
||||
|
||||
BUILT_SOURCES = $(HEADERS_GEN_MAKE) link_sources probes_mysql_nodtrace.h
|
||||
HEADERS_GEN_CONFIGURE = mysql_version.h
|
||||
HEADERS_GEN_MAKE = my_config.h
|
||||
@@ -25,18 +27,16 @@ pkginclude_HEADERS = $(HEADERS_ABI) my_dbug.h m_string.h my_sys.h \
|
||||
my_xml.h mysql_embed.h mysql/services.h \
|
||||
mysql/service_my_snprintf.h mysql/service_thd_alloc.h \
|
||||
my_pthread.h my_no_pthread.h \
|
||||
mysql/psi/psi.h mysql/psi/mysql_thread.h \
|
||||
mysql/psi/mysql_file.h \
|
||||
decimal.h errmsg.h my_global.h my_net.h \
|
||||
my_getopt.h sslopt-longopts.h my_dir.h \
|
||||
sslopt-vars.h sslopt-case.h sql_common.h keycache.h \
|
||||
m_ctype.h my_attribute.h $(HEADERS_GEN_CONFIGURE) \
|
||||
$(HEADERS_GEN_MAKE) probes_mysql.h probes_mysql_nodtrace.h
|
||||
|
||||
noinst_HEADERS = config-win.h config-netware.h lf.h my_bit.h \
|
||||
noinst_HEADERS = config-win.h lf.h my_bit.h \
|
||||
heap.h my_bitmap.h my_uctype.h password.h \
|
||||
myisam.h myisampack.h myisammrg.h ft_global.h\
|
||||
mysys_err.h my_base.h help_start.h help_end.h \
|
||||
mysys_err.h my_base.h \
|
||||
my_nosys.h my_alarm.h queues.h rijndael.h sha1.h sha2.h \
|
||||
my_aes.h my_tree.h my_trie.h hash.h thr_alarm.h \
|
||||
thr_lock.h t_ctype.h violite.h my_md5.h base64.h \
|
||||
@@ -45,7 +45,10 @@ noinst_HEADERS = config-win.h config-netware.h lf.h my_bit.h \
|
||||
my_vle.h my_user.h my_atomic.h atomic/nolock.h \
|
||||
atomic/rwlock.h atomic/x86-gcc.h atomic/generic-msvc.h \
|
||||
atomic/gcc_builtins.h my_libwrap.h my_stacktrace.h \
|
||||
atomic/solaris.h mysql/innodb_priv.h
|
||||
atomic/solaris.h mysql/innodb_priv.h my_compiler.h
|
||||
|
||||
pkgpsiinclude_HEADERS = mysql/psi/psi.h mysql/psi/mysql_thread.h \
|
||||
mysql/psi/mysql_file.h
|
||||
|
||||
EXTRA_DIST = mysql.h.pp mysql/plugin.h.pp probes_mysql.d.base \
|
||||
CMakeLists.txt \
|
||||
|
@@ -1,161 +0,0 @@
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
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; version 2 of the License.
|
||||
|
||||
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 */
|
||||
|
||||
/* Header for NetWare compatible with MySQL */
|
||||
|
||||
#ifndef _config_netware_h
|
||||
#define _config_netware_h
|
||||
|
||||
#define __event_h__
|
||||
#define _EVENT_H_
|
||||
/*
|
||||
These two #define(s) are needed as both libc of NetWare and MySQL have
|
||||
files named event.h which causes compilation errors.
|
||||
*/
|
||||
|
||||
|
||||
/* required headers */
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <screen.h>
|
||||
#include <limits.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <pthread.h>
|
||||
#include <termios.h>
|
||||
|
||||
#undef _EVENT_H_
|
||||
/*
|
||||
This #undef exists here because both libc of NetWare and MySQL have
|
||||
files named event.h which causes compilation errors.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* required adjustments */
|
||||
#undef HAVE_READDIR_R
|
||||
#undef HAVE_RWLOCK_INIT
|
||||
#undef HAVE_SCHED_H
|
||||
#undef HAVE_SYS_MMAN_H
|
||||
#undef HAVE_SYNCH_H
|
||||
#undef HAVE_MMAP
|
||||
#undef HAVE_RINT
|
||||
|
||||
#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
|
||||
#define HAVE_PTHREAD_SIGMASK 1
|
||||
#define HAVE_PTHREAD_YIELD_ZERO_ARG 1
|
||||
#define HAVE_BROKEN_REALPATH 1
|
||||
|
||||
/* changes made to make use of LibC-June-2004 for building purpose */
|
||||
#undef HAVE_POSIX_SIGNALS
|
||||
#undef HAVE_PTHREAD_ATTR_SETSCOPE
|
||||
#undef HAVE_ALLOC_A
|
||||
#undef HAVE_FINITE
|
||||
#undef HAVE_GETPWNAM
|
||||
#undef HAVE_GETPWUID
|
||||
#undef HAVE_READLINK
|
||||
#undef HAVE_STPCPY
|
||||
/* changes end */
|
||||
|
||||
/* Changes made to make use of LibC-June-2005 for building purpose */
|
||||
#undef HAVE_GETPASS
|
||||
#undef HAVE_GETRLIMIT
|
||||
#undef HAVE_GETRUSAGE
|
||||
#undef HAVE_INITGROUPS
|
||||
/* Changes end - LibC-June-2005 */
|
||||
|
||||
/* no libc crypt() function */
|
||||
#ifdef HAVE_OPENSSL
|
||||
#define HAVE_CRYPT 1
|
||||
#else
|
||||
#undef HAVE_CRYPT
|
||||
#endif /* HAVE_OPENSSL */
|
||||
|
||||
/* Netware has an ancient zlib */
|
||||
#undef HAVE_COMPRESS
|
||||
#define HAVE_COMPRESS
|
||||
#undef HAVE_ARCHIVE_DB
|
||||
|
||||
/* include the old function apis */
|
||||
#define USE_OLD_FUNCTIONS 1
|
||||
|
||||
/* no case sensitivity */
|
||||
#define FN_NO_CASE_SENSE 1
|
||||
|
||||
/* the thread alarm is not used */
|
||||
#define DONT_USE_THR_ALARM 1
|
||||
|
||||
/* signals do not interrupt sockets */
|
||||
#define SIGNALS_DONT_BREAK_READ 1
|
||||
|
||||
/* signal by closing the sockets */
|
||||
#define SIGNAL_WITH_VIO_CLOSE 1
|
||||
|
||||
/* On NetWare, stack grows towards lower address */
|
||||
#define STACK_DIRECTION -1
|
||||
|
||||
/* On NetWare, we need to set stack size for threads, otherwise default 16K is used */
|
||||
#define NW_THD_STACKSIZE 65536
|
||||
|
||||
/* On NetWare, to fix the problem with the deletion of open files */
|
||||
#define CANT_DELETE_OPEN_FILES 1
|
||||
|
||||
#define FN_LIBCHAR '\\'
|
||||
#define FN_ROOTDIR "\\"
|
||||
#define FN_DEVCHAR ':'
|
||||
|
||||
/* default directory information */
|
||||
#define DEFAULT_MYSQL_HOME "sys:/mysql"
|
||||
#define PACKAGE "mysql"
|
||||
#define DEFAULT_BASEDIR "sys:/"
|
||||
#define SHAREDIR "share/"
|
||||
#define DEFAULT_CHARSET_HOME "sys:/mysql/"
|
||||
#define MYSQL_DATADIR "data/"
|
||||
|
||||
/* 64-bit file system calls */
|
||||
#define SIZEOF_OFF_T 8
|
||||
#define off_t off64_t
|
||||
#define chsize chsize64
|
||||
#define ftruncate ftruncate64
|
||||
#define lseek lseek64
|
||||
#define pread pread64
|
||||
#define pwrite pwrite64
|
||||
#define tell tell64
|
||||
|
||||
/* do not use the extended time in LibC sys\stat.h */
|
||||
#define _POSIX_SOURCE
|
||||
|
||||
/* Some macros for portability */
|
||||
|
||||
#define set_timespec(ABSTIME,SEC) { (ABSTIME).tv_sec=time(NULL)+(SEC); (ABSTIME).tv_nsec=0; }
|
||||
|
||||
/* extra protection against CPU Hogs on NetWare */
|
||||
#define NETWARE_YIELD pthread_yield()
|
||||
/* Screen mode for help texts */
|
||||
#define NETWARE_SET_SCREEN_MODE(A) setscreenmode(A)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _config_netware_h */
|
@@ -185,7 +185,6 @@ typedef SSIZE_T ssize_t;
|
||||
#define SOCKET_SIZE_TYPE int
|
||||
#define my_socket_defined
|
||||
#define byte_defined
|
||||
#define HUGE_PTR
|
||||
#define STDCALL __stdcall /* Used by libmysql.dll */
|
||||
#define isnan(X) _isnan(X)
|
||||
#define finite(X) _finite(X)
|
||||
|
@@ -64,14 +64,14 @@ typedef struct st_hash {
|
||||
typedef uint HASH_SEARCH_STATE;
|
||||
|
||||
#define my_hash_init(A,B,C,D,E,F,G,H) \
|
||||
_my_hash_init(A,0,B,C,D,E,F,G,H CALLER_INFO)
|
||||
_my_hash_init(A,0,B,C,D,E,F,G,H)
|
||||
#define my_hash_init2(A,B,C,D,E,F,G,H,I) \
|
||||
_my_hash_init(A,B,C,D,E,F,G,H,I CALLER_INFO)
|
||||
_my_hash_init(A,B,C,D,E,F,G,H,I)
|
||||
my_bool _my_hash_init(HASH *hash, uint growth_size, CHARSET_INFO *charset,
|
||||
ulong default_array_elements, size_t key_offset,
|
||||
size_t key_length, my_hash_get_key get_key,
|
||||
void (*free_element)(void*),
|
||||
uint flags CALLER_INFO_PROTO);
|
||||
uint flags);
|
||||
void my_hash_free(HASH *tree);
|
||||
void my_hash_reset(HASH *hash);
|
||||
uchar *my_hash_element(HASH *hash, ulong idx);
|
||||
@@ -100,7 +100,7 @@ my_bool my_hash_check(HASH *hash); /* Only in debug library */
|
||||
#define my_hash_clear(H) bzero((char*) (H), sizeof(*(H)))
|
||||
#define my_hash_inited(H) ((H)->blength != 0)
|
||||
#define my_hash_init_opt(A,B,C,D,E,F,G,H) \
|
||||
(!my_hash_inited(A) && _my_hash_init(A,0,B,C,D,E,F,G, H CALLER_INFO))
|
||||
(!my_hash_inited(A) && _my_hash_init(A,0,B,C,D,E,F,G,H))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -1,26 +0,0 @@
|
||||
#ifndef HELP_END_INCLUDED
|
||||
#define HELP_END_INCLUDED
|
||||
|
||||
/* Copyright (C) 2004-2005 MySQL AB
|
||||
|
||||
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; version 2 of the License.
|
||||
|
||||
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
#ifdef __NETWARE__
|
||||
#undef printf
|
||||
#undef puts
|
||||
#undef fputs
|
||||
#undef fputc
|
||||
#undef putchar
|
||||
#endif
|
||||
#endif /* HELP_END_INCLUDED */
|
@@ -1,28 +0,0 @@
|
||||
#ifndef HELP_START_INCLUDED
|
||||
#define HELP_START_INCLUDED
|
||||
|
||||
/* Copyright (C) 2004-2005 MySQL AB
|
||||
|
||||
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; version 2 of the License.
|
||||
|
||||
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
/* Divert all help information on NetWare to logger screen. */
|
||||
|
||||
#ifdef __NETWARE__
|
||||
#define printf consoleprintf
|
||||
#define puts(s) consoleprintf("%s\n",s)
|
||||
#define fputs(s,f) puts(s)
|
||||
#define fputc(s,f) consoleprintf("%c", s)
|
||||
#define putchar(s) consoleprintf("%c", s)
|
||||
#endif
|
||||
#endif /* HELP_START_INCLUDED */
|
@@ -204,7 +204,7 @@ uint lf_alloc_pool_count(LF_ALLOCATOR *allocator);
|
||||
#define lf_alloc_get_pins(A) lf_pinbox_get_pins(&(A)->pinbox)
|
||||
#define _lf_alloc_put_pins(PINS) _lf_pinbox_put_pins(PINS)
|
||||
#define lf_alloc_put_pins(PINS) lf_pinbox_put_pins(PINS)
|
||||
#define lf_alloc_direct_free(ALLOC, ADDR) my_free((uchar*)(ADDR), MYF(0))
|
||||
#define lf_alloc_direct_free(ALLOC, ADDR) my_free((ADDR))
|
||||
|
||||
lock_wrap(lf_alloc_new, void *,
|
||||
(LF_PINS *pins),
|
||||
|
@@ -36,10 +36,6 @@
|
||||
/* need by my_vsnprintf */
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef _AIX
|
||||
#undef HAVE_BCMP
|
||||
#endif
|
||||
|
||||
/* This is needed for the definitions of bzero... on solaris */
|
||||
#if defined(HAVE_STRINGS_H)
|
||||
#include <strings.h>
|
||||
@@ -63,14 +59,10 @@
|
||||
/* Unixware 7 */
|
||||
#if !defined(HAVE_BFILL)
|
||||
# define bfill(A,B,C) memset((A),(C),(B))
|
||||
# define bmove_align(A,B,C) memcpy((A),(B),(C))
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_BCMP)
|
||||
# define bcopy(s, d, n) memcpy((d), (s), (n))
|
||||
# define bcmp(A,B,C) memcmp((A),(B),(C))
|
||||
# define bzero(A,B) memset((A),0,(B))
|
||||
# define bmove_align(A,B,C) memcpy((A),(B),(C))
|
||||
#if !defined(bzero) && !defined(HAVE_BZERO)
|
||||
# define bzero(A,B) memset((A),0,(B))
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
@@ -92,8 +84,8 @@ extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 */
|
||||
#endif
|
||||
|
||||
/* Declared in int2str() */
|
||||
extern char NEAR _dig_vec_upper[];
|
||||
extern char NEAR _dig_vec_lower[];
|
||||
extern char _dig_vec_upper[];
|
||||
extern char _dig_vec_lower[];
|
||||
|
||||
#ifndef strmov
|
||||
#define strmov_overlapp(A,B) strmov(A,B)
|
||||
@@ -116,19 +108,6 @@ extern char NEAR _dig_vec_lower[];
|
||||
extern void bfill(uchar *dst,size_t len,pchar fill);
|
||||
#endif
|
||||
|
||||
#if !defined(bzero) && !defined(HAVE_BZERO)
|
||||
extern void bzero(uchar * dst,size_t len);
|
||||
#endif
|
||||
|
||||
#if !defined(bcmp) && !defined(HAVE_BCMP)
|
||||
extern size_t bcmp(const uchar *s1,const uchar *s2,size_t len);
|
||||
#endif
|
||||
#ifdef HAVE_purify
|
||||
extern size_t my_bcmp(const uchar *s1,const uchar *s2,size_t len);
|
||||
#undef bcmp
|
||||
#define bcmp(A,B,C) my_bcmp((A),(B),(C))
|
||||
#endif /* HAVE_purify */
|
||||
|
||||
#ifndef bmove512
|
||||
extern void bmove512(uchar *dst,const uchar *src,size_t len);
|
||||
#endif
|
||||
@@ -156,15 +135,15 @@ extern char *strmov(char *dst,const char *src);
|
||||
#else
|
||||
extern char *strmov_overlapp(char *dst,const char *src);
|
||||
#endif
|
||||
extern char *strnmov(char *dst,const char *src,size_t n);
|
||||
extern char *strsuff(const char *src,const char *suffix);
|
||||
extern char *strcont(const char *src,const char *set);
|
||||
extern char *strxcat _VARARGS((char *dst,const char *src, ...));
|
||||
extern char *strxmov _VARARGS((char *dst,const char *src, ...));
|
||||
extern char *strxcpy _VARARGS((char *dst,const char *src, ...));
|
||||
extern char *strxncat _VARARGS((char *dst,size_t len, const char *src, ...));
|
||||
extern char *strxnmov _VARARGS((char *dst,size_t len, const char *src, ...));
|
||||
extern char *strxncpy _VARARGS((char *dst,size_t len, const char *src, ...));
|
||||
extern char *strnmov(char *dst, const char *src, size_t n);
|
||||
extern char *strsuff(const char *src, const char *suffix);
|
||||
extern char *strcont(const char *src, const char *set);
|
||||
extern char *strxcat(char *dst, const char *src, ...);
|
||||
extern char *strxmov(char *dst, const char *src, ...);
|
||||
extern char *strxcpy(char *dst, const char *src, ...);
|
||||
extern char *strxncat(char *dst, size_t len, const char *src, ...);
|
||||
extern char *strxnmov(char *dst, size_t len, const char *src, ...);
|
||||
extern char *strxncpy(char *dst, size_t len, const char *src, ...);
|
||||
|
||||
/* Prototypes of normal stringfunctions (with may ours) */
|
||||
|
||||
|
@@ -36,14 +36,14 @@ extern ulong my_time_to_wait_for_lock;
|
||||
#define ALARM_END (void) signal(SIGALRM,alarm_signal); \
|
||||
(void) alarm(alarm_old);
|
||||
#define ALARM_TEST my_have_got_alarm
|
||||
#ifdef DONT_REMEMBER_SIGNAL
|
||||
#ifdef SIGNAL_HANDLER_RESET_ON_DELIVERY
|
||||
#define ALARM_REINIT (void) alarm(MY_HOW_OFTEN_TO_ALARM); \
|
||||
(void) signal(SIGALRM,my_set_alarm_variable);\
|
||||
my_have_got_alarm=0;
|
||||
#else
|
||||
#define ALARM_REINIT (void) alarm((uint) MY_HOW_OFTEN_TO_ALARM); \
|
||||
my_have_got_alarm=0;
|
||||
#endif /* DONT_REMEMBER_SIGNAL */
|
||||
#endif /* SIGNAL_HANDLER_RESET_ON_DELIVERY */
|
||||
#else
|
||||
#define ALARM_VARIABLES long alarm_pos=0,alarm_end_pos=MY_HOW_OFTEN_TO_WRITE-1
|
||||
#define ALARM_INIT
|
||||
|
@@ -159,22 +159,6 @@ static inline my_bool bitmap_cmp(const MY_BITMAP *map1, const MY_BITMAP *map2)
|
||||
#define bitmap_set_all(MAP) \
|
||||
(memset((MAP)->bitmap, 0xFF, 4*no_words_in_map((MAP))))
|
||||
|
||||
/**
|
||||
check, set and clear a bit of interest of an integer.
|
||||
|
||||
If the bit is out of range @retval -1. Otherwise
|
||||
bit_is_set @return 0 or 1 reflecting the bit is set or not;
|
||||
bit_do_set @return 1 (bit is set 1)
|
||||
bit_do_clear @return 0 (bit is cleared to 0)
|
||||
*/
|
||||
|
||||
#define bit_is_set(I,B) (sizeof(I) * CHAR_BIT > (B) ? \
|
||||
(((I) & (ULL(1) << (B))) == 0 ? 0 : 1) : -1)
|
||||
#define bit_do_set(I,B) (sizeof(I) * CHAR_BIT > (B) ? \
|
||||
((I) |= (ULL(1) << (B)), 1) : -1)
|
||||
#define bit_do_clear(I,B) (sizeof(I) * CHAR_BIT > (B) ? \
|
||||
((I) &= ~(ULL(1) << (B)), 0) : -1)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
129
include/my_compiler.h
Normal file
129
include/my_compiler.h
Normal file
@@ -0,0 +1,129 @@
|
||||
#ifndef MY_COMPILER_INCLUDED
|
||||
#define MY_COMPILER_INCLUDED
|
||||
|
||||
/* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
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; version 2 of the License.
|
||||
|
||||
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
/**
|
||||
Header for compiler-dependent features.
|
||||
|
||||
Intended to contain a set of reusable wrappers for preprocessor
|
||||
macros, attributes, pragmas, and any other features that are
|
||||
specific to a target compiler.
|
||||
*/
|
||||
|
||||
#include <my_global.h> /* stddef.h offsetof */
|
||||
|
||||
/**
|
||||
Compiler-dependent internal convenience macros.
|
||||
*/
|
||||
|
||||
/* GNU C/C++ */
|
||||
#if defined __GNUC__
|
||||
/* Any after 2.95... */
|
||||
# define MY_ALIGN_EXT
|
||||
|
||||
/* Microsoft Visual C++ */
|
||||
#elif defined _MSC_VER
|
||||
# define MY_ALIGNOF(type) __alignof(type)
|
||||
# define MY_ALIGNED(n) __declspec(align(n))
|
||||
|
||||
/* Oracle Solaris Studio */
|
||||
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||
# if __SUNPRO_C >= 0x590
|
||||
# define MY_ALIGN_EXT
|
||||
# endif
|
||||
|
||||
/* IBM XL C/C++ */
|
||||
#elif defined __xlC__
|
||||
# if __xlC__ >= 0x0600
|
||||
# define MY_ALIGN_EXT
|
||||
# endif
|
||||
|
||||
/* HP aCC */
|
||||
#elif defined(__HP_aCC) || defined(__HP_cc)
|
||||
# if (__HP_aCC >= 60000) || (__HP_cc >= 60000)
|
||||
# define MY_ALIGN_EXT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef MY_ALIGN_EXT
|
||||
/** Specifies the minimum alignment of a type. */
|
||||
# define MY_ALIGNOF(type) __alignof__(type)
|
||||
/** Determine the alignment requirement of a type. */
|
||||
# define MY_ALIGNED(n) __attribute__((__aligned__((n))))
|
||||
#endif
|
||||
|
||||
/**
|
||||
Generic compiler-dependent features.
|
||||
*/
|
||||
#ifndef MY_ALIGNOF
|
||||
# ifdef __cplusplus
|
||||
template<typename type> struct my_alignof_helper { char m1; type m2; };
|
||||
/* Invalid for non-POD types, but most compilers give the right answer. */
|
||||
# define MY_ALIGNOF(type) offsetof(my_alignof_helper<type>, m2)
|
||||
# else
|
||||
# define MY_ALIGNOF(type) offsetof(struct { char m1; type m2; }, m2)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
C++ Type Traits
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
/**
|
||||
Opaque storage with a particular alignment.
|
||||
*/
|
||||
# if defined(MY_ALIGNED)
|
||||
/* Partial specialization used due to MSVC++. */
|
||||
template<size_t alignment> struct my_alignment_imp;
|
||||
template<> struct MY_ALIGNED(1) my_alignment_imp<1> {};
|
||||
template<> struct MY_ALIGNED(2) my_alignment_imp<2> {};
|
||||
template<> struct MY_ALIGNED(4) my_alignment_imp<4> {};
|
||||
template<> struct MY_ALIGNED(8) my_alignment_imp<8> {};
|
||||
template<> struct MY_ALIGNED(16) my_alignment_imp<16> {};
|
||||
/* ... expand as necessary. */
|
||||
# else
|
||||
template<size_t alignment>
|
||||
struct my_alignment_imp { double m1; };
|
||||
# endif
|
||||
|
||||
/**
|
||||
A POD type with a given size and alignment.
|
||||
|
||||
@remark If the compiler does not support a alignment attribute
|
||||
(MY_ALIGN macro), the default alignment of a double is
|
||||
used instead.
|
||||
|
||||
@tparam size The minimum size.
|
||||
@tparam alignment The desired alignment: 1, 2, 4, 8 or 16.
|
||||
*/
|
||||
template <size_t size, size_t alignment>
|
||||
struct my_aligned_storage
|
||||
{
|
||||
union
|
||||
{
|
||||
char data[size];
|
||||
my_alignment_imp<alignment> align;
|
||||
};
|
||||
};
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <my_attribute.h>
|
||||
|
||||
#endif /* MY_COMPILER_INCLUDED */
|
@@ -45,7 +45,7 @@ extern void _db_enter_(const char *_func_, const char *_file_, uint _line_,
|
||||
struct _db_stack_frame_ *_stack_frame_);
|
||||
extern void _db_return_(uint _line_, struct _db_stack_frame_ *_stack_frame_);
|
||||
extern void _db_pargs_(uint _line_,const char *keyword);
|
||||
extern void _db_doprnt_ _VARARGS((const char *format,...))
|
||||
extern void _db_doprnt_(const char *format,...)
|
||||
ATTRIBUTE_FORMAT(printf, 1, 2);
|
||||
extern void _db_dump_(uint _line_,const char *keyword,
|
||||
const unsigned char *memory, size_t length);
|
||||
|
@@ -46,15 +46,6 @@
|
||||
#define HAVE_ERRNO_AS_DEFINE
|
||||
#endif /* __CYGWIN__ */
|
||||
|
||||
#if defined(__QNXNTO__) && !defined(FD_SETSIZE)
|
||||
#define FD_SETSIZE 1024 /* Max number of file descriptor bits in
|
||||
fd_set, used when calling 'select'
|
||||
Must be defined before including
|
||||
"sys/select.h" and "sys/time.h"
|
||||
*/
|
||||
#endif
|
||||
|
||||
|
||||
/* to make command line shorter we'll define USE_PRAGMA_INTERFACE here */
|
||||
#ifdef USE_PRAGMA_IMPLEMENTATION
|
||||
#define USE_PRAGMA_INTERFACE
|
||||
@@ -82,20 +73,7 @@
|
||||
#define CPP_UNNAMED_NS_END }
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <my_config.h>
|
||||
#elif defined(__NETWARE__)
|
||||
#include <my_config.h>
|
||||
#include <config-netware.h>
|
||||
#if defined(__cplusplus) && defined(inline)
|
||||
#undef inline /* fix configure problem */
|
||||
#endif
|
||||
#else
|
||||
#include <my_config.h>
|
||||
#if defined(__cplusplus) && defined(inline)
|
||||
#undef inline /* fix configure problem */
|
||||
#endif
|
||||
#endif /* _WIN32... */
|
||||
|
||||
#ifdef WITH_PERFSCHEMA_STORAGE_ENGINE
|
||||
#define HAVE_PSI_INTERFACE
|
||||
@@ -108,12 +86,6 @@
|
||||
#define IF_WIN(A,B) B
|
||||
#endif
|
||||
|
||||
#ifdef __NETWARE__
|
||||
#define IF_NETWARE(A,B) A
|
||||
#else
|
||||
#define IF_NETWARE(A,B) B
|
||||
#endif
|
||||
|
||||
#ifndef DBUG_OFF
|
||||
#define IF_DBUG(A,B) A
|
||||
#else
|
||||
@@ -143,12 +115,6 @@
|
||||
#define HAVE_EXTERNAL_CLIENT
|
||||
#endif
|
||||
|
||||
/* Some defines to avoid ifdefs in the code */
|
||||
#ifndef NETWARE_YIELD
|
||||
#define NETWARE_YIELD
|
||||
#define NETWARE_SET_SCREEN_MODE(A)
|
||||
#endif
|
||||
|
||||
#if defined (_WIN32)
|
||||
/*
|
||||
off_t is 32 bit long. We do not use C runtime functions
|
||||
@@ -591,22 +557,6 @@ C_MODE_END
|
||||
extern "C" int madvise(void *addr, size_t len, int behav);
|
||||
#endif
|
||||
|
||||
#ifdef __QNXNTO__
|
||||
/* This has to be after include limits.h */
|
||||
#define HAVE_ERRNO_AS_DEFINE
|
||||
#define HAVE_FCNTL_LOCK
|
||||
#undef HAVE_FINITE
|
||||
#undef LONGLONG_MIN /* These get wrongly defined in QNX 6.2 */
|
||||
#undef LONGLONG_MAX /* standard system library 'limits.h' */
|
||||
#ifdef __cplusplus
|
||||
#ifndef HAVE_RINT
|
||||
#define HAVE_RINT
|
||||
#endif /* rint() and isnan() functions are not */
|
||||
#define rint(a) std::rint(a) /* visible in C++ scope due to an error */
|
||||
#define isnan(a) std::isnan(a) /* in the usr/include/math.h on QNX */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* We can not live without the following defines */
|
||||
|
||||
#define USE_MYFUNC 1 /* Must use syscall indirection */
|
||||
@@ -627,12 +577,19 @@ extern "C" int madvise(void *addr, size_t len, int behav);
|
||||
#endif
|
||||
|
||||
/* Does the system remember a signal handler after a signal ? */
|
||||
#ifndef HAVE_BSD_SIGNALS
|
||||
#define DONT_REMEMBER_SIGNAL
|
||||
#if !defined(HAVE_BSD_SIGNALS) && !defined(HAVE_SIGACTION)
|
||||
#define SIGNAL_HANDLER_RESET_ON_DELIVERY
|
||||
#endif
|
||||
|
||||
#if defined(_lint) || defined(FORCE_INIT_OF_VARS)
|
||||
#define LINT_INIT(var) var=0 /* No uninitialize-warning */
|
||||
/*
|
||||
Deprecated workaround for false-positive uninitialized variables
|
||||
warnings. Those should be silenced using tool-specific heuristics.
|
||||
|
||||
Enabled by default for g++ due to the bug referenced below.
|
||||
*/
|
||||
#if defined(_lint) || defined(FORCE_INIT_OF_VARS) || \
|
||||
(defined(__GNUC__) && defined(__cplusplus))
|
||||
#define LINT_INIT(var) var= 0
|
||||
#else
|
||||
#define LINT_INIT(var)
|
||||
#endif
|
||||
@@ -643,10 +600,11 @@ extern "C" int madvise(void *addr, size_t len, int behav);
|
||||
The _cplusplus is a temporary workaround for C++ code pending a fix
|
||||
for a g++ bug (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34772).
|
||||
*/
|
||||
#if defined(_lint) || defined(FORCE_INIT_OF_VARS) || defined(__cplusplus) || \
|
||||
!defined(__GNUC__)
|
||||
#if defined(_lint) || defined(FORCE_INIT_OF_VARS) || \
|
||||
defined(__cplusplus) || !defined(__GNUC__)
|
||||
#define UNINIT_VAR(x) x= 0
|
||||
#else
|
||||
/* GCC specific self-initialization which inhibits the warning. */
|
||||
#define UNINIT_VAR(x) x= x
|
||||
#endif
|
||||
|
||||
@@ -670,7 +628,6 @@ typedef unsigned short ushort;
|
||||
#define set_if_bigger(a,b) do { if ((a) < (b)) (a)=(b); } while(0)
|
||||
#define set_if_smaller(a,b) do { if ((a) > (b)) (a)=(b); } while(0)
|
||||
#define test_all_bits(a,b) (((a) & (b)) == (b))
|
||||
#define set_bits(type, bit_count) (sizeof(type)*8 <= (bit_count) ? ~(type) 0 : ((((type) 1) << (bit_count)) - (type) 1))
|
||||
#define array_elements(A) ((uint) (sizeof(A)/sizeof(A[0])))
|
||||
|
||||
/* Define some general constants */
|
||||
@@ -691,7 +648,7 @@ typedef unsigned short ushort;
|
||||
#define my_const_cast(A) (A)
|
||||
#endif
|
||||
|
||||
#include <my_attribute.h>
|
||||
#include <my_compiler.h>
|
||||
|
||||
/*
|
||||
Wen using the embedded library, users might run into link problems,
|
||||
@@ -704,16 +661,6 @@ int __cxa_pure_virtual () __attribute__ ((weak));
|
||||
C_MODE_END
|
||||
#endif
|
||||
|
||||
/* From old s-system.h */
|
||||
|
||||
/*
|
||||
Support macros for non ansi & other old compilers. Since such
|
||||
things are no longer supported we do nothing. We keep then since
|
||||
some of our code may still be needed to upgrade old customers.
|
||||
*/
|
||||
#define _VARARGS(X) X
|
||||
#define _STATIC_VARARGS(X) X
|
||||
|
||||
/* The DBUG_ON flag always takes precedence over default DBUG_OFF */
|
||||
#if defined(DBUG_ON) && defined(DBUG_OFF)
|
||||
#undef DBUG_OFF
|
||||
@@ -729,7 +676,6 @@ C_MODE_END
|
||||
|
||||
#define MIN_ARRAY_SIZE 0 /* Zero or One. Gcc allows zero*/
|
||||
#define ASCII_BITS_USED 8 /* Bit char used */
|
||||
#define NEAR_F /* No near function handling */
|
||||
|
||||
/* Some types that is different between systems */
|
||||
|
||||
@@ -889,11 +835,8 @@ typedef SOCKET_SIZE_TYPE size_socket;
|
||||
How much overhead does malloc have. The code often allocates
|
||||
something like 1024-MALLOC_OVERHEAD bytes
|
||||
*/
|
||||
#ifdef SAFEMALLOC
|
||||
#define MALLOC_OVERHEAD (8+24+4)
|
||||
#else
|
||||
#define MALLOC_OVERHEAD 8
|
||||
#endif
|
||||
|
||||
/* get memory in huncs */
|
||||
#define ONCE_ALLOC_INIT (uint) (4096-MALLOC_OVERHEAD)
|
||||
/* Typical record cash */
|
||||
@@ -1076,20 +1019,6 @@ typedef long long my_ptrdiff_t;
|
||||
#define ADD_TO_PTR(ptr,size,type) (type) ((uchar*) (ptr)+size)
|
||||
#define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((uchar*) (A) - (uchar*) (B))
|
||||
|
||||
#define MY_DIV_UP(A, B) (((A) + (B) - 1) / (B))
|
||||
#define MY_ALIGNED_BYTE_ARRAY(N, S, T) T N[MY_DIV_UP(S, sizeof(T))]
|
||||
|
||||
#ifdef __cplusplus
|
||||
template <size_t sz> struct Aligned_char_array
|
||||
{
|
||||
union {
|
||||
void *v; // Ensures alignment.
|
||||
char arr[sz]; // The actual buffer.
|
||||
} u;
|
||||
void* arr() { return &u.arr[0]; }
|
||||
};
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*
|
||||
Custom version of standard offsetof() macro which can be used to get
|
||||
offsets of members in class for non-POD types (according to the current
|
||||
@@ -1106,14 +1035,6 @@ template <size_t sz> struct Aligned_char_array
|
||||
((size_t)((char *)&(((TYPE *)0x10)->MEMBER) - (char*)0x10))
|
||||
|
||||
#define NullS (char *) 0
|
||||
/* Nowdays we do not support MessyDos */
|
||||
#ifndef NEAR
|
||||
#define NEAR /* Who needs segments ? */
|
||||
#define FAR /* On a good machine */
|
||||
#ifndef HUGE_PTR
|
||||
#define HUGE_PTR
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef STDCALL
|
||||
#undef STDCALL
|
||||
@@ -1625,17 +1546,6 @@ do { doubleget_union _tmp; \
|
||||
|
||||
#endif /* WORDS_BIGENDIAN */
|
||||
|
||||
/* sprintf does not always return the number of bytes :- */
|
||||
#ifdef SPRINTF_RETURNS_INT
|
||||
#define my_sprintf(buff,args) sprintf args
|
||||
#else
|
||||
#ifdef SPRINTF_RETURNS_PTR
|
||||
#define my_sprintf(buff,args) ((int)(sprintf args - buff))
|
||||
#else
|
||||
#define my_sprintf(buff,args) ((ulong) sprintf args, (ulong) strlen(buff))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef THREAD
|
||||
#define thread_safe_increment(V,L) (V)++
|
||||
#define thread_safe_decrement(V,L) (V)--
|
||||
@@ -1680,25 +1590,12 @@ do { doubleget_union _tmp; \
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef __NETWARE__
|
||||
/*
|
||||
* Include standard definitions of operator new and delete.
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
#include <new>
|
||||
#endif
|
||||
#else
|
||||
/*
|
||||
* Define placement versions of operator new and operator delete since
|
||||
* we don't have <new> when building for Netware.
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
inline void *operator new(size_t, void *ptr) { return ptr; }
|
||||
inline void *operator new[](size_t, void *ptr) { return ptr; }
|
||||
inline void operator delete(void*, void*) { /* Do nothing */ }
|
||||
inline void operator delete[](void*, void*) { /* Do nothing */ }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Length of decimal number represented by INT32. */
|
||||
#define MY_INT32_NUM_DECIMAL_DIGITS 11
|
||||
@@ -1712,11 +1609,6 @@ inline void operator delete[](void*, void*) { /* Do nothing */ }
|
||||
#define min(a, b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#define x_free(A) \
|
||||
do { my_free((uchar*)(A), MYF(MY_WME|MY_FAE|MY_ALLOW_ZERO_PTR)); } while (0)
|
||||
#define safeFree(X) \
|
||||
do { if (X) { my_free((uchar*)(X), MYF(0)); (X) = NULL; } } while (0)
|
||||
|
||||
/*
|
||||
Only Linux is known to need an explicit sync of the directory to make sure a
|
||||
file creation/deletion/renaming in(from,to) this directory durable.
|
||||
|
@@ -37,7 +37,7 @@ extern int list_walk(LIST *,list_walk_action action,unsigned char * argument);
|
||||
|
||||
#define list_rest(a) ((a)->next)
|
||||
#define list_push(a,b) (a)=list_cons((b),(a))
|
||||
#define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old) ; my_free((unsigned char *) old,MYF(MY_FAE)); }
|
||||
#define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old); my_free(old); }
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -46,7 +46,7 @@ C_MODE_START
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#if !defined(__WIN__) && !defined(HAVE_BROKEN_NETINET_INCLUDES) && !defined(__NETWARE__)
|
||||
#if !defined(__WIN__) && !defined(HAVE_BROKEN_NETINET_INCLUDES)
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/ip.h>
|
||||
|
@@ -39,7 +39,7 @@ extern size_t my_quick_read(File Filedes,uchar *Buffer,size_t Count,
|
||||
myf myFlags);
|
||||
extern size_t my_quick_write(File Filedes,const uchar *Buffer,size_t Count);
|
||||
|
||||
#if !defined(SAFEMALLOC) && defined(USE_HALLOC)
|
||||
#if defined(USE_HALLOC)
|
||||
#define my_malloc(a,b) halloc(a,1)
|
||||
#define my_no_flags_free(a) hfree(a)
|
||||
#endif
|
||||
|
@@ -195,11 +195,6 @@ int pthread_cancel(pthread_t thread);
|
||||
#include <synch.h>
|
||||
#endif
|
||||
|
||||
#ifdef __NETWARE__
|
||||
void my_pthread_exit(void *status);
|
||||
#define pthread_exit(A) my_pthread_exit(A)
|
||||
#endif
|
||||
|
||||
#define pthread_key(T,V) pthread_key_t V
|
||||
#define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(T,(V))
|
||||
#define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,(void*) (V))
|
||||
@@ -356,7 +351,7 @@ struct tm *gmtime_r(const time_t *clock, struct tm *res);
|
||||
#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH)
|
||||
#undef pthread_detach_this_thread
|
||||
#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(&tmp); }
|
||||
#elif !defined(__NETWARE__) /* HAVE_PTHREAD_ATTR_CREATE && !HAVE_SIGWAIT */
|
||||
#else /* HAVE_PTHREAD_ATTR_CREATE && !HAVE_SIGWAIT */
|
||||
#define HAVE_PTHREAD_KILL
|
||||
#endif
|
||||
|
||||
@@ -461,10 +456,6 @@ int my_pthread_mutex_trylock(pthread_mutex_t *mutex);
|
||||
|
||||
/* safe_mutex adds checking to mutex for easier debugging */
|
||||
|
||||
#if defined(__NETWARE__) && !defined(SAFE_MUTEX_DETECT_DESTROY)
|
||||
#define SAFE_MUTEX_DETECT_DESTROY
|
||||
#endif
|
||||
|
||||
typedef struct st_safe_mutex_t
|
||||
{
|
||||
pthread_mutex_t global,mutex;
|
||||
|
@@ -32,9 +32,7 @@
|
||||
#define HAVE_STACKTRACE 1
|
||||
#endif
|
||||
|
||||
#if !defined(__NETWARE__)
|
||||
#define HAVE_WRITE_CORE
|
||||
#endif
|
||||
|
||||
#if HAVE_BACKTRACE && HAVE_BACKTRACE_SYMBOLS && \
|
||||
HAVE_CXXABI_H && HAVE_ABI_CXA_DEMANGLE && \
|
||||
|
116
include/my_sys.h
116
include/my_sys.h
@@ -42,7 +42,7 @@ typedef struct my_aio_result {
|
||||
#endif /* HAVE_VALGRIND */
|
||||
|
||||
#ifndef THREAD
|
||||
extern int NEAR my_errno; /* Last error in mysys */
|
||||
extern int my_errno; /* Last error in mysys */
|
||||
#else
|
||||
#include <my_pthread.h>
|
||||
#endif
|
||||
@@ -158,46 +158,15 @@ extern int NEAR my_errno; /* Last error in mysys */
|
||||
#define GETDATE_FIXEDLENGTH 16
|
||||
|
||||
/* defines when allocating data */
|
||||
#ifdef SAFEMALLOC
|
||||
#define my_malloc(SZ,FLAG) _mymalloc((SZ), __FILE__, __LINE__, FLAG )
|
||||
#define my_malloc_ci(SZ,FLAG) _mymalloc((SZ), sFile, uLine, FLAG )
|
||||
#define my_realloc(PTR,SZ,FLAG) _myrealloc((PTR), (SZ), __FILE__, __LINE__, FLAG )
|
||||
#define my_checkmalloc() _sanity( __FILE__, __LINE__ )
|
||||
#define my_free(PTR,FLAG) _myfree((PTR), __FILE__, __LINE__,FLAG)
|
||||
#define my_memdup(A,B,C) _my_memdup((A),(B), __FILE__,__LINE__,C)
|
||||
#define my_strdup(A,C) _my_strdup((A), __FILE__,__LINE__,C)
|
||||
#define my_strndup(A,B,C) _my_strndup((A),(B),__FILE__,__LINE__,C)
|
||||
#define TRASH(A,B) do { bfill(A, B, 0x8F); MEM_UNDEFINED(A, B); } while (0)
|
||||
#define QUICK_SAFEMALLOC sf_malloc_quick=1
|
||||
#define NORMAL_SAFEMALLOC sf_malloc_quick=0
|
||||
extern uint sf_malloc_prehunc,sf_malloc_endhunc,sf_malloc_quick;
|
||||
extern ulonglong sf_malloc_mem_limit;
|
||||
|
||||
#define CALLER_INFO_PROTO , const char *sFile, uint uLine
|
||||
#define CALLER_INFO , __FILE__, __LINE__
|
||||
#define ORIG_CALLER_INFO , sFile, uLine
|
||||
#else
|
||||
#define my_checkmalloc()
|
||||
#undef TERMINATE
|
||||
#define TERMINATE(A,B) {}
|
||||
#define QUICK_SAFEMALLOC
|
||||
#define NORMAL_SAFEMALLOC
|
||||
extern void *my_malloc(size_t Size,myf MyFlags);
|
||||
#define my_malloc_ci(SZ,FLAG) my_malloc( SZ, FLAG )
|
||||
extern void *my_multi_malloc(myf MyFlags, ...);
|
||||
extern void *my_realloc(void *oldpoint, size_t Size, myf MyFlags);
|
||||
extern void my_no_flags_free(void *ptr);
|
||||
extern void my_free(void *ptr);
|
||||
extern void *my_memdup(const void *from,size_t length,myf MyFlags);
|
||||
extern char *my_strdup(const char *from,myf MyFlags);
|
||||
extern char *my_strndup(const char *from, size_t length,
|
||||
myf MyFlags);
|
||||
/* we do use FG (as a no-op) in below so that a typo on FG is caught */
|
||||
#define my_free(PTR,FG) ((void)FG,my_no_flags_free(PTR))
|
||||
#define CALLER_INFO_PROTO /* nothing */
|
||||
#define CALLER_INFO /* nothing */
|
||||
#define ORIG_CALLER_INFO /* nothing */
|
||||
#define TRASH(A,B) do{MEM_CHECK_ADDRESSABLE(A,B);MEM_UNDEFINED(A,B);} while (0)
|
||||
#endif
|
||||
|
||||
#if defined(ENABLED_DEBUG_SYNC)
|
||||
extern void (*debug_sync_C_callback_ptr)(const char *, size_t);
|
||||
#define DEBUG_SYNC_C(_sync_point_name_) do { \
|
||||
@@ -211,11 +180,11 @@ extern void (*debug_sync_C_callback_ptr)(const char *, size_t);
|
||||
#ifdef HAVE_LARGE_PAGES
|
||||
extern uint my_get_large_page_size(void);
|
||||
extern uchar * my_large_malloc(size_t size, myf my_flags);
|
||||
extern void my_large_free(uchar * ptr, myf my_flags);
|
||||
extern void my_large_free(uchar *ptr);
|
||||
#else
|
||||
#define my_get_large_page_size() (0)
|
||||
#define my_large_malloc(A,B) my_malloc_lock((A),(B))
|
||||
#define my_large_free(A,B) my_free_lock((A),(B))
|
||||
#define my_large_free(A) my_free_lock((A))
|
||||
#endif /* HAVE_LARGE_PAGES */
|
||||
|
||||
#ifdef HAVE_ALLOCA
|
||||
@@ -233,7 +202,7 @@ extern void my_large_free(uchar * ptr, myf my_flags);
|
||||
#define my_afree(PTR) {}
|
||||
#else
|
||||
#define my_alloca(SZ) my_malloc(SZ,MYF(0))
|
||||
#define my_afree(PTR) my_free(PTR,MYF(MY_WME))
|
||||
#define my_afree(PTR) my_free(PTR)
|
||||
#endif /* HAVE_ALLOCA */
|
||||
|
||||
#ifndef errno /* did we already get it? */
|
||||
@@ -245,7 +214,7 @@ extern int errno; /* declare errno */
|
||||
#endif /* #ifndef errno */
|
||||
extern char *home_dir; /* Home directory for user */
|
||||
extern const char *my_progname; /* program-name (printed in errors) */
|
||||
extern char NEAR curr_dir[]; /* Current directory for user */
|
||||
extern char curr_dir[]; /* Current directory for user */
|
||||
extern void (*error_handler_hook)(uint my_err, const char *str,myf MyFlags);
|
||||
extern void (*fatal_error_handler_hook)(uint my_err, const char *str,
|
||||
myf MyFlags);
|
||||
@@ -278,17 +247,16 @@ extern void (*my_sigtstp_cleanup)(void),
|
||||
(*my_sigtstp_restart)(void),
|
||||
(*my_abort_hook)(int);
|
||||
/* Executed when comming from shell */
|
||||
extern MYSQL_PLUGIN_IMPORT int NEAR my_umask; /* Default creation mask */
|
||||
extern int NEAR my_umask_dir,
|
||||
NEAR my_recived_signals, /* Signals we have got */
|
||||
NEAR my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */
|
||||
NEAR my_dont_interrupt; /* call remember_intr when set */
|
||||
extern my_bool NEAR my_use_symdir;
|
||||
extern size_t sf_malloc_cur_memory, sf_malloc_max_memory;
|
||||
extern MYSQL_PLUGIN_IMPORT int my_umask; /* Default creation mask */
|
||||
extern int my_umask_dir,
|
||||
my_recived_signals, /* Signals we have got */
|
||||
my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */
|
||||
my_dont_interrupt; /* call remember_intr when set */
|
||||
extern my_bool my_use_symdir;
|
||||
|
||||
extern ulong my_default_record_cache_size;
|
||||
extern my_bool NEAR my_disable_locking,NEAR my_disable_async_io,
|
||||
NEAR my_disable_flush_key_blocks, NEAR my_disable_symlinks;
|
||||
extern my_bool my_disable_locking, my_disable_async_io,
|
||||
my_disable_flush_key_blocks, my_disable_symlinks;
|
||||
extern char wild_many,wild_one,wild_prefix;
|
||||
extern const char *charsets_dir;
|
||||
/* from default.c */
|
||||
@@ -642,20 +610,6 @@ extern size_t my_fwrite(FILE *stream,const uchar *Buffer,size_t Count,
|
||||
myf MyFlags);
|
||||
extern my_off_t my_fseek(FILE *stream,my_off_t pos,int whence,myf MyFlags);
|
||||
extern my_off_t my_ftell(FILE *stream,myf MyFlags);
|
||||
extern void *_mymalloc(size_t uSize,const char *sFile,
|
||||
uint uLine, myf MyFlag);
|
||||
extern void *_myrealloc(void *pPtr,size_t uSize,const char *sFile,
|
||||
uint uLine, myf MyFlag);
|
||||
extern void * my_multi_malloc _VARARGS((myf MyFlags, ...));
|
||||
extern void _myfree(void *pPtr,const char *sFile,uint uLine, myf MyFlag);
|
||||
extern int _sanity(const char *sFile, uint uLine);
|
||||
extern void *_my_memdup(const void *from, size_t length,
|
||||
const char *sFile, uint uLine,myf MyFlag);
|
||||
extern char * _my_strdup(const char *from, const char *sFile, uint uLine,
|
||||
myf MyFlag);
|
||||
extern char *_my_strndup(const char *from, size_t length,
|
||||
const char *sFile, uint uLine,
|
||||
myf MyFlag);
|
||||
|
||||
/* implemented in my_memmem.c */
|
||||
extern void *my_memmem(const void *haystack, size_t haystacklen,
|
||||
@@ -684,9 +638,6 @@ extern HANDLE my_get_osfhandle(File fd);
|
||||
extern void my_osmaperr(unsigned long last_error);
|
||||
#endif
|
||||
|
||||
#ifndef TERMINATE
|
||||
extern void TERMINATE(FILE *file, uint flag);
|
||||
#endif
|
||||
extern void init_glob_errs(void);
|
||||
extern const char** get_global_errmsgs();
|
||||
extern void wait_for_free_space(const char *filename, int errors);
|
||||
@@ -698,10 +649,10 @@ extern int my_chsize(File fd,my_off_t newlength, int filler, myf MyFlags);
|
||||
extern int my_sync(File fd, myf my_flags);
|
||||
extern int my_sync_dir(const char *dir_name, myf my_flags);
|
||||
extern int my_sync_dir_by_file(const char *file_name, myf my_flags);
|
||||
extern void my_error _VARARGS((int nr,myf MyFlags, ...));
|
||||
extern void my_printf_error _VARARGS((uint my_err, const char *format,
|
||||
myf MyFlags, ...))
|
||||
ATTRIBUTE_FORMAT(printf, 2, 4);
|
||||
extern void my_error(int nr,myf MyFlags, ...);
|
||||
extern void my_printf_error(uint my_err, const char *format,
|
||||
myf MyFlags, ...)
|
||||
ATTRIBUTE_FORMAT(printf, 2, 4);
|
||||
extern void my_printv_error(uint error, const char *format, myf MyFlags,
|
||||
va_list ap);
|
||||
extern int my_error_register(const char** (*get_errmsgs) (),
|
||||
@@ -835,18 +786,16 @@ extern my_bool real_open_cached_file(IO_CACHE *cache);
|
||||
extern void close_cached_file(IO_CACHE *cache);
|
||||
File create_temp_file(char *to, const char *dir, const char *pfx,
|
||||
int mode, myf MyFlags);
|
||||
#define my_init_dynamic_array(A,B,C,D) init_dynamic_array2(A,B,NULL,C,D CALLER_INFO)
|
||||
#define my_init_dynamic_array_ci(A,B,C,D) init_dynamic_array2(A,B,NULL,C,D ORIG_CALLER_INFO)
|
||||
#define my_init_dynamic_array2(A,B,C,D,E) init_dynamic_array2(A,B,C,D,E CALLER_INFO)
|
||||
#define my_init_dynamic_array2_ci(A,B,C,D,E) init_dynamic_array2(A,B,C,D,E ORIG_CALLER_INFO)
|
||||
extern my_bool init_dynamic_array2(DYNAMIC_ARRAY *array,uint element_size,
|
||||
#define my_init_dynamic_array(A,B,C,D) init_dynamic_array2(A,B,NULL,C,D)
|
||||
#define my_init_dynamic_array_ci(A,B,C,D) init_dynamic_array2(A,B,NULL,C,D)
|
||||
#define my_init_dynamic_array2(A,B,C,D,E) init_dynamic_array2(A,B,C,D,E)
|
||||
#define my_init_dynamic_array2_ci(A,B,C,D,E) init_dynamic_array2(A,B,C,D,E)
|
||||
extern my_bool init_dynamic_array2(DYNAMIC_ARRAY *array, uint element_size,
|
||||
void *init_buffer, uint init_alloc,
|
||||
uint alloc_increment
|
||||
CALLER_INFO_PROTO);
|
||||
uint alloc_increment);
|
||||
/* init_dynamic_array() function is deprecated */
|
||||
extern my_bool init_dynamic_array(DYNAMIC_ARRAY *array,uint element_size,
|
||||
uint init_alloc,uint alloc_increment
|
||||
CALLER_INFO_PROTO);
|
||||
extern my_bool init_dynamic_array(DYNAMIC_ARRAY *array, uint element_size,
|
||||
uint init_alloc, uint alloc_increment);
|
||||
extern my_bool insert_dynamic(DYNAMIC_ARRAY *array,uchar * element);
|
||||
extern uchar *alloc_dynamic(DYNAMIC_ARRAY *array);
|
||||
extern uchar *pop_dynamic(DYNAMIC_ARRAY*);
|
||||
@@ -876,10 +825,10 @@ extern my_bool dynstr_trunc(DYNAMIC_STRING *str, size_t n);
|
||||
extern void dynstr_free(DYNAMIC_STRING *str);
|
||||
#ifdef HAVE_MLOCK
|
||||
extern void *my_malloc_lock(size_t length,myf flags);
|
||||
extern void my_free_lock(void *ptr,myf flags);
|
||||
extern void my_free_lock(void *ptr);
|
||||
#else
|
||||
#define my_malloc_lock(A,B) my_malloc((A),(B))
|
||||
#define my_free_lock(A,B) my_free((A),(B))
|
||||
#define my_free_lock(A) my_free((A))
|
||||
#endif
|
||||
#define alloc_root_inited(A) ((A)->min_malloc != 0)
|
||||
#define ALLOC_ROOT_MIN_BLOCK_SIZE (MALLOC_OVERHEAD + sizeof(USED_MEM) + 8)
|
||||
@@ -963,10 +912,7 @@ extern int my_getncpus();
|
||||
#define MAP_FAILED ((void *)-1)
|
||||
#define MS_SYNC 0x0000
|
||||
|
||||
#ifndef __NETWARE__
|
||||
#define HAVE_MMAP
|
||||
#endif
|
||||
|
||||
void *my_mmap(void *, size_t, int, int, int, my_off_t);
|
||||
int my_munmap(void *, size_t);
|
||||
#endif
|
||||
@@ -1031,10 +977,6 @@ void my_security_attr_free(SECURITY_ATTRIBUTES *sa);
|
||||
char* my_cgets(char *string, size_t clen, size_t* plen);
|
||||
|
||||
#endif
|
||||
#ifdef __NETWARE__
|
||||
void netware_reg_user(const char *ip, const char *user,
|
||||
const char *application);
|
||||
#endif
|
||||
|
||||
#include <mysql/psi/psi.h>
|
||||
|
||||
|
@@ -35,8 +35,6 @@ extern uchar days_in_month[];
|
||||
|
||||
Using the system built in time_t is not an option as
|
||||
we rely on the above requirements in the time functions
|
||||
|
||||
For example QNX has an unsigned time_t type
|
||||
*/
|
||||
typedef long my_time_t;
|
||||
|
||||
|
@@ -55,8 +55,6 @@ extern "C" {
|
||||
#define MI_MAX_MSG_BUF 1024 /* used in CHECK TABLE, REPAIR TABLE */
|
||||
#define MI_NAME_IEXT ".MYI"
|
||||
#define MI_NAME_DEXT ".MYD"
|
||||
/* Max extra space to use when sorting keys */
|
||||
#define MI_MAX_TEMP_LENGTH 2*1024L*1024L*1024L
|
||||
|
||||
/* Possible values for myisam_block_size (must be power of 2) */
|
||||
#define MI_KEY_BLOCK_LENGTH 1024 /* default key block length */
|
||||
|
@@ -79,10 +79,6 @@ extern char *mysql_unix_port;
|
||||
#define CLIENT_NET_READ_TIMEOUT 365*24*3600 /* Timeout on read */
|
||||
#define CLIENT_NET_WRITE_TIMEOUT 365*24*3600 /* Timeout on write */
|
||||
|
||||
#ifdef __NETWARE__
|
||||
#pragma pack(push, 8) /* 8 byte alignment */
|
||||
#endif
|
||||
|
||||
#define IS_PRI_KEY(n) ((n) & PRI_KEY_FLAG)
|
||||
#define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG)
|
||||
#define IS_BLOB(n) ((n) & BLOB_FLAG)
|
||||
@@ -746,10 +742,6 @@ int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB);
|
||||
(*(mysql)->methods->advanced_command)(mysql, command, 0, \
|
||||
0, arg, length, 1, stmt)
|
||||
|
||||
#ifdef __NETWARE__
|
||||
#pragma pack(pop) /* restore alignment */
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -233,10 +233,10 @@ extern void make_type(char *to,unsigned int nr,TYPELIB *typelib);
|
||||
extern const char *get_type(TYPELIB *typelib,unsigned int nr);
|
||||
extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from);
|
||||
extern TYPELIB sql_protocol_typelib;
|
||||
my_ulonglong find_set_from_flags(const TYPELIB *lib, uint default_name,
|
||||
my_ulonglong find_set_from_flags(const TYPELIB *lib, unsigned int default_name,
|
||||
my_ulonglong cur_set, my_ulonglong default_set,
|
||||
const char *str, uint length,
|
||||
char **err_pos, uint *err_len);
|
||||
const char *str, unsigned int length,
|
||||
char **err_pos, unsigned int *err_len);
|
||||
typedef struct st_mysql_rows {
|
||||
struct st_mysql_rows *next;
|
||||
MYSQL_ROW data;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2008-2009 Sun Microsystems, Inc
|
||||
/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
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
|
||||
@@ -10,8 +10,8 @@
|
||||
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 */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
|
||||
|
||||
#ifndef MYSQL_FILE_H
|
||||
#define MYSQL_FILE_H
|
||||
@@ -506,9 +506,10 @@ inline_mysql_file_fgets(
|
||||
char *result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server && file->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_stream_locker(file->m_psi,
|
||||
locker= PSI_server->get_thread_file_stream_locker(&state, file->m_psi,
|
||||
PSI_FILE_READ);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, (size_t) size, src_file, src_line);
|
||||
@@ -532,9 +533,10 @@ inline_mysql_file_fgetc(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server && file->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_stream_locker(file->m_psi,
|
||||
locker= PSI_server->get_thread_file_stream_locker(&state, file->m_psi,
|
||||
PSI_FILE_READ);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, (size_t) 1, src_file, src_line);
|
||||
@@ -558,10 +560,11 @@ inline_mysql_file_fputs(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
size_t bytes= 0;
|
||||
if (likely(PSI_server && file->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_stream_locker(file->m_psi,
|
||||
locker= PSI_server->get_thread_file_stream_locker(&state, file->m_psi,
|
||||
PSI_FILE_WRITE);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
@@ -588,9 +591,10 @@ inline_mysql_file_fputc(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server && file->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_stream_locker(file->m_psi,
|
||||
locker= PSI_server->get_thread_file_stream_locker(&state, file->m_psi,
|
||||
PSI_FILE_WRITE);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, (size_t) 1, src_file, src_line);
|
||||
@@ -614,9 +618,10 @@ inline_mysql_file_fprintf(MYSQL_FILE *file, const char *format, ...)
|
||||
va_list args;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server && file->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_stream_locker(file->m_psi,
|
||||
locker= PSI_server->get_thread_file_stream_locker(&state, file->m_psi,
|
||||
PSI_FILE_WRITE);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, (size_t) 0, __FILE__, __LINE__);
|
||||
@@ -642,9 +647,10 @@ inline_mysql_file_vfprintf(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server && file->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_stream_locker(file->m_psi,
|
||||
locker= PSI_server->get_thread_file_stream_locker(&state, file->m_psi,
|
||||
PSI_FILE_WRITE);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, (size_t) 0, src_file, src_line);
|
||||
@@ -668,9 +674,10 @@ inline_mysql_file_fflush(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server && file->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_stream_locker(file->m_psi,
|
||||
locker= PSI_server->get_thread_file_stream_locker(&state, file->m_psi,
|
||||
PSI_FILE_FLUSH);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, (size_t) 0, src_file, src_line);
|
||||
@@ -700,9 +707,10 @@ inline_mysql_file_fstat(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server != NULL))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_descriptor_locker(filenr,
|
||||
locker= PSI_server->get_thread_file_descriptor_locker(&state, filenr,
|
||||
PSI_FILE_FSTAT);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, (size_t) 0, src_file, src_line);
|
||||
@@ -726,9 +734,11 @@ inline_mysql_file_stat(
|
||||
MY_STAT *result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server != NULL))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_name_locker(key, PSI_FILE_STAT,
|
||||
locker= PSI_server->get_thread_file_name_locker(&state,
|
||||
key, PSI_FILE_STAT,
|
||||
path, &locker);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_open_wait(locker, src_file, src_line);
|
||||
@@ -752,9 +762,10 @@ inline_mysql_file_chsize(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server != NULL))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_descriptor_locker(file,
|
||||
locker= PSI_server->get_thread_file_descriptor_locker(&state, file,
|
||||
PSI_FILE_CHSIZE);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, (size_t) newlength, src_file,
|
||||
@@ -784,10 +795,11 @@ inline_mysql_file_fopen(
|
||||
{
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server != NULL))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_name_locker
|
||||
(key, PSI_FILE_STREAM_OPEN, filename, that);
|
||||
(&state, key, PSI_FILE_STREAM_OPEN, filename, that);
|
||||
if (likely(locker != NULL))
|
||||
that->m_psi= PSI_server->start_file_open_wait(locker, src_file,
|
||||
src_line);
|
||||
@@ -800,7 +812,7 @@ inline_mysql_file_fopen(
|
||||
#endif
|
||||
if (unlikely(that->m_file == NULL))
|
||||
{
|
||||
my_free(that, MYF(0));
|
||||
my_free(that);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -820,10 +832,11 @@ inline_mysql_file_fclose(
|
||||
{
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
DBUG_ASSERT(file != NULL);
|
||||
if (likely(PSI_server && file->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_stream_locker(file->m_psi,
|
||||
locker= PSI_server->get_thread_file_stream_locker(&state, file->m_psi,
|
||||
PSI_FILE_STREAM_CLOSE);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, (size_t) 0, src_file, src_line);
|
||||
@@ -834,7 +847,7 @@ inline_mysql_file_fclose(
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->end_file_wait(locker, (size_t) 0);
|
||||
#endif
|
||||
my_free(file, MYF(0));
|
||||
my_free(file);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -849,9 +862,10 @@ inline_mysql_file_fread(
|
||||
size_t result= 0;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server && file->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_stream_locker(file->m_psi,
|
||||
locker= PSI_server->get_thread_file_stream_locker(&state, file->m_psi,
|
||||
PSI_FILE_READ);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, count, src_file, src_line);
|
||||
@@ -882,9 +896,10 @@ inline_mysql_file_fwrite(
|
||||
size_t result= 0;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server && file->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_stream_locker(file->m_psi,
|
||||
locker= PSI_server->get_thread_file_stream_locker(&state, file->m_psi,
|
||||
PSI_FILE_WRITE);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, count, src_file, src_line);
|
||||
@@ -915,9 +930,10 @@ inline_mysql_file_fseek(
|
||||
my_off_t result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server && file->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_stream_locker(file->m_psi,
|
||||
locker= PSI_server->get_thread_file_stream_locker(&state, file->m_psi,
|
||||
PSI_FILE_SEEK);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, (size_t) 0, src_file, src_line);
|
||||
@@ -941,9 +957,10 @@ inline_mysql_file_ftell(
|
||||
my_off_t result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server && file->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_stream_locker(file->m_psi,
|
||||
locker= PSI_server->get_thread_file_stream_locker(&state, file->m_psi,
|
||||
PSI_FILE_TELL);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, (size_t) 0, src_file, src_line);
|
||||
@@ -967,9 +984,10 @@ inline_mysql_file_create(
|
||||
File file;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server != NULL))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_name_locker(key, PSI_FILE_CREATE,
|
||||
locker= PSI_server->get_thread_file_name_locker(&state, key, PSI_FILE_CREATE,
|
||||
filename, &locker);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_open_wait(locker, src_file, src_line);
|
||||
@@ -1014,9 +1032,10 @@ inline_mysql_file_open(
|
||||
File file;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server != NULL))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_name_locker(key, PSI_FILE_OPEN,
|
||||
locker= PSI_server->get_thread_file_name_locker(&state, key, PSI_FILE_OPEN,
|
||||
filename, &locker);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_open_wait(locker, src_file, src_line);
|
||||
@@ -1040,9 +1059,10 @@ inline_mysql_file_close(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server != NULL))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_descriptor_locker(file,
|
||||
locker= PSI_server->get_thread_file_descriptor_locker(&state, file,
|
||||
PSI_FILE_CLOSE);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, (size_t) 0, src_file, src_line);
|
||||
@@ -1066,9 +1086,10 @@ inline_mysql_file_read(
|
||||
size_t result= 0;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server != NULL))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_descriptor_locker(file,
|
||||
locker= PSI_server->get_thread_file_descriptor_locker(&state, file,
|
||||
PSI_FILE_READ);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, count, src_file, src_line);
|
||||
@@ -1099,9 +1120,10 @@ inline_mysql_file_write(
|
||||
size_t result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server != NULL))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_descriptor_locker(file,
|
||||
locker= PSI_server->get_thread_file_descriptor_locker(&state, file,
|
||||
PSI_FILE_WRITE);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, count, src_file, src_line);
|
||||
@@ -1132,9 +1154,10 @@ inline_mysql_file_pread(
|
||||
size_t result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server != NULL))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_descriptor_locker(file, PSI_FILE_READ);
|
||||
locker= PSI_server->get_thread_file_descriptor_locker(&state, file, PSI_FILE_READ);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, count, src_file, src_line);
|
||||
}
|
||||
@@ -1164,9 +1187,10 @@ inline_mysql_file_pwrite(
|
||||
size_t result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server != NULL))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_descriptor_locker(file,
|
||||
locker= PSI_server->get_thread_file_descriptor_locker(&state, file,
|
||||
PSI_FILE_WRITE);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, count, src_file, src_line);
|
||||
@@ -1197,9 +1221,10 @@ inline_mysql_file_seek(
|
||||
my_off_t result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server != NULL))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_descriptor_locker(file, PSI_FILE_SEEK);
|
||||
locker= PSI_server->get_thread_file_descriptor_locker(&state, file, PSI_FILE_SEEK);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, (size_t) 0, src_file, src_line);
|
||||
}
|
||||
@@ -1222,9 +1247,10 @@ inline_mysql_file_tell(
|
||||
my_off_t result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server != NULL))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_descriptor_locker(file, PSI_FILE_TELL);
|
||||
locker= PSI_server->get_thread_file_descriptor_locker(&state, file, PSI_FILE_TELL);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, (size_t) 0, src_file, src_line);
|
||||
}
|
||||
@@ -1247,9 +1273,10 @@ inline_mysql_file_delete(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server != NULL))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_name_locker(key, PSI_FILE_DELETE,
|
||||
locker= PSI_server->get_thread_file_name_locker(&state, key, PSI_FILE_DELETE,
|
||||
name, &locker);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, (size_t) 0, src_file, src_line);
|
||||
@@ -1273,9 +1300,10 @@ inline_mysql_file_rename(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server != NULL))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_name_locker(key, PSI_FILE_RENAME,
|
||||
locker= PSI_server->get_thread_file_name_locker(&state, key, PSI_FILE_RENAME,
|
||||
to, &locker);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, (size_t) 0, src_file, src_line);
|
||||
@@ -1300,9 +1328,10 @@ inline_mysql_file_create_with_symlink(
|
||||
File file;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server != NULL))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_name_locker(key, PSI_FILE_CREATE,
|
||||
locker= PSI_server->get_thread_file_name_locker(&state, key, PSI_FILE_CREATE,
|
||||
filename, &locker);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_open_wait(locker, src_file, src_line);
|
||||
@@ -1327,9 +1356,10 @@ inline_mysql_file_delete_with_symlink(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server != NULL))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_name_locker(key, PSI_FILE_DELETE,
|
||||
locker= PSI_server->get_thread_file_name_locker(&state, key, PSI_FILE_DELETE,
|
||||
name, &locker);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, (size_t) 0, src_file, src_line);
|
||||
@@ -1353,9 +1383,10 @@ inline_mysql_file_rename_with_symlink(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server != NULL))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_name_locker(key, PSI_FILE_RENAME,
|
||||
locker= PSI_server->get_thread_file_name_locker(&state, key, PSI_FILE_RENAME,
|
||||
to, &locker);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, (size_t) 0, src_file, src_line);
|
||||
@@ -1379,9 +1410,10 @@ inline_mysql_file_sync(
|
||||
int result= 0;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_file_locker *locker= NULL;
|
||||
PSI_file_locker_state state;
|
||||
if (likely(PSI_server != NULL))
|
||||
{
|
||||
locker= PSI_server->get_thread_file_descriptor_locker(fd, PSI_FILE_SYNC);
|
||||
locker= PSI_server->get_thread_file_descriptor_locker(&state, fd, PSI_FILE_SYNC);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_file_wait(locker, (size_t) 0, src_file, src_line);
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2008-2009 Sun Microsystems, Inc
|
||||
/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
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
|
||||
@@ -10,8 +10,8 @@
|
||||
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 */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
|
||||
|
||||
#ifndef MYSQL_THREAD_H
|
||||
#define MYSQL_THREAD_H
|
||||
@@ -625,9 +625,10 @@ static inline int inline_mysql_mutex_lock(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_mutex_locker *locker= NULL;
|
||||
PSI_mutex_locker_state state;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_mutex_locker(that->m_psi, PSI_MUTEX_LOCK);
|
||||
locker= PSI_server->get_thread_mutex_locker(&state, that->m_psi, PSI_MUTEX_LOCK);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_mutex_wait(locker, src_file, src_line);
|
||||
}
|
||||
@@ -654,9 +655,10 @@ static inline int inline_mysql_mutex_trylock(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_mutex_locker *locker= NULL;
|
||||
PSI_mutex_locker_state state;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_mutex_locker(that->m_psi, PSI_MUTEX_TRYLOCK);
|
||||
locker= PSI_server->get_thread_mutex_locker(&state, that->m_psi, PSI_MUTEX_TRYLOCK);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_mutex_wait(locker, src_file, src_line);
|
||||
}
|
||||
@@ -682,13 +684,8 @@ static inline int inline_mysql_mutex_unlock(
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_thread *thread;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
thread= PSI_server->get_thread();
|
||||
if (likely(thread != NULL))
|
||||
PSI_server->unlock_mutex(thread, that->m_psi);
|
||||
}
|
||||
PSI_server->unlock_mutex(that->m_psi);
|
||||
#endif
|
||||
#ifdef SAFE_MUTEX
|
||||
result= safe_mutex_unlock(&that->m_mutex, src_file, src_line);
|
||||
@@ -771,9 +768,10 @@ static inline int inline_mysql_rwlock_rdlock(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_rwlock_locker *locker= NULL;
|
||||
PSI_rwlock_locker_state state;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_rwlock_locker(that->m_psi,
|
||||
locker= PSI_server->get_thread_rwlock_locker(&state, that->m_psi,
|
||||
PSI_RWLOCK_READLOCK);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_rwlock_rdwait(locker, src_file, src_line);
|
||||
@@ -798,9 +796,10 @@ static inline int inline_mysql_prlock_rdlock(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_rwlock_locker *locker= NULL;
|
||||
PSI_rwlock_locker_state state;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_rwlock_locker(that->m_psi,
|
||||
locker= PSI_server->get_thread_rwlock_locker(&state, that->m_psi,
|
||||
PSI_RWLOCK_READLOCK);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_rwlock_rdwait(locker, src_file, src_line);
|
||||
@@ -825,9 +824,10 @@ static inline int inline_mysql_rwlock_wrlock(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_rwlock_locker *locker= NULL;
|
||||
PSI_rwlock_locker_state state;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_rwlock_locker(that->m_psi,
|
||||
locker= PSI_server->get_thread_rwlock_locker(&state, that->m_psi,
|
||||
PSI_RWLOCK_WRITELOCK);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_rwlock_wrwait(locker, src_file, src_line);
|
||||
@@ -852,9 +852,10 @@ static inline int inline_mysql_prlock_wrlock(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_rwlock_locker *locker= NULL;
|
||||
PSI_rwlock_locker_state state;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_rwlock_locker(that->m_psi,
|
||||
locker= PSI_server->get_thread_rwlock_locker(&state, that->m_psi,
|
||||
PSI_RWLOCK_WRITELOCK);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_rwlock_wrwait(locker, src_file, src_line);
|
||||
@@ -879,9 +880,10 @@ static inline int inline_mysql_rwlock_tryrdlock(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_rwlock_locker *locker= NULL;
|
||||
PSI_rwlock_locker_state state;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_rwlock_locker(that->m_psi,
|
||||
locker= PSI_server->get_thread_rwlock_locker(&state, that->m_psi,
|
||||
PSI_RWLOCK_TRYREADLOCK);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_rwlock_rdwait(locker, src_file, src_line);
|
||||
@@ -906,9 +908,10 @@ static inline int inline_mysql_prlock_tryrdlock(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_rwlock_locker *locker= NULL;
|
||||
PSI_rwlock_locker_state state;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_rwlock_locker(that->m_psi,
|
||||
locker= PSI_server->get_thread_rwlock_locker(&state, that->m_psi,
|
||||
PSI_RWLOCK_TRYREADLOCK);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_rwlock_rdwait(locker, src_file, src_line);
|
||||
@@ -933,9 +936,10 @@ static inline int inline_mysql_rwlock_trywrlock(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_rwlock_locker *locker= NULL;
|
||||
PSI_rwlock_locker_state state;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_rwlock_locker(that->m_psi,
|
||||
locker= PSI_server->get_thread_rwlock_locker(&state, that->m_psi,
|
||||
PSI_RWLOCK_TRYWRITELOCK);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_rwlock_wrwait(locker, src_file, src_line);
|
||||
@@ -960,9 +964,10 @@ static inline int inline_mysql_prlock_trywrlock(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_rwlock_locker *locker= NULL;
|
||||
PSI_rwlock_locker_state state;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_rwlock_locker(that->m_psi,
|
||||
locker= PSI_server->get_thread_rwlock_locker(&state, that->m_psi,
|
||||
PSI_RWLOCK_TRYWRITELOCK);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_rwlock_wrwait(locker, src_file, src_line);
|
||||
@@ -982,13 +987,8 @@ static inline int inline_mysql_rwlock_unlock(
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_thread *thread;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
thread= PSI_server->get_thread();
|
||||
if (likely(thread != NULL))
|
||||
PSI_server->unlock_rwlock(thread, that->m_psi);
|
||||
}
|
||||
PSI_server->unlock_rwlock(that->m_psi);
|
||||
#endif
|
||||
result= rw_unlock(&that->m_rwlock);
|
||||
return result;
|
||||
@@ -1000,13 +1000,8 @@ static inline int inline_mysql_prlock_unlock(
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_thread *thread;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
thread= PSI_server->get_thread();
|
||||
if (likely(thread != NULL))
|
||||
PSI_server->unlock_rwlock(thread, that->m_psi);
|
||||
}
|
||||
PSI_server->unlock_rwlock(that->m_psi);
|
||||
#endif
|
||||
result= rw_pr_unlock(&that->m_prlock);
|
||||
return result;
|
||||
@@ -1053,9 +1048,10 @@ static inline int inline_mysql_cond_wait(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_cond_locker *locker= NULL;
|
||||
PSI_cond_locker_state state;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_cond_locker(that->m_psi, mutex->m_psi,
|
||||
locker= PSI_server->get_thread_cond_locker(&state, that->m_psi, mutex->m_psi,
|
||||
PSI_COND_WAIT);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_cond_wait(locker, src_file, src_line);
|
||||
@@ -1081,9 +1077,10 @@ static inline int inline_mysql_cond_timedwait(
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_cond_locker *locker= NULL;
|
||||
PSI_cond_locker_state state;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_cond_locker(that->m_psi, mutex->m_psi,
|
||||
locker= PSI_server->get_thread_cond_locker(&state, that->m_psi, mutex->m_psi,
|
||||
PSI_COND_TIMEDWAIT);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_cond_wait(locker, src_file, src_line);
|
||||
@@ -1102,13 +1099,8 @@ static inline int inline_mysql_cond_signal(
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_thread *thread;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
thread= PSI_server->get_thread();
|
||||
if (likely(thread != NULL))
|
||||
PSI_server->signal_cond(thread, that->m_psi);
|
||||
}
|
||||
PSI_server->signal_cond(that->m_psi);
|
||||
#endif
|
||||
result= pthread_cond_signal(&that->m_cond);
|
||||
return result;
|
||||
@@ -1119,13 +1111,8 @@ static inline int inline_mysql_cond_broadcast(
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_thread *thread;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
thread= PSI_server->get_thread();
|
||||
if (likely(thread != NULL))
|
||||
PSI_server->broadcast_cond(thread, that->m_psi);
|
||||
}
|
||||
PSI_server->broadcast_cond(that->m_psi);
|
||||
#endif
|
||||
result= pthread_cond_broadcast(&that->m_cond);
|
||||
return result;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2008-2010 Sun Microsystems, Inc
|
||||
/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
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
|
||||
@@ -10,8 +10,8 @@
|
||||
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 */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
|
||||
|
||||
#ifndef MYSQL_PERFORMANCE_SCHEMA_INTERFACE_H
|
||||
#define MYSQL_PERFORMANCE_SCHEMA_INTERFACE_H
|
||||
@@ -422,6 +422,175 @@ struct PSI_file_info_v1
|
||||
int m_flags;
|
||||
};
|
||||
|
||||
/**
|
||||
State data storage for @c get_thread_mutex_locker_v1_t.
|
||||
This structure provide temporary storage to a mutex locker.
|
||||
The content of this structure is considered opaque,
|
||||
the fields are only hints of what an implementation
|
||||
of the psi interface can use.
|
||||
This memory is provided by the instrumented code for performance reasons.
|
||||
@sa get_thread_mutex_locker_v1_t
|
||||
*/
|
||||
struct PSI_mutex_locker_state_v1
|
||||
{
|
||||
/** Internal state. */
|
||||
uint m_flags;
|
||||
/** Current mutex. */
|
||||
struct PSI_mutex *m_mutex;
|
||||
/** Current thread. */
|
||||
struct PSI_thread *m_thread;
|
||||
/** Timer start. */
|
||||
ulonglong m_timer_start;
|
||||
/** Timer function. */
|
||||
ulonglong (*m_timer)(void);
|
||||
/** Current operation. */
|
||||
enum PSI_mutex_operation m_operation;
|
||||
/** Source file. */
|
||||
const char* m_src_file;
|
||||
/** Source line number. */
|
||||
int m_src_line;
|
||||
/** Internal data. */
|
||||
void *m_wait;
|
||||
};
|
||||
|
||||
/**
|
||||
State data storage for @c get_thread_rwlock_locker_v1_t.
|
||||
This structure provide temporary storage to a rwlock locker.
|
||||
The content of this structure is considered opaque,
|
||||
the fields are only hints of what an implementation
|
||||
of the psi interface can use.
|
||||
This memory is provided by the instrumented code for performance reasons.
|
||||
@sa get_thread_rwlock_locker_v1_t
|
||||
*/
|
||||
struct PSI_rwlock_locker_state_v1
|
||||
{
|
||||
/** Internal state. */
|
||||
uint m_flags;
|
||||
/** Current rwlock. */
|
||||
struct PSI_rwlock *m_rwlock;
|
||||
/** Current thread. */
|
||||
struct PSI_thread *m_thread;
|
||||
/** Timer start. */
|
||||
ulonglong m_timer_start;
|
||||
/** Timer function. */
|
||||
ulonglong (*m_timer)(void);
|
||||
/** Current operation. */
|
||||
enum PSI_rwlock_operation m_operation;
|
||||
/** Source file. */
|
||||
const char* m_src_file;
|
||||
/** Source line number. */
|
||||
int m_src_line;
|
||||
/** Internal data. */
|
||||
void *m_wait;
|
||||
};
|
||||
|
||||
/**
|
||||
State data storage for @c get_thread_cond_locker_v1_t.
|
||||
This structure provide temporary storage to a condition locker.
|
||||
The content of this structure is considered opaque,
|
||||
the fields are only hints of what an implementation
|
||||
of the psi interface can use.
|
||||
This memory is provided by the instrumented code for performance reasons.
|
||||
@sa get_thread_cond_locker_v1_t
|
||||
*/
|
||||
struct PSI_cond_locker_state_v1
|
||||
{
|
||||
/** Internal state. */
|
||||
uint m_flags;
|
||||
/** Current condition. */
|
||||
struct PSI_cond *m_cond;
|
||||
/** Current mutex. */
|
||||
struct PSI_mutex *m_mutex;
|
||||
/** Current thread. */
|
||||
struct PSI_thread *m_thread;
|
||||
/** Timer start. */
|
||||
ulonglong m_timer_start;
|
||||
/** Timer function. */
|
||||
ulonglong (*m_timer)(void);
|
||||
/** Current operation. */
|
||||
enum PSI_cond_operation m_operation;
|
||||
/** Source file. */
|
||||
const char* m_src_file;
|
||||
/** Source line number. */
|
||||
int m_src_line;
|
||||
/** Internal data. */
|
||||
void *m_wait;
|
||||
};
|
||||
|
||||
/**
|
||||
State data storage for @c get_thread_file_name_locker_v1_t.
|
||||
This structure provide temporary storage to a file locker.
|
||||
The content of this structure is considered opaque,
|
||||
the fields are only hints of what an implementation
|
||||
of the psi interface can use.
|
||||
This memory is provided by the instrumented code for performance reasons.
|
||||
@sa get_thread_file_name_locker_v1_t
|
||||
@sa get_thread_file_stream_locker_v1_t
|
||||
@sa get_thread_file_descriptor_locker_v1_t
|
||||
*/
|
||||
struct PSI_file_locker_state_v1
|
||||
{
|
||||
/** Internal state. */
|
||||
uint m_flags;
|
||||
/** Current file. */
|
||||
struct PSI_file *m_file;
|
||||
/** Current thread. */
|
||||
struct PSI_thread *m_thread;
|
||||
/** Operation number of bytes. */
|
||||
size_t m_number_of_bytes;
|
||||
/** Timer start. */
|
||||
ulonglong m_timer_start;
|
||||
/** Timer function. */
|
||||
ulonglong (*m_timer)(void);
|
||||
/** Current operation. */
|
||||
enum PSI_file_operation m_operation;
|
||||
/** Source file. */
|
||||
const char* m_src_file;
|
||||
/** Source line number. */
|
||||
int m_src_line;
|
||||
/** Internal data. */
|
||||
void *m_wait;
|
||||
};
|
||||
|
||||
/**
|
||||
State data storage for @c get_thread_table_locker_v1_t.
|
||||
This structure provide temporary storage to a table locker.
|
||||
The content of this structure is considered opaque,
|
||||
the fields are only hints of what an implementation
|
||||
of the psi interface can use.
|
||||
This memory is provided by the instrumented code for performance reasons.
|
||||
@sa get_thread_table_locker_v1_t
|
||||
*/
|
||||
struct PSI_table_locker_state_v1
|
||||
{
|
||||
/** Internal state. */
|
||||
uint m_flags;
|
||||
/** Current table handle. */
|
||||
struct PSI_table *m_table;
|
||||
/** Current table share. */
|
||||
struct PSI_table_share *m_table_share;
|
||||
/** Instrumentation class. */
|
||||
void *m_class;
|
||||
/** Current thread. */
|
||||
struct PSI_thread *m_thread;
|
||||
/** Timer start. */
|
||||
ulonglong m_timer_start;
|
||||
/** Timer function. */
|
||||
ulonglong (*m_timer)(void);
|
||||
/* Current operation (waiting for WL#4895). */
|
||||
/* enum PSI_table_operation m_operation; */
|
||||
/** Current table io index. */
|
||||
uint m_index;
|
||||
/** Current table lock index. */
|
||||
uint m_lock_index;
|
||||
/** Source file. */
|
||||
const char* m_src_file;
|
||||
/** Source line number. */
|
||||
int m_src_line;
|
||||
/** Internal data. */
|
||||
void *m_wait;
|
||||
};
|
||||
|
||||
/* Using typedef to make reuse between PSI_v1 and PSI_v2 easier later. */
|
||||
|
||||
/**
|
||||
@@ -619,40 +788,51 @@ typedef void (*delete_thread_v1_t)(struct PSI_thread *thread);
|
||||
|
||||
/**
|
||||
Get a mutex instrumentation locker.
|
||||
@param state data storage for the locker
|
||||
@param mutex the instrumented mutex to lock
|
||||
@return a mutex locker, or NULL
|
||||
*/
|
||||
typedef struct PSI_mutex_locker* (*get_thread_mutex_locker_v1_t)
|
||||
(struct PSI_mutex *mutex, enum PSI_mutex_operation op);
|
||||
(struct PSI_mutex_locker_state_v1 *state,
|
||||
struct PSI_mutex *mutex,
|
||||
enum PSI_mutex_operation op);
|
||||
|
||||
/**
|
||||
Get a rwlock instrumentation locker.
|
||||
@param state data storage for the locker
|
||||
@param rwlock the instrumented rwlock to lock
|
||||
@return a rwlock locker, or NULL
|
||||
*/
|
||||
typedef struct PSI_rwlock_locker* (*get_thread_rwlock_locker_v1_t)
|
||||
(struct PSI_rwlock *rwlock, enum PSI_rwlock_operation op);
|
||||
(struct PSI_rwlock_locker_state_v1 *state,
|
||||
struct PSI_rwlock *rwlock,
|
||||
enum PSI_rwlock_operation op);
|
||||
|
||||
/**
|
||||
Get a cond instrumentation locker.
|
||||
@param state data storage for the locker
|
||||
@param cond the instrumented condition to wait on
|
||||
@param mutex the instrumented mutex associated with the condition
|
||||
@return a condition locker, or NULL
|
||||
*/
|
||||
typedef struct PSI_cond_locker* (*get_thread_cond_locker_v1_t)
|
||||
(struct PSI_cond *cond, struct PSI_mutex *mutex,
|
||||
(struct PSI_cond_locker_state_v1 *state,
|
||||
struct PSI_cond *cond, struct PSI_mutex *mutex,
|
||||
enum PSI_cond_operation op);
|
||||
|
||||
/**
|
||||
Get a table instrumentation locker.
|
||||
@param state data storage for the locker
|
||||
@param table the instrumented table to lock
|
||||
@return a table locker, or NULL
|
||||
*/
|
||||
typedef struct PSI_table_locker* (*get_thread_table_locker_v1_t)
|
||||
(struct PSI_table *table);
|
||||
(struct PSI_table_locker_state_v1 *state,
|
||||
struct PSI_table *table);
|
||||
|
||||
/**
|
||||
Get a file instrumentation locker, for opening or creating a file.
|
||||
@param state data storage for the locker
|
||||
@param key the file instrumentation key
|
||||
@param op the operation to perform
|
||||
@param name the file name
|
||||
@@ -660,58 +840,59 @@ typedef struct PSI_table_locker* (*get_thread_table_locker_v1_t)
|
||||
@return a file locker, or NULL
|
||||
*/
|
||||
typedef struct PSI_file_locker* (*get_thread_file_name_locker_v1_t)
|
||||
(PSI_file_key key, enum PSI_file_operation op, const char *name,
|
||||
(struct PSI_file_locker_state_v1 *state,
|
||||
PSI_file_key key, enum PSI_file_operation op, const char *name,
|
||||
const void *identity);
|
||||
|
||||
/**
|
||||
Get a file stream instrumentation locker.
|
||||
@param state data storage for the locker
|
||||
@param file the file stream to access
|
||||
@param op the operation to perform
|
||||
@return a file locker, or NULL
|
||||
*/
|
||||
typedef struct PSI_file_locker* (*get_thread_file_stream_locker_v1_t)
|
||||
(struct PSI_file *file, enum PSI_file_operation op);
|
||||
(struct PSI_file_locker_state_v1 *state,
|
||||
struct PSI_file *file, enum PSI_file_operation op);
|
||||
|
||||
/**
|
||||
Get a file instrumentation locker.
|
||||
@param state data storage for the locker
|
||||
@param file the file descriptor to access
|
||||
@param op the operation to perform
|
||||
@return a file locker, or NULL
|
||||
*/
|
||||
typedef struct PSI_file_locker* (*get_thread_file_descriptor_locker_v1_t)
|
||||
(File file, enum PSI_file_operation op);
|
||||
(struct PSI_file_locker_state_v1 *state,
|
||||
File file, enum PSI_file_operation op);
|
||||
|
||||
/**
|
||||
Record a mutex instrumentation unlock event.
|
||||
@param thread the running thread instrumentation
|
||||
@param mutex the mutex instrumentation
|
||||
*/
|
||||
typedef void (*unlock_mutex_v1_t)
|
||||
(struct PSI_thread *thread, struct PSI_mutex *mutex);
|
||||
(struct PSI_mutex *mutex);
|
||||
|
||||
/**
|
||||
Record a rwlock instrumentation unlock event.
|
||||
@param thread the running thread instrumentation
|
||||
@param rwlock the rwlock instrumentation
|
||||
*/
|
||||
typedef void (*unlock_rwlock_v1_t)
|
||||
(struct PSI_thread *thread, struct PSI_rwlock *rwlock);
|
||||
(struct PSI_rwlock *rwlock);
|
||||
|
||||
/**
|
||||
Record a condition instrumentation signal event.
|
||||
@param thread the running thread instrumentation
|
||||
@param cond the cond instrumentation
|
||||
*/
|
||||
typedef void (*signal_cond_v1_t)
|
||||
(struct PSI_thread *thread, struct PSI_cond *cond);
|
||||
(struct PSI_cond *cond);
|
||||
|
||||
/**
|
||||
Record a condition instrumentation broadcast event.
|
||||
@param thread the running thread instrumentation
|
||||
@param cond the cond instrumentation
|
||||
*/
|
||||
typedef void (*broadcast_cond_v1_t)
|
||||
(struct PSI_thread *thread, struct PSI_cond *cond);
|
||||
(struct PSI_cond *cond);
|
||||
|
||||
/**
|
||||
Record a mutex instrumentation wait start event.
|
||||
@@ -1013,6 +1194,36 @@ struct PSI_file_info_v2
|
||||
int placeholder;
|
||||
};
|
||||
|
||||
struct PSI_mutex_locker_state_v2
|
||||
{
|
||||
/** Placeholder */
|
||||
int placeholder;
|
||||
};
|
||||
|
||||
struct PSI_rwlock_locker_state_v2
|
||||
{
|
||||
/** Placeholder */
|
||||
int placeholder;
|
||||
};
|
||||
|
||||
struct PSI_cond_locker_state_v2
|
||||
{
|
||||
/** Placeholder */
|
||||
int placeholder;
|
||||
};
|
||||
|
||||
struct PSI_file_locker_state_v2
|
||||
{
|
||||
/** Placeholder */
|
||||
int placeholder;
|
||||
};
|
||||
|
||||
struct PSI_table_locker_state_v2
|
||||
{
|
||||
/** Placeholder */
|
||||
int placeholder;
|
||||
};
|
||||
|
||||
/** @} (end of group Group_PSI_v2) */
|
||||
|
||||
#endif /* HAVE_PSI_2 */
|
||||
@@ -1056,6 +1267,11 @@ typedef struct PSI_rwlock_info_v1 PSI_rwlock_info;
|
||||
typedef struct PSI_cond_info_v1 PSI_cond_info;
|
||||
typedef struct PSI_thread_info_v1 PSI_thread_info;
|
||||
typedef struct PSI_file_info_v1 PSI_file_info;
|
||||
typedef struct PSI_mutex_locker_state_v1 PSI_mutex_locker_state;
|
||||
typedef struct PSI_rwlock_locker_state_v1 PSI_rwlock_locker_state;
|
||||
typedef struct PSI_cond_locker_state_v1 PSI_cond_locker_state;
|
||||
typedef struct PSI_file_locker_state_v1 PSI_file_locker_state;
|
||||
typedef struct PSI_table_locker_state_v1 PSI_table_locker_state;
|
||||
#endif
|
||||
|
||||
#ifdef USE_PSI_2
|
||||
@@ -1065,6 +1281,11 @@ typedef struct PSI_rwlock_info_v2 PSI_rwlock_info;
|
||||
typedef struct PSI_cond_info_v2 PSI_cond_info;
|
||||
typedef struct PSI_thread_info_v2 PSI_thread_info;
|
||||
typedef struct PSI_file_info_v2 PSI_file_info;
|
||||
typedef struct PSI_mutex_locker_state_v2 PSI_mutex_locker_state;
|
||||
typedef struct PSI_rwlock_locker_state_v2 PSI_rwlock_locker_state;
|
||||
typedef struct PSI_cond_locker_state_v2 PSI_cond_locker_state;
|
||||
typedef struct PSI_file_locker_state_v2 PSI_file_locker_state;
|
||||
typedef struct PSI_table_locker_state_v2 PSI_table_locker_state;
|
||||
#endif
|
||||
|
||||
#else /* HAVE_PSI_INTERFACE */
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2008-2009 Sun Microsystems, Inc
|
||||
/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
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
|
||||
@@ -10,8 +10,8 @@
|
||||
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 */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
|
||||
|
||||
/**
|
||||
@file mysql/psi/psi_abi_v1.h
|
||||
|
@@ -88,6 +88,71 @@ struct PSI_file_info_v1
|
||||
const char *m_name;
|
||||
int m_flags;
|
||||
};
|
||||
struct PSI_mutex_locker_state_v1
|
||||
{
|
||||
uint m_flags;
|
||||
struct PSI_mutex *m_mutex;
|
||||
struct PSI_thread *m_thread;
|
||||
ulonglong m_timer_start;
|
||||
ulonglong (*m_timer)(void);
|
||||
enum PSI_mutex_operation m_operation;
|
||||
const char* m_src_file;
|
||||
int m_src_line;
|
||||
void *m_wait;
|
||||
};
|
||||
struct PSI_rwlock_locker_state_v1
|
||||
{
|
||||
uint m_flags;
|
||||
struct PSI_rwlock *m_rwlock;
|
||||
struct PSI_thread *m_thread;
|
||||
ulonglong m_timer_start;
|
||||
ulonglong (*m_timer)(void);
|
||||
enum PSI_rwlock_operation m_operation;
|
||||
const char* m_src_file;
|
||||
int m_src_line;
|
||||
void *m_wait;
|
||||
};
|
||||
struct PSI_cond_locker_state_v1
|
||||
{
|
||||
uint m_flags;
|
||||
struct PSI_cond *m_cond;
|
||||
struct PSI_mutex *m_mutex;
|
||||
struct PSI_thread *m_thread;
|
||||
ulonglong m_timer_start;
|
||||
ulonglong (*m_timer)(void);
|
||||
enum PSI_cond_operation m_operation;
|
||||
const char* m_src_file;
|
||||
int m_src_line;
|
||||
void *m_wait;
|
||||
};
|
||||
struct PSI_file_locker_state_v1
|
||||
{
|
||||
uint m_flags;
|
||||
struct PSI_file *m_file;
|
||||
struct PSI_thread *m_thread;
|
||||
size_t m_number_of_bytes;
|
||||
ulonglong m_timer_start;
|
||||
ulonglong (*m_timer)(void);
|
||||
enum PSI_file_operation m_operation;
|
||||
const char* m_src_file;
|
||||
int m_src_line;
|
||||
void *m_wait;
|
||||
};
|
||||
struct PSI_table_locker_state_v1
|
||||
{
|
||||
uint m_flags;
|
||||
struct PSI_table *m_table;
|
||||
struct PSI_table_share *m_table_share;
|
||||
void *m_class;
|
||||
struct PSI_thread *m_thread;
|
||||
ulonglong m_timer_start;
|
||||
ulonglong (*m_timer)(void);
|
||||
uint m_index;
|
||||
uint m_lock_index;
|
||||
const char* m_src_file;
|
||||
int m_src_line;
|
||||
void *m_wait;
|
||||
};
|
||||
typedef void (*register_mutex_v1_t)
|
||||
(const char *category, struct PSI_mutex_info_v1 *info, int count);
|
||||
typedef void (*register_rwlock_v1_t)
|
||||
@@ -129,29 +194,38 @@ typedef void (*set_thread_v1_t)(struct PSI_thread *thread);
|
||||
typedef void (*delete_current_thread_v1_t)(void);
|
||||
typedef void (*delete_thread_v1_t)(struct PSI_thread *thread);
|
||||
typedef struct PSI_mutex_locker* (*get_thread_mutex_locker_v1_t)
|
||||
(struct PSI_mutex *mutex, enum PSI_mutex_operation op);
|
||||
(struct PSI_mutex_locker_state_v1 *state,
|
||||
struct PSI_mutex *mutex,
|
||||
enum PSI_mutex_operation op);
|
||||
typedef struct PSI_rwlock_locker* (*get_thread_rwlock_locker_v1_t)
|
||||
(struct PSI_rwlock *rwlock, enum PSI_rwlock_operation op);
|
||||
(struct PSI_rwlock_locker_state_v1 *state,
|
||||
struct PSI_rwlock *rwlock,
|
||||
enum PSI_rwlock_operation op);
|
||||
typedef struct PSI_cond_locker* (*get_thread_cond_locker_v1_t)
|
||||
(struct PSI_cond *cond, struct PSI_mutex *mutex,
|
||||
(struct PSI_cond_locker_state_v1 *state,
|
||||
struct PSI_cond *cond, struct PSI_mutex *mutex,
|
||||
enum PSI_cond_operation op);
|
||||
typedef struct PSI_table_locker* (*get_thread_table_locker_v1_t)
|
||||
(struct PSI_table *table);
|
||||
(struct PSI_table_locker_state_v1 *state,
|
||||
struct PSI_table *table);
|
||||
typedef struct PSI_file_locker* (*get_thread_file_name_locker_v1_t)
|
||||
(PSI_file_key key, enum PSI_file_operation op, const char *name,
|
||||
(struct PSI_file_locker_state_v1 *state,
|
||||
PSI_file_key key, enum PSI_file_operation op, const char *name,
|
||||
const void *identity);
|
||||
typedef struct PSI_file_locker* (*get_thread_file_stream_locker_v1_t)
|
||||
(struct PSI_file *file, enum PSI_file_operation op);
|
||||
(struct PSI_file_locker_state_v1 *state,
|
||||
struct PSI_file *file, enum PSI_file_operation op);
|
||||
typedef struct PSI_file_locker* (*get_thread_file_descriptor_locker_v1_t)
|
||||
(File file, enum PSI_file_operation op);
|
||||
(struct PSI_file_locker_state_v1 *state,
|
||||
File file, enum PSI_file_operation op);
|
||||
typedef void (*unlock_mutex_v1_t)
|
||||
(struct PSI_thread *thread, struct PSI_mutex *mutex);
|
||||
(struct PSI_mutex *mutex);
|
||||
typedef void (*unlock_rwlock_v1_t)
|
||||
(struct PSI_thread *thread, struct PSI_rwlock *rwlock);
|
||||
(struct PSI_rwlock *rwlock);
|
||||
typedef void (*signal_cond_v1_t)
|
||||
(struct PSI_thread *thread, struct PSI_cond *cond);
|
||||
(struct PSI_cond *cond);
|
||||
typedef void (*broadcast_cond_v1_t)
|
||||
(struct PSI_thread *thread, struct PSI_cond *cond);
|
||||
(struct PSI_cond *cond);
|
||||
typedef void (*start_mutex_wait_v1_t)
|
||||
(struct PSI_mutex_locker *locker, const char *src_file, uint src_line);
|
||||
typedef void (*end_mutex_wait_v1_t)
|
||||
@@ -240,5 +314,10 @@ typedef struct PSI_rwlock_info_v1 PSI_rwlock_info;
|
||||
typedef struct PSI_cond_info_v1 PSI_cond_info;
|
||||
typedef struct PSI_thread_info_v1 PSI_thread_info;
|
||||
typedef struct PSI_file_info_v1 PSI_file_info;
|
||||
typedef struct PSI_mutex_locker_state_v1 PSI_mutex_locker_state;
|
||||
typedef struct PSI_rwlock_locker_state_v1 PSI_rwlock_locker_state;
|
||||
typedef struct PSI_cond_locker_state_v1 PSI_cond_locker_state;
|
||||
typedef struct PSI_file_locker_state_v1 PSI_file_locker_state;
|
||||
typedef struct PSI_table_locker_state_v1 PSI_table_locker_state;
|
||||
extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;
|
||||
C_MODE_END
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2008-2009 Sun Microsystems, Inc
|
||||
/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
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
|
||||
@@ -10,8 +10,8 @@
|
||||
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 */
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
|
||||
|
||||
/**
|
||||
@file mysql/psi/psi_abi_v1.h
|
||||
|
@@ -82,11 +82,36 @@ struct PSI_file_info_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
struct PSI_mutex_locker_state_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
struct PSI_rwlock_locker_state_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
struct PSI_cond_locker_state_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
struct PSI_file_locker_state_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
struct PSI_table_locker_state_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
typedef struct PSI_v2 PSI;
|
||||
typedef struct PSI_mutex_info_v2 PSI_mutex_info;
|
||||
typedef struct PSI_rwlock_info_v2 PSI_rwlock_info;
|
||||
typedef struct PSI_cond_info_v2 PSI_cond_info;
|
||||
typedef struct PSI_thread_info_v2 PSI_thread_info;
|
||||
typedef struct PSI_file_info_v2 PSI_file_info;
|
||||
typedef struct PSI_mutex_locker_state_v2 PSI_mutex_locker_state;
|
||||
typedef struct PSI_rwlock_locker_state_v2 PSI_rwlock_locker_state;
|
||||
typedef struct PSI_cond_locker_state_v2 PSI_cond_locker_state;
|
||||
typedef struct PSI_file_locker_state_v2 PSI_file_locker_state;
|
||||
typedef struct PSI_table_locker_state_v2 PSI_table_locker_state;
|
||||
extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;
|
||||
C_MODE_END
|
||||
|
@@ -15,17 +15,15 @@
|
||||
|
||||
#ifndef _mysys_err_h
|
||||
#define _mysys_err_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include "my_global.h" /* NEAR */
|
||||
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define GLOBERRS (EE_ERROR_LAST - EE_ERROR_FIRST + 1) /* Nr of global errors */
|
||||
#define EE(X) (globerrs[(X) - EE_ERROR_FIRST])
|
||||
|
||||
extern const char * NEAR globerrs[]; /* my_error_messages is here */
|
||||
extern const char *globerrs[]; /* my_error_messages is here */
|
||||
|
||||
/* Error message numbers in global map */
|
||||
/*
|
||||
|
@@ -36,9 +36,9 @@ extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from);
|
||||
|
||||
extern TYPELIB sql_protocol_typelib;
|
||||
|
||||
my_ulonglong find_set_from_flags(const TYPELIB *lib, uint default_name,
|
||||
my_ulonglong find_set_from_flags(const TYPELIB *lib, unsigned int default_name,
|
||||
my_ulonglong cur_set, my_ulonglong default_set,
|
||||
const char *str, uint length,
|
||||
char **err_pos, uint *err_len);
|
||||
const char *str, unsigned int length,
|
||||
char **err_pos, unsigned int *err_len);
|
||||
|
||||
#endif /* _typelib_h */
|
||||
|
0
libmysql/CMakeLists.txt
Executable file → Normal file
0
libmysql/CMakeLists.txt
Executable file → Normal file
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user