mirror of
https://github.com/MariaDB/server.git
synced 2025-01-26 08:44:33 +01:00
Merge of mysql-trunk-bugfixing into mysql-trunk-merge.
This commit is contained in:
commit
711c318c07
488 changed files with 12061 additions and 12284 deletions
.bzr-mysql
BUILD
CMakeLists.txtMakefile.amclient
client_priv.hcompletion_hash.ccmysql.ccmysql_upgrade.cmysqladmin.ccmysqlbinlog.ccmysqlcheck.cmysqldump.cmysqlimport.cmysqlshow.cmysqlslap.cmysqltest.ccreadline.ccsql_string.h
cmake
config/ac-macros
configure.indbug
extra
include
Makefile.amconfig-netware.hconfig-win.hhash.hhelp_end.hhelp_start.hlf.hm_string.hmy_dbug.hmy_global.hmy_list.hmy_net.hmy_nosys.hmy_pthread.hmy_stacktrace.hmy_sys.hmy_time.hmysql.hmysql.h.pp
mysql/psi
mysys_err.htypelib.hlibmysql
libmysqld
mysql-test
collections
default.dailydefault.experimentaldefault.pushdisabled-per-push.listmysql-next-mr.pushmysql-trunk.push
extra
binlog_tests
rpl_tests
include
lib
mysql-stress-test.plmysql-test-run.plr
|
@ -1,4 +1,4 @@
|
|||
[MYSQL]
|
||||
post_commit_to = "commits@lists.mysql.com"
|
||||
post_push_to = "commits@lists.mysql.com"
|
||||
tree_name = "mysql-trunk"
|
||||
tree_name = "mysql-trunk-bugfixing"
|
||||
|
|
|
@ -119,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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
@ -196,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")
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
104
client/mysql.cc
104
client/mysql.cc
|
@ -90,7 +90,7 @@ extern "C" {
|
|||
|
||||
#if defined(__WIN__)
|
||||
#include <conio.h>
|
||||
#elif !defined(__NETWARE__)
|
||||
#else
|
||||
#include <readline/readline.h>
|
||||
#define HAVE_READLINE
|
||||
#endif
|
||||
|
@ -108,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
|
||||
|
||||
|
@ -1204,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;
|
||||
}
|
||||
}
|
||||
|
@ -1265,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);
|
||||
|
@ -1364,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. "
|
||||
|
@ -1581,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
|
||||
|
@ -1608,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
|
||||
}
|
||||
|
||||
|
||||
|
@ -1620,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;
|
||||
|
@ -1735,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)
|
||||
|
@ -1832,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)
|
||||
|
@ -1850,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;
|
||||
|
@ -1899,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);
|
||||
|
@ -1931,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
|
||||
|
@ -1984,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
|
||||
|
||||
|
@ -2730,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()") &&
|
||||
|
@ -3944,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;
|
||||
}
|
||||
|
@ -4022,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));
|
||||
}
|
||||
}
|
||||
|
@ -4199,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)
|
||||
|
@ -4663,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);
|
||||
|
@ -4679,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);
|
||||
|
@ -4688,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)
|
||||
|
@ -4705,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>
|
||||
|
@ -4717,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);
|
||||
|
@ -4951,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);
|
||||
|
@ -4970,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));
|
||||
}
|
||||
|
@ -442,7 +442,7 @@ Exit_status Load_log_processor::process_first_event(const char *bname,
|
|||
{
|
||||
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
|
||||
{
|
||||
|
@ -726,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;
|
||||
}
|
||||
|
||||
|
@ -898,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},
|
||||
|
@ -241,14 +236,11 @@ 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_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)
|
||||
|
|
|
@ -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 */
|
||||
};
|
||||
|
||||
|
@ -1106,9 +1106,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;
|
||||
}
|
||||
|
||||
|
@ -1137,7 +1137,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;
|
||||
|
@ -1157,22 +1157,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__
|
||||
|
@ -1933,9 +1933,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
|
||||
|
@ -3706,7 +3707,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" },
|
||||
|
@ -4824,7 +4824,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-"
|
||||
|
@ -5491,7 +5491,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)
|
||||
{
|
||||
|
@ -5967,9 +5967,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},
|
||||
|
@ -6008,8 +6005,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,
|
||||
|
@ -6028,8 +6023,6 @@ void usage()
|
|||
my_print_variables(my_long_options);
|
||||
}
|
||||
|
||||
#include <help_end.h>
|
||||
|
||||
|
||||
/*
|
||||
Read arguments for embedded server and put them into
|
||||
|
@ -6125,7 +6118,7 @@ get_one_option(int optid, const struct my_option *, 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;
|
||||
|
@ -6158,11 +6151,6 @@ get_one_option(int optid, const struct my_option *, 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;
|
||||
|
@ -6321,7 +6309,7 @@ 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;
|
||||
}
|
||||
|
||||
|
@ -6345,7 +6333,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);
|
||||
}
|
||||
|
@ -6538,12 +6526,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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -8489,11 +8477,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;
|
||||
|
@ -8507,7 +8495,7 @@ void free_replace_column()
|
|||
{
|
||||
if (replace_column[i])
|
||||
{
|
||||
my_free(replace_column[i], 0);
|
||||
my_free(replace_column[i]);
|
||||
replace_column[i]= 0;
|
||||
}
|
||||
}
|
||||
|
@ -8588,7 +8576,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;
|
||||
}
|
||||
|
@ -8597,11 +8585,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;
|
||||
}
|
||||
|
||||
|
@ -8821,7 +8806,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;
|
||||
}
|
||||
|
@ -8913,9 +8898,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;
|
||||
}
|
||||
}
|
||||
|
@ -9110,7 +9095,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;
|
||||
|
@ -9242,7 +9227,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);
|
||||
}
|
||||
|
||||
|
@ -9436,9 +9421,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);
|
||||
}
|
||||
|
@ -9454,7 +9439,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;
|
||||
|
@ -9515,8 +9500,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;
|
||||
}
|
||||
|
||||
|
@ -9654,7 +9639,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*)+
|
||||
|
@ -9715,9 +9700,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 */
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -26,11 +26,10 @@ 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()
|
||||
|
||||
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
SET(NEED_DASH_BETWEEN_PLATFORM_AND_MACHINE 0)
|
||||
SET(DEFAULT_PLATFORM "win")
|
||||
|
|
|
@ -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")
|
||||
|
|
280
configure.in
280
configure.in
|
@ -229,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")
|
||||
|
@ -427,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)
|
||||
|
@ -528,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
|
||||
|
@ -1279,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"
|
||||
|
@ -1334,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
|
||||
|
||||
|
||||
|
@ -1798,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++
|
||||
|
@ -1843,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
|
||||
|
@ -1882,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])
|
||||
|
@ -2201,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])
|
||||
|
@ -2910,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)
|
||||
|
@ -3059,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],
|
||||
|
@ -3131,14 +2984,6 @@ 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)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
|
@ -3211,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
|
||||
)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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("");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -33,10 +33,10 @@ pkginclude_HEADERS = $(HEADERS_ABI) my_dbug.h m_string.h my_sys.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 \
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -84,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)
|
||||
|
@ -135,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) */
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
@ -711,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
|
||||
|
@ -736,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 */
|
||||
|
||||
|
@ -896,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 */
|
||||
|
@ -1099,14 +1035,6 @@ typedef long long my_ptrdiff_t;
|
|||
((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
|
||||
|
@ -1662,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
|
||||
|
@ -1694,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 && \
|
||||
|
|
117
include/my_sys.h
117
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,17 @@ 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 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 size_t sf_malloc_cur_memory, sf_malloc_max_memory;
|
||||
|
||||
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 +611,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 +639,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 +650,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 +787,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,
|
||||
void *init_buffer, uint init_alloc,
|
||||
uint alloc_increment
|
||||
CALLER_INFO_PROTO);
|
||||
#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);
|
||||
/* 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 +826,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 +913,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 +978,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;
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -79,7 +79,7 @@ link_sources:
|
|||
# a minimal MySQL client library
|
||||
#
|
||||
# For a really minimal distribution (without debugging code) we could
|
||||
# keep only the stubs for safemalloc.c and debug.c
|
||||
# keep only the stubs for debug.c
|
||||
#
|
||||
# A list of needed headers collected from the deps information 000213
|
||||
nh = my_global.h config-win32.h dbug.h errmsg.h \
|
||||
|
|
|
@ -49,15 +49,15 @@ mystringsobjects = strmov.lo strxmov.lo strxnmov.lo strnmov.lo \
|
|||
ctype-uca.lo xml.lo my_strtoll10.lo str_alloc.lo dtoa.lo
|
||||
|
||||
mystringsextra= strto.c
|
||||
dbugobjects = dbug.lo # IT IS IN SAFEMALLOC.C sanity.lo
|
||||
dbugobjects = dbug.lo
|
||||
mysysheaders = mysys_priv.h my_static.h
|
||||
vioheaders = vio_priv.h
|
||||
mysysobjects1 = my_init.lo my_static.lo my_malloc.lo my_realloc.lo \
|
||||
mysysobjects1 = my_init.lo my_static.lo my_malloc.lo \
|
||||
my_create.lo my_delete.lo mf_tempfile.lo my_open.lo \
|
||||
my_file.lo my_read.lo my_write.lo errors.lo \
|
||||
my_error.lo my_getwd.lo my_div.lo \
|
||||
mf_pack.lo my_mess.lo mf_dirname.lo mf_fn_ext.lo\
|
||||
mf_wcomp.lo typelib.lo safemalloc.lo my_alloc.lo \
|
||||
mf_wcomp.lo typelib.lo my_alloc.lo \
|
||||
mf_format.lo mf_path.lo mf_unixpath.lo my_fopen.lo \
|
||||
my_symlink.lo my_fstream.lo mf_arr_appstr.lo \
|
||||
mf_loadpath.lo my_pthread.lo my_thr_init.lo \
|
||||
|
|
|
@ -48,7 +48,7 @@ void libmysql_init(void)
|
|||
#ifdef __WIN__
|
||||
|
||||
static int inited=0,threads=0;
|
||||
HINSTANCE NEAR s_hModule; /* Saved module handle */
|
||||
HINSTANCE s_hModule; /* Saved module handle */
|
||||
DWORD main_thread;
|
||||
|
||||
BOOL APIENTRY LibMain(HANDLE hInst,DWORD ul_reason_being_called,
|
||||
|
@ -105,21 +105,3 @@ int __stdcall DllMain(HANDLE hInst,DWORD ul_reason_being_called,LPVOID lpReserve
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
#elif defined(WINDOWS)
|
||||
|
||||
/****************************************************************************
|
||||
** This routine is called by LIBSTART.ASM at module load time. All it
|
||||
** does in this sample is remember the DLL module handle. The module
|
||||
** handle is needed if you want to do things like load stuff from the
|
||||
** resource file (for instance string resources).
|
||||
****************************************************************************/
|
||||
|
||||
int _export FAR PASCAL libmain(HANDLE hModule,short cbHeapSize,
|
||||
UCHAR FAR *lszCmdLine)
|
||||
{
|
||||
s_hModule = hModule;
|
||||
libmysql_init();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include <pwd.h>
|
||||
#endif /* HAVE_PWD_H */
|
||||
#else /* ! HAVE_GETPASS */
|
||||
#if !defined(__WIN__) && !defined(__NETWARE__)
|
||||
#if !defined(__WIN__)
|
||||
#include <sys/ioctl.h>
|
||||
#ifdef HAVE_TERMIOS_H /* For tty-password */
|
||||
#include <termios.h>
|
||||
|
@ -55,9 +55,7 @@
|
|||
#include <asm/termiobits.h>
|
||||
#endif
|
||||
#else
|
||||
#ifndef __NETWARE__
|
||||
#include <conio.h>
|
||||
#endif /* __NETWARE__ */
|
||||
#endif /* __WIN__ */
|
||||
#endif /* HAVE_GETPASS */
|
||||
|
||||
|
@ -65,16 +63,8 @@
|
|||
#define getpass(A) getpassphrase(A)
|
||||
#endif
|
||||
|
||||
#if defined( __WIN__) || defined(__NETWARE__)
|
||||
#if defined(__WIN__)
|
||||
/* were just going to fake it here and get input from the keyboard */
|
||||
|
||||
#ifdef __NETWARE__
|
||||
#undef _getch
|
||||
#undef _cputs
|
||||
#define _getch getcharacter
|
||||
#define _cputs(A) putstring(A)
|
||||
#endif
|
||||
|
||||
char *get_tty_password(const char *opt_message)
|
||||
{
|
||||
char to[80];
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#ifdef HAVE_PWD_H
|
||||
#include <pwd.h>
|
||||
#endif
|
||||
#if !defined(MSDOS) && !defined(__WIN__)
|
||||
#if !defined(__WIN__)
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
@ -45,7 +45,7 @@
|
|||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
#endif /* !defined(MSDOS) && !defined(__WIN__) */
|
||||
#endif /* !defined(__WIN__) */
|
||||
#ifdef HAVE_POLL
|
||||
#include <sys/poll.h>
|
||||
#endif
|
||||
|
@ -74,7 +74,7 @@ ulong max_allowed_packet= 1024L*1024L*1024L;
|
|||
my_bool net_flush(NET *net);
|
||||
#endif
|
||||
|
||||
#if defined(MSDOS) || defined(__WIN__)
|
||||
#if defined(__WIN__)
|
||||
/* socket_errno is defined in my_global.h for all platforms */
|
||||
#define perror(A)
|
||||
#else
|
||||
|
@ -128,31 +128,29 @@ int STDCALL mysql_server_init(int argc __attribute__((unused)),
|
|||
init_client_errs();
|
||||
if (!mysql_port)
|
||||
{
|
||||
mysql_port = MYSQL_PORT;
|
||||
#ifndef MSDOS
|
||||
{
|
||||
struct servent *serv_ptr __attribute__((unused));
|
||||
char *env;
|
||||
char *env;
|
||||
struct servent *serv_ptr __attribute__((unused));
|
||||
|
||||
/*
|
||||
if builder specifically requested a default port, use that
|
||||
(even if it coincides with our factory default).
|
||||
only if they didn't do we check /etc/services (and, failing
|
||||
on that, fall back to the factory default of 3306).
|
||||
either default can be overridden by the environment variable
|
||||
MYSQL_TCP_PORT, which in turn can be overridden with command
|
||||
line options.
|
||||
*/
|
||||
mysql_port = MYSQL_PORT;
|
||||
|
||||
/*
|
||||
if builder specifically requested a default port, use that
|
||||
(even if it coincides with our factory default).
|
||||
only if they didn't do we check /etc/services (and, failing
|
||||
on that, fall back to the factory default of 3306).
|
||||
either default can be overridden by the environment variable
|
||||
MYSQL_TCP_PORT, which in turn can be overridden with command
|
||||
line options.
|
||||
*/
|
||||
|
||||
#if MYSQL_PORT_DEFAULT == 0
|
||||
if ((serv_ptr = getservbyname("mysql", "tcp")))
|
||||
mysql_port = (uint) ntohs((ushort) serv_ptr->s_port);
|
||||
#endif
|
||||
if ((env = getenv("MYSQL_TCP_PORT")))
|
||||
mysql_port =(uint) atoi(env);
|
||||
}
|
||||
if ((serv_ptr= getservbyname("mysql", "tcp")))
|
||||
mysql_port= (uint) ntohs((ushort) serv_ptr->s_port);
|
||||
#endif
|
||||
if ((env= getenv("MYSQL_TCP_PORT")))
|
||||
mysql_port=(uint) atoi(env);
|
||||
}
|
||||
|
||||
if (!mysql_unix_port)
|
||||
{
|
||||
char *env;
|
||||
|
@ -165,7 +163,7 @@ int STDCALL mysql_server_init(int argc __attribute__((unused)),
|
|||
mysql_unix_port = env;
|
||||
}
|
||||
mysql_debug(NullS);
|
||||
#if defined(SIGPIPE) && !defined(__WIN__) && !defined(__NETWARE__)
|
||||
#if defined(SIGPIPE) && !defined(__WIN__)
|
||||
(void) signal(SIGPIPE, SIG_IGN);
|
||||
#endif
|
||||
#ifdef EMBEDDED_LIBRARY
|
||||
|
@ -341,7 +339,7 @@ mysql_connect(MYSQL *mysql,const char *host,
|
|||
if (!(res=mysql_real_connect(mysql,host,user,passwd,NullS,0,NullS,0)))
|
||||
{
|
||||
if (mysql->free_me)
|
||||
my_free((uchar*) mysql,MYF(0));
|
||||
my_free(mysql);
|
||||
}
|
||||
mysql->reconnect= 1;
|
||||
DBUG_RETURN(res);
|
||||
|
@ -457,9 +455,9 @@ my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
|
|||
if (rc == 0)
|
||||
{
|
||||
/* Free old connect information */
|
||||
my_free(mysql->user,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(mysql->passwd,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(mysql->db,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(mysql->user);
|
||||
my_free(mysql->passwd);
|
||||
my_free(mysql->db);
|
||||
|
||||
/* alloc new connect information */
|
||||
mysql->user= my_strdup(user,MYF(MY_WME));
|
||||
|
@ -479,15 +477,7 @@ struct passwd *getpwuid(uid_t);
|
|||
char* getlogin(void);
|
||||
#endif
|
||||
|
||||
#if defined(__NETWARE__)
|
||||
/* Default to value of USER on NetWare, if unset use "UNKNOWN_USER" */
|
||||
void read_user_name(char *name)
|
||||
{
|
||||
char *str=getenv("USER");
|
||||
strmake(name, str ? str : "UNKNOWN_USER", USERNAME_LENGTH);
|
||||
}
|
||||
|
||||
#elif !defined(MSDOS) && ! defined(VMS) && !defined(__WIN__)
|
||||
#if !defined(__WIN__)
|
||||
|
||||
void read_user_name(char *name)
|
||||
{
|
||||
|
@ -517,7 +507,7 @@ void read_user_name(char *name)
|
|||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
#else /* If MSDOS || VMS */
|
||||
#else /* If Windows */
|
||||
|
||||
void read_user_name(char *name)
|
||||
{
|
||||
|
@ -604,7 +594,7 @@ my_bool handle_local_infile(MYSQL *mysql, const char *net_filename)
|
|||
err:
|
||||
/* free up memory allocated with _init, usually */
|
||||
(*options->local_infile_end)(li_ptr);
|
||||
my_free(buf, MYF(0));
|
||||
my_free(buf);
|
||||
DBUG_RETURN(result);
|
||||
}
|
||||
|
||||
|
@ -715,7 +705,7 @@ static void default_local_infile_end(void *ptr)
|
|||
{
|
||||
if (data->fd >= 0)
|
||||
my_close(data->fd, MYF(MY_WME));
|
||||
my_free(ptr, MYF(MY_WME));
|
||||
my_free(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2211,7 +2201,7 @@ int cli_stmt_execute(MYSQL_STMT *stmt)
|
|||
}
|
||||
result= execute(stmt, param_data, length);
|
||||
stmt->send_types_to_server=0;
|
||||
my_free(param_data, MYF(MY_WME));
|
||||
my_free(param_data);
|
||||
DBUG_RETURN(result);
|
||||
}
|
||||
DBUG_RETURN((int) execute(stmt,0,0));
|
||||
|
@ -4728,7 +4718,7 @@ my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt)
|
|||
}
|
||||
}
|
||||
|
||||
my_free((uchar*) stmt, MYF(MY_WME));
|
||||
my_free(stmt);
|
||||
|
||||
DBUG_RETURN(test(rc));
|
||||
}
|
||||
|
|
|
@ -157,27 +157,6 @@ if DARWIN_MWCC
|
|||
mwld -lib -o $@ libmysqld_int.a `echo $(INC_LIB) | sort -u` $(storageobjects)
|
||||
else
|
||||
-rm -f libmysqld.a
|
||||
if test "$(host_os)" = "netware" ; \
|
||||
then \
|
||||
$(libmysqld_a_AR) libmysqld.a $(INC_LIB) libmysqld_int.a $(storageobjects); \
|
||||
else \
|
||||
current_dir=`pwd`; \
|
||||
rm -rf tmp; mkdir tmp; \
|
||||
(for arc in $(INC_LIB) ./libmysqld_int.a; do \
|
||||
arpath=`echo $$arc|sed 's|[^/]*$$||'|sed 's|\.libs/$$||'`; \
|
||||
artmp=`echo $$arc|sed 's|^.*/|tmp/lib-|'`; \
|
||||
for F in `$(AR) t $$arc | grep -v SYMDEF`; do \
|
||||
if test -e "$$arpath/$$F" ; then echo "$$arpath/$$F"; else \
|
||||
mkdir $$artmp; cd $$artmp > /dev/null; \
|
||||
$(AR) x ../../$$arc; \
|
||||
cd $$current_dir > /dev/null; \
|
||||
ls $$artmp/* | grep -v SYMDEF; \
|
||||
continue 2; fi; done; \
|
||||
done; echo $(libmysqld_a_DEPENDENCIES) ) | sort -u | xargs $(AR) cq libmysqld.a ; \
|
||||
$(AR) r libmysqld.a $(storageobjects); \
|
||||
$(RANLIB) libmysqld.a ; \
|
||||
rm -rf tmp; \
|
||||
fi
|
||||
endif
|
||||
|
||||
## XXX: any time the client interface changes, we'll need to bump
|
||||
|
|
|
@ -76,7 +76,7 @@ void embedded_get_error(MYSQL *mysql, MYSQL_DATA *data)
|
|||
strmake(net->last_error, ei->info, sizeof(net->last_error)-1);
|
||||
memcpy(net->sqlstate, ei->sqlstate, sizeof(net->sqlstate));
|
||||
mysql->server_status= ei->server_status;
|
||||
my_free(data, MYF(0));
|
||||
my_free(data);
|
||||
}
|
||||
|
||||
static my_bool
|
||||
|
@ -207,7 +207,7 @@ static MYSQL_FIELD *emb_list_fields(MYSQL *mysql)
|
|||
res= ((THD*) mysql->thd)->cur_data;
|
||||
((THD*) mysql->thd)->cur_data= 0;
|
||||
mysql->field_alloc= res->alloc;
|
||||
my_free(res,MYF(0));
|
||||
my_free(res);
|
||||
mysql->status= MYSQL_STATUS_READY;
|
||||
return mysql->fields;
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ static my_bool emb_read_prepare_result(MYSQL *mysql, MYSQL_STMT *stmt)
|
|||
stmt->fields= mysql->fields;
|
||||
stmt->mem_root= res->alloc;
|
||||
mysql->fields= NULL;
|
||||
my_free(res,MYF(0));
|
||||
my_free(res);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -293,7 +293,7 @@ static my_bool emb_read_query_result(MYSQL *mysql)
|
|||
thd->cur_data= res;
|
||||
}
|
||||
else
|
||||
my_free(res, MYF(0));
|
||||
my_free(res);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -335,7 +335,7 @@ int emb_read_binary_rows(MYSQL_STMT *stmt)
|
|||
return 1;
|
||||
}
|
||||
stmt->result= *data;
|
||||
my_free((char *) data, MYF(0));
|
||||
my_free(data);
|
||||
set_stmt_errmsg(stmt, &stmt->mysql->net);
|
||||
return 0;
|
||||
}
|
||||
|
@ -522,10 +522,10 @@ int init_embedded_server(int argc, char **argv, char **groups)
|
|||
|
||||
mysql_data_home= mysql_real_data_home;
|
||||
mysql_data_home_len= mysql_real_data_home_len;
|
||||
|
||||
|
||||
/* Get default temporary directory */
|
||||
opt_mysql_tmpdir=getenv("TMPDIR"); /* Use this if possible */
|
||||
#if defined( __WIN__) || defined(OS2)
|
||||
#if defined(__WIN__)
|
||||
if (!opt_mysql_tmpdir)
|
||||
opt_mysql_tmpdir=getenv("TEMP");
|
||||
if (!opt_mysql_tmpdir)
|
||||
|
@ -590,7 +590,7 @@ int init_embedded_server(int argc, char **argv, char **groups)
|
|||
|
||||
void end_embedded_server()
|
||||
{
|
||||
my_free((char*) copy_arguments_ptr, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(copy_arguments_ptr);
|
||||
copy_arguments_ptr=0;
|
||||
clean_up(0);
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#ifdef HAVE_PWD_H
|
||||
#include <pwd.h>
|
||||
#endif
|
||||
#if !defined(MSDOS) && !defined(__WIN__)
|
||||
#if !defined(__WIN__)
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
@ -54,7 +54,7 @@
|
|||
extern ulong net_buffer_length;
|
||||
extern ulong max_allowed_packet;
|
||||
|
||||
#if defined(MSDOS) || defined(__WIN__)
|
||||
#if defined(__WIN__)
|
||||
#define ERRNO WSAGetLastError()
|
||||
#define perror(A)
|
||||
#else
|
||||
|
@ -119,8 +119,8 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
|
|||
(mysql->options.my_cnf_file ?
|
||||
mysql->options.my_cnf_file : "my"),
|
||||
mysql->options.my_cnf_group);
|
||||
my_free(mysql->options.my_cnf_file,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(mysql->options.my_cnf_group,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(mysql->options.my_cnf_file);
|
||||
my_free(mysql->options.my_cnf_group);
|
||||
mysql->options.my_cnf_file=mysql->options.my_cnf_group=0;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,3 +3,4 @@ perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collection
|
|||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=embedded --vardir=var-emebbed --embedded
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=rpl_ndb_row --vardir=var-rpl_ndb_row --mysqld=--binlog-format=row --suite=rpl_ndb,ndb
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=rpl_binlog_row --vardir=var-rpl_binlog_row --mysqld=--binlog-format=row --suite=rpl,binlog --skip-ndb
|
||||
|
|
|
@ -24,9 +24,10 @@ main.sp @solaris # Bug#47791 2010-01-20 alik Several tes
|
|||
main.type_float @freebsd # Bug#38965 2010-05-04 alik test cases gis-rtree, type_float, type_newdecimal fail in embedded server
|
||||
main.wait_timeout @solaris # Bug#51244 2010-04-26 alik wait_timeout fails on OpenSolaris
|
||||
|
||||
parts.partition_alter4_innodb # Bug#45299 2010-06-28 alik Test "partition_alter4_innodb" is taking too long, timeout
|
||||
perfschema.pfs_upgrade # Bug#53102 2010-06-15 alik perfschema.pfs_upgrade fails on sol10 sparc64 max in parallel mode
|
||||
|
||||
rpl.rpl_heartbeat_basic # BUG#43828 2009-10-22 luis fails sporadically
|
||||
rpl.rpl_heartbeat_basic # BUG#54820 2010-06-26 alik rpl.rpl_heartbeat_basic fails sporadically again
|
||||
rpl.rpl_heartbeat_2slaves # BUG#43828 2009-10-22 luis fails sporadically
|
||||
rpl.rpl_innodb_bug28430* # Bug#46029
|
||||
rpl.rpl_innodb_bug30888* @solaris # Bug#47646 2009-09-25 alik rpl.rpl_innodb_bug30888 fails sporadically on Solaris
|
||||
|
@ -35,6 +36,7 @@ rpl.rpl_plugin_load* @solaris # Bug#47146
|
|||
rpl.rpl_row_sp011* @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||
|
||||
sys_vars.max_sp_recursion_depth_func @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||
sys_vars.slow_query_log_func @solaris # Bug#54819 2010-06-26 alik sys_vars.slow_query_log_func fails sporadically on Solaris 10
|
||||
sys_vars.wait_timeout_func # Bug#41255 2010-04-26 alik wait_timeout_func fails
|
||||
|
||||
# Declare all NDB-tests in ndb and rpl_ndb test suites experimental.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=embedded --vardir=var-emebbed --embedded --experimental=collections/default.experimental --skip-ndb
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=rpl_binlog_row --vardir=var-rpl_binlog_row --suite=rpl,binlog --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=rpl_binlog_row --vardir=var-rpl_binlog_row --suite=rpl,binlog --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1 --experimental=collections/default.experimental --skip-ndb
|
||||
|
|
186
mysql-test/collections/disabled-per-push.list
Normal file
186
mysql-test/collections/disabled-per-push.list
Normal file
|
@ -0,0 +1,186 @@
|
|||
rpl.rpl000010 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl000011 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl000013 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_000015 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_alter_db : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_auto_increment_11932 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_auto_increment_update_failure : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_begin_commit_rollback : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_binlog_grant : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_binlog_query_filter_rules : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_bit : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_bit_npk : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_blackhole : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_bug31076 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_bug33931 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_bug38694 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_bug41902 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_charset : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_concurrency_error : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_create_if_not_exists : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_create_tmp_table_if_not_exists : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_cross_version : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_do_grant : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_drop_if_exists : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_EE_err : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_empty_master_host : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_extraColmaster_myisam : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_extraCol_myisam : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_filter_tables_not_exist : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_flushlog_loop : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_flush_logs : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_foreign_key_innodb : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_free_items : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_get_lock : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_grant : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_heartbeat : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_idempotency : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_ignore_revoke : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_ignore_table_update : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_incident : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_init_slave_errors : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_init_slave : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_innodb_bug30888 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_innodb_mixed_ddl : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_insert_id_pk : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_insert_ignore : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_insert_select : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_ip_mix2 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_ip_mix : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_ipv4_as_ipv6 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_ipv6 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_known_bugs_detection : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_loaddata_charset : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_loaddata_fatal : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_loaddatalocal : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_loaddata : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_loaddata_map : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_loaddata_simple : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_loaddata_s : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_loaddata_symlink : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_log_pos : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_master_pos_wait : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_misc_functions : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_mixed_binlog_max_cache_size : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_mixed_bit_pk : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_mixed_ddl_dml : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_mixed_implicit_commit_binlog : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_mixed_mixing_engines : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_mixed_row_innodb : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_mix_found_rows : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_multi_delete2 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_multi_delete : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_multi_engine : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_multi_update2 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_multi_update3 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_multi_update4 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_multi_update : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_mysql_upgrade : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_name_const : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_nondeterministic_functions : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_non_direct_mixed_mixing_engines : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_non_direct_row_mixing_engines : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_non_direct_stm_mixing_engines : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_not_null_myisam : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_optimize : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_ps : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_relayrotate : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_relay_space_innodb : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_relayspace : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_relay_space_myisam : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_replicate_ignore_db : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_rewrt_db : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_4_bytes : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_basic_2myisam : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_basic_3innodb : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_basic_8partition : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_colSize : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_disabled_slave_key : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_drop : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_flsh_tbls : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_func001 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_func002 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_func003 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_idempotency : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_implicit_commit_binlog : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_inexist_tbl : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_loaddata_concurrent : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_max_relay_size : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_mixing_engines : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_reset_slave : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_show_relaylog_events : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_sp001 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_sp002_innodb : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_sp005 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_sp006_InnoDB : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_sp007_innodb : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_sp008 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_sp009 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_sp012 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_tabledefs_2myisam : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_tabledefs_3innodb : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_trig001 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_trig002 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_trig003 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_trig004 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_trunc_temp : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_unsafe_funcs : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_until : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_USER : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_utf16 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_utf32 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_view01 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_row_wide_table : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_server_id1 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_server_id2 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_server_id_ignore : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_server_id : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_set_charset : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_set_null_innodb : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_set_null_myisam : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_sf : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_skip_error : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_slave_grp_exec : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_slave_load_in : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_slave_load_tmpdir_not_exist : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_slave_status : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_slow_query_log : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_sp004 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_sporadic_master : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_stm_000001 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_stm_auto_increment_bug33029 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_stm_binlog_max_cache_size : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_stm_conflicts : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_stm_EE_err2 : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_stm_flsh_tbls : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_stm_found_rows : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_stm_innodb : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_stm_insert_delayed : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_stm_loaddata_concurrent : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_stm_loadfile : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_stm_log : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_stm_max_relay_size : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_stm_mixing_engines : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_stm_mix_show_relaylog_events : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_stm_multi_query : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_stm_no_op : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_stm_reset_slave : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_stm_sql_mode : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_stm_start_stop_slave : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_stm_stop_middle_group : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_stm_until : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_stm_user_variables : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_temporary_errors : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_temporary : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_temp_table : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_temp_table_mix_row : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_temp_temporary : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_truncate_2myisam : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_truncate_3innodb : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_trunc_temp : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_typeconv_innodb : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_typeconv : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_user : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_user_variables : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_variables : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
||||
rpl.rpl_variables_stm : lsoares 2010-05-26 WL#5408 Reduce Pushbuild2 turnaround times for rpl suite.
|
|
@ -1,5 +1,5 @@
|
|||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --suite=main,binlog,innodb,federated,rpl,sys_vars,perfschema
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row --suite=main,binlog,innodb,federated,rpl,sys_vars,perfschema
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --suite=main,binlog,innodb,federated,rpl,sys_vars,perfschema --skip-test-list=collections/disabled-per-push.list
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row --suite=main,binlog,innodb,federated,rpl,sys_vars,perfschema --skip-test-list=collections/disabled-per-push.list
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=embedded --vardir=var-emebbed --embedded --suite=main,binlog,innodb,federated,rpl,sys_vars,perfschema
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=rpl_binlog_row --vardir=var-rpl_binlog_row --mysqld=--binlog-format=row --suite=rpl,binlog
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=rpl_binlog_row --vardir=var-rpl_binlog_row --mysqld=--binlog-format=row --suite=rpl,binlog --skip-test-list=collections/disabled-per-push.list
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --suite=main,binlog,innodb,federated,rpl,sys_vars,perfschema
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row --suite=main,binlog,innodb,federated,rpl,sys_vars,perfschema
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --suite=main,binlog,innodb,federated,rpl,sys_vars,perfschema --skip-test-list=collections/disabled-per-push.list
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row --suite=main,binlog,innodb,federated,rpl,sys_vars,perfschema --skip-test-list=collections/disabled-per-push.list
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=embedded --vardir=var-emebbed --embedded --suite=main,binlog,innodb,federated,rpl,sys_vars,perfschema
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=rpl_binlog_row --vardir=var-rpl_binlog_row --mysqld=--binlog-format=row --suite=rpl,binlog
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=rpl_binlog_row --vardir=var-rpl_binlog_row --mysqld=--binlog-format=row --suite=rpl,binlog --skip-test-list=collections/disabled-per-push.list
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1
|
||||
|
|
|
@ -69,4 +69,34 @@ let $VERSION=`SELECT VERSION()`;
|
|||
source include/show_binlog_events.inc;
|
||||
DROP DATABASE `drop-temp+table-test`;
|
||||
|
||||
|
||||
#
|
||||
# Bug #54842: DROP TEMPORARY TABLE not binlogged after manual switching binlog format to ROW
|
||||
#
|
||||
# Sanity test. Checking that implicit DROP event is logged.
|
||||
#
|
||||
# After BUG#52616, the switch to ROW mode becomes effective even
|
||||
# if there are open temporary tables. As such the implicit drop
|
||||
# for temporary tables on session closing must be logged.
|
||||
#
|
||||
|
||||
RESET MASTER;
|
||||
|
||||
CREATE TABLE t1 ( i text );
|
||||
|
||||
--connect(con1,localhost,root,,)
|
||||
CREATE TEMPORARY TABLE ttmp1 ( i text );
|
||||
SET @@session.binlog_format=ROW;
|
||||
INSERT INTO t1 VALUES ('1');
|
||||
SELECT @@session.binlog_format;
|
||||
--disconnect con1
|
||||
|
||||
-- connection default
|
||||
--let $wait_binlog_event= DROP
|
||||
--source include/wait_for_binlog_event.inc
|
||||
-- source include/show_binlog_events.inc
|
||||
RESET MASTER;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
|
|
@ -77,11 +77,11 @@ eval UPDATE t2, t1 SET t2.data = CONCAT($data, $data, $data, $data),
|
|||
connection slave;
|
||||
--source include/wait_for_slave_sql_to_stop.inc
|
||||
|
||||
if (`SELECT @@binlog_format = 'STATEMENT'`)
|
||||
if (`SELECT @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'`)
|
||||
{
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
|
||||
}
|
||||
if (`SELECT @@binlog_format = 'ROW' || @@binlog_format = 'MIXED'`)
|
||||
if (`SELECT @@binlog_format = 'ROW'`)
|
||||
{
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 2;
|
||||
}
|
||||
|
|
967
mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc
Normal file
967
mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc
Normal file
|
@ -0,0 +1,967 @@
|
|||
--source include/have_innodb.inc
|
||||
--disable_abort_on_error
|
||||
|
||||
if (`SELECT HEX(@commands) = HEX('configure')`)
|
||||
{
|
||||
connection master;
|
||||
|
||||
#
|
||||
# Creates a T-table that is never dropped.
|
||||
#
|
||||
--eval CREATE TABLE tt_xx_1 ( id INT ) ENGINE = Innodb
|
||||
|
||||
#
|
||||
# Creates a N-table that is never dropped.
|
||||
#
|
||||
--eval CREATE TABLE nt_xx_1 ( id INT ) ENGINE = MyIsam
|
||||
|
||||
#
|
||||
# Creates a Temporary N-table that is never dropped.
|
||||
#
|
||||
--eval CREATE TEMPORARY TABLE nt_tmp_xx_1 ( id INT ) ENGINE = MyIsam
|
||||
|
||||
#
|
||||
# Creates a Temporary N-table that is never dropped.
|
||||
#
|
||||
--eval CREATE TEMPORARY TABLE tt_tmp_xx_1 ( id INT ) ENGINE = Innodb
|
||||
|
||||
#
|
||||
# In what follows, we create a set of tables that are used
|
||||
# throughout this test case. The number of tables to be
|
||||
# created is give by the variable $tot_table.
|
||||
#
|
||||
#
|
||||
# Creates Temporay N-tables that are automatically dropped and recreated
|
||||
# when a command ends.
|
||||
#
|
||||
--let $n= $tot_table
|
||||
while (`SELECT $n != 0`)
|
||||
{
|
||||
--eval DROP TEMPORARY TABLE IF EXISTS nt_tmp_$n
|
||||
--eval CREATE TEMPORARY TABLE nt_tmp_$n ( id INT ) ENGINE = MyIsam
|
||||
--disable_query_log
|
||||
--eval SET @check_temp='$available_n_temp'
|
||||
--enable_query_log
|
||||
#
|
||||
# Updates the $available_n_temp that keeps track of the created
|
||||
# temporary N-tables.
|
||||
#
|
||||
if (`SELECT HEX(@check_temp) != HEX('')`)
|
||||
{
|
||||
--let $available_n_temp= $available_n_temp,nt_tmp_$n
|
||||
}
|
||||
if (`SELECT HEX(@check_temp) = HEX('')`)
|
||||
{
|
||||
--let $available_n_temp= nt_tmp_$n
|
||||
}
|
||||
--dec $n
|
||||
}
|
||||
|
||||
#
|
||||
# Creates Temporay T-tables that are automatically dropped and recreated
|
||||
# when a command ends.
|
||||
#
|
||||
--let $n= $tot_table
|
||||
while (`SELECT $n != 0`)
|
||||
{
|
||||
--eval DROP TEMPORARY TABLE IF EXISTS tt_tmp_$n
|
||||
--eval CREATE TEMPORARY TABLE tt_tmp_$n ( id INT ) ENGINE = Innodb
|
||||
--disable_query_log
|
||||
--eval SET @check_temp='$available_t_temp'
|
||||
--enable_query_log
|
||||
#
|
||||
# Updates the $available_t_temp that keeps track of the created
|
||||
# temporary T-tables.
|
||||
#
|
||||
if (`SELECT HEX(@check_temp) != HEX('')`)
|
||||
{
|
||||
--let $available_t_temp= $available_t_temp,tt_tmp_$n
|
||||
}
|
||||
if (`SELECT HEX(@check_temp) = HEX('')`)
|
||||
{
|
||||
--let $available_t_temp= tt_tmp_$n
|
||||
}
|
||||
--dec $n
|
||||
}
|
||||
|
||||
#
|
||||
# Creates N-tables that are automatically dropped and recreated
|
||||
# when a command ends.
|
||||
#
|
||||
--let $n= $tot_table
|
||||
while (`SELECT $n != 0`)
|
||||
{
|
||||
--eval DROP TABLE IF EXISTS nt_$n
|
||||
--eval CREATE TABLE nt_$n ( id INT ) ENGINE = MyIsam
|
||||
--disable_query_log
|
||||
--eval SET @check_temp='$available_n'
|
||||
--enable_query_log
|
||||
#
|
||||
# Updates the $available_n that keeps track of the created
|
||||
# N-tables.
|
||||
#
|
||||
if (`SELECT HEX(@check_temp) != HEX('')`)
|
||||
{
|
||||
--let $available_n= $available_n,nt_$n
|
||||
}
|
||||
if (`SELECT HEX(@check_temp) = HEX('')`)
|
||||
{
|
||||
--let $available_n= nt_$n
|
||||
}
|
||||
--dec $n
|
||||
}
|
||||
|
||||
#
|
||||
# Creates T-tables that are automatically dropped and recreated
|
||||
# when a command ends.
|
||||
#
|
||||
--let $n= $tot_table
|
||||
while (`SELECT $n != 0`)
|
||||
{
|
||||
--eval DROP TABLE IF EXISTS tt_$n
|
||||
--eval CREATE TABLE tt_$n ( id INT ) ENGINE = Innodb
|
||||
--disable_query_log
|
||||
--eval SET @check_temp='$available_t'
|
||||
--enable_query_log
|
||||
#
|
||||
# Updates the $available_t that keeps track of the created
|
||||
# T-tables.
|
||||
#
|
||||
if (`SELECT HEX(@check_temp) != HEX('')`)
|
||||
{
|
||||
--let $available_t= $available_t,tt_$n
|
||||
}
|
||||
if (`SELECT HEX(@check_temp) = HEX('')`)
|
||||
{
|
||||
--let $available_t= tt_$n
|
||||
}
|
||||
--dec $n
|
||||
}
|
||||
|
||||
--let $dropped_t_temp=
|
||||
--let $dropped_n_temp=
|
||||
|
||||
--let $dropped_t=
|
||||
--let $dropped_n=
|
||||
|
||||
let $pos_trans_command= query_get_value("SHOW MASTER STATUS", Position, 1);
|
||||
|
||||
SET @commands= '';
|
||||
}
|
||||
|
||||
#
|
||||
# Drops tables and synchronizes master and slave. Note that temporary
|
||||
# tables are not explitcily dropped as they will be dropped while
|
||||
# closing the connection.
|
||||
#
|
||||
if (`SELECT HEX(@commands) = HEX('clean')`)
|
||||
{
|
||||
connection master;
|
||||
|
||||
DROP TABLE IF EXISTS tt_xx_1;
|
||||
|
||||
DROP TABLE IF EXISTS nt_xx_1;
|
||||
|
||||
--let $n= $tot_table
|
||||
while (`SELECT $n != 0`)
|
||||
{
|
||||
--eval DROP TABLE IF EXISTS nt_$n
|
||||
--dec $n
|
||||
}
|
||||
|
||||
--let $n= $tot_table
|
||||
while (`SELECT $n != 0`)
|
||||
{
|
||||
--eval DROP TABLE IF EXISTS tt_$n
|
||||
--dec $n
|
||||
}
|
||||
|
||||
sync_slave_with_master;
|
||||
|
||||
SET @commands= '';
|
||||
}
|
||||
|
||||
#
|
||||
# This is the core of the test is responsible for processing
|
||||
# the following commands:
|
||||
#
|
||||
# B - Begin
|
||||
# C - Commit
|
||||
# R - Rollback
|
||||
#
|
||||
#
|
||||
# T - Inserts a row into a T-table
|
||||
# N-Temp - Inserts a row into a temporary N-table.
|
||||
#
|
||||
#
|
||||
# T-SELECT-N-Temp - Selects from a temporary N-table and inserts
|
||||
# into a T-table.
|
||||
# N-SELECT-N-Temp - Selects from a temporary N-table and inserts
|
||||
# into a N-table.
|
||||
# T-SELECT-T-Temp - Selects from a temporary T-table and inserts
|
||||
# into a T-table.
|
||||
# N-SELECT-T-Temp - Selects from a temporary T-table and inserts
|
||||
# into a N-table.
|
||||
#
|
||||
#
|
||||
# Create-N-Temp - Creates a temporary N-table if a temporary N-table
|
||||
# was dropped before
|
||||
# Create-T-Temp - Creates a temporary T-table if a temporary T-table
|
||||
# was dropped before
|
||||
#
|
||||
#
|
||||
# Drop-Temp-T-Temp - Drops a temporary T-table if there is any
|
||||
# Drop-Temp-N-Temp - Drops a temporary N-table if there is any
|
||||
# Drop-Temp-TN-Temp - Drops both a temporary T-table and N-table if there
|
||||
# is any
|
||||
# Drop-Temp-TT-Temp - Drops two temporary T-tables if there is any
|
||||
# Drop-Temp-NN-Temp - Drops two temporary N-tables if there is any
|
||||
# Drop-Temp-Xe-Temp - Tries to drop a temporary table that does not exist
|
||||
# Drop-Temp-NXe-Temp - Drops a temporary N-table if there is any and
|
||||
# a temporary table that does not exist
|
||||
# Drop-Temp-TXe-Temp - Drops a temporary T-table if there is any and
|
||||
# a temporary table that does not exist
|
||||
#
|
||||
#
|
||||
# Drop-Temp-If-Xe-Temp - Tries to drop a temporary table that does not exist
|
||||
# Drop-Temp-If-TXe-Temp - Drops a temporary T-table if there is any and
|
||||
# a temporary table that does not exist
|
||||
#
|
||||
#
|
||||
# Drop-T - Drops a T-table if there is any
|
||||
# Drop-N - Drops a N-table if there is any
|
||||
# Drop-Xe - Tries to drop a table that does not exist
|
||||
# Drop-TXe - Drops a T-table if there is any and a table that does
|
||||
# not exist
|
||||
# Drop-NXe - Drops a N-table if there is any and a table that does
|
||||
# not exist
|
||||
# Drop-TN - Drops both a T-table and N-table if there is any
|
||||
# Drop-TT - Drops two T-tables if there is any
|
||||
# Drop-NN - Drops two N-tables if there is any
|
||||
# Drop-N-TN-Temp - Drops a N-table and both a temporary T-table and
|
||||
# N-table if there is any
|
||||
#
|
||||
#
|
||||
# Drop-If-Xe - Tries to drop a table that does not exist
|
||||
# Drop-If-TXe - Drops a T-table if there is any and a table that does
|
||||
# not exist
|
||||
# Drop-If-NXe - Drops a N-table if there is any and a table that does
|
||||
# not exist
|
||||
#
|
||||
while (`SELECT HEX(@commands) != HEX('')`)
|
||||
{
|
||||
--disable_query_log
|
||||
SET @command= SUBSTRING_INDEX(@commands, ' ', 1);
|
||||
let $command= `SELECT @command`;
|
||||
--eval SET @check_commands= '$commands'
|
||||
if (`SELECT HEX(@check_commands) = HEX('''')`)
|
||||
{
|
||||
let $commands= `SELECT @commands`;
|
||||
}
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('B')`)
|
||||
{
|
||||
--enable_query_log
|
||||
eval BEGIN;
|
||||
--disable_query_log
|
||||
}
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('T')`)
|
||||
{
|
||||
--enable_query_log
|
||||
eval INSERT INTO tt_xx_1() VALUES (1);
|
||||
--disable_query_log
|
||||
}
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('N')`)
|
||||
{
|
||||
--enable_query_log
|
||||
eval INSERT INTO nt_xx_1() VALUES (1);
|
||||
--disable_query_log
|
||||
}
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('N-Temp')`)
|
||||
{
|
||||
--enable_query_log
|
||||
eval INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||
--disable_query_log
|
||||
}
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('N-SELECT-N-Temp')`)
|
||||
{
|
||||
--enable_query_log
|
||||
eval INSERT INTO nt_xx_1 SELECT * FROM nt_tmp_xx_1;
|
||||
--disable_query_log
|
||||
}
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('N-SELECT-T-Temp')`)
|
||||
{
|
||||
--enable_query_log
|
||||
eval INSERT INTO nt_xx_1 SELECT * FROM tt_tmp_xx_1;
|
||||
--disable_query_log
|
||||
}
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('T-SELECT-N-Temp')`)
|
||||
{
|
||||
--enable_query_log
|
||||
eval INSERT INTO tt_xx_1 SELECT * FROM nt_tmp_xx_1;
|
||||
--disable_query_log
|
||||
}
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('T-SELECT-T-Temp')`)
|
||||
{
|
||||
--enable_query_log
|
||||
eval INSERT INTO tt_xx_1 SELECT * FROM tt_tmp_xx_1;
|
||||
--disable_query_log
|
||||
}
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('Create-N-Temp') || HEX(@command) = HEX('Create-T-Temp')`)
|
||||
{
|
||||
if (`SELECT HEX(@command) = HEX('Create-N-Temp')`)
|
||||
{
|
||||
--let $dropped_temp=$dropped_n_temp
|
||||
--let $available_temp=$available_n_temp
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Create-T-Temp')`)
|
||||
{
|
||||
--let $dropped_temp=$dropped_t_temp
|
||||
--let $available_temp=$available_t_temp
|
||||
}
|
||||
|
||||
--eval SET @check_temp='$dropped_temp'
|
||||
if (`SELECT HEX(@check_temp) != HEX('')`)
|
||||
{
|
||||
SET @temp= SUBSTRING_INDEX(@check_temp, ',', 1);
|
||||
let $table=`SELECT @temp`;
|
||||
--eval SET @check_temp='$available_temp'
|
||||
if (`SELECT HEX(@check_temp) != HEX('')`)
|
||||
{
|
||||
--let $available_temp= $available_temp,$table
|
||||
}
|
||||
if (`SELECT HEX(@check_temp) = HEX('')`)
|
||||
{
|
||||
--let $available_temp= $table
|
||||
}
|
||||
--eval SET @check_temp='$dropped_temp'
|
||||
--eval SET @table_temp='$table'
|
||||
SET @check_temp= LTRIM(SUBSTRING(@check_temp, LENGTH(@table_temp) + 2));
|
||||
--let $dropped_temp= `SELECT @check_temp`
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('Create-N-Temp')`)
|
||||
{
|
||||
--enable_query_log
|
||||
--eval CREATE TEMPORARY TABLE $table ( id INT ) engine= MyIsam
|
||||
--disable_query_log
|
||||
|
||||
--let $available_n_temp= $available_temp
|
||||
--let $dropped_n_temp= $dropped_temp
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Create-T-Temp')`)
|
||||
{
|
||||
--enable_query_log
|
||||
--eval CREATE TEMPORARY TABLE $table ( id INT ) engine= Innodb
|
||||
--disable_query_log
|
||||
|
||||
--let $available_t_temp= $available_temp
|
||||
--let $dropped_t_temp= $dropped_temp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('Drop-Temp-N-Temp') || HEX(@command) = HEX('Drop-Temp-T-Temp') || HEX(@command) = HEX('Drop-T') || HEX(@command) = HEX('Drop-N')`)
|
||||
{
|
||||
if (`SELECT HEX(@command) = HEX('Drop-Temp-N-Temp')`)
|
||||
{
|
||||
--let $dropped_temp=$dropped_n_temp
|
||||
--let $available_temp=$available_n_temp
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-Temp-T-Temp')`)
|
||||
{
|
||||
--let $dropped_temp=$dropped_t_temp
|
||||
--let $available_temp=$available_t_temp
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-N')`)
|
||||
{
|
||||
--let $dropped_temp=$dropped_n
|
||||
--let $available_temp=$available_n
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-T')`)
|
||||
{
|
||||
--let $dropped_temp=$dropped_t
|
||||
--let $available_temp=$available_t
|
||||
}
|
||||
|
||||
--eval SET @check_temp='$available_temp'
|
||||
if (`SELECT HEX(@check_temp) != HEX('')`)
|
||||
{
|
||||
SET @temp= SUBSTRING_INDEX(@check_temp, ',', 1);
|
||||
let $table=`SELECT @temp`;
|
||||
--eval SET @check_temp='$dropped_temp'
|
||||
if (`SELECT HEX(@check_temp) != HEX('')`)
|
||||
{
|
||||
--let $dropped_temp= $dropped_temp,$table
|
||||
}
|
||||
if (`SELECT HEX(@check_temp) = HEX('')`)
|
||||
{
|
||||
--let $dropped_temp= $table
|
||||
}
|
||||
--eval SET @check_temp='$available_temp'
|
||||
--eval SET @table_temp='$table'
|
||||
SET @check_temp= LTRIM(SUBSTRING(@check_temp, LENGTH(@table_temp) + 2));
|
||||
--let $available_temp= `SELECT @check_temp`
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('Drop-Temp-N-Temp')`)
|
||||
{
|
||||
--enable_query_log
|
||||
--eval DROP TEMPORARY TABLE $table
|
||||
--disable_query_log
|
||||
|
||||
--let $available_n_temp= $available_temp
|
||||
--let $dropped_n_temp= $dropped_temp
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-Temp-T-Temp')`)
|
||||
{
|
||||
--enable_query_log
|
||||
--eval DROP TEMPORARY TABLE $table
|
||||
--disable_query_log
|
||||
|
||||
--let $available_t_temp= $available_temp
|
||||
--let $dropped_t_temp= $dropped_temp
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-N')`)
|
||||
{
|
||||
--enable_query_log
|
||||
--eval DROP TABLE $table
|
||||
--disable_query_log
|
||||
|
||||
--let $available_n= $available_temp
|
||||
--let $dropped_n= $dropped_temp
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-T')`)
|
||||
{
|
||||
--enable_query_log
|
||||
--eval DROP TABLE $table
|
||||
--disable_query_log
|
||||
|
||||
--let $available_t= $available_temp
|
||||
--let $dropped_t= $dropped_temp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('Drop-Temp-Xe-Temp')`)
|
||||
{
|
||||
--enable_query_log
|
||||
--eval DROP TEMPORARY TABLE tt_xx_1
|
||||
--disable_query_log
|
||||
}
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('Drop-Temp-If-Xe-Temp')`)
|
||||
{
|
||||
--enable_query_log
|
||||
--eval DROP TEMPORARY TABLE IF EXISTS tt_xx_1
|
||||
--disable_query_log
|
||||
}
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('Drop-Xe')`)
|
||||
{
|
||||
--enable_query_log
|
||||
--eval DROP TABLE xx_1
|
||||
--disable_query_log
|
||||
}
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('Drop-If-Xe')`)
|
||||
{
|
||||
--enable_query_log
|
||||
--eval DROP TABLE IF EXISTS xx_1
|
||||
--disable_query_log
|
||||
}
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('Drop-Temp-NXe-Temp') || HEX(@command) = HEX('Drop-Temp-TXe-Temp') || HEX(@command) = HEX('Drop-NXe') || HEX(@command) = HEX('Drop-TXe') || HEX(@command) = HEX('Drop-Temp-If-NXe-Temp') || HEX(@command) = HEX('Drop-Temp-If-TXe-Temp') || HEX(@command) = HEX('Drop-If-NXe') || HEX(@command) = HEX('Drop-If-TXe')`)
|
||||
{
|
||||
if (`SELECT HEX(@command) = HEX('Drop-Temp-NXe-Temp') || HEX(@command) = HEX('Drop-Temp-If-NXe-Temp')`)
|
||||
{
|
||||
--let $dropped_temp=$dropped_n_temp
|
||||
--let $available_temp=$available_n_temp
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-Temp-TXe-Temp') || HEX(@command) = HEX('Drop-Temp-If-TXe-Temp')`)
|
||||
{
|
||||
--let $dropped_temp=$dropped_t_temp
|
||||
--let $available_temp=$available_t_temp
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-NXe') || HEX(@command) = HEX('Drop-If-NXe')`)
|
||||
{
|
||||
--let $dropped_temp=$dropped_n
|
||||
--let $available_temp=$available_n
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-TXe') || HEX(@command) = HEX('Drop-If-TXe')`)
|
||||
{
|
||||
--let $dropped_temp=$dropped_t
|
||||
--let $available_temp=$available_t
|
||||
}
|
||||
|
||||
--eval SET @check_temp='$available_temp'
|
||||
if (`SELECT HEX(@check_temp) != HEX('')`)
|
||||
{
|
||||
SET @temp= SUBSTRING_INDEX(@check_temp, ',', 1);
|
||||
let $table=`SELECT @temp`;
|
||||
--eval SET @check_temp='$dropped_temp'
|
||||
if (`SELECT HEX(@check_temp) != HEX('')`)
|
||||
{
|
||||
--let $dropped_temp= $dropped_temp,$table
|
||||
}
|
||||
if (`SELECT HEX(@check_temp) = HEX('')`)
|
||||
{
|
||||
--let $dropped_n_temp= $table
|
||||
}
|
||||
--eval SET @check_temp='$available_temp'
|
||||
--eval SET @table_temp='$table'
|
||||
SET @check_temp= LTRIM(SUBSTRING(@check_temp, LENGTH(@table_temp) + 2));
|
||||
--let $available_temp= `SELECT @check_temp`
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('Drop-Temp-NXe-Temp')`)
|
||||
{
|
||||
--enable_query_log
|
||||
--eval DROP TEMPORARY TABLE $table, tt_1
|
||||
--disable_query_log
|
||||
|
||||
--let $available_n_temp= $available_temp
|
||||
--let $dropped_n_temp= $dropped_temp
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-Temp-If-NXe-Temp')`)
|
||||
{
|
||||
--enable_query_log
|
||||
--eval DROP TEMPORARY TABLE IF EXISTS $table, tt_1
|
||||
--disable_query_log
|
||||
|
||||
--let $available_n_temp= $available_temp
|
||||
--let $dropped_n_temp= $dropped_temp
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-Temp-TXe-Temp')`)
|
||||
{
|
||||
--enable_query_log
|
||||
--eval DROP TEMPORARY TABLE $table, tt_1
|
||||
--disable_query_log
|
||||
|
||||
--let $available_t_temp= $available_temp
|
||||
--let $dropped_t_temp= $dropped_temp
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-Temp-If-TXe-Temp')`)
|
||||
{
|
||||
--enable_query_log
|
||||
--eval DROP TEMPORARY TABLE IF EXISTS $table, tt_1
|
||||
--disable_query_log
|
||||
|
||||
--let $available_t_temp= $available_temp
|
||||
--let $dropped_t_temp= $dropped_temp
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-NXe')`)
|
||||
{
|
||||
--enable_query_log
|
||||
--eval DROP TABLE $table, xx_1
|
||||
--disable_query_log
|
||||
|
||||
--let $available_n= $available_temp
|
||||
--let $dropped_n= $dropped_temp
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-If-NXe')`)
|
||||
{
|
||||
--enable_query_log
|
||||
--eval DROP TABLE IF EXISTS $table, xx_1
|
||||
--disable_query_log
|
||||
|
||||
--let $available_n= $available_temp
|
||||
--let $dropped_n= $dropped_temp
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-TXe')`)
|
||||
{
|
||||
--enable_query_log
|
||||
--eval DROP TABLE $table, xx_1
|
||||
--disable_query_log
|
||||
|
||||
--let $available_t= $available_temp
|
||||
--let $dropped_t= $dropped_temp
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-If-TXe')`)
|
||||
{
|
||||
--enable_query_log
|
||||
--eval DROP TABLE IF EXISTS $table, xx_1
|
||||
--disable_query_log
|
||||
|
||||
--let $available_t= $available_temp
|
||||
--let $dropped_t= $dropped_temp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('Drop-Temp-NN-Temp') || HEX(@command) = HEX('Drop-Temp-TT-Temp') || HEX(@command) = HEX('Drop-NN') || HEX(@command) = HEX('Drop-TT')`)
|
||||
{
|
||||
if (`SELECT HEX(@command) = HEX('Drop-Temp-NN-Temp')`)
|
||||
{
|
||||
--let $dropped_temp=$dropped_n_temp
|
||||
--let $available_temp=$available_n_temp
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-Temp-TT-Temp')`)
|
||||
{
|
||||
--let $dropped_temp=$dropped_t_temp
|
||||
--let $available_temp=$available_t_temp
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-NN')`)
|
||||
{
|
||||
--let $dropped_temp=$dropped_n
|
||||
--let $available_temp=$available_n
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-TT')`)
|
||||
{
|
||||
--let $dropped_temp=$dropped_t
|
||||
--let $available_temp=$available_t
|
||||
}
|
||||
|
||||
--eval SET @check_temp='$available_temp'
|
||||
if (`SELECT HEX(@check_temp) != HEX('')`)
|
||||
{
|
||||
--let $n= 2
|
||||
while (`SELECT HEX(@check_temp) != HEX('') && $n != 0`)
|
||||
{
|
||||
SET @temp= SUBSTRING_INDEX(@check_temp, ',', 1);
|
||||
let $table=`SELECT @temp`;
|
||||
--eval SET @check_temp='$dropped_temp'
|
||||
if (`SELECT HEX(@check_temp) != HEX('')`)
|
||||
{
|
||||
--let $dropped_temp= $dropped_temp,$table
|
||||
}
|
||||
if (`SELECT HEX(@check_temp) = HEX('')`)
|
||||
{
|
||||
--let $dropped_temp= $table
|
||||
}
|
||||
if (`SELECT $n = 1`)
|
||||
{
|
||||
--let $table_1= $table
|
||||
}
|
||||
if (`SELECT $n = 2`)
|
||||
{
|
||||
--let $table_2= $table
|
||||
}
|
||||
|
||||
--dec $n
|
||||
--eval SET @check_temp='$available_temp'
|
||||
--eval SET @table_temp='$table'
|
||||
SET @check_temp= LTRIM(SUBSTRING(@check_temp, LENGTH(@table_temp) + 2));
|
||||
--let $available_temp= `SELECT @check_temp`
|
||||
}
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('Drop-Temp-NN-Temp') && $n = 0`)
|
||||
{
|
||||
--enable_query_log
|
||||
--eval DROP TEMPORARY TABLE $table_1, $table_2
|
||||
--disable_query_log
|
||||
|
||||
--let $available_n_temp= $available_temp
|
||||
--let $dropped_n_temp= $dropped_temp
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-Temp-TT-Temp') && $n= 0`)
|
||||
{
|
||||
--enable_query_log
|
||||
--eval DROP TEMPORARY TABLE $table_1, $table_2
|
||||
--disable_query_log
|
||||
|
||||
--let $available_t_temp= $available_temp
|
||||
--let $dropped_t_temp= $dropped_temp
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-NN') && $n = 0`)
|
||||
{
|
||||
--enable_query_log
|
||||
--eval DROP TABLE $table_1, $table_2
|
||||
--disable_query_log
|
||||
|
||||
--let $available_n= $available_temp
|
||||
--let $dropped_n= $dropped_temp
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-TT') && $n= 0`)
|
||||
{
|
||||
--enable_query_log
|
||||
--eval DROP TABLE $table_1, $table_2
|
||||
--disable_query_log
|
||||
|
||||
--let $available_t= $available_temp
|
||||
--let $dropped_t= $dropped_temp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('Drop-Temp-TN-Temp')`)
|
||||
{
|
||||
--eval SET @check_temp_t='$available_t_temp'
|
||||
--eval SET @check_temp_n='$available_n_temp'
|
||||
if (`SELECT HEX(@check_temp_t) != HEX('') && HEX(@check_temp_n) != HEX('')`)
|
||||
{
|
||||
SET @temp_t= SUBSTRING_INDEX(@check_temp_t, ',', 1);
|
||||
let $table_t=`SELECT @temp_t`;
|
||||
--eval SET @check_temp_t='$dropped_t_temp'
|
||||
if (`SELECT HEX(@check_temp_t) != HEX('')`)
|
||||
{
|
||||
--let $dropped_t_temp= $dropped_t_temp,$table_t
|
||||
}
|
||||
if (`SELECT HEX(@check_temp_t) = HEX('')`)
|
||||
{
|
||||
--let $dropped_t_temp= $table_t
|
||||
}
|
||||
--eval SET @check_temp='$available_t_temp'
|
||||
--eval SET @table_temp='$table_t'
|
||||
SET @check_temp= LTRIM(SUBSTRING(@check_temp, LENGTH(@table_temp) + 2));
|
||||
--let $available_t_temp= `SELECT @check_temp`
|
||||
|
||||
SET @temp_n= SUBSTRING_INDEX(@check_temp_n, ',', 1);
|
||||
let $table_n=`SELECT @temp_n`;
|
||||
--eval SET @check_temp_n='$dropped_n_temp'
|
||||
if (`SELECT HEX(@check_temp_n) != HEX('')`)
|
||||
{
|
||||
--let $dropped_n_temp= $dropped_n_temp,$table_n
|
||||
}
|
||||
if (`SELECT HEX(@check_temp_n) = HEX('')`)
|
||||
{
|
||||
--let $dropped_n_temp= $table_n
|
||||
}
|
||||
--eval SET @check_temp='$available_n_temp'
|
||||
--eval SET @table_temp='$table_n'
|
||||
SET @check_temp= LTRIM(SUBSTRING(@check_temp, LENGTH(@table_temp) + 2));
|
||||
--let $available_t_temp= `SELECT @check_temp`
|
||||
|
||||
--enable_query_log
|
||||
--eval DROP TEMPORARY TABLE $table_t, $table_n
|
||||
--disable_query_log
|
||||
}
|
||||
}
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('Drop-TN')`)
|
||||
{
|
||||
--eval SET @check_temp_t='$available_t'
|
||||
--eval SET @check_temp_n='$available_n'
|
||||
if (`SELECT HEX(@check_temp_t) != HEX('') && HEX(@check_temp_n) != HEX('')`)
|
||||
{
|
||||
SET @temp_t= SUBSTRING_INDEX(@check_temp_t, ',', 1);
|
||||
let $table_t=`SELECT @temp_t`;
|
||||
--eval SET @check_temp_t='$dropped_t'
|
||||
if (`SELECT HEX(@check_temp_t) != HEX('')`)
|
||||
{
|
||||
--let $dropped_t= $dropped_t,$table_t
|
||||
}
|
||||
if (`SELECT HEX(@check_temp_t) = HEX('')`)
|
||||
{
|
||||
--let $dropped_t= $table_t
|
||||
}
|
||||
--eval SET @check_temp='$available_t'
|
||||
--eval SET @table_temp='$table_t'
|
||||
SET @check_temp= LTRIM(SUBSTRING(@check_temp, LENGTH(@table_temp) + 2));
|
||||
--let $available_t= `SELECT @check_temp`
|
||||
|
||||
SET @temp_n= SUBSTRING_INDEX(@check_temp_n, ',', 1);
|
||||
let $table_n=`SELECT @temp_n`;
|
||||
--eval SET @check_temp_n='$dropped_n'
|
||||
if (`SELECT HEX(@check_temp_n) != HEX('')`)
|
||||
{
|
||||
--let $dropped_n= $dropped_n,$table_n
|
||||
}
|
||||
if (`SELECT HEX(@check_temp_n) = HEX('')`)
|
||||
{
|
||||
--let $dropped_n= $table_n
|
||||
}
|
||||
--eval SET @check_temp='$available_n'
|
||||
--eval SET @table_temp='$table_n'
|
||||
SET @check_temp= LTRIM(SUBSTRING(@check_temp, LENGTH(@table_temp) + 2));
|
||||
--let $available_t= `SELECT @check_temp`
|
||||
|
||||
--enable_query_log
|
||||
--eval DROP TABLE $table_t, $table_n
|
||||
--disable_query_log
|
||||
}
|
||||
}
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('Drop-N-TN-Temp') || HEX(@command) = HEX('Drop-TN-Temp')`)
|
||||
{
|
||||
--eval SET @check_temp_t='$available_t_temp'
|
||||
--eval SET @check_temp_n='$available_n_temp'
|
||||
if (`SELECT HEX(@command) = HEX('Drop-N-TN-Temp')`)
|
||||
{
|
||||
--eval SET @check_n='$available_n'
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-TN-Temp')`)
|
||||
{
|
||||
#
|
||||
# Just to be possible to go through the next if...
|
||||
#
|
||||
--eval SET @check_n='...'
|
||||
}
|
||||
if (`SELECT HEX(@check_temp_t) != HEX('') && HEX(@check_temp_n) != HEX('') && HEX(@check_n) != HEX('')`)
|
||||
{
|
||||
SET @temp_t= SUBSTRING_INDEX(@check_temp_t, ',', 1);
|
||||
let $table_temp_t=`SELECT @temp_t`;
|
||||
--eval SET @check_temp_t='$dropped_t_temp'
|
||||
if (`SELECT HEX(@check_temp_t) != HEX('')`)
|
||||
{
|
||||
--let $dropped_t_temp= $dropped_t_temp,$table_temp_t
|
||||
}
|
||||
if (`SELECT HEX(@check_temp_t) = HEX('')`)
|
||||
{
|
||||
--let $dropped_t_temp= $table_temp_t
|
||||
}
|
||||
--eval SET @check_temp='$available_t_temp'
|
||||
--eval SET @table_temp='$table_temp_t'
|
||||
SET @check_temp= LTRIM(SUBSTRING(@check_temp, LENGTH(@table_temp) + 2));
|
||||
--let $available_t_temp= `SELECT @check_temp`
|
||||
|
||||
SET @temp_n= SUBSTRING_INDEX(@check_temp_n, ',', 1);
|
||||
let $table_temp_n=`SELECT @temp_n`;
|
||||
--eval SET @check_temp_n='$dropped_n_temp'
|
||||
if (`SELECT HEX(@check_temp_n) != HEX('')`)
|
||||
{
|
||||
--let $dropped_n_temp= $dropped_n_temp,$table_temp_n
|
||||
}
|
||||
if (`SELECT HEX(@check_temp_n) = HEX('')`)
|
||||
{
|
||||
--let $dropped_n_temp= $table_temp_n
|
||||
}
|
||||
--eval SET @check_temp='$available_n_temp'
|
||||
--eval SET @table_temp='$table_temp_n'
|
||||
SET @check_temp= LTRIM(SUBSTRING(@check_temp, LENGTH(@table_temp) + 2));
|
||||
--let $available_n_temp= `SELECT @check_temp`
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('Drop-N-TN-Temp')`)
|
||||
{
|
||||
SET @temp_n= SUBSTRING_INDEX(@check_n, ',', 1);
|
||||
let $table_n=`SELECT @temp_n`;
|
||||
--eval SET @check_n='$dropped_n'
|
||||
if (`SELECT HEX(@check_n) != HEX('')`)
|
||||
{
|
||||
--let $dropped_n= $dropped_n,$table_n
|
||||
}
|
||||
if (`SELECT HEX(@check_n) = HEX('')`)
|
||||
{
|
||||
--let $dropped_n= $table_n
|
||||
}
|
||||
--eval SET @check_temp='$available_n'
|
||||
--eval SET @table_temp='$table_n'
|
||||
SET @check_temp= LTRIM(SUBSTRING(@check_temp, LENGTH(@table_temp) + 2));
|
||||
--let $available_n= `SELECT @check_temp`
|
||||
|
||||
--enable_query_log
|
||||
--eval DROP TABLE $table_temp_t, $table_temp_n, $table_n
|
||||
--disable_query_log
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Drop-TN-Temp')`)
|
||||
{
|
||||
--enable_query_log
|
||||
--eval DROP TABLE $table_temp_t, $table_temp_n
|
||||
--disable_query_log
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('C')`)
|
||||
{
|
||||
--enable_query_log
|
||||
--error 0, ER_GET_ERRMSG
|
||||
eval COMMIT;
|
||||
--disable_query_log
|
||||
}
|
||||
|
||||
if (`SELECT HEX(@command) = HEX('R')`)
|
||||
{
|
||||
--enable_query_log
|
||||
--error 0, ER_GET_ERRMSG
|
||||
eval ROLLBACK;
|
||||
--disable_query_log
|
||||
}
|
||||
|
||||
SET @commands= LTRIM(SUBSTRING(@commands, LENGTH(@command) + 1));
|
||||
if (`SELECT HEX(@commands) = HEX('')`)
|
||||
{
|
||||
let $binlog_start= $pos_trans_command;
|
||||
--echo -b-b-b-b-b-b-b-b-b-b-b- >> $commands << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
--source include/show_binlog_events.inc
|
||||
--echo -e-e-e-e-e-e-e-e-e-e-e- >> $commands << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
--echo
|
||||
|
||||
--disable_warnings
|
||||
--let $available_n_temp=
|
||||
--let $dropped_n_temp=
|
||||
--let $n= $tot_table
|
||||
while (`SELECT $n != 0`)
|
||||
{
|
||||
--eval DROP TEMPORARY TABLE IF EXISTS nt_tmp_$n
|
||||
--eval CREATE TEMPORARY TABLE nt_tmp_$n ( id INT ) ENGINE = MyIsam
|
||||
--eval SET @check_temp='$available_n_temp'
|
||||
if (`SELECT HEX(@check_temp) != HEX('')`)
|
||||
{
|
||||
--let $available_n_temp= $available_n_temp,nt_tmp_$n
|
||||
}
|
||||
if (`SELECT HEX(@check_temp) = HEX('')`)
|
||||
{
|
||||
--let $available_n_temp= nt_tmp_$n
|
||||
}
|
||||
--dec $n
|
||||
}
|
||||
|
||||
--let $available_t_temp=
|
||||
--let $dropped_t_temp=
|
||||
--let $n= $tot_table
|
||||
while (`SELECT $n != 0`)
|
||||
{
|
||||
--eval DROP TEMPORARY TABLE IF EXISTS tt_tmp_$n
|
||||
--eval CREATE TEMPORARY TABLE tt_tmp_$n ( id INT ) ENGINE = Innodb
|
||||
--eval SET @check_temp='$available_t_temp'
|
||||
if (`SELECT HEX(@check_temp) != HEX('')`)
|
||||
{
|
||||
--let $available_t_temp= $available_t_temp,tt_tmp_$n
|
||||
}
|
||||
if (`SELECT HEX(@check_temp) = HEX('')`)
|
||||
{
|
||||
--let $available_t_temp= tt_tmp_$n
|
||||
}
|
||||
--dec $n
|
||||
}
|
||||
|
||||
--let $available_t=
|
||||
--let $dropped_t=
|
||||
--let $n= $tot_table
|
||||
while (`SELECT $n != 0`)
|
||||
{
|
||||
--eval DROP TABLE IF EXISTS tt_$n
|
||||
--eval CREATE TABLE tt_$n ( id INT ) ENGINE = Innodb
|
||||
--eval SET @check_temp='$available_t'
|
||||
if (`SELECT HEX(@check_temp) != HEX('')`)
|
||||
{
|
||||
--let $available_t= $available_t,tt_$n
|
||||
}
|
||||
if (`SELECT HEX(@check_temp) = HEX('')`)
|
||||
{
|
||||
--let $available_t= tt_$n
|
||||
}
|
||||
--dec $n
|
||||
}
|
||||
|
||||
--let $available_n=
|
||||
--let $dropped_n=
|
||||
--let $n= $tot_table
|
||||
while (`SELECT $n != 0`)
|
||||
{
|
||||
--eval DROP TABLE IF EXISTS nt_$n
|
||||
--eval CREATE TABLE nt_$n ( id INT ) ENGINE = MyIsam
|
||||
--eval SET @check_temp='$available_n'
|
||||
if (`SELECT HEX(@check_temp) != HEX('')`)
|
||||
{
|
||||
--let $available_n= $available_n,nt_$n
|
||||
}
|
||||
if (`SELECT HEX(@check_temp) = HEX('')`)
|
||||
{
|
||||
--let $available_n= nt_$n
|
||||
}
|
||||
--dec $n
|
||||
}
|
||||
--enable_warnings
|
||||
|
||||
let $pos_trans_command= query_get_value("SHOW MASTER STATUS", Position, 1);
|
||||
let $commands= '';
|
||||
}
|
||||
--enable_query_log
|
||||
}
|
389
mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.test
Normal file
389
mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.test
Normal file
|
@ -0,0 +1,389 @@
|
|||
###############################################################################
|
||||
# In this test case, we check how changes to temporary tables are written
|
||||
# to the binary log.
|
||||
#
|
||||
# (TODO --- GET INFO AS SOON AS THE SITE IS AVAILABLE)
|
||||
#
|
||||
# This test uses the commands available at:
|
||||
# extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
|
||||
--echo #########################################################################
|
||||
--echo # CONFIGURATION
|
||||
--echo #########################################################################
|
||||
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.");
|
||||
|
||||
--let $tot_table= 2
|
||||
SET @commands= 'configure';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
--echo #########################################################################
|
||||
--echo # 1 - Tables dropped by "DROP TEMPORARY TABLE"
|
||||
--echo #########################################################################
|
||||
connection master;
|
||||
|
||||
--echo
|
||||
--echo #
|
||||
--echo #1) Generates in the binlog what follows:
|
||||
--echo #
|
||||
SET @commands= 'Drop-Temp-T-Temp';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'Drop-Temp-N-Temp';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'Drop-Temp-Xe-Temp';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'Drop-Temp-If-Xe-Temp';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'Drop-Temp-TXe-Temp';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'Drop-Temp-If-TXe-Temp';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'Drop-Temp-NXe-Temp';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'Drop-Temp-If-NXe-Temp';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'Drop-Temp-TN-Temp';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'Drop-Temp-TT-Temp';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'Drop-Temp-NN-Temp';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
|
||||
--echo
|
||||
--echo #
|
||||
--echo #2) Generates in the binlog what follows:
|
||||
--echo #
|
||||
SET @commands= 'B T Drop-Temp-T-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-T-Temp N Drop-Temp-T-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-N-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-N-Temp N Drop-Temp-N-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-Xe-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-If-Xe-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-TXe-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-If-TXe-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-NXe-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-If-NXe-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-TN-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-TT-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-NN-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
|
||||
--echo
|
||||
--echo #
|
||||
--echo #3) Generates in the binlog what follows:
|
||||
--echo #
|
||||
SET @commands= 'B T Drop-Temp-T-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-T-Temp N Drop-Temp-T-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-N-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-N-Temp N Drop-Temp-N-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-Xe-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-If-Xe-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-TXe-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-If-TXe-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-NXe-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-If-NXe-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-TN-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-TT-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-NN-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
|
||||
--echo #########################################################################
|
||||
--echo # 2 - Tables dropped by "DROP TABLE"
|
||||
--echo #########################################################################
|
||||
connection master;
|
||||
|
||||
--echo
|
||||
--echo #
|
||||
--echo #1) Generates in the binlog what follows:
|
||||
--echo #
|
||||
SET @commands= 'Drop-T';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'Drop-N';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'Drop-Xe';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'Drop-If-Xe';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'Drop-TXe';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'Drop-If-TXe';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'Drop-NXe';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'Drop-If-NXe';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'Drop-TN';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'Drop-TT';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'Drop-NN';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'Drop-N-TN-Temp';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'Drop-TN-Temp';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
--echo
|
||||
--echo #
|
||||
--echo #2) Generates in the binlog what follows:
|
||||
--echo #
|
||||
SET @commands= 'B T Drop-T';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-N';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-Xe';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-If-Xe';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-TXe';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-If-TXe';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-NXe';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-If-NXe';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-TN';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-TT';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-NN';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-N-TN-Temp';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B T Drop-TN-Temp';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
--echo #########################################################################
|
||||
--echo # 3 - CREATE TEMPORARY TABLE
|
||||
--echo #########################################################################
|
||||
connection master;
|
||||
|
||||
--echo
|
||||
--echo #
|
||||
--echo #1) Generates in the binlog what follows:
|
||||
--echo #
|
||||
SET @commands= 'Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
--echo
|
||||
--echo #
|
||||
--echo #2) Generates in the binlog what follows:
|
||||
--echo #
|
||||
SET @commands= 'B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
--echo
|
||||
--echo #
|
||||
--echo #3) Generates in the binlog what follows:
|
||||
--echo #
|
||||
SET @commands= 'B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
|
||||
--echo #########################################################################
|
||||
--echo # 4 - CHANGING TEMPORARY TABLES
|
||||
--echo #########################################################################
|
||||
connection master;
|
||||
|
||||
--echo
|
||||
--echo #
|
||||
--echo #1) Generates in the binlog what follows:
|
||||
--echo #
|
||||
SET @commands= 'B N N-Temp N-SELECT-N-Temp N-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B N N-Temp T-SELECT-N-Temp N-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B N N-Temp N-SELECT-T-Temp N-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp C';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
--echo
|
||||
--echo
|
||||
--echo #
|
||||
--echo #2) Generates in the binlog what follows:
|
||||
--echo #
|
||||
SET @commands= 'B N N-Temp N-SELECT-N-Temp N-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B N N-Temp T-SELECT-N-Temp N-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B N N-Temp N-SELECT-T-Temp N-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp R';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
||||
|
||||
--echo ###################################################################################
|
||||
--echo # CHECK CONSISTENCY
|
||||
--echo ###################################################################################
|
||||
connection master;
|
||||
sync_slave_with_master;
|
||||
|
||||
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
|
||||
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLD_DATADIR/test-temporary-master.sql
|
||||
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLD_DATADIR/test-temporary-slave.sql
|
||||
--diff_files $MYSQLD_DATADIR/test-temporary-master.sql $MYSQLD_DATADIR/test-temporary-slave.sql
|
||||
|
||||
--echo #########################################################################
|
||||
--echo # CLEAN
|
||||
--echo #########################################################################
|
||||
SET @commands= 'clean';
|
||||
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
|
|
@ -1606,3 +1606,41 @@ drop function f1;
|
|||
--echo # End of WL#2649 Number-to-string conversions
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # Bug#54668 User variable assignments get wrong type
|
||||
--echo #
|
||||
SET @x=md5('a');
|
||||
SELECT charset(@x), collation(@x);
|
||||
SET @x=old_password('a');
|
||||
SELECT charset(@x), collation(@x);
|
||||
SET @x=password('a');
|
||||
SELECT charset(@x), collation(@x);
|
||||
SET @x=sha('a');
|
||||
SELECT charset(@x), collation(@x);
|
||||
SET @x=sha1('a');
|
||||
SELECT charset(@x), collation(@x);
|
||||
SET @x=astext(point(1,2));
|
||||
SELECT charset(@x), collation(@x);
|
||||
SET @x=aswkt(point(1,2));
|
||||
SELECT charset(@x), collation(@x);
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#52159 returning time type from function and empty left join causes debug assertion
|
||||
--echo #
|
||||
CREATE FUNCTION f1() RETURNS TIME RETURN 1;
|
||||
CREATE TABLE t1 (b INT);
|
||||
INSERT INTO t1 VALUES (0);
|
||||
SELECT f1() FROM t1 LEFT JOIN (SELECT 1 AS a FROM t1 LIMIT 0) AS d ON 1 GROUP BY a;
|
||||
DROP FUNCTION f1;
|
||||
DROP TABLE t1;
|
||||
|
||||
SET NAMES latin1;
|
||||
SET sql_mode='';
|
||||
CREATE TABLE t1(a char(215) CHARACTER SET utf8 NOT NULL DEFAULT '', KEY(a));
|
||||
INSERT INTO t1 VALUES ();
|
||||
--disable_warnings
|
||||
SELECT maketime(`a`,`a`,`a`) FROM t1 GROUP BY 1;
|
||||
--enable_warnings
|
||||
DROP TABLE t1;
|
||||
SET sql_mode=default;
|
||||
|
|
|
@ -13,7 +13,7 @@ perl;
|
|||
@skipvars=qw/basedir open-files-limit general-log-file log plugin-dir
|
||||
log-slow-queries pid-file slow-query-log-file
|
||||
datadir slave-load-tmpdir tmpdir/;
|
||||
@plugins=qw/innodb ndb archive blackhole federated partition ndbcluster safemalloc debug temp-pool ssl des-key-file
|
||||
@plugins=qw/innodb ndb archive blackhole federated partition ndbcluster debug temp-pool ssl des-key-file
|
||||
thread-concurrency super-large-pages mutex-deadlock-detector null-audit/;
|
||||
@env=qw/MYSQLTEST_VARDIR MYSQL_TEST_DIR MYSQL_LIBDIR MYSQL_CHARSETSDIR MYSQL_SHAREDIR /;
|
||||
$re1=join('|', @skipvars, @plugins);
|
||||
|
|
|
@ -104,10 +104,11 @@ sub init_pattern {
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
sub collect_test_cases ($$$) {
|
||||
sub collect_test_cases ($$$$) {
|
||||
my $opt_reorder= shift; # True if we're reordering tests
|
||||
my $suites= shift; # Semicolon separated list of test suites
|
||||
my $opt_cases= shift;
|
||||
my $opt_skip_test_list= shift;
|
||||
my $cases= []; # Array of hash(one hash for each testcase)
|
||||
|
||||
$do_test_reg= init_pattern($do_test, "--do-test");
|
||||
|
@ -131,7 +132,7 @@ sub collect_test_cases ($$$) {
|
|||
{
|
||||
foreach my $suite (split(",", $suites))
|
||||
{
|
||||
push(@$cases, collect_one_suite($suite, $opt_cases));
|
||||
push(@$cases, collect_one_suite($suite, $opt_cases, $opt_skip_test_list));
|
||||
last if $some_test_found;
|
||||
}
|
||||
}
|
||||
|
@ -256,6 +257,7 @@ sub collect_one_suite($)
|
|||
{
|
||||
my $suite= shift; # Test suite name
|
||||
my $opt_cases= shift;
|
||||
my $opt_skip_test_list= shift;
|
||||
my @cases; # Array of hash
|
||||
|
||||
mtr_verbose("Collecting: $suite");
|
||||
|
@ -317,18 +319,23 @@ sub collect_one_suite($)
|
|||
# Build a hash of disabled testcases for this suite
|
||||
# ----------------------------------------------------------------------
|
||||
my %disabled;
|
||||
if ( open(DISABLED, "$testdir/disabled.def" ) )
|
||||
{
|
||||
while ( <DISABLED> )
|
||||
my @disabled_collection= @{$opt_skip_test_list} if defined @{$opt_skip_test_list};
|
||||
unshift (@disabled_collection, "$testdir/disabled.def");
|
||||
for my $skip (@disabled_collection)
|
||||
{
|
||||
if ( open(DISABLED, $skip ) )
|
||||
{
|
||||
chomp;
|
||||
if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ )
|
||||
while ( <DISABLED> )
|
||||
{
|
||||
$disabled{$1}= $2;
|
||||
chomp;
|
||||
if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ )
|
||||
{
|
||||
$disabled{$1}= $2 if not exists $disabled{$1};
|
||||
}
|
||||
}
|
||||
close DISABLED;
|
||||
}
|
||||
close DISABLED;
|
||||
}
|
||||
}
|
||||
|
||||
# Read suite.opt file
|
||||
my $suite_opt_file= "$testdir/suite.opt";
|
||||
|
|
|
@ -141,7 +141,6 @@ sub mtr_exe_maybe_exists (@) {
|
|||
my @path= @_;
|
||||
|
||||
map {$_.= ".exe"} @path if $::glob_win32;
|
||||
map {$_.= ".nlm"} @path if $::glob_netware;
|
||||
foreach my $path ( @path )
|
||||
{
|
||||
if($::glob_win32)
|
||||
|
|
|
@ -253,19 +253,8 @@ sub mtr_report_stats ($) {
|
|||
mtr_warning("can't read $errlog");
|
||||
next;
|
||||
}
|
||||
my $leak_reports_expected= undef;
|
||||
while ( <ERR> )
|
||||
{
|
||||
# There is a test case that purposely provokes a
|
||||
# SAFEMALLOC leak report, even though there is no actual
|
||||
# leak. We need to detect this, and ignore the warning in
|
||||
# that case.
|
||||
if (/Begin safemalloc memory dump:/) {
|
||||
$leak_reports_expected= 1;
|
||||
} elsif (/End safemalloc memory dump./) {
|
||||
$leak_reports_expected= undef;
|
||||
}
|
||||
|
||||
# Skip some non fatal warnings from the log files
|
||||
if (
|
||||
/\"SELECT UNIX_TIMESTAMP\(\)\" failed on master/ or
|
||||
|
@ -426,9 +415,6 @@ sub mtr_report_stats ($) {
|
|||
}
|
||||
if ( /$pattern/ )
|
||||
{
|
||||
if ($leak_reports_expected) {
|
||||
next;
|
||||
}
|
||||
$found_problems= 1;
|
||||
print WARN basename($errlog) . ": $testname: $_";
|
||||
}
|
||||
|
|
|
@ -76,7 +76,6 @@ $| = 1; # Automatically flush STDOUT
|
|||
our $glob_win32_perl= ($^O eq "MSWin32"); # ActiveState Win32 Perl
|
||||
our $glob_cygwin_perl= ($^O eq "cygwin"); # Cygwin Perl
|
||||
our $glob_win32= ($glob_win32_perl or $glob_cygwin_perl);
|
||||
our $glob_netware= ($^O eq "NetWare"); # NetWare
|
||||
|
||||
require "lib/v1/mtr_cases.pl";
|
||||
require "lib/v1/mtr_im.pl";
|
||||
|
@ -3125,11 +3124,8 @@ sub install_db ($$) {
|
|||
$path_vardir_trace, $type);
|
||||
}
|
||||
|
||||
if ( ! $glob_netware )
|
||||
{
|
||||
mtr_add_arg($args, "--lc-messages-dir=%s", $path_language);
|
||||
mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
|
||||
}
|
||||
mtr_add_arg($args, "--lc-messages-dir=%s", $path_language);
|
||||
mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
|
||||
|
||||
# If DISABLE_GRANT_OPTIONS is defined when the server is compiled (e.g.,
|
||||
# configure --disable-grant-options), mysqld will not recognize the
|
||||
|
@ -3882,8 +3878,6 @@ sub mysqld_arguments ($$$$) {
|
|||
|
||||
if ( $opt_valgrind_mysqld )
|
||||
{
|
||||
mtr_add_arg($args, "%s--loose-skip-safemalloc", $prefix);
|
||||
|
||||
if ( $mysql_version_id < 50100 )
|
||||
{
|
||||
mtr_add_arg($args, "%s--skip-bdb", $prefix);
|
||||
|
@ -4722,7 +4716,6 @@ sub run_check_testcase ($$) {
|
|||
|
||||
mtr_add_arg($args, "--no-defaults");
|
||||
mtr_add_arg($args, "--silent");
|
||||
mtr_add_arg($args, "--skip-safemalloc");
|
||||
mtr_add_arg($args, "--tmpdir=%s", $opt_tmpdir);
|
||||
mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
|
||||
|
||||
|
@ -4805,7 +4798,6 @@ sub run_mysqltest ($) {
|
|||
|
||||
mtr_add_arg($args, "--no-defaults");
|
||||
mtr_add_arg($args, "--silent");
|
||||
mtr_add_arg($args, "--skip-safemalloc");
|
||||
mtr_add_arg($args, "--tmpdir=%s", $opt_tmpdir);
|
||||
mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
|
||||
mtr_add_arg($args, "--logdir=%s/log", $opt_vardir);
|
||||
|
|
|
@ -123,7 +123,7 @@ $pid_file="mysql_stress_test.pid";
|
|||
$opt_mysqltest= ($^O =~ /mswin32/i) ? "mysqltest.exe" : "mysqltest";
|
||||
$opt_check_tests_file="";
|
||||
# OBM adding a setting for 'max-connect-retries=20' the default of 500 is to high
|
||||
@mysqltest_args=("--silent", "-v", "--skip-safemalloc", "--max-connect-retries=20");
|
||||
@mysqltest_args=("--silent", "-v", "--max-connect-retries=20");
|
||||
|
||||
# Client ip address
|
||||
$client_ip=inet_ntoa((gethostbyname(hostname()))[4]);
|
||||
|
|
|
@ -165,6 +165,7 @@ our @opt_extra_mysqld_opt;
|
|||
my $opt_compress;
|
||||
my $opt_ssl;
|
||||
my $opt_skip_ssl;
|
||||
my @opt_skip_test_list;
|
||||
our $opt_ssl_supported;
|
||||
my $opt_ps_protocol;
|
||||
my $opt_sp_protocol;
|
||||
|
@ -326,7 +327,7 @@ sub main {
|
|||
}
|
||||
|
||||
mtr_report("Collecting tests...");
|
||||
my $tests= collect_test_cases($opt_reorder, $opt_suites, \@opt_cases);
|
||||
my $tests= collect_test_cases($opt_reorder, $opt_suites, \@opt_cases, \@opt_skip_test_list);
|
||||
|
||||
if ( $opt_report_features ) {
|
||||
# Put "report features" as the first test to run
|
||||
|
@ -948,6 +949,7 @@ sub command_line_setup {
|
|||
|
||||
'help|h' => \$opt_usage,
|
||||
'list-options' => \$opt_list_options,
|
||||
'skip-test-list=s' => \@opt_skip_test_list
|
||||
);
|
||||
|
||||
GetOptions(%options) or usage("Can't read options");
|
||||
|
@ -3178,7 +3180,6 @@ sub start_run_one ($$) {
|
|||
mtr_add_arg($args, "--defaults-group-suffix=%s", $mysqld->after('mysqld'));
|
||||
|
||||
mtr_add_arg($args, "--silent");
|
||||
mtr_add_arg($args, "--skip-safemalloc");
|
||||
mtr_add_arg($args, "--test-file=%s", "include/$run.test");
|
||||
|
||||
my $errfile= "$opt_vardir/tmp/$name.err";
|
||||
|
@ -3757,25 +3758,6 @@ sub extract_server_log ($$) {
|
|||
}
|
||||
$Ferr = undef; # Close error log file
|
||||
|
||||
# mysql_client_test.test sends a COM_DEBUG packet to the server
|
||||
# to provoke a SAFEMALLOC leak report, ignore any warnings
|
||||
# between "Begin/end safemalloc memory dump"
|
||||
if ( grep(/Begin safemalloc memory dump:/, @lines) > 0)
|
||||
{
|
||||
my $discard_lines= 1;
|
||||
foreach my $line ( @lines )
|
||||
{
|
||||
if ($line =~ /Begin safemalloc memory dump:/){
|
||||
$discard_lines = 1;
|
||||
} elsif ($line =~ /End safemalloc memory dump./){
|
||||
$discard_lines = 0;
|
||||
}
|
||||
|
||||
if ($discard_lines){
|
||||
$line = "ignored";
|
||||
}
|
||||
}
|
||||
}
|
||||
return @lines;
|
||||
}
|
||||
|
||||
|
@ -3871,8 +3853,6 @@ sub start_check_warnings ($$) {
|
|||
|
||||
mtr_add_arg($args, "--defaults-file=%s", $path_config_file);
|
||||
mtr_add_arg($args, "--defaults-group-suffix=%s", $mysqld->after('mysqld'));
|
||||
|
||||
mtr_add_arg($args, "--loose-skip-safemalloc");
|
||||
mtr_add_arg($args, "--test-file=%s", "include/check-warnings.test");
|
||||
|
||||
if ( $opt_embedded_server )
|
||||
|
@ -4303,8 +4283,6 @@ sub mysqld_arguments ($$$) {
|
|||
|
||||
if ( $opt_valgrind_mysqld )
|
||||
{
|
||||
mtr_add_arg($args, "--loose-skip-safemalloc");
|
||||
|
||||
if ( $mysql_version_id < 50100 )
|
||||
{
|
||||
mtr_add_arg($args, "--skip-bdb");
|
||||
|
@ -4897,9 +4875,6 @@ sub start_check_testcase ($$$) {
|
|||
|
||||
mtr_add_arg($args, "--defaults-file=%s", $path_config_file);
|
||||
mtr_add_arg($args, "--defaults-group-suffix=%s", $mysqld->after('mysqld'));
|
||||
|
||||
mtr_add_arg($args, "--skip-safemalloc");
|
||||
|
||||
mtr_add_arg($args, "--result-file=%s", "$opt_vardir/tmp/$name.result");
|
||||
mtr_add_arg($args, "--test-file=%s", "include/check-testcase.test");
|
||||
mtr_add_arg($args, "--verbose");
|
||||
|
@ -4940,7 +4915,6 @@ sub start_mysqltest ($) {
|
|||
|
||||
mtr_add_arg($args, "--defaults-file=%s", $path_config_file);
|
||||
mtr_add_arg($args, "--silent");
|
||||
mtr_add_arg($args, "--skip-safemalloc");
|
||||
mtr_add_arg($args, "--tmpdir=%s", $opt_tmpdir);
|
||||
mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
|
||||
mtr_add_arg($args, "--logdir=%s/log", $opt_vardir);
|
||||
|
@ -5440,6 +5414,9 @@ Options to control what test suites or cases to run
|
|||
enable-disabled Run also tests marked as disabled
|
||||
print-testcases Don't run the tests but print details about all the
|
||||
selected tests, in the order they would be run.
|
||||
skip-test-list=FILE Skip the tests listed in FILE. Each line in the file
|
||||
is an entry and should be formatted as:
|
||||
<TESTNAME> : <COMMENT>
|
||||
|
||||
Options that specify ports
|
||||
|
||||
|
|
|
@ -2567,5 +2567,56 @@ drop function f1;
|
|||
# End of WL#2649 Number-to-string conversions
|
||||
#
|
||||
#
|
||||
# Bug#54668 User variable assignments get wrong type
|
||||
#
|
||||
SET @x=md5('a');
|
||||
SELECT charset(@x), collation(@x);
|
||||
charset(@x) collation(@x)
|
||||
binary binary
|
||||
SET @x=old_password('a');
|
||||
SELECT charset(@x), collation(@x);
|
||||
charset(@x) collation(@x)
|
||||
binary binary
|
||||
SET @x=password('a');
|
||||
SELECT charset(@x), collation(@x);
|
||||
charset(@x) collation(@x)
|
||||
binary binary
|
||||
SET @x=sha('a');
|
||||
SELECT charset(@x), collation(@x);
|
||||
charset(@x) collation(@x)
|
||||
binary binary
|
||||
SET @x=sha1('a');
|
||||
SELECT charset(@x), collation(@x);
|
||||
charset(@x) collation(@x)
|
||||
binary binary
|
||||
SET @x=astext(point(1,2));
|
||||
SELECT charset(@x), collation(@x);
|
||||
charset(@x) collation(@x)
|
||||
binary binary
|
||||
SET @x=aswkt(point(1,2));
|
||||
SELECT charset(@x), collation(@x);
|
||||
charset(@x) collation(@x)
|
||||
binary binary
|
||||
#
|
||||
# Bug#52159 returning time type from function and empty left join causes debug assertion
|
||||
#
|
||||
CREATE FUNCTION f1() RETURNS TIME RETURN 1;
|
||||
CREATE TABLE t1 (b INT);
|
||||
INSERT INTO t1 VALUES (0);
|
||||
SELECT f1() FROM t1 LEFT JOIN (SELECT 1 AS a FROM t1 LIMIT 0) AS d ON 1 GROUP BY a;
|
||||
f1()
|
||||
00:00:01
|
||||
DROP FUNCTION f1;
|
||||
DROP TABLE t1;
|
||||
SET NAMES latin1;
|
||||
SET sql_mode='';
|
||||
CREATE TABLE t1(a char(215) CHARACTER SET utf8 NOT NULL DEFAULT '', KEY(a));
|
||||
INSERT INTO t1 VALUES ();
|
||||
SELECT maketime(`a`,`a`,`a`) FROM t1 GROUP BY 1;
|
||||
maketime(`a`,`a`,`a`)
|
||||
00:00:00
|
||||
DROP TABLE t1;
|
||||
SET sql_mode=default;
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
|
|
|
@ -2649,5 +2649,56 @@ drop function f1;
|
|||
# End of WL#2649 Number-to-string conversions
|
||||
#
|
||||
#
|
||||
# Bug#54668 User variable assignments get wrong type
|
||||
#
|
||||
SET @x=md5('a');
|
||||
SELECT charset(@x), collation(@x);
|
||||
charset(@x) collation(@x)
|
||||
cp1251 cp1251_general_ci
|
||||
SET @x=old_password('a');
|
||||
SELECT charset(@x), collation(@x);
|
||||
charset(@x) collation(@x)
|
||||
cp1251 cp1251_general_ci
|
||||
SET @x=password('a');
|
||||
SELECT charset(@x), collation(@x);
|
||||
charset(@x) collation(@x)
|
||||
cp1251 cp1251_general_ci
|
||||
SET @x=sha('a');
|
||||
SELECT charset(@x), collation(@x);
|
||||
charset(@x) collation(@x)
|
||||
cp1251 cp1251_general_ci
|
||||
SET @x=sha1('a');
|
||||
SELECT charset(@x), collation(@x);
|
||||
charset(@x) collation(@x)
|
||||
cp1251 cp1251_general_ci
|
||||
SET @x=astext(point(1,2));
|
||||
SELECT charset(@x), collation(@x);
|
||||
charset(@x) collation(@x)
|
||||
cp1251 cp1251_general_ci
|
||||
SET @x=aswkt(point(1,2));
|
||||
SELECT charset(@x), collation(@x);
|
||||
charset(@x) collation(@x)
|
||||
cp1251 cp1251_general_ci
|
||||
#
|
||||
# Bug#52159 returning time type from function and empty left join causes debug assertion
|
||||
#
|
||||
CREATE FUNCTION f1() RETURNS TIME RETURN 1;
|
||||
CREATE TABLE t1 (b INT);
|
||||
INSERT INTO t1 VALUES (0);
|
||||
SELECT f1() FROM t1 LEFT JOIN (SELECT 1 AS a FROM t1 LIMIT 0) AS d ON 1 GROUP BY a;
|
||||
f1()
|
||||
00:00:01
|
||||
DROP FUNCTION f1;
|
||||
DROP TABLE t1;
|
||||
SET NAMES latin1;
|
||||
SET sql_mode='';
|
||||
CREATE TABLE t1(a char(215) CHARACTER SET utf8 NOT NULL DEFAULT '', KEY(a));
|
||||
INSERT INTO t1 VALUES ();
|
||||
SELECT maketime(`a`,`a`,`a`) FROM t1 GROUP BY 1;
|
||||
maketime(`a`,`a`,`a`)
|
||||
00:00:00
|
||||
DROP TABLE t1;
|
||||
SET sql_mode=default;
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue