mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 07:35:32 +02:00
Merge: lp:maria/10.0 latest.
This commit is contained in:
commit
96100d6652
2512 changed files with 67602 additions and 22232 deletions
|
|
@ -1455,4 +1455,4 @@ storage/tokudb/ft-index/utils/tokudb_gen
|
||||||
storage/tokudb/ft-index/utils/tokudb_load
|
storage/tokudb/ft-index/utils/tokudb_load
|
||||||
storage/connect/connect.cnf
|
storage/connect/connect.cnf
|
||||||
storage/cassandra/cassandra.cnf
|
storage/cassandra/cassandra.cnf
|
||||||
libmysql/libmysql.version
|
libmysql/libmysql_versions.ld
|
||||||
|
|
|
||||||
|
|
@ -176,6 +176,81 @@ MARK_AS_ADVANCED(CYBOZU BACKUP_TEST WITHOUT_SERVER DISABLE_SHARED)
|
||||||
|
|
||||||
OPTION(NOT_FOR_DISTRIBUTION "Allow linking with GPLv2-incompatible system libraries. Only set it you never plan to distribute the resulting binaries" OFF)
|
OPTION(NOT_FOR_DISTRIBUTION "Allow linking with GPLv2-incompatible system libraries. Only set it you never plan to distribute the resulting binaries" OFF)
|
||||||
|
|
||||||
|
include(CheckCSourceCompiles)
|
||||||
|
include(CheckCXXSourceCompiles)
|
||||||
|
# We need some extra FAIL_REGEX patterns
|
||||||
|
# Note that CHECK_C_SOURCE_COMPILES is a misnomer, it will also link.
|
||||||
|
MACRO (MY_CHECK_C_COMPILER_FLAG FLAG RESULT)
|
||||||
|
SET(SAVE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
|
||||||
|
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${FLAG}")
|
||||||
|
CHECK_C_SOURCE_COMPILES("int main(void) { return 0; }" ${RESULT}
|
||||||
|
FAIL_REGEX "argument unused during compilation"
|
||||||
|
FAIL_REGEX "unsupported .*option"
|
||||||
|
FAIL_REGEX "unknown .*option"
|
||||||
|
FAIL_REGEX "unrecognized .*option"
|
||||||
|
FAIL_REGEX "ignoring unknown option"
|
||||||
|
FAIL_REGEX "[Ww]arning: [Oo]ption"
|
||||||
|
)
|
||||||
|
SET(CMAKE_REQUIRED_FLAGS "${SAVE_CMAKE_REQUIRED_FLAGS}")
|
||||||
|
ENDMACRO()
|
||||||
|
|
||||||
|
MACRO (MY_CHECK_CXX_COMPILER_FLAG FLAG RESULT)
|
||||||
|
SET(SAVE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
|
||||||
|
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${FLAG}")
|
||||||
|
CHECK_CXX_SOURCE_COMPILES("int main(void) { return 0; }" ${RESULT}
|
||||||
|
FAIL_REGEX "argument unused during compilation"
|
||||||
|
FAIL_REGEX "unsupported .*option"
|
||||||
|
FAIL_REGEX "unknown .*option"
|
||||||
|
FAIL_REGEX "unrecognized .*option"
|
||||||
|
FAIL_REGEX "ignoring unknown option"
|
||||||
|
FAIL_REGEX "[Ww]arning: [Oo]ption"
|
||||||
|
)
|
||||||
|
SET(CMAKE_REQUIRED_FLAGS "${SAVE_CMAKE_REQUIRED_FLAGS}")
|
||||||
|
ENDMACRO()
|
||||||
|
|
||||||
|
OPTION(WITH_ASAN "Enable address sanitizer" OFF)
|
||||||
|
IF (WITH_ASAN)
|
||||||
|
# gcc 4.8.1 and new versions of clang
|
||||||
|
MY_CHECK_C_COMPILER_FLAG("-fsanitize=address" HAVE_C_FSANITIZE)
|
||||||
|
MY_CHECK_CXX_COMPILER_FLAG("-fsanitize=address" HAVE_CXX_FSANITIZE)
|
||||||
|
|
||||||
|
IF(HAVE_C_FSANITIZE AND HAVE_CXX_FSANITIZE)
|
||||||
|
# We switch on basic optimization also for debug builds.
|
||||||
|
# With optimization we may get some warnings, so we switch off -Werror
|
||||||
|
SET(CMAKE_C_FLAGS_DEBUG
|
||||||
|
"${CMAKE_C_FLAGS_DEBUG} -fsanitize=address -O1 -Wno-error -fPIC")
|
||||||
|
SET(CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||||
|
"${CMAKE_C_FLAGS_RELWITHDEBINFO} -fsanitize=address -fPIC")
|
||||||
|
SET(CMAKE_CXX_FLAGS_DEBUG
|
||||||
|
"${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address -O1 -Wno-error -fPIC")
|
||||||
|
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||||
|
"${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fsanitize=address -fPIC")
|
||||||
|
SET(WITH_ASAN_OK 1)
|
||||||
|
ELSE()
|
||||||
|
# older versions of clang
|
||||||
|
MY_CHECK_C_COMPILER_FLAG("-faddress-sanitizer" HAVE_C_FADDRESS)
|
||||||
|
MY_CHECK_CXX_COMPILER_FLAG("-faddress-sanitizer" HAVE_CXX_FFADDRESS)
|
||||||
|
|
||||||
|
IF(HAVE_C_FADDRESS AND HAVE_CXX_FFADDRESS)
|
||||||
|
# We switch on basic optimization also for debug builds.
|
||||||
|
SET(CMAKE_C_FLAGS_DEBUG
|
||||||
|
"${CMAKE_C_FLAGS_DEBUG} -faddress-sanitizer -O1 -fPIC")
|
||||||
|
SET(CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||||
|
"${CMAKE_C_FLAGS_RELWITHDEBINFO} -faddress-sanitizer -fPIC")
|
||||||
|
SET(CMAKE_CXX_FLAGS_DEBUG
|
||||||
|
"${CMAKE_CXX_FLAGS_DEBUG} -faddress-sanitizer -O1 -fPIC")
|
||||||
|
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||||
|
"${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -faddress-sanitizer -fPIC")
|
||||||
|
SET(WITH_ASAN_OK 1)
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF(NOT WITH_ASAN_OK)
|
||||||
|
MESSAGE(FATAL_ERROR "Do not know how to enable address sanitizer")
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
OPTION(ENABLE_DEBUG_SYNC "Enable debug sync (debug builds only)" ON)
|
OPTION(ENABLE_DEBUG_SYNC "Enable debug sync (debug builds only)" ON)
|
||||||
IF(ENABLE_DEBUG_SYNC)
|
IF(ENABLE_DEBUG_SYNC)
|
||||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
|
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
|
||||||
|
|
@ -254,13 +329,25 @@ SET(PLUGINDIR "${DEFAULT_MYSQL_HOME}/${INSTALL_PLUGINDIR}")
|
||||||
IF(INSTALL_SYSCONFDIR)
|
IF(INSTALL_SYSCONFDIR)
|
||||||
SET(DEFAULT_SYSCONFDIR "${INSTALL_SYSCONFDIR}")
|
SET(DEFAULT_SYSCONFDIR "${INSTALL_SYSCONFDIR}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
OPTION(TMPDIR
|
||||||
|
"PATH to MySQL TMP dir. If unspecified, defaults to P_tmpdir in <stdio.h>" OFF)
|
||||||
IF(TMPDIR)
|
IF(TMPDIR)
|
||||||
SET(DEFAULT_TMPDIR "${TMPDIR}")
|
# Quote it, to make it a const char string.
|
||||||
|
SET(DEFAULT_TMPDIR "\"${TMPDIR}\"")
|
||||||
|
ELSE()
|
||||||
|
# Do not quote it, to refer to the P_tmpdir macro in <stdio.h>.
|
||||||
|
SET(DEFAULT_TMPDIR "P_tmpdir")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# Run platform tests
|
# Run platform tests
|
||||||
INCLUDE(configure.cmake)
|
INCLUDE(configure.cmake)
|
||||||
|
|
||||||
|
# Find header files from the bundled libraries
|
||||||
|
# (jemalloc, yassl, readline, pcre, etc)
|
||||||
|
# before the ones installed in the system
|
||||||
|
SET(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
|
||||||
|
|
||||||
# Common defines and includes
|
# Common defines and includes
|
||||||
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
|
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/include)
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/include)
|
||||||
|
|
@ -272,6 +359,7 @@ MYSQL_CHECK_SSL()
|
||||||
# Add readline or libedit.
|
# Add readline or libedit.
|
||||||
MYSQL_CHECK_READLINE()
|
MYSQL_CHECK_READLINE()
|
||||||
|
|
||||||
|
SET(MALLOC_LIBRARY "system")
|
||||||
CHECK_JEMALLOC()
|
CHECK_JEMALLOC()
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
@ -337,6 +425,7 @@ IF(NOT WITHOUT_SERVER)
|
||||||
ADD_SUBDIRECTORY(internal)
|
ADD_SUBDIRECTORY(internal)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ADD_SUBDIRECTORY(packaging/rpm-uln)
|
ADD_SUBDIRECTORY(packaging/rpm-uln)
|
||||||
|
ADD_SUBDIRECTORY(packaging/rpm-oel)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
|
|
|
||||||
2
VERSION
2
VERSION
|
|
@ -4,5 +4,5 @@
|
||||||
#
|
#
|
||||||
MYSQL_VERSION_MAJOR=10
|
MYSQL_VERSION_MAJOR=10
|
||||||
MYSQL_VERSION_MINOR=0
|
MYSQL_VERSION_MINOR=0
|
||||||
MYSQL_VERSION_PATCH=7
|
MYSQL_VERSION_PATCH=9
|
||||||
MYSQL_VERSION_EXTRA=
|
MYSQL_VERSION_EXTRA=
|
||||||
|
|
|
||||||
|
|
@ -915,6 +915,7 @@ static COMMANDS commands[] = {
|
||||||
{ "MAKE_SET", 0, 0, 0, ""},
|
{ "MAKE_SET", 0, 0, 0, ""},
|
||||||
{ "MAKEDATE", 0, 0, 0, ""},
|
{ "MAKEDATE", 0, 0, 0, ""},
|
||||||
{ "MAKETIME", 0, 0, 0, ""},
|
{ "MAKETIME", 0, 0, 0, ""},
|
||||||
|
{ "MASTER_GTID_WAIT", 0, 0, 0, ""},
|
||||||
{ "MASTER_POS_WAIT", 0, 0, 0, ""},
|
{ "MASTER_POS_WAIT", 0, 0, 0, ""},
|
||||||
{ "MAX", 0, 0, 0, ""},
|
{ "MAX", 0, 0, 0, ""},
|
||||||
{ "MBRCONTAINS", 0, 0, 0, ""},
|
{ "MBRCONTAINS", 0, 0, 0, ""},
|
||||||
|
|
@ -1227,7 +1228,7 @@ int main(int argc,char *argv[])
|
||||||
|
|
||||||
put_info("Welcome to the MariaDB monitor. Commands end with ; or \\g.",
|
put_info("Welcome to the MariaDB monitor. Commands end with ; or \\g.",
|
||||||
INFO_INFO);
|
INFO_INFO);
|
||||||
sprintf((char*) glob_buffer.ptr(),
|
my_snprintf((char*) glob_buffer.ptr(), glob_buffer.alloced_length(),
|
||||||
"Your %s connection id is %lu\nServer version: %s\n",
|
"Your %s connection id is %lu\nServer version: %s\n",
|
||||||
mysql_get_server_name(&mysql),
|
mysql_get_server_name(&mysql),
|
||||||
mysql_thread_id(&mysql), server_version_string(&mysql));
|
mysql_thread_id(&mysql), server_version_string(&mysql));
|
||||||
|
|
@ -1411,7 +1412,8 @@ sig_handler window_resize(int sig)
|
||||||
struct winsize window_size;
|
struct winsize window_size;
|
||||||
|
|
||||||
if (ioctl(fileno(stdin), TIOCGWINSZ, &window_size) == 0)
|
if (ioctl(fileno(stdin), TIOCGWINSZ, &window_size) == 0)
|
||||||
terminal_width= window_size.ws_col;
|
if (window_size.ws_col > 0)
|
||||||
|
terminal_width= window_size.ws_col;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -1675,8 +1677,9 @@ static void usage(int version)
|
||||||
return;
|
return;
|
||||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
||||||
printf("Usage: %s [OPTIONS] [database]\n", my_progname);
|
printf("Usage: %s [OPTIONS] [database]\n", my_progname);
|
||||||
my_print_help(my_long_options);
|
|
||||||
print_defaults("my", load_default_groups);
|
print_defaults("my", load_default_groups);
|
||||||
|
puts("");
|
||||||
|
my_print_help(my_long_options);
|
||||||
my_print_variables(my_long_options);
|
my_print_variables(my_long_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -857,7 +857,7 @@ static int process_options(int argc, char *argv[], char *operation)
|
||||||
strncat(buff, FN_DIRSEP, sizeof(buff) - strlen(buff) - 1);
|
strncat(buff, FN_DIRSEP, sizeof(buff) - strlen(buff) - 1);
|
||||||
#endif
|
#endif
|
||||||
buff[sizeof(buff) - 1]= 0;
|
buff[sizeof(buff) - 1]= 0;
|
||||||
my_delete(opt_basedir, MYF(0));
|
my_free(opt_basedir);
|
||||||
opt_basedir= my_strdup(buff, MYF(MY_FAE));
|
opt_basedir= my_strdup(buff, MYF(MY_FAE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
|
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
|
||||||
|
|
||||||
#define VER "1.3"
|
#define VER "1.3a"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_WAIT_H
|
#ifdef HAVE_SYS_WAIT_H
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
|
@ -164,6 +164,15 @@ static struct my_option my_long_options[]=
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static const char *load_default_groups[]=
|
||||||
|
{
|
||||||
|
"client", /* Read settings how to connect to server */
|
||||||
|
"mysql_upgrade", /* Read special settings for mysql_upgrade */
|
||||||
|
"client-server", /* Reads settings common between client & server */
|
||||||
|
"client-mariadb", /* Read mariadb unique client settings */
|
||||||
|
0
|
||||||
|
};
|
||||||
|
|
||||||
static void free_used_memory(void)
|
static void free_used_memory(void)
|
||||||
{
|
{
|
||||||
/* Free memory allocated by 'load_defaults' */
|
/* Free memory allocated by 'load_defaults' */
|
||||||
|
|
@ -180,6 +189,7 @@ static void die(const char *fmt, ...)
|
||||||
DBUG_ENTER("die");
|
DBUG_ENTER("die");
|
||||||
|
|
||||||
/* Print the error message */
|
/* Print the error message */
|
||||||
|
fflush(stdout);
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
if (fmt)
|
if (fmt)
|
||||||
{
|
{
|
||||||
|
|
@ -259,8 +269,11 @@ get_one_option(int optid, const struct my_option *opt,
|
||||||
printf("%s Ver %s Distrib %s, for %s (%s)\n",
|
printf("%s Ver %s Distrib %s, for %s (%s)\n",
|
||||||
my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
|
my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
|
||||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
||||||
puts("MariaDB utility for upgrading databases to new MariaDB versions.\n");
|
puts("MariaDB utility for upgrading databases to new MariaDB versions.");
|
||||||
|
print_defaults("my", load_default_groups);
|
||||||
|
puts("");
|
||||||
my_print_help(my_long_options);
|
my_print_help(my_long_options);
|
||||||
|
my_print_variables(my_long_options);
|
||||||
die(0);
|
die(0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -736,6 +749,7 @@ static int run_mysqlcheck_upgrade(void)
|
||||||
!opt_silent || opt_verbose ? "--verbose": "",
|
!opt_silent || opt_verbose ? "--verbose": "",
|
||||||
opt_silent ? "--silent": "",
|
opt_silent ? "--silent": "",
|
||||||
opt_write_binlog ? "--write-binlog" : "--skip-write-binlog",
|
opt_write_binlog ? "--write-binlog" : "--skip-write-binlog",
|
||||||
|
"2>&1",
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -754,6 +768,7 @@ static int run_mysqlcheck_fixnames(void)
|
||||||
opt_verbose ? "--verbose": "",
|
opt_verbose ? "--verbose": "",
|
||||||
opt_silent ? "--silent": "",
|
opt_silent ? "--silent": "",
|
||||||
opt_write_binlog ? "--write-binlog" : "--skip-write-binlog",
|
opt_write_binlog ? "--write-binlog" : "--skip-write-binlog",
|
||||||
|
"2>&1",
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -874,14 +889,11 @@ static int run_sql_fix_privilege_tables(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static const char *load_default_groups[]=
|
static void print_error(const char *error_msg, DYNAMIC_STRING *output)
|
||||||
{
|
{
|
||||||
"client", /* Read settings how to connect to server */
|
fprintf(stderr, "%s\n", error_msg);
|
||||||
"mysql_upgrade", /* Read special settings for mysql_upgrade */
|
fprintf(stderr, "%s", output->str);
|
||||||
"client-server", /* Reads settings common between client & server */
|
}
|
||||||
"client-mariadb", /* Read mariadb unique client settings */
|
|
||||||
0
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* Convert the specified version string into the numeric format. */
|
/* Convert the specified version string into the numeric format. */
|
||||||
|
|
@ -914,6 +926,8 @@ static int check_version_match(void)
|
||||||
&ds_version, FALSE) ||
|
&ds_version, FALSE) ||
|
||||||
extract_variable_from_show(&ds_version, version_str))
|
extract_variable_from_show(&ds_version, version_str))
|
||||||
{
|
{
|
||||||
|
print_error("Version check failed. Got the following error when calling "
|
||||||
|
"the 'mysql' command line client", &ds_version);
|
||||||
dynstr_free(&ds_version);
|
dynstr_free(&ds_version);
|
||||||
return 1; /* Query failed */
|
return 1; /* Query failed */
|
||||||
}
|
}
|
||||||
|
|
@ -982,7 +996,8 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf("The --upgrade-system-tables option was used, databases won't be touched.\n");
|
if (!opt_silent)
|
||||||
|
printf("The --upgrade-system-tables option was used, databases won't be touched.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -1230,9 +1230,10 @@ static void usage(void)
|
||||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
||||||
puts("Administration program for the mysqld daemon.");
|
puts("Administration program for the mysqld daemon.");
|
||||||
printf("Usage: %s [OPTIONS] command command....\n", my_progname);
|
printf("Usage: %s [OPTIONS] command command....\n", my_progname);
|
||||||
|
print_defaults("my",load_default_groups);
|
||||||
|
puts("");
|
||||||
my_print_help(my_long_options);
|
my_print_help(my_long_options);
|
||||||
my_print_variables(my_long_options);
|
my_print_variables(my_long_options);
|
||||||
print_defaults("my",load_default_groups);
|
|
||||||
puts("\nWhere command is a one or more of: (Commands may be shortened)\n\
|
puts("\nWhere command is a one or more of: (Commands may be shortened)\n\
|
||||||
create databasename Create a new database\n\
|
create databasename Create a new database\n\
|
||||||
debug Instruct server to write debug information to log\n\
|
debug Instruct server to write debug information to log\n\
|
||||||
|
|
|
||||||
|
|
@ -1546,6 +1546,8 @@ static void usage()
|
||||||
Dumps a MySQL binary log in a format usable for viewing or for piping to\n\
|
Dumps a MySQL binary log in a format usable for viewing or for piping to\n\
|
||||||
the mysql command line client.\n\n");
|
the mysql command line client.\n\n");
|
||||||
printf("Usage: %s [options] log-files\n", my_progname);
|
printf("Usage: %s [options] log-files\n", my_progname);
|
||||||
|
print_defaults("my",load_groups);
|
||||||
|
puts("");
|
||||||
my_print_help(my_options);
|
my_print_help(my_options);
|
||||||
my_print_variables(my_options);
|
my_print_variables(my_options);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -250,6 +250,7 @@ static void usage(void)
|
||||||
puts("http://kb.askmonty.org/v/mysqlcheck for latest information about");
|
puts("http://kb.askmonty.org/v/mysqlcheck for latest information about");
|
||||||
puts("this program.");
|
puts("this program.");
|
||||||
print_defaults("my", load_default_groups);
|
print_defaults("my", load_default_groups);
|
||||||
|
puts("");
|
||||||
my_print_help(my_long_options);
|
my_print_help(my_long_options);
|
||||||
my_print_variables(my_long_options);
|
my_print_variables(my_long_options);
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
|
|
@ -1046,7 +1047,7 @@ int main(int argc, char **argv)
|
||||||
for (i = 0; i < alter_table_cmds.elements ; i++)
|
for (i = 0; i < alter_table_cmds.elements ; i++)
|
||||||
run_query((char*) dynamic_array_ptr(&alter_table_cmds, i));
|
run_query((char*) dynamic_array_ptr(&alter_table_cmds, i));
|
||||||
}
|
}
|
||||||
ret= test(first_error);
|
ret= MY_TEST(first_error);
|
||||||
|
|
||||||
end:
|
end:
|
||||||
dbDisconnect(current_host);
|
dbDisconnect(current_host);
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
** 10 Jun 2003: SET NAMES and --no-set-names by Alexander Barkov
|
** 10 Jun 2003: SET NAMES and --no-set-names by Alexander Barkov
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DUMP_VERSION "10.14"
|
#define DUMP_VERSION "10.15"
|
||||||
|
|
||||||
#include <my_global.h>
|
#include <my_global.h>
|
||||||
#include <my_sys.h>
|
#include <my_sys.h>
|
||||||
|
|
@ -137,6 +137,12 @@ static uint opt_slave_data;
|
||||||
static uint my_end_arg;
|
static uint my_end_arg;
|
||||||
static char * opt_mysql_unix_port=0;
|
static char * opt_mysql_unix_port=0;
|
||||||
static int first_error=0;
|
static int first_error=0;
|
||||||
|
/*
|
||||||
|
multi_source is 0 if old server or 2 if server that support multi source
|
||||||
|
This is choosen this was as multi_source has 2 extra columns first in
|
||||||
|
SHOW ALL SLAVES STATUS.
|
||||||
|
*/
|
||||||
|
static uint multi_source= 0;
|
||||||
static DYNAMIC_STRING extended_row;
|
static DYNAMIC_STRING extended_row;
|
||||||
#include <sslopt-vars.h>
|
#include <sslopt-vars.h>
|
||||||
FILE *md_result_file= 0;
|
FILE *md_result_file= 0;
|
||||||
|
|
@ -160,6 +166,8 @@ static void dynstr_set_checked(DYNAMIC_STRING *str, const char *init_str);
|
||||||
static void dynstr_append_mem_checked(DYNAMIC_STRING *str, const char *append,
|
static void dynstr_append_mem_checked(DYNAMIC_STRING *str, const char *append,
|
||||||
uint length);
|
uint length);
|
||||||
static void dynstr_realloc_checked(DYNAMIC_STRING *str, ulong additional_size);
|
static void dynstr_realloc_checked(DYNAMIC_STRING *str, ulong additional_size);
|
||||||
|
|
||||||
|
static int do_start_slave_sql(MYSQL *mysql_con);
|
||||||
/*
|
/*
|
||||||
Constant for detection of default value of default_charset.
|
Constant for detection of default value of default_charset.
|
||||||
If default_charset is equal to mysql_universal_client_charset, then
|
If default_charset is equal to mysql_universal_client_charset, then
|
||||||
|
|
@ -612,7 +620,8 @@ static void usage(void)
|
||||||
puts("Dumping structure and contents of MySQL databases and tables.");
|
puts("Dumping structure and contents of MySQL databases and tables.");
|
||||||
short_usage_sub();
|
short_usage_sub();
|
||||||
print_defaults("my",load_default_groups);
|
print_defaults("my",load_default_groups);
|
||||||
my_print_help(my_long_options);
|
puts("");
|
||||||
|
my_print_help(my_long_options);
|
||||||
my_print_variables(my_long_options);
|
my_print_variables(my_long_options);
|
||||||
} /* usage */
|
} /* usage */
|
||||||
|
|
||||||
|
|
@ -1493,6 +1502,8 @@ static void free_resources()
|
||||||
|
|
||||||
static void maybe_exit(int error)
|
static void maybe_exit(int error)
|
||||||
{
|
{
|
||||||
|
if (opt_slave_data)
|
||||||
|
do_start_slave_sql(mysql);
|
||||||
if (!first_error)
|
if (!first_error)
|
||||||
first_error= error;
|
first_error= error;
|
||||||
if (ignore_errors)
|
if (ignore_errors)
|
||||||
|
|
@ -3648,7 +3659,8 @@ static void dump_table(char *table, char *db)
|
||||||
field->type == MYSQL_TYPE_BLOB ||
|
field->type == MYSQL_TYPE_BLOB ||
|
||||||
field->type == MYSQL_TYPE_LONG_BLOB ||
|
field->type == MYSQL_TYPE_LONG_BLOB ||
|
||||||
field->type == MYSQL_TYPE_MEDIUM_BLOB ||
|
field->type == MYSQL_TYPE_MEDIUM_BLOB ||
|
||||||
field->type == MYSQL_TYPE_TINY_BLOB)) ? 1 : 0;
|
field->type == MYSQL_TYPE_TINY_BLOB ||
|
||||||
|
field->type == MYSQL_TYPE_GEOMETRY)) ? 1 : 0;
|
||||||
if (extended_insert && !opt_xml)
|
if (extended_insert && !opt_xml)
|
||||||
{
|
{
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
|
|
@ -4734,7 +4746,8 @@ static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (mysql_query_with_error_report(mysql_con, &master, "SHOW MASTER STATUS"))
|
if (mysql_query_with_error_report(mysql_con, &master,
|
||||||
|
"SHOW MASTER STATUS"))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
row= mysql_fetch_row(master);
|
row= mysql_fetch_row(master);
|
||||||
|
|
@ -4779,29 +4792,37 @@ static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos)
|
||||||
static int do_stop_slave_sql(MYSQL *mysql_con)
|
static int do_stop_slave_sql(MYSQL *mysql_con)
|
||||||
{
|
{
|
||||||
MYSQL_RES *slave;
|
MYSQL_RES *slave;
|
||||||
/* We need to check if the slave sql is running in the first place */
|
MYSQL_ROW row;
|
||||||
if (mysql_query_with_error_report(mysql_con, &slave, "SHOW SLAVE STATUS"))
|
|
||||||
|
if (mysql_query_with_error_report(mysql_con, &slave,
|
||||||
|
multi_source ?
|
||||||
|
"SHOW ALL SLAVES STATUS" :
|
||||||
|
"SHOW SLAVE STATUS"))
|
||||||
return(1);
|
return(1);
|
||||||
else
|
|
||||||
|
/* Loop over all slaves */
|
||||||
|
while ((row= mysql_fetch_row(slave)))
|
||||||
{
|
{
|
||||||
MYSQL_ROW row= mysql_fetch_row(slave);
|
if (row[11 + multi_source])
|
||||||
if (row && row[11])
|
|
||||||
{
|
{
|
||||||
/* if SLAVE SQL is not running, we don't stop it */
|
/* if SLAVE SQL is not running, we don't stop it */
|
||||||
if (!strcmp(row[11],"No"))
|
if (strcmp(row[11 + multi_source], "No"))
|
||||||
{
|
{
|
||||||
mysql_free_result(slave);
|
char query[160];
|
||||||
/* Silently assume that they don't have the slave running */
|
if (multi_source)
|
||||||
return(0);
|
sprintf(query, "STOP SLAVE '%.80s' SQL_THREAD", row[0]);
|
||||||
|
else
|
||||||
|
strmov(query, "STOP SLAVE SQL_THREAD");
|
||||||
|
|
||||||
|
if (mysql_query_with_error_report(mysql_con, 0, query))
|
||||||
|
{
|
||||||
|
mysql_free_result(slave);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mysql_free_result(slave);
|
mysql_free_result(slave);
|
||||||
|
|
||||||
/* now, stop slave if running */
|
|
||||||
if (mysql_query_with_error_report(mysql_con, 0, "STOP SLAVE SQL_THREAD"))
|
|
||||||
return(1);
|
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4810,7 +4831,10 @@ static int add_stop_slave(void)
|
||||||
if (opt_comments)
|
if (opt_comments)
|
||||||
fprintf(md_result_file,
|
fprintf(md_result_file,
|
||||||
"\n--\n-- stop slave statement to make a recovery dump)\n--\n\n");
|
"\n--\n-- stop slave statement to make a recovery dump)\n--\n\n");
|
||||||
fprintf(md_result_file, "STOP SLAVE;\n");
|
if (multi_source)
|
||||||
|
fprintf(md_result_file, "STOP ALL SLAVES;\n");
|
||||||
|
else
|
||||||
|
fprintf(md_result_file, "STOP SLAVE;\n");
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4819,16 +4843,24 @@ static int add_slave_statements(void)
|
||||||
if (opt_comments)
|
if (opt_comments)
|
||||||
fprintf(md_result_file,
|
fprintf(md_result_file,
|
||||||
"\n--\n-- start slave statement to make a recovery dump)\n--\n\n");
|
"\n--\n-- start slave statement to make a recovery dump)\n--\n\n");
|
||||||
fprintf(md_result_file, "START SLAVE;\n");
|
if (multi_source)
|
||||||
|
fprintf(md_result_file, "START ALL SLAVES;\n");
|
||||||
|
else
|
||||||
|
fprintf(md_result_file, "START SLAVE;\n");
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_show_slave_status(MYSQL *mysql_con)
|
static int do_show_slave_status(MYSQL *mysql_con)
|
||||||
{
|
{
|
||||||
MYSQL_RES *UNINIT_VAR(slave);
|
MYSQL_RES *UNINIT_VAR(slave);
|
||||||
|
MYSQL_ROW row;
|
||||||
const char *comment_prefix=
|
const char *comment_prefix=
|
||||||
(opt_slave_data == MYSQL_OPT_SLAVE_DATA_COMMENTED_SQL) ? "-- " : "";
|
(opt_slave_data == MYSQL_OPT_SLAVE_DATA_COMMENTED_SQL) ? "-- " : "";
|
||||||
if (mysql_query_with_error_report(mysql_con, &slave, "SHOW SLAVE STATUS"))
|
|
||||||
|
if (mysql_query_with_error_report(mysql_con, &slave,
|
||||||
|
multi_source ?
|
||||||
|
"SHOW ALL SLAVES STATUS" :
|
||||||
|
"SHOW SLAVE STATUS"))
|
||||||
{
|
{
|
||||||
if (!ignore_errors)
|
if (!ignore_errors)
|
||||||
{
|
{
|
||||||
|
|
@ -4838,10 +4870,10 @@ static int do_show_slave_status(MYSQL *mysql_con)
|
||||||
mysql_free_result(slave);
|
mysql_free_result(slave);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
while ((row= mysql_fetch_row(slave)))
|
||||||
{
|
{
|
||||||
MYSQL_ROW row= mysql_fetch_row(slave);
|
if (row[9 + multi_source] && row[21 + multi_source])
|
||||||
if (row && row[9] && row[21])
|
|
||||||
{
|
{
|
||||||
/* SHOW MASTER STATUS reports file and position */
|
/* SHOW MASTER STATUS reports file and position */
|
||||||
if (opt_comments)
|
if (opt_comments)
|
||||||
|
|
@ -4849,54 +4881,70 @@ static int do_show_slave_status(MYSQL *mysql_con)
|
||||||
"\n--\n-- Position to start replication or point-in-time "
|
"\n--\n-- Position to start replication or point-in-time "
|
||||||
"recovery from (the master of this slave)\n--\n\n");
|
"recovery from (the master of this slave)\n--\n\n");
|
||||||
|
|
||||||
fprintf(md_result_file, "%sCHANGE MASTER TO ", comment_prefix);
|
if (multi_source)
|
||||||
|
fprintf(md_result_file, "%sCHANGE MASTER '%.80s' TO ",
|
||||||
|
comment_prefix, row[0]);
|
||||||
|
else
|
||||||
|
fprintf(md_result_file, "%sCHANGE MASTER TO ", comment_prefix);
|
||||||
|
|
||||||
if (opt_include_master_host_port)
|
if (opt_include_master_host_port)
|
||||||
{
|
{
|
||||||
if (row[1])
|
if (row[1 + multi_source])
|
||||||
fprintf(md_result_file, "MASTER_HOST='%s', ", row[1]);
|
fprintf(md_result_file, "MASTER_HOST='%s', ", row[1 + multi_source]);
|
||||||
if (row[3])
|
if (row[3])
|
||||||
fprintf(md_result_file, "MASTER_PORT=%s, ", row[3]);
|
fprintf(md_result_file, "MASTER_PORT=%s, ", row[3 + multi_source]);
|
||||||
}
|
}
|
||||||
fprintf(md_result_file,
|
fprintf(md_result_file,
|
||||||
"MASTER_LOG_FILE='%s', MASTER_LOG_POS=%s;\n", row[9], row[21]);
|
"MASTER_LOG_FILE='%s', MASTER_LOG_POS=%s;\n",
|
||||||
|
row[9 + multi_source], row[21 + multi_source]);
|
||||||
|
|
||||||
check_io(md_result_file);
|
check_io(md_result_file);
|
||||||
}
|
}
|
||||||
mysql_free_result(slave);
|
|
||||||
}
|
}
|
||||||
|
mysql_free_result(slave);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_start_slave_sql(MYSQL *mysql_con)
|
static int do_start_slave_sql(MYSQL *mysql_con)
|
||||||
{
|
{
|
||||||
MYSQL_RES *slave;
|
MYSQL_RES *slave;
|
||||||
|
MYSQL_ROW row;
|
||||||
|
int error= 0;
|
||||||
|
DBUG_ENTER("do_start_slave_sql");
|
||||||
|
|
||||||
/* We need to check if the slave sql is stopped in the first place */
|
/* We need to check if the slave sql is stopped in the first place */
|
||||||
if (mysql_query_with_error_report(mysql_con, &slave, "SHOW SLAVE STATUS"))
|
if (mysql_query_with_error_report(mysql_con, &slave,
|
||||||
return(1);
|
multi_source ?
|
||||||
else
|
"SHOW ALL SLAVES STATUS" :
|
||||||
|
"SHOW SLAVE STATUS"))
|
||||||
|
DBUG_RETURN(1);
|
||||||
|
|
||||||
|
while ((row= mysql_fetch_row(slave)))
|
||||||
{
|
{
|
||||||
MYSQL_ROW row= mysql_fetch_row(slave);
|
DBUG_PRINT("info", ("Connection: '%s' status: '%s'",
|
||||||
if (row && row[11])
|
multi_source ? row[0] : "", row[11 + multi_source]));
|
||||||
|
if (row[11 + multi_source])
|
||||||
{
|
{
|
||||||
/* if SLAVE SQL is not running, we don't start it */
|
/* if SLAVE SQL is not running, we don't start it */
|
||||||
if (!strcmp(row[11],"Yes"))
|
if (strcmp(row[11 + multi_source], "Yes"))
|
||||||
{
|
{
|
||||||
mysql_free_result(slave);
|
char query[160];
|
||||||
/* Silently assume that they don't have the slave running */
|
if (multi_source)
|
||||||
return(0);
|
sprintf(query, "START SLAVE '%.80s'", row[0]);
|
||||||
|
else
|
||||||
|
strmov(query, "START SLAVE");
|
||||||
|
|
||||||
|
if (mysql_query_with_error_report(mysql_con, 0, query))
|
||||||
|
{
|
||||||
|
fprintf(stderr, "%s: Error: Unable to start slave '%s'\n",
|
||||||
|
my_progname_short, multi_source ? row[0] : "");
|
||||||
|
error= 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mysql_free_result(slave);
|
mysql_free_result(slave);
|
||||||
|
DBUG_RETURN(error);
|
||||||
/* now, start slave if stopped */
|
|
||||||
if (mysql_query_with_error_report(mysql_con, 0, "START SLAVE"))
|
|
||||||
{
|
|
||||||
fprintf(stderr, "%s: Error: Unable to start slave\n", my_progname_short);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -5574,6 +5622,10 @@ int main(int argc, char **argv)
|
||||||
if (!path)
|
if (!path)
|
||||||
write_header(md_result_file, *argv);
|
write_header(md_result_file, *argv);
|
||||||
|
|
||||||
|
/* Check if the server support multi source */
|
||||||
|
if (mysql_get_server_version(mysql) >= 100000)
|
||||||
|
multi_source= 2;
|
||||||
|
|
||||||
if (opt_slave_data && do_stop_slave_sql(mysql))
|
if (opt_slave_data && do_stop_slave_sql(mysql))
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
|
|
@ -5653,10 +5705,6 @@ int main(int argc, char **argv)
|
||||||
dump_databases(argv);
|
dump_databases(argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if --dump-slave , start the slave sql thread */
|
|
||||||
if (opt_slave_data && do_start_slave_sql(mysql))
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
/* add 'START SLAVE' to end of dump */
|
/* add 'START SLAVE' to end of dump */
|
||||||
if (opt_slave_apply && add_slave_statements())
|
if (opt_slave_apply && add_slave_statements())
|
||||||
goto err;
|
goto err;
|
||||||
|
|
@ -5672,9 +5720,6 @@ int main(int argc, char **argv)
|
||||||
if (opt_delete_master_logs && purge_bin_logs_to(mysql, bin_log_name))
|
if (opt_delete_master_logs && purge_bin_logs_to(mysql, bin_log_name))
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
my_free(shared_memory_base_name);
|
|
||||||
#endif
|
|
||||||
/*
|
/*
|
||||||
No reason to explicitely COMMIT the transaction, neither to explicitely
|
No reason to explicitely COMMIT the transaction, neither to explicitely
|
||||||
UNLOCK TABLES: these will be automatically be done by the server when we
|
UNLOCK TABLES: these will be automatically be done by the server when we
|
||||||
|
|
@ -5682,6 +5727,14 @@ int main(int argc, char **argv)
|
||||||
server.
|
server.
|
||||||
*/
|
*/
|
||||||
err:
|
err:
|
||||||
|
/* if --dump-slave , start the slave sql thread */
|
||||||
|
if (opt_slave_data && do_start_slave_sql(mysql))
|
||||||
|
goto err;
|
||||||
|
|
||||||
|
#ifdef HAVE_SMEM
|
||||||
|
my_free(shared_memory_base_name);
|
||||||
|
#endif
|
||||||
|
|
||||||
dbDisconnect(current_host);
|
dbDisconnect(current_host);
|
||||||
if (!path)
|
if (!path)
|
||||||
write_footer(md_result_file);
|
write_footer(md_result_file);
|
||||||
|
|
|
||||||
|
|
@ -216,8 +216,9 @@ If one uses sockets to connect to the MySQL server, the server will open and\n\
|
||||||
read the text file directly. In other cases the client will open the text\n\
|
read the text file directly. In other cases the client will open the text\n\
|
||||||
file. The SQL command 'LOAD DATA INFILE' is used to import the rows.\n");
|
file. The SQL command 'LOAD DATA INFILE' is used to import the rows.\n");
|
||||||
|
|
||||||
printf("\nUsage: %s [OPTIONS] database textfile...",my_progname);
|
printf("\nUsage: %s [OPTIONS] database textfile...\n",my_progname);
|
||||||
print_defaults("my",load_default_groups);
|
print_defaults("my",load_default_groups);
|
||||||
|
puts("");
|
||||||
my_print_help(my_long_options);
|
my_print_help(my_long_options);
|
||||||
my_print_variables(my_long_options);
|
my_print_variables(my_long_options);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -286,6 +286,7 @@ If no table is given, then all matching tables in database are shown.\n\
|
||||||
If no column is given, then all matching columns and column types in table\n\
|
If no column is given, then all matching columns and column types in table\n\
|
||||||
are shown.");
|
are shown.");
|
||||||
print_defaults("my",load_default_groups);
|
print_defaults("my",load_default_groups);
|
||||||
|
puts("");
|
||||||
my_print_help(my_long_options);
|
my_print_help(my_long_options);
|
||||||
my_print_variables(my_long_options);
|
my_print_variables(my_long_options);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -739,7 +739,9 @@ static void usage(void)
|
||||||
puts("Run a query multiple times against the server.\n");
|
puts("Run a query multiple times against the server.\n");
|
||||||
printf("Usage: %s [OPTIONS]\n",my_progname);
|
printf("Usage: %s [OPTIONS]\n",my_progname);
|
||||||
print_defaults("my",load_default_groups);
|
print_defaults("my",load_default_groups);
|
||||||
|
puts("");
|
||||||
my_print_help(my_long_options);
|
my_print_help(my_long_options);
|
||||||
|
my_print_variables(my_long_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -528,6 +528,7 @@ struct st_command
|
||||||
{
|
{
|
||||||
char *query, *query_buf,*first_argument,*last_argument,*end;
|
char *query, *query_buf,*first_argument,*last_argument,*end;
|
||||||
DYNAMIC_STRING content;
|
DYNAMIC_STRING content;
|
||||||
|
DYNAMIC_STRING eval_query;
|
||||||
int first_word_len, query_len;
|
int first_word_len, query_len;
|
||||||
my_bool abort_on_error, used_replace;
|
my_bool abort_on_error, used_replace;
|
||||||
struct st_expected_errors expected_errors;
|
struct st_expected_errors expected_errors;
|
||||||
|
|
@ -1399,6 +1400,8 @@ void free_used_memory()
|
||||||
{
|
{
|
||||||
struct st_command **q= dynamic_element(&q_lines, i, struct st_command**);
|
struct st_command **q= dynamic_element(&q_lines, i, struct st_command**);
|
||||||
my_free((*q)->query_buf);
|
my_free((*q)->query_buf);
|
||||||
|
if ((*q)->eval_query.str)
|
||||||
|
dynstr_free(&(*q)->eval_query);
|
||||||
if ((*q)->content.str)
|
if ((*q)->content.str)
|
||||||
dynstr_free(&(*q)->content);
|
dynstr_free(&(*q)->content);
|
||||||
my_free((*q));
|
my_free((*q));
|
||||||
|
|
@ -7030,8 +7033,9 @@ void usage()
|
||||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
||||||
printf("Runs a test against the mysql server and compares output with a results file.\n\n");
|
printf("Runs a test against the mysql server and compares output with a results file.\n\n");
|
||||||
printf("Usage: %s [OPTIONS] [database] < test_file\n", my_progname);
|
printf("Usage: %s [OPTIONS] [database] < test_file\n", my_progname);
|
||||||
|
print_defaults("my",load_default_groups);
|
||||||
|
puts("");
|
||||||
my_print_help(my_long_options);
|
my_print_help(my_long_options);
|
||||||
printf(" --no-defaults Don't read default options from any options file.\n");
|
|
||||||
my_print_variables(my_long_options);
|
my_print_variables(my_long_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -8341,7 +8345,6 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
|
||||||
DYNAMIC_STRING ds_result;
|
DYNAMIC_STRING ds_result;
|
||||||
DYNAMIC_STRING ds_sorted;
|
DYNAMIC_STRING ds_sorted;
|
||||||
DYNAMIC_STRING ds_warnings;
|
DYNAMIC_STRING ds_warnings;
|
||||||
DYNAMIC_STRING eval_query;
|
|
||||||
char *query;
|
char *query;
|
||||||
int query_len;
|
int query_len;
|
||||||
my_bool view_created= 0, sp_created= 0;
|
my_bool view_created= 0, sp_created= 0;
|
||||||
|
|
@ -8364,10 +8367,14 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
|
||||||
if (command->type == Q_EVAL || command->type == Q_SEND_EVAL ||
|
if (command->type == Q_EVAL || command->type == Q_SEND_EVAL ||
|
||||||
command->type == Q_EVALP)
|
command->type == Q_EVALP)
|
||||||
{
|
{
|
||||||
init_dynamic_string(&eval_query, "", command->query_len+256, 1024);
|
if (!command->eval_query.str)
|
||||||
do_eval(&eval_query, command->query, command->end, FALSE);
|
init_dynamic_string(&command->eval_query, "", command->query_len + 256,
|
||||||
query = eval_query.str;
|
1024);
|
||||||
query_len = eval_query.length;
|
else
|
||||||
|
dynstr_set(&command->eval_query, 0);
|
||||||
|
do_eval(&command->eval_query, command->query, command->end, FALSE);
|
||||||
|
query= command->eval_query.str;
|
||||||
|
query_len= command->eval_query.length;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -8535,8 +8542,6 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
|
||||||
|
|
||||||
dynstr_free(&ds_warnings);
|
dynstr_free(&ds_warnings);
|
||||||
ds_warn= 0;
|
ds_warn= 0;
|
||||||
if (command->type == Q_EVAL || command->type == Q_SEND_EVAL)
|
|
||||||
dynstr_free(&eval_query);
|
|
||||||
|
|
||||||
if (display_result_sorted)
|
if (display_result_sorted)
|
||||||
{
|
{
|
||||||
|
|
@ -8583,7 +8588,7 @@ char *re_eprint(int err)
|
||||||
{
|
{
|
||||||
static char epbuf[100];
|
static char epbuf[100];
|
||||||
size_t len __attribute__((unused))=
|
size_t len __attribute__((unused))=
|
||||||
regerror(REG_ITOA|err, (regex_t *)NULL, epbuf, sizeof(epbuf));
|
regerror(err, (regex_t *)NULL, epbuf, sizeof(epbuf));
|
||||||
assert(len <= sizeof(epbuf));
|
assert(len <= sizeof(epbuf));
|
||||||
return(epbuf);
|
return(epbuf);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
16
cmake/CPackRPM.cmake
Normal file
16
cmake/CPackRPM.cmake
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
#
|
||||||
|
# Wrapper for CPackRPM.cmake
|
||||||
|
#
|
||||||
|
|
||||||
|
# load the original CPackRPM.cmake
|
||||||
|
set(orig_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
|
||||||
|
unset(CMAKE_MODULE_PATH)
|
||||||
|
include(CPackRPM)
|
||||||
|
set(CMAKE_MODULE_PATH ${orig_CMAKE_MODULE_PATH})
|
||||||
|
|
||||||
|
# per-component cleanup
|
||||||
|
foreach(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLICTS AUTOPROV AUTOREQ AUTOREQPROV)
|
||||||
|
unset(TMP_RPM_${_RPM_SPEC_HEADER})
|
||||||
|
unset(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
|
@ -23,14 +23,14 @@ SET(CPACK_COMPONENT_SHAREDLIBRARIES_GROUP "shared")
|
||||||
SET(CPACK_COMPONENT_COMMON_GROUP "common")
|
SET(CPACK_COMPONENT_COMMON_GROUP "common")
|
||||||
SET(CPACK_COMPONENT_COMPAT_GROUP "compat")
|
SET(CPACK_COMPONENT_COMPAT_GROUP "compat")
|
||||||
SET(CPACK_COMPONENTS_ALL Server ManPagesServer IniFiles Server_Scripts
|
SET(CPACK_COMPONENTS_ALL Server ManPagesServer IniFiles Server_Scripts
|
||||||
SupportFiles Development ManPagesDevelopment
|
SupportFiles Development ManPagesDevelopment
|
||||||
ManPagesTest Readme ManPagesClient Test
|
ManPagesTest Readme ManPagesClient Test
|
||||||
Common Client SharedLibraries)
|
Common Client SharedLibraries)
|
||||||
|
|
||||||
SET(CPACK_RPM_PACKAGE_NAME "MariaDB")
|
SET(CPACK_RPM_PACKAGE_NAME "MariaDB")
|
||||||
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${VERSION}-${RPM}-${CMAKE_SYSTEM_PROCESSOR}")
|
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${VERSION}-${RPM}-${CMAKE_SYSTEM_PROCESSOR}")
|
||||||
|
|
||||||
SET(CPACK_RPM_PACKAGE_RELEASE 1) # FIX: add distribution name here
|
SET(CPACK_RPM_PACKAGE_RELEASE "1%{?dist}")
|
||||||
SET(CPACK_RPM_PACKAGE_LICENSE "GPL")
|
SET(CPACK_RPM_PACKAGE_LICENSE "GPL")
|
||||||
SET(CPACK_RPM_PACKAGE_RELOCATABLE FALSE)
|
SET(CPACK_RPM_PACKAGE_RELOCATABLE FALSE)
|
||||||
SET(CPACK_RPM_PACKAGE_GROUP "Applications/Databases")
|
SET(CPACK_RPM_PACKAGE_GROUP "Applications/Databases")
|
||||||
|
|
@ -94,55 +94,128 @@ SET(CPACK_RPM_compat_USER_FILELIST ${ignored})
|
||||||
SET(CPACK_RPM_devel_USER_FILELIST ${ignored})
|
SET(CPACK_RPM_devel_USER_FILELIST ${ignored})
|
||||||
SET(CPACK_RPM_test_USER_FILELIST ${ignored})
|
SET(CPACK_RPM_test_USER_FILELIST ${ignored})
|
||||||
|
|
||||||
SET(CPACK_RPM_client_PACKAGE_OBSOLETES "mysql-client MySQL-client MySQL-OurDelta-client")
|
# "set/append array" - append a set of strings, separated by a space
|
||||||
SET(CPACK_RPM_client_PACKAGE_PROVIDES "MySQL-client mysql-client")
|
MACRO(SETA var)
|
||||||
|
FOREACH(v ${ARGN})
|
||||||
|
SET(${var} "${${var}} ${v}")
|
||||||
|
ENDFOREACH()
|
||||||
|
ENDMACRO(SETA)
|
||||||
|
|
||||||
# this is a workaround for CPackRPM.cmake (as of 2.8.8) bug.
|
SETA(CPACK_RPM_client_PACKAGE_OBSOLETES
|
||||||
# If a package group does not specify OBSOLETES/REQUIRES the values of the
|
"mysql-client"
|
||||||
# previous (alphabetically) group will apply.
|
"MySQL-client"
|
||||||
SET(CPACK_RPM_common_PACKAGE_OBSOLETES "MySQL-common")
|
"MySQL-OurDelta-client")
|
||||||
SET(CPACK_RPM_common_PACKAGE_PROVIDES "MariaDB-common")
|
SETA(CPACK_RPM_client_PACKAGE_PROVIDES
|
||||||
|
"MySQL-client"
|
||||||
|
"mysql-client")
|
||||||
|
|
||||||
SET(CPACK_RPM_devel_PACKAGE_OBSOLETES "mysql-devel MySQL-devel MySQL-OurDelta-devel")
|
SETA(CPACK_RPM_devel_PACKAGE_OBSOLETES
|
||||||
SET(CPACK_RPM_devel_PACKAGE_PROVIDES "MySQL-devel mysql-devel")
|
"MySQL-devel"
|
||||||
|
"MySQL-OurDelta-devel")
|
||||||
|
SETA(CPACK_RPM_devel_PACKAGE_PROVIDES
|
||||||
|
"MySQL-devel")
|
||||||
|
|
||||||
|
SETA(CPACK_RPM_server_PACKAGE_OBSOLETES
|
||||||
|
"MariaDB"
|
||||||
|
"MySQL"
|
||||||
|
"mysql-server"
|
||||||
|
"MySQL-server"
|
||||||
|
"MySQL-OurDelta-server")
|
||||||
|
SETA(CPACK_RPM_server_PACKAGE_PROVIDES
|
||||||
|
"MariaDB"
|
||||||
|
"MySQL"
|
||||||
|
"MySQL-server"
|
||||||
|
"msqlormysql"
|
||||||
|
"mysql-server")
|
||||||
|
|
||||||
|
SETA(CPACK_RPM_shared_PACKAGE_OBSOLETES
|
||||||
|
"mysql-shared"
|
||||||
|
"MySQL-shared-standard"
|
||||||
|
"MySQL-shared-pro"
|
||||||
|
"MySQL-shared-pro-cert"
|
||||||
|
"MySQL-shared-pro-gpl"
|
||||||
|
"MySQL-shared-pro-gpl-cert"
|
||||||
|
"MySQL-shared"
|
||||||
|
"MySQL-OurDelta-shared")
|
||||||
|
SETA(CPACK_RPM_shared_PACKAGE_PROVIDES
|
||||||
|
"MySQL-shared"
|
||||||
|
"mysql-shared")
|
||||||
|
|
||||||
|
SETA(CPACK_RPM_test_PACKAGE_OBSOLETES
|
||||||
|
"MySQL-test"
|
||||||
|
"MySQL-OurDelta-test")
|
||||||
|
SETA(CPACK_RPM_test_PACKAGE_PROVIDES
|
||||||
|
"MySQL-test")
|
||||||
|
|
||||||
SET(CPACK_RPM_server_PACKAGE_OBSOLETES "MariaDB MySQL mysql-server MySQL-server MySQL-OurDelta-server")
|
|
||||||
SET(CPACK_RPM_server_PACKAGE_PROVIDES "MariaDB MySQL MySQL-server msqlormysql mysql-server")
|
|
||||||
SET(CPACK_RPM_server_PRE_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-prein.sh)
|
SET(CPACK_RPM_server_PRE_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-prein.sh)
|
||||||
SET(CPACK_RPM_server_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-preun.sh)
|
SET(CPACK_RPM_server_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-preun.sh)
|
||||||
SET(CPACK_RPM_server_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-postin.sh)
|
SET(CPACK_RPM_server_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-postin.sh)
|
||||||
SET(CPACK_RPM_server_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-postun.sh)
|
SET(CPACK_RPM_server_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-postun.sh)
|
||||||
|
|
||||||
SET(CPACK_RPM_shared_PACKAGE_OBSOLETES "mysql-shared MySQL-shared-standard MySQL-shared-pro MySQL-shared-pro-cert MySQL-shared-pro-gpl MySQL-shared-pro-gpl-cert MySQL-shared MySQL-OurDelta-shared mysql-libs")
|
|
||||||
SET(CPACK_RPM_shared_PACKAGE_PROVIDES "MySQL-shared mysql-shared")
|
|
||||||
|
|
||||||
SET(CPACK_RPM_shared_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)
|
SET(CPACK_RPM_shared_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)
|
||||||
SET(CPACK_RPM_shared_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)
|
SET(CPACK_RPM_shared_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)
|
||||||
|
|
||||||
SET(CPACK_RPM_test_PACKAGE_OBSOLETES "mysql-test MySQL-test MySQL-OurDelta-test")
|
|
||||||
SET(CPACK_RPM_test_PACKAGE_PROVIDES "MySQL-test mysql-test")
|
|
||||||
|
|
||||||
# Argh! Different distributions call packages differently, to be a drop-in replacement
|
|
||||||
# we have to fake distribution-speficic dependencies
|
|
||||||
MACRO(ALTERNATIVE_NAME real alt)
|
MACRO(ALTERNATIVE_NAME real alt)
|
||||||
|
SET(ver "%{version}-%{release}")
|
||||||
|
IF (${epoch})
|
||||||
|
SET(ver "${epoch}:${ver}")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
SET(p "CPACK_RPM_${real}_PACKAGE_PROVIDES")
|
SET(p "CPACK_RPM_${real}_PACKAGE_PROVIDES")
|
||||||
SET(${p} "${${p}} ${alt} ${alt}(x86-32) ${alt}(x86-64) config(${alt})")
|
SET(${p} "${${p}} ${alt} = ${ver} ${alt}%{?_isa} = ${ver} config(${alt}) = ${ver}")
|
||||||
SET(o "CPACK_RPM_${real}_PACKAGE_OBSOLETES")
|
SET(o "CPACK_RPM_${real}_PACKAGE_OBSOLETES")
|
||||||
SET(${o} "${${o}} ${alt}")
|
SET(${o} "${${o}} ${alt} ${alt}%{_isa}")
|
||||||
ENDMACRO(ALTERNATIVE_NAME)
|
ENDMACRO(ALTERNATIVE_NAME)
|
||||||
|
|
||||||
|
# Argh! Different distributions call packages differently, to be a drop-in
|
||||||
|
# replacement we have to fake distribution-speficic dependencies
|
||||||
|
|
||||||
|
ALTERNATIVE_NAME("devel" "mysql-devel")
|
||||||
|
ALTERNATIVE_NAME("server" "mysql-server")
|
||||||
|
ALTERNATIVE_NAME("test" "mysql-test")
|
||||||
|
|
||||||
IF(RPM MATCHES "(rhel|centos)5")
|
IF(RPM MATCHES "(rhel|centos)5")
|
||||||
ALTERNATIVE_NAME("shared" "mysql")
|
ALTERNATIVE_NAME("shared" "mysql")
|
||||||
ELSEIF(RPM MATCHES "(rhel|centos)6")
|
ELSEIF(RPM MATCHES "(rhel|centos)6")
|
||||||
ALTERNATIVE_NAME("client" "mysql")
|
ALTERNATIVE_NAME("client" "mysql")
|
||||||
ALTERNATIVE_NAME("shared" "mysql-libs")
|
ALTERNATIVE_NAME("shared" "mysql-libs")
|
||||||
ELSEIF(RPM MATCHES "fedora")
|
ELSEIF(RPM MATCHES "fedora")
|
||||||
|
SET(epoch 1) # this is fedora
|
||||||
|
ALTERNATIVE_NAME("client" "mariadb")
|
||||||
ALTERNATIVE_NAME("client" "mysql")
|
ALTERNATIVE_NAME("client" "mysql")
|
||||||
|
ALTERNATIVE_NAME("devel" "mariadb-devel")
|
||||||
|
ALTERNATIVE_NAME("server" "mariadb-server")
|
||||||
|
ALTERNATIVE_NAME("shared" "mariadb-libs")
|
||||||
ALTERNATIVE_NAME("shared" "mysql-libs")
|
ALTERNATIVE_NAME("shared" "mysql-libs")
|
||||||
|
ALTERNATIVE_NAME("test" "mariadb-test")
|
||||||
|
SET(CPACK_RPM_common_PACKAGE_CONFLICTS "mariadb-libs < 1:%{version}-%{release}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# workaround for lots of perl dependencies added by rpmbuild
|
# workaround for lots of perl dependencies added by rpmbuild
|
||||||
SET(CPACK_RPM_test_PACKAGE_PROVIDES "${CPACK_RPM_test_PACKAGE_PROVIDES} perl(lib::mtr_gcov.pl) perl(lib::mtr_gprof.pl) perl(lib::mtr_io.pl) perl(lib::mtr_misc.pl) perl(lib::mtr_process.pl) perl(lib::v1/mtr_cases.pl) perl(lib::v1/mtr_gcov.pl) perl(lib::v1/mtr_gprof.pl) perl(lib::v1/mtr_im.pl) perl(lib::v1/mtr_io.pl) perl(lib::v1/mtr_match.pl) perl(lib::v1/mtr_misc.pl) perl(lib::v1/mtr_process.pl) perl(lib::v1/mtr_report.pl) perl(lib::v1/mtr_stress.pl) perl(lib::v1/mtr_timer.pl) perl(lib::v1/mtr_unique.pl) perl(mtr_cases) perl(mtr_io.pl) perl(mtr_match) perl(mtr_misc.pl) perl(mtr_report) perl(mtr_results) perl(mtr_unique)")
|
SETA(CPACK_RPM_test_PACKAGE_PROVIDES
|
||||||
|
"perl(lib::mtr_gcov.pl)"
|
||||||
|
"perl(lib::mtr_gprof.pl)"
|
||||||
|
"perl(lib::mtr_io.pl)"
|
||||||
|
"perl(lib::mtr_misc.pl)"
|
||||||
|
"perl(lib::mtr_process.pl)"
|
||||||
|
"perl(lib::v1/mtr_cases.pl)"
|
||||||
|
"perl(lib::v1/mtr_gcov.pl)"
|
||||||
|
"perl(lib::v1/mtr_gprof.pl)"
|
||||||
|
"perl(lib::v1/mtr_im.pl)"
|
||||||
|
"perl(lib::v1/mtr_io.pl)"
|
||||||
|
"perl(lib::v1/mtr_match.pl)"
|
||||||
|
"perl(lib::v1/mtr_misc.pl)"
|
||||||
|
"perl(lib::v1/mtr_process.pl)"
|
||||||
|
"perl(lib::v1/mtr_report.pl)"
|
||||||
|
"perl(lib::v1/mtr_stress.pl)"
|
||||||
|
"perl(lib::v1/mtr_timer.pl)"
|
||||||
|
"perl(lib::v1/mtr_unique.pl)"
|
||||||
|
"perl(mtr_cases)"
|
||||||
|
"perl(mtr_io.pl)"
|
||||||
|
"perl(mtr_match)"
|
||||||
|
"perl(mtr_misc.pl)"
|
||||||
|
"perl(mtr_report)"
|
||||||
|
"perl(mtr_results)"
|
||||||
|
"perl(mtr_unique)")
|
||||||
|
|
||||||
# If we want to build build MariaDB-shared-compat,
|
# If we want to build build MariaDB-shared-compat,
|
||||||
# extract compat libraries from MariaDB-shared-5.3 rpm
|
# extract compat libraries from MariaDB-shared-5.3 rpm
|
||||||
|
|
@ -170,7 +243,6 @@ IF (compat_rpm)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF(compat_rpm)
|
ENDIF(compat_rpm)
|
||||||
|
|
||||||
SET(CPACK_RPM_compat_PACKAGE_REQUIRES "/bin/sh") # to mask CPACK_RPM_PACKAGE_REQUIRES
|
|
||||||
SET(CPACK_RPM_compat_PACKAGE_PROVIDES "mysql-libs = 5.3.5") # exact version doesn't matter as long as it greater than 5.1
|
SET(CPACK_RPM_compat_PACKAGE_PROVIDES "mysql-libs = 5.3.5") # exact version doesn't matter as long as it greater than 5.1
|
||||||
SET(CPACK_RPM_compat_PACKAGE_OBSOLETES "mysql-libs < 5.3.5")
|
SET(CPACK_RPM_compat_PACKAGE_OBSOLETES "mysql-libs < 5.3.5")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,10 @@ FUNCTION (INSTALL_DEBUG_SYMBOLS)
|
||||||
)
|
)
|
||||||
|
|
||||||
IF(NOT ARG_COMPONENT)
|
IF(NOT ARG_COMPONENT)
|
||||||
MESSAGE(FATAL_ERROR "No COMPONENT passed to INSTALL_DEBUG_SYMBOLS")
|
SET(ARG_COMPONENT DebugBinaries)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
IF(NOT ARG_INSTALL_LOCATION)
|
IF(NOT ARG_INSTALL_LOCATION)
|
||||||
MESSAGE(FATAL_ERROR "No INSTALL_LOCATION passed to INSTALL_DEBUG_SYMBOLS")
|
SET(ARG_INSTALL_LOCATION lib)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
SET(targets ${ARG_DEFAULT_ARGS})
|
SET(targets ${ARG_DEFAULT_ARGS})
|
||||||
FOREACH(target ${targets})
|
FOREACH(target ${targets})
|
||||||
|
|
@ -397,6 +397,7 @@ FUNCTION(INSTALL_MYSQL_TEST from to)
|
||||||
PATTERN "*.vcxproj.filters" EXCLUDE
|
PATTERN "*.vcxproj.filters" EXCLUDE
|
||||||
PATTERN "*.vcxproj.user" EXCLUDE
|
PATTERN "*.vcxproj.user" EXCLUDE
|
||||||
PATTERN "CTest" EXCLUDE
|
PATTERN "CTest" EXCLUDE
|
||||||
|
PATTERN "*~" EXCLUDE
|
||||||
)
|
)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDFUNCTION()
|
ENDFUNCTION()
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ MACRO (CHECK_JEMALLOC)
|
||||||
CHECK_LIBRARY_EXISTS(jemalloc malloc_stats_print "" HAVE_JEMALLOC)
|
CHECK_LIBRARY_EXISTS(jemalloc malloc_stats_print "" HAVE_JEMALLOC)
|
||||||
IF (HAVE_JEMALLOC)
|
IF (HAVE_JEMALLOC)
|
||||||
SET(LIBJEMALLOC jemalloc)
|
SET(LIBJEMALLOC jemalloc)
|
||||||
|
SET(MALLOC_LIBRARY "system jemalloc")
|
||||||
ELSEIF (WITH_JEMALLOC STREQUAL "system")
|
ELSEIF (WITH_JEMALLOC STREQUAL "system")
|
||||||
MESSAGE(FATAL_ERROR "system jemalloc is not found")
|
MESSAGE(FATAL_ERROR "system jemalloc is not found")
|
||||||
ELSEIF (WITH_JEMALLOC STREQUAL "yes")
|
ELSEIF (WITH_JEMALLOC STREQUAL "yes")
|
||||||
|
|
@ -61,5 +62,6 @@ MACRO (CHECK_JEMALLOC)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
IF(WITH_JEMALLOC STREQUAL "bundled" OR trybundled)
|
IF(WITH_JEMALLOC STREQUAL "bundled" OR trybundled)
|
||||||
USE_BUNDLED_JEMALLOC()
|
USE_BUNDLED_JEMALLOC()
|
||||||
|
SET(MALLOC_LIBRARY "bundled jemalloc")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDMACRO()
|
ENDMACRO()
|
||||||
|
|
|
||||||
|
|
@ -1,48 +1,48 @@
|
||||||
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
# the Free Software Foundation; version 2 of the License.
|
# the Free Software Foundation; version 2 of the License.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
# Add executable plus some additional MySQL specific stuff
|
# Add executable plus some additional MySQL specific stuff
|
||||||
# Usage (same as for standard CMake's ADD_EXECUTABLE)
|
# Usage (same as for standard CMake's ADD_EXECUTABLE)
|
||||||
#
|
#
|
||||||
# MYSQL_ADD_EXECUTABLE(target source1...sourceN)
|
# MYSQL_ADD_EXECUTABLE(target source1...sourceN)
|
||||||
#
|
#
|
||||||
# MySQL specifics:
|
# MySQL specifics:
|
||||||
# - instruct CPack to install executable under ${CMAKE_INSTALL_PREFIX}/bin directory
|
# - instruct CPack to install executable under ${CMAKE_INSTALL_PREFIX}/bin directory
|
||||||
# On Windows :
|
# On Windows :
|
||||||
# - add version resource
|
# - add version resource
|
||||||
# - instruct CPack to do autenticode signing if SIGNCODE is set
|
# - instruct CPack to do autenticode signing if SIGNCODE is set
|
||||||
|
|
||||||
INCLUDE(cmake_parse_arguments)
|
INCLUDE(cmake_parse_arguments)
|
||||||
|
|
||||||
FUNCTION (MYSQL_ADD_EXECUTABLE)
|
FUNCTION (MYSQL_ADD_EXECUTABLE)
|
||||||
# Pass-through arguments for ADD_EXECUTABLE
|
# Pass-through arguments for ADD_EXECUTABLE
|
||||||
MYSQL_PARSE_ARGUMENTS(ARG
|
MYSQL_PARSE_ARGUMENTS(ARG
|
||||||
"WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL;DESTINATION;COMPONENT"
|
"WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL;DESTINATION;COMPONENT"
|
||||||
""
|
""
|
||||||
${ARGN}
|
${ARGN}
|
||||||
)
|
)
|
||||||
LIST(GET ARG_DEFAULT_ARGS 0 target)
|
LIST(GET ARG_DEFAULT_ARGS 0 target)
|
||||||
LIST(REMOVE_AT ARG_DEFAULT_ARGS 0)
|
LIST(REMOVE_AT ARG_DEFAULT_ARGS 0)
|
||||||
|
|
||||||
SET(sources ${ARG_DEFAULT_ARGS})
|
SET(sources ${ARG_DEFAULT_ARGS})
|
||||||
ADD_VERSION_INFO(${target} EXECUTABLE sources)
|
ADD_VERSION_INFO(${target} EXECUTABLE sources)
|
||||||
ADD_EXECUTABLE(${target} ${ARG_WIN32} ${ARG_MACOSX_BUNDLE} ${ARG_EXCLUDE_FROM_ALL} ${sources})
|
ADD_EXECUTABLE(${target} ${ARG_WIN32} ${ARG_MACOSX_BUNDLE} ${ARG_EXCLUDE_FROM_ALL} ${sources})
|
||||||
# tell CPack where to install
|
# tell CPack where to install
|
||||||
IF(NOT ARG_EXCLUDE_FROM_ALL)
|
IF(NOT ARG_EXCLUDE_FROM_ALL)
|
||||||
IF(NOT ARG_DESTINATION)
|
IF(NOT ARG_DESTINATION)
|
||||||
SET(ARG_DESTINATION ${INSTALL_BINDIR})
|
SET(ARG_DESTINATION ${INSTALL_BINDIR})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
IF(ARG_COMPONENT)
|
IF(ARG_COMPONENT)
|
||||||
SET(COMP COMPONENT ${ARG_COMPONENT})
|
SET(COMP COMPONENT ${ARG_COMPONENT})
|
||||||
|
|
@ -50,7 +50,7 @@ FUNCTION (MYSQL_ADD_EXECUTABLE)
|
||||||
SET(COMP COMPONENT ${MYSQL_INSTALL_COMPONENT})
|
SET(COMP COMPONENT ${MYSQL_INSTALL_COMPONENT})
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(COMP COMPONENT Client)
|
SET(COMP COMPONENT Client)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} ${COMP})
|
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} ${COMP})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDFUNCTION()
|
ENDFUNCTION()
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -34,7 +34,10 @@ ENDFOREACH()
|
||||||
|
|
||||||
# Ensure we have clean build for shared libraries
|
# Ensure we have clean build for shared libraries
|
||||||
# without unresolved symbols
|
# without unresolved symbols
|
||||||
SET(LINK_FLAG_NO_UNDEFINED "-Wl,--no-undefined")
|
# Not supported with AddressSanitizer
|
||||||
|
IF(NOT WITH_ASAN)
|
||||||
|
SET(LINK_FLAG_NO_UNDEFINED "-Wl,--no-undefined")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# 64 bit file offset support flag
|
# 64 bit file offset support flag
|
||||||
SET(_FILE_OFFSET_BITS 64)
|
SET(_FILE_OFFSET_BITS 64)
|
||||||
|
|
|
||||||
|
|
@ -1,38 +1,38 @@
|
||||||
// Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
// Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation; version 2 of the License.
|
// the Free Software Foundation; version 2 of the License.
|
||||||
//
|
//
|
||||||
// This program is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program; if not, write to the Free Software
|
// along with this program; if not, write to the Free Software
|
||||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@
|
FILEVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@
|
||||||
PRODUCTVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@
|
PRODUCTVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@
|
||||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||||
FILEFLAGS 0
|
FILEFLAGS 0
|
||||||
FILEOS VOS__WINDOWS32
|
FILEOS VOS__WINDOWS32
|
||||||
FILETYPE @FILETYPE@
|
FILETYPE @FILETYPE@
|
||||||
FILESUBTYPE VFT2_UNKNOWN
|
FILESUBTYPE VFT2_UNKNOWN
|
||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "StringFileInfo"
|
BLOCK "StringFileInfo"
|
||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "040904E4"
|
BLOCK "040904E4"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "FileVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0"
|
VALUE "FileVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0"
|
||||||
VALUE "ProductVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0"
|
VALUE "ProductVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "Translation", 0x409, 1252
|
VALUE "Translation", 0x409, 1252
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
# Copyright (c) 2009 Sun Microsystems, Inc.
|
# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
# Use is subject to license terms.
|
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
|
/* Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -618,7 +618,7 @@
|
||||||
#cmakedefine DEFAULT_CHARSET_HOME "@DEFAULT_CHARSET_HOME@"
|
#cmakedefine DEFAULT_CHARSET_HOME "@DEFAULT_CHARSET_HOME@"
|
||||||
#cmakedefine PLUGINDIR "@PLUGINDIR@"
|
#cmakedefine PLUGINDIR "@PLUGINDIR@"
|
||||||
#cmakedefine DEFAULT_SYSCONFDIR "@DEFAULT_SYSCONFDIR@"
|
#cmakedefine DEFAULT_SYSCONFDIR "@DEFAULT_SYSCONFDIR@"
|
||||||
#cmakedefine DEFAULT_TMPDIR "@DEFAULT_TMPDIR@"
|
#cmakedefine DEFAULT_TMPDIR @DEFAULT_TMPDIR@
|
||||||
|
|
||||||
#cmakedefine SO_EXT "@CMAKE_SHARED_MODULE_SUFFIX@"
|
#cmakedefine SO_EXT "@CMAKE_SHARED_MODULE_SUFFIX@"
|
||||||
|
|
||||||
|
|
@ -636,6 +636,7 @@
|
||||||
#define VERSION "@VERSION@"
|
#define VERSION "@VERSION@"
|
||||||
#define PROTOCOL_VERSION 10
|
#define PROTOCOL_VERSION 10
|
||||||
|
|
||||||
|
#define MALLOC_LIBRARY "@MALLOC_LIBRARY@"
|
||||||
|
|
||||||
/* time_t related defines */
|
/* time_t related defines */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,10 @@ IF(UNIX)
|
||||||
|
|
||||||
SET(CMAKE_REQUIRED_LIBRARIES
|
SET(CMAKE_REQUIRED_LIBRARIES
|
||||||
${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT} ${LIBEXECINFO})
|
${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT} ${LIBEXECINFO})
|
||||||
|
# Need explicit pthread for gcc -fsanitize=address
|
||||||
|
IF(CMAKE_USE_PTHREADS_INIT AND CMAKE_C_FLAGS MATCHES "-fsanitize=")
|
||||||
|
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} pthread)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
IF(CMAKE_REQUIRED_LIBRARIES)
|
IF(CMAKE_REQUIRED_LIBRARIES)
|
||||||
LIST(REMOVE_DUPLICATES CMAKE_REQUIRED_LIBRARIES)
|
LIST(REMOVE_DUPLICATES CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
|
|
||||||
1
debian/dist/Debian/control
vendored
1
debian/dist/Debian/control
vendored
|
|
@ -172,6 +172,7 @@ Depends: mariadb-server-10.0 (= ${source:Version}), mariadb-client-10.0 (= ${sou
|
||||||
Conflicts: mariadb-test (<< ${source:Version}),
|
Conflicts: mariadb-test (<< ${source:Version}),
|
||||||
mariadb-test-5.1, mariadb-test-5.2, mariadb-test-5.3,
|
mariadb-test-5.1, mariadb-test-5.2, mariadb-test-5.3,
|
||||||
mariadb-server-5.5 (<< 5.5.33), mariadb-galera-server-5.5 (<< 5.5.33)
|
mariadb-server-5.5 (<< 5.5.33), mariadb-galera-server-5.5 (<< 5.5.33)
|
||||||
|
Suggests: patch
|
||||||
Replaces: mariadb-test (<< ${source:Version}),
|
Replaces: mariadb-test (<< ${source:Version}),
|
||||||
mariadb-test-5.1, mariadb-test-5.2, mariadb-test-5.3
|
mariadb-test-5.1, mariadb-test-5.2, mariadb-test-5.3
|
||||||
Description: MariaDB database regression test suite
|
Description: MariaDB database regression test suite
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ usr/lib/mysql/plugin/query_cache_info.so
|
||||||
usr/lib/mysql/plugin/query_response_time.so
|
usr/lib/mysql/plugin/query_response_time.so
|
||||||
usr/lib/mysql/plugin/semisync_master.so
|
usr/lib/mysql/plugin/semisync_master.so
|
||||||
usr/lib/mysql/plugin/semisync_slave.so
|
usr/lib/mysql/plugin/semisync_slave.so
|
||||||
usr/lib/mysql/plugin/sphinx.so
|
|
||||||
usr/lib/mysql/plugin/sql_errlog.so
|
usr/lib/mysql/plugin/sql_errlog.so
|
||||||
usr/lib/libhsclient.so.*
|
usr/lib/libhsclient.so.*
|
||||||
etc/mysql/debian-start
|
etc/mysql/debian-start
|
||||||
|
|
|
||||||
5
debian/dist/Debian/rules
vendored
5
debian/dist/Debian/rules
vendored
|
|
@ -87,11 +87,6 @@ build-stamp: configure
|
||||||
cd $(builddir) && $(MAKE) $(MAKE_J) $(AM_EXTRA_MAKEFLAGS)
|
cd $(builddir) && $(MAKE) $(MAKE_J) $(AM_EXTRA_MAKEFLAGS)
|
||||||
|
|
||||||
ifeq ($(findstring nocheck,$(DEB_BUILD_OPTIONS)),)
|
ifeq ($(findstring nocheck,$(DEB_BUILD_OPTIONS)),)
|
||||||
# Don't know why the following is necessary...
|
|
||||||
cp unittest/unit.pl $(builddir)/unittest/
|
|
||||||
cp -r mysql-test/* $(builddir)/mysql-test/
|
|
||||||
cp -r sql/share/* $(builddir)/sql/share/
|
|
||||||
cp -r scripts/*sql $(builddir)/scripts/
|
|
||||||
if [ ! -f testsuite-stamp ] ; then \
|
if [ ! -f testsuite-stamp ] ; then \
|
||||||
cd $(builddir) && $(MAKE) $(MAKE_TEST_TARGET) || $(TESTSUITE_FAIL_CMD) ; \
|
cd $(builddir) && $(MAKE) $(MAKE_TEST_TARGET) || $(TESTSUITE_FAIL_CMD) ; \
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
1
debian/dist/Ubuntu/control
vendored
1
debian/dist/Ubuntu/control
vendored
|
|
@ -163,6 +163,7 @@ Package: mariadb-test-10.0
|
||||||
Section: database
|
Section: database
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: mariadb-server-10.0 (= ${source:Version}), mariadb-client-10.0 (= ${source:Version})
|
Depends: mariadb-server-10.0 (= ${source:Version}), mariadb-client-10.0 (= ${source:Version})
|
||||||
|
Suggests: patch
|
||||||
Conflicts: mariadb-test (<< ${source:Version}),
|
Conflicts: mariadb-test (<< ${source:Version}),
|
||||||
mariadb-test-5.1, mariadb-test-5.2, mariadb-test-5.3,
|
mariadb-test-5.1, mariadb-test-5.2, mariadb-test-5.3,
|
||||||
mariadb-server-5.5 (<< 5.5.33), mariadb-galera-server-5.5 (<< 5.5.33)
|
mariadb-server-5.5 (<< 5.5.33), mariadb-galera-server-5.5 (<< 5.5.33)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
usr/lib/mysql/plugin/auth_pam.so
|
usr/lib/mysql/plugin/auth_pam.so
|
||||||
usr/lib/mysql/plugin/auth_socket.so
|
usr/lib/mysql/plugin/auth_socket.so
|
||||||
usr/lib/mysql/plugin/ha_sequence.so
|
usr/lib/mysql/plugin/ha_sequence.so
|
||||||
|
usr/lib/mysql/plugin/ha_sphinx.so
|
||||||
usr/lib/mysql/plugin/ha_xtradb.so
|
usr/lib/mysql/plugin/ha_xtradb.so
|
||||||
usr/lib/mysql/plugin/handlersocket.so
|
usr/lib/mysql/plugin/handlersocket.so
|
||||||
usr/lib/mysql/plugin/locales.so
|
usr/lib/mysql/plugin/locales.so
|
||||||
|
|
@ -9,7 +10,6 @@ usr/lib/mysql/plugin/query_cache_info.so
|
||||||
usr/lib/mysql/plugin/query_response_time.so
|
usr/lib/mysql/plugin/query_response_time.so
|
||||||
usr/lib/mysql/plugin/semisync_master.so
|
usr/lib/mysql/plugin/semisync_master.so
|
||||||
usr/lib/mysql/plugin/semisync_slave.so
|
usr/lib/mysql/plugin/semisync_slave.so
|
||||||
usr/lib/mysql/plugin/sphinx.so
|
|
||||||
usr/lib/mysql/plugin/sql_errlog.so
|
usr/lib/mysql/plugin/sql_errlog.so
|
||||||
usr/lib/libhsclient.so.*
|
usr/lib/libhsclient.so.*
|
||||||
etc/apparmor.d/usr.sbin.mysqld
|
etc/apparmor.d/usr.sbin.mysqld
|
||||||
|
|
|
||||||
5
debian/dist/Ubuntu/rules
vendored
5
debian/dist/Ubuntu/rules
vendored
|
|
@ -87,11 +87,6 @@ build-stamp: configure
|
||||||
cd $(builddir) && $(MAKE) $(MAKE_J) $(AM_EXTRA_MAKEFLAGS)
|
cd $(builddir) && $(MAKE) $(MAKE_J) $(AM_EXTRA_MAKEFLAGS)
|
||||||
|
|
||||||
ifeq ($(findstring nocheck,$(DEB_BUILD_OPTIONS)),)
|
ifeq ($(findstring nocheck,$(DEB_BUILD_OPTIONS)),)
|
||||||
# Don't know why the following is necessary...
|
|
||||||
cp unittest/unit.pl $(builddir)/unittest/
|
|
||||||
cp -r mysql-test/* $(builddir)/mysql-test/
|
|
||||||
cp -r sql/share/* $(builddir)/sql/share/
|
|
||||||
cp -r scripts/*sql $(builddir)/scripts/
|
|
||||||
if [ ! -f testsuite-stamp ] ; then \
|
if [ ! -f testsuite-stamp ] ; then \
|
||||||
cd $(builddir) && $(MAKE) $(MAKE_TEST_TARGET) || $(TESTSUITE_FAIL_CMD) ; \
|
cd $(builddir) && $(MAKE) $(MAKE_TEST_TARGET) || $(TESTSUITE_FAIL_CMD) ; \
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -10,21 +10,30 @@
|
||||||
@DPATCH@
|
@DPATCH@
|
||||||
--- old/scripts/mysql_system_tables_data.sql 2008-12-04 22:59:44.000000000 +0100
|
--- old/scripts/mysql_system_tables_data.sql 2008-12-04 22:59:44.000000000 +0100
|
||||||
+++ new/scripts/mysql_system_tables_data.sql 2008-12-04 23:00:07.000000000 +0100
|
+++ new/scripts/mysql_system_tables_data.sql 2008-12-04 23:00:07.000000000 +0100
|
||||||
@@ -31,8 +31,6 @@
|
@@ -26,16 +26,6 @@
|
||||||
-- Fill "db" table with default grants for anyone to
|
-- a plain character
|
||||||
-- access database 'test' and 'test_%' if "db" table didn't exist
|
SELECT LOWER( REPLACE((SELECT REPLACE(@@hostname,'_','\_')),'%','\%') )INTO @current_hostname;
|
||||||
CREATE TEMPORARY TABLE tmp_db LIKE db;
|
|
||||||
|
-
|
||||||
|
--- Fill "db" table with default grants for anyone to
|
||||||
|
--- access database 'test' and 'test_%' if "db" table didn't exist
|
||||||
|
-CREATE TEMPORARY TABLE tmp_db LIKE db;
|
||||||
-INSERT INTO tmp_db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');
|
-INSERT INTO tmp_db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');
|
||||||
-INSERT INTO tmp_db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');
|
-INSERT INTO tmp_db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');
|
||||||
INSERT INTO db SELECT * FROM tmp_db WHERE @had_db_table=0;
|
-INSERT INTO db SELECT * FROM tmp_db WHERE @had_db_table=0;
|
||||||
DROP TABLE tmp_db;
|
-DROP TABLE tmp_db;
|
||||||
|
-
|
||||||
@@ -44,8 +42,6 @@
|
-
|
||||||
REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N' FROM dual WHERE LOWER( @current_hostname) != 'localhost';
|
-- Fill "user" table with default users allowing root access
|
||||||
|
-- from local machine if "user" table didn't exist before
|
||||||
|
CREATE TEMPORARY TABLE tmp_user LIKE user;
|
||||||
|
@@ -43,8 +33,6 @@ INSERT INTO tmp_user VALUES ('localhost'
|
||||||
|
REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N' FROM dual WHERE @current_hostname != 'localhost';
|
||||||
REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N');
|
REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N');
|
||||||
REPLACE INTO tmp_user VALUES ('::1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N');
|
REPLACE INTO tmp_user VALUES ('::1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N');
|
||||||
-INSERT INTO tmp_user (host,user) VALUES ('localhost','');
|
-INSERT INTO tmp_user (host,user) VALUES ('localhost','');
|
||||||
-INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE LOWER(@current_hostname ) != 'localhost';
|
-INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE @current_hostname != 'localhost';
|
||||||
INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0;
|
INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0;
|
||||||
DROP TABLE tmp_user;
|
DROP TABLE tmp_user;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
--- a/scripts/mysqld_safe.sh 2013-01-11 16:02:41 +0000
|
--- a/scripts/mysqld_safe.sh 2013-01-11 16:02:41 +0000
|
||||||
+++ b/scripts/mysqld_safe.sh 2013-01-11 16:03:14 +0000
|
+++ b/scripts/mysqld_safe.sh 2013-01-11 16:03:14 +0000
|
||||||
@@ -30,7 +30,6 @@
|
@@ -32,7 +32,6 @@ err_log=
|
||||||
syslog_tag_mysqld=mysqld
|
syslog_tag_mysqld=mysqld
|
||||||
syslog_tag_mysqld_safe=mysqld_safe
|
syslog_tag_mysqld_safe=mysqld_safe
|
||||||
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
# MySQL-specific environment variable. First off, it's not really a umask,
|
# MySQL-specific environment variable. First off, it's not really a umask,
|
||||||
# it's the desired mode. Second, it follows umask(2), not umask(3) in that
|
# it's the desired mode. Second, it follows umask(2), not umask(3) in that
|
||||||
@@ -156,7 +155,7 @@
|
@@ -163,7 +162,7 @@ eval_log_error () {
|
||||||
# sed buffers output (only GNU sed supports a -u (unbuffered) option)
|
# sed buffers output (only GNU sed supports a -u (unbuffered) option)
|
||||||
# which means that messages may not get sent to syslog until the
|
# which means that messages may not get sent to syslog until the
|
||||||
# mysqld process quits.
|
# mysqld process quits.
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Internal program error (non-fatal):" \
|
echo "Internal program error (non-fatal):" \
|
||||||
@@ -758,6 +757,13 @@
|
@@ -805,6 +804,13 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,12 @@
|
||||||
|
|
||||||
--- mysql-dfsg-5.1-5.1.23rc.orig/scripts/mysql_install_db.sh 2008-01-29 22:41:20.000000000 +0100
|
--- mysql-dfsg-5.1-5.1.23rc.orig/scripts/mysql_install_db.sh 2008-01-29 22:41:20.000000000 +0100
|
||||||
+++ mysql-dfsg-5.1-5.1.23rc/scripts/mysql_install_db.sh 2008-02-28 10:08:11.000000000 +0100
|
+++ mysql-dfsg-5.1-5.1.23rc/scripts/mysql_install_db.sh 2008-02-28 10:08:11.000000000 +0100
|
||||||
@@ -306,7 +306,7 @@
|
@@ -372,7 +372,7 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create database directories
|
# Create database directories
|
||||||
-for dir in "$ldata" "$ldata/mysql" "$ldata/test"
|
-for dir in "$ldata" "$ldata/mysql" "$ldata/test"
|
||||||
+for dir in "$ldata" "$ldata/mysql"
|
+for dir in "$ldata" "$ldata/mysql"
|
||||||
do
|
do
|
||||||
if test ! -d $dir
|
if test ! -d "$dir"
|
||||||
then
|
then
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
diff -Nur mysql-dfsg-5.1-5.1.31.orig/scripts/mysql_config.sh mysql-dfsg-5.1-5.1.31/scripts/mysql_config.sh
|
diff -Nur mysql-dfsg-5.1-5.1.31.orig/scripts/mysql_config.sh mysql-dfsg-5.1-5.1.31/scripts/mysql_config.sh
|
||||||
--- mysql-dfsg-5.1-5.1.31.orig/scripts/mysql_config.sh 2009-01-19 17:30:55.000000000 +0100
|
--- mysql-dfsg-5.1-5.1.31.orig/scripts/mysql_config.sh 2009-01-19 17:30:55.000000000 +0100
|
||||||
+++ mysql-dfsg-5.1-5.1.31/scripts/mysql_config.sh 2009-02-08 17:17:48.000000000 +0100
|
+++ mysql-dfsg-5.1-5.1.31/scripts/mysql_config.sh 2009-02-08 17:17:48.000000000 +0100
|
||||||
@@ -110,10 +110,10 @@
|
@@ -106,10 +106,10 @@ fi
|
||||||
|
|
||||||
# Create options
|
# Create options
|
||||||
# We intentionally add a space to the beginning and end of lib strings, simplifies replace later
|
# We intentionally add a space to the beginning and end of lib strings, simplifies replace later
|
||||||
|
|
|
||||||
4
debian/patches/50_mysql-test__db_test.dpatch
vendored
4
debian/patches/50_mysql-test__db_test.dpatch
vendored
|
|
@ -10,9 +10,9 @@
|
||||||
|
|
||||||
--- old/mysql-test/mysql-test-run.pl 2009-06-16 14:24:09.000000000 +0200
|
--- old/mysql-test/mysql-test-run.pl 2009-06-16 14:24:09.000000000 +0200
|
||||||
+++ new/mysql-test/mysql-test-run.pl 2009-07-04 00:03:34.000000000 +0200
|
+++ new/mysql-test/mysql-test-run.pl 2009-07-04 00:03:34.000000000 +0200
|
||||||
@@ -2717,6 +2717,11 @@
|
@@ -3578,6 +3578,11 @@ sub mysql_install_db {
|
||||||
mtr_appendfile_to_file("$sql_dir/mysql_system_tables_data.sql",
|
mtr_appendfile_to_file("$sql_dir/mysql_system_tables_data.sql",
|
||||||
$bootstrap_sql_file);
|
$bootstrap_sql_file);
|
||||||
|
|
||||||
+ mtr_tofile($bootstrap_sql_file, "-- Debian removed the default privileges on the 'test' database\n");
|
+ mtr_tofile($bootstrap_sql_file, "-- Debian removed the default privileges on the 'test' database\n");
|
||||||
+ mtr_tofile($bootstrap_sql_file, "INSERT INTO mysql.db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');\n");
|
+ mtr_tofile($bootstrap_sql_file, "INSERT INTO mysql.db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');\n");
|
||||||
|
|
|
||||||
10
debian/po/it.po
vendored
10
debian/po/it.po
vendored
|
|
@ -1,8 +1,8 @@
|
||||||
# Italian (it) translation of debconf templates for mysql-dfsg-5.1
|
# Italian (it) translation of debconf templates for mysql-dfsg-5.1
|
||||||
# Copyright (C) 2009 Software in the Public Interest
|
# Copyright (C) 2009 Software in the Public Interest
|
||||||
# This file is distributed under the same license as the mysql-dfsg-5.1 package.
|
# This file is distributed under the same license as the mysql-dfsg-5.1 package.
|
||||||
# Luca Monducci <luca.mo@tiscali.it>, 2006 - 2009.
|
# Luca Monducci <luca.mo@tiscali.it>, 2006 - 2009.
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: mysql-dfsg-5.1 5.1.37 italian debconf templates\n"
|
"Project-Id-Version: mysql-dfsg-5.1 5.1.37 italian debconf templates\n"
|
||||||
|
|
|
||||||
12
debian/po/sv.po
vendored
12
debian/po/sv.po
vendored
|
|
@ -1,9 +1,9 @@
|
||||||
# Translation of mysql-dfsg-5.1 debconf template to Swedish
|
# Translation of mysql-dfsg-5.1 debconf template to Swedish
|
||||||
# Copyright (C) 2009 Martin Bagge <brother@bsnet.se>
|
# Copyright (C) 2009 Martin Bagge <brother@bsnet.se>
|
||||||
# This file is distributed under the same license as the mysql-dfsg-5.1 package.
|
# This file is distributed under the same license as the mysql-dfsg-5.1 package.
|
||||||
#
|
#
|
||||||
# Andreas Henriksson <andreas@fatal.se>, 2007
|
# Andreas Henriksson <andreas@fatal.se>, 2007
|
||||||
# Martin Bagge <brother@bsnet.se>, 2009
|
# Martin Bagge <brother@bsnet.se>, 2009
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: mysql-dfsg-5.1 5.0.21-3\n"
|
"Project-Id-Version: mysql-dfsg-5.1 5.0.21-3\n"
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,15 @@ found in the git revision history:
|
||||||
http://www.canonware.com/cgi-bin/gitweb.cgi?p=jemalloc.git
|
http://www.canonware.com/cgi-bin/gitweb.cgi?p=jemalloc.git
|
||||||
git://canonware.com/jemalloc.git
|
git://canonware.com/jemalloc.git
|
||||||
|
|
||||||
|
* 3.3.1a (December 27, 2013)
|
||||||
|
|
||||||
|
Bug fixes from 3.4.1
|
||||||
|
- Fix Valgrind integration flaws that caused Valgrind warnings about reads of
|
||||||
|
uninitialized memory in:
|
||||||
|
+ arena chunk headers
|
||||||
|
+ internal zero-initialized data structures (relevant to tcache and prof
|
||||||
|
code)
|
||||||
|
|
||||||
* 3.3.1 (March 6, 2013)
|
* 3.3.1 (March 6, 2013)
|
||||||
|
|
||||||
This version fixes bugs that are typically encountered only when utilizing
|
This version fixes bugs that are typically encountered only when utilizing
|
||||||
|
|
|
||||||
|
|
@ -441,6 +441,7 @@ void arena_postfork_child(arena_t *arena);
|
||||||
#ifndef JEMALLOC_ENABLE_INLINE
|
#ifndef JEMALLOC_ENABLE_INLINE
|
||||||
arena_chunk_map_t *arena_mapp_get(arena_chunk_t *chunk, size_t pageind);
|
arena_chunk_map_t *arena_mapp_get(arena_chunk_t *chunk, size_t pageind);
|
||||||
size_t *arena_mapbitsp_get(arena_chunk_t *chunk, size_t pageind);
|
size_t *arena_mapbitsp_get(arena_chunk_t *chunk, size_t pageind);
|
||||||
|
size_t arena_mapbitsp_read(size_t *mapbitsp);
|
||||||
size_t arena_mapbits_get(arena_chunk_t *chunk, size_t pageind);
|
size_t arena_mapbits_get(arena_chunk_t *chunk, size_t pageind);
|
||||||
size_t arena_mapbits_unallocated_size_get(arena_chunk_t *chunk,
|
size_t arena_mapbits_unallocated_size_get(arena_chunk_t *chunk,
|
||||||
size_t pageind);
|
size_t pageind);
|
||||||
|
|
@ -451,6 +452,7 @@ size_t arena_mapbits_dirty_get(arena_chunk_t *chunk, size_t pageind);
|
||||||
size_t arena_mapbits_unzeroed_get(arena_chunk_t *chunk, size_t pageind);
|
size_t arena_mapbits_unzeroed_get(arena_chunk_t *chunk, size_t pageind);
|
||||||
size_t arena_mapbits_large_get(arena_chunk_t *chunk, size_t pageind);
|
size_t arena_mapbits_large_get(arena_chunk_t *chunk, size_t pageind);
|
||||||
size_t arena_mapbits_allocated_get(arena_chunk_t *chunk, size_t pageind);
|
size_t arena_mapbits_allocated_get(arena_chunk_t *chunk, size_t pageind);
|
||||||
|
void arena_mapbitsp_write(size_t *mapbitsp, size_t mapbits);
|
||||||
void arena_mapbits_unallocated_set(arena_chunk_t *chunk, size_t pageind,
|
void arena_mapbits_unallocated_set(arena_chunk_t *chunk, size_t pageind,
|
||||||
size_t size, size_t flags);
|
size_t size, size_t flags);
|
||||||
void arena_mapbits_unallocated_size_set(arena_chunk_t *chunk, size_t pageind,
|
void arena_mapbits_unallocated_size_set(arena_chunk_t *chunk, size_t pageind,
|
||||||
|
|
@ -497,11 +499,18 @@ arena_mapbitsp_get(arena_chunk_t *chunk, size_t pageind)
|
||||||
return (&arena_mapp_get(chunk, pageind)->bits);
|
return (&arena_mapp_get(chunk, pageind)->bits);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JEMALLOC_ALWAYS_INLINE size_t
|
||||||
|
arena_mapbitsp_read(size_t *mapbitsp)
|
||||||
|
{
|
||||||
|
|
||||||
|
return (*mapbitsp);
|
||||||
|
}
|
||||||
|
|
||||||
JEMALLOC_ALWAYS_INLINE size_t
|
JEMALLOC_ALWAYS_INLINE size_t
|
||||||
arena_mapbits_get(arena_chunk_t *chunk, size_t pageind)
|
arena_mapbits_get(arena_chunk_t *chunk, size_t pageind)
|
||||||
{
|
{
|
||||||
|
|
||||||
return (*arena_mapbitsp_get(chunk, pageind));
|
return (arena_mapbitsp_read(arena_mapbitsp_get(chunk, pageind)));
|
||||||
}
|
}
|
||||||
|
|
||||||
JEMALLOC_ALWAYS_INLINE size_t
|
JEMALLOC_ALWAYS_INLINE size_t
|
||||||
|
|
@ -584,83 +593,90 @@ arena_mapbits_allocated_get(arena_chunk_t *chunk, size_t pageind)
|
||||||
return (mapbits & CHUNK_MAP_ALLOCATED);
|
return (mapbits & CHUNK_MAP_ALLOCATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JEMALLOC_ALWAYS_INLINE void
|
||||||
|
arena_mapbitsp_write(size_t *mapbitsp, size_t mapbits)
|
||||||
|
{
|
||||||
|
|
||||||
|
*mapbitsp = mapbits;
|
||||||
|
}
|
||||||
|
|
||||||
JEMALLOC_ALWAYS_INLINE void
|
JEMALLOC_ALWAYS_INLINE void
|
||||||
arena_mapbits_unallocated_set(arena_chunk_t *chunk, size_t pageind, size_t size,
|
arena_mapbits_unallocated_set(arena_chunk_t *chunk, size_t pageind, size_t size,
|
||||||
size_t flags)
|
size_t flags)
|
||||||
{
|
{
|
||||||
size_t *mapbitsp;
|
size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind);
|
||||||
|
|
||||||
mapbitsp = arena_mapbitsp_get(chunk, pageind);
|
|
||||||
assert((size & PAGE_MASK) == 0);
|
assert((size & PAGE_MASK) == 0);
|
||||||
assert((flags & ~CHUNK_MAP_FLAGS_MASK) == 0);
|
assert((flags & ~CHUNK_MAP_FLAGS_MASK) == 0);
|
||||||
assert((flags & (CHUNK_MAP_DIRTY|CHUNK_MAP_UNZEROED)) == flags);
|
assert((flags & (CHUNK_MAP_DIRTY|CHUNK_MAP_UNZEROED)) == flags);
|
||||||
*mapbitsp = size | CHUNK_MAP_BININD_INVALID | flags;
|
arena_mapbitsp_write(mapbitsp, size | CHUNK_MAP_BININD_INVALID | flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
JEMALLOC_ALWAYS_INLINE void
|
JEMALLOC_ALWAYS_INLINE void
|
||||||
arena_mapbits_unallocated_size_set(arena_chunk_t *chunk, size_t pageind,
|
arena_mapbits_unallocated_size_set(arena_chunk_t *chunk, size_t pageind,
|
||||||
size_t size)
|
size_t size)
|
||||||
{
|
{
|
||||||
size_t *mapbitsp;
|
size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind);
|
||||||
|
size_t mapbits = arena_mapbitsp_read(mapbitsp);
|
||||||
|
|
||||||
mapbitsp = arena_mapbitsp_get(chunk, pageind);
|
|
||||||
assert((size & PAGE_MASK) == 0);
|
assert((size & PAGE_MASK) == 0);
|
||||||
assert((*mapbitsp & (CHUNK_MAP_LARGE|CHUNK_MAP_ALLOCATED)) == 0);
|
assert((mapbits & (CHUNK_MAP_LARGE|CHUNK_MAP_ALLOCATED)) == 0);
|
||||||
*mapbitsp = size | (*mapbitsp & PAGE_MASK);
|
arena_mapbitsp_write(mapbitsp, size | (mapbits & PAGE_MASK));
|
||||||
}
|
}
|
||||||
|
|
||||||
JEMALLOC_ALWAYS_INLINE void
|
JEMALLOC_ALWAYS_INLINE void
|
||||||
arena_mapbits_large_set(arena_chunk_t *chunk, size_t pageind, size_t size,
|
arena_mapbits_large_set(arena_chunk_t *chunk, size_t pageind, size_t size,
|
||||||
size_t flags)
|
size_t flags)
|
||||||
{
|
{
|
||||||
size_t *mapbitsp;
|
size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind);
|
||||||
|
size_t mapbits = arena_mapbitsp_read(mapbitsp);
|
||||||
size_t unzeroed;
|
size_t unzeroed;
|
||||||
|
|
||||||
mapbitsp = arena_mapbitsp_get(chunk, pageind);
|
|
||||||
assert((size & PAGE_MASK) == 0);
|
assert((size & PAGE_MASK) == 0);
|
||||||
assert((flags & CHUNK_MAP_DIRTY) == flags);
|
assert((flags & CHUNK_MAP_DIRTY) == flags);
|
||||||
unzeroed = *mapbitsp & CHUNK_MAP_UNZEROED; /* Preserve unzeroed. */
|
unzeroed = mapbits & CHUNK_MAP_UNZEROED; /* Preserve unzeroed. */
|
||||||
*mapbitsp = size | CHUNK_MAP_BININD_INVALID | flags | unzeroed |
|
arena_mapbitsp_write(mapbitsp, size | CHUNK_MAP_BININD_INVALID | flags
|
||||||
CHUNK_MAP_LARGE | CHUNK_MAP_ALLOCATED;
|
| unzeroed | CHUNK_MAP_LARGE | CHUNK_MAP_ALLOCATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
JEMALLOC_ALWAYS_INLINE void
|
JEMALLOC_ALWAYS_INLINE void
|
||||||
arena_mapbits_large_binind_set(arena_chunk_t *chunk, size_t pageind,
|
arena_mapbits_large_binind_set(arena_chunk_t *chunk, size_t pageind,
|
||||||
size_t binind)
|
size_t binind)
|
||||||
{
|
{
|
||||||
size_t *mapbitsp;
|
size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind);
|
||||||
|
size_t mapbits = arena_mapbitsp_read(mapbitsp);
|
||||||
|
|
||||||
assert(binind <= BININD_INVALID);
|
assert(binind <= BININD_INVALID);
|
||||||
mapbitsp = arena_mapbitsp_get(chunk, pageind);
|
|
||||||
assert(arena_mapbits_large_size_get(chunk, pageind) == PAGE);
|
assert(arena_mapbits_large_size_get(chunk, pageind) == PAGE);
|
||||||
*mapbitsp = (*mapbitsp & ~CHUNK_MAP_BININD_MASK) | (binind <<
|
arena_mapbitsp_write(mapbitsp, (mapbits & ~CHUNK_MAP_BININD_MASK) |
|
||||||
CHUNK_MAP_BININD_SHIFT);
|
(binind << CHUNK_MAP_BININD_SHIFT));
|
||||||
}
|
}
|
||||||
|
|
||||||
JEMALLOC_ALWAYS_INLINE void
|
JEMALLOC_ALWAYS_INLINE void
|
||||||
arena_mapbits_small_set(arena_chunk_t *chunk, size_t pageind, size_t runind,
|
arena_mapbits_small_set(arena_chunk_t *chunk, size_t pageind, size_t runind,
|
||||||
size_t binind, size_t flags)
|
size_t binind, size_t flags)
|
||||||
{
|
{
|
||||||
size_t *mapbitsp;
|
size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind);
|
||||||
|
size_t mapbits = arena_mapbitsp_read(mapbitsp);
|
||||||
size_t unzeroed;
|
size_t unzeroed;
|
||||||
|
|
||||||
assert(binind < BININD_INVALID);
|
assert(binind < BININD_INVALID);
|
||||||
mapbitsp = arena_mapbitsp_get(chunk, pageind);
|
|
||||||
assert(pageind - runind >= map_bias);
|
assert(pageind - runind >= map_bias);
|
||||||
assert((flags & CHUNK_MAP_DIRTY) == flags);
|
assert((flags & CHUNK_MAP_DIRTY) == flags);
|
||||||
unzeroed = *mapbitsp & CHUNK_MAP_UNZEROED; /* Preserve unzeroed. */
|
unzeroed = mapbits & CHUNK_MAP_UNZEROED; /* Preserve unzeroed. */
|
||||||
*mapbitsp = (runind << LG_PAGE) | (binind << CHUNK_MAP_BININD_SHIFT) |
|
arena_mapbitsp_write(mapbitsp, (runind << LG_PAGE) | (binind <<
|
||||||
flags | unzeroed | CHUNK_MAP_ALLOCATED;
|
CHUNK_MAP_BININD_SHIFT) | flags | unzeroed | CHUNK_MAP_ALLOCATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
JEMALLOC_ALWAYS_INLINE void
|
JEMALLOC_ALWAYS_INLINE void
|
||||||
arena_mapbits_unzeroed_set(arena_chunk_t *chunk, size_t pageind,
|
arena_mapbits_unzeroed_set(arena_chunk_t *chunk, size_t pageind,
|
||||||
size_t unzeroed)
|
size_t unzeroed)
|
||||||
{
|
{
|
||||||
size_t *mapbitsp;
|
size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind);
|
||||||
|
size_t mapbits = arena_mapbitsp_read(mapbitsp);
|
||||||
|
|
||||||
mapbitsp = arena_mapbitsp_get(chunk, pageind);
|
arena_mapbitsp_write(mapbitsp, (mapbits & ~CHUNK_MAP_UNZEROED) |
|
||||||
*mapbitsp = (*mapbitsp & ~CHUNK_MAP_UNZEROED) | unzeroed;
|
unzeroed);
|
||||||
}
|
}
|
||||||
|
|
||||||
JEMALLOC_INLINE bool
|
JEMALLOC_INLINE bool
|
||||||
|
|
|
||||||
|
|
@ -235,6 +235,7 @@ static const bool config_ivsalloc =
|
||||||
#ifdef JEMALLOC_DEBUG
|
#ifdef JEMALLOC_DEBUG
|
||||||
/* Disable inlining to make debugging easier. */
|
/* Disable inlining to make debugging easier. */
|
||||||
# define JEMALLOC_ALWAYS_INLINE
|
# define JEMALLOC_ALWAYS_INLINE
|
||||||
|
# define JEMALLOC_ALWAYS_INLINE_C static
|
||||||
# define JEMALLOC_INLINE
|
# define JEMALLOC_INLINE
|
||||||
# define inline
|
# define inline
|
||||||
#else
|
#else
|
||||||
|
|
@ -242,8 +243,11 @@ static const bool config_ivsalloc =
|
||||||
# ifdef JEMALLOC_HAVE_ATTR
|
# ifdef JEMALLOC_HAVE_ATTR
|
||||||
# define JEMALLOC_ALWAYS_INLINE \
|
# define JEMALLOC_ALWAYS_INLINE \
|
||||||
static inline JEMALLOC_ATTR(unused) JEMALLOC_ATTR(always_inline)
|
static inline JEMALLOC_ATTR(unused) JEMALLOC_ATTR(always_inline)
|
||||||
|
# define JEMALLOC_ALWAYS_INLINE_C \
|
||||||
|
static inline JEMALLOC_ATTR(always_inline)
|
||||||
# else
|
# else
|
||||||
# define JEMALLOC_ALWAYS_INLINE static inline
|
# define JEMALLOC_ALWAYS_INLINE static inline
|
||||||
|
# define JEMALLOC_ALWAYS_INLINE_C static inline
|
||||||
# endif
|
# endif
|
||||||
# define JEMALLOC_INLINE static inline
|
# define JEMALLOC_INLINE static inline
|
||||||
# ifdef _MSC_VER
|
# ifdef _MSC_VER
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,8 @@
|
||||||
#define arena_mapbits_unzeroed_get JEMALLOC_N(arena_mapbits_unzeroed_get)
|
#define arena_mapbits_unzeroed_get JEMALLOC_N(arena_mapbits_unzeroed_get)
|
||||||
#define arena_mapbits_unzeroed_set JEMALLOC_N(arena_mapbits_unzeroed_set)
|
#define arena_mapbits_unzeroed_set JEMALLOC_N(arena_mapbits_unzeroed_set)
|
||||||
#define arena_mapbitsp_get JEMALLOC_N(arena_mapbitsp_get)
|
#define arena_mapbitsp_get JEMALLOC_N(arena_mapbitsp_get)
|
||||||
|
#define arena_mapbitsp_read JEMALLOC_N(arena_mapbitsp_read)
|
||||||
|
#define arena_mapbitsp_write JEMALLOC_N(arena_mapbitsp_write)
|
||||||
#define arena_mapp_get JEMALLOC_N(arena_mapp_get)
|
#define arena_mapp_get JEMALLOC_N(arena_mapp_get)
|
||||||
#define arena_maxclass JEMALLOC_N(arena_maxclass)
|
#define arena_maxclass JEMALLOC_N(arena_maxclass)
|
||||||
#define arena_new JEMALLOC_N(arena_new)
|
#define arena_new JEMALLOC_N(arena_new)
|
||||||
|
|
|
||||||
|
|
@ -313,6 +313,7 @@ tcache_alloc_small(tcache_t *tcache, size_t size, bool zero)
|
||||||
} else if (opt_zero)
|
} else if (opt_zero)
|
||||||
memset(ret, 0, size);
|
memset(ret, 0, size);
|
||||||
}
|
}
|
||||||
|
VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
|
||||||
} else {
|
} else {
|
||||||
if (config_fill && opt_junk) {
|
if (config_fill && opt_junk) {
|
||||||
arena_alloc_junk_small(ret, &arena_bin_info[binind],
|
arena_alloc_junk_small(ret, &arena_bin_info[binind],
|
||||||
|
|
@ -321,7 +322,6 @@ tcache_alloc_small(tcache_t *tcache, size_t size, bool zero)
|
||||||
VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
|
VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
|
||||||
memset(ret, 0, size);
|
memset(ret, 0, size);
|
||||||
}
|
}
|
||||||
VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
|
|
||||||
|
|
||||||
if (config_stats)
|
if (config_stats)
|
||||||
tbin->tstats.nrequests++;
|
tbin->tstats.nrequests++;
|
||||||
|
|
@ -368,11 +368,11 @@ tcache_alloc_large(tcache_t *tcache, size_t size, bool zero)
|
||||||
else if (opt_zero)
|
else if (opt_zero)
|
||||||
memset(ret, 0, size);
|
memset(ret, 0, size);
|
||||||
}
|
}
|
||||||
|
VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
|
||||||
} else {
|
} else {
|
||||||
VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
|
VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
|
||||||
memset(ret, 0, size);
|
memset(ret, 0, size);
|
||||||
}
|
}
|
||||||
VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
|
|
||||||
|
|
||||||
if (config_stats)
|
if (config_stats)
|
||||||
tbin->tstats.nrequests++;
|
tbin->tstats.nrequests++;
|
||||||
|
|
|
||||||
|
|
@ -368,14 +368,21 @@ arena_run_zero(arena_chunk_t *chunk, size_t run_ind, size_t npages)
|
||||||
(npages << LG_PAGE));
|
(npages << LG_PAGE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
arena_run_page_mark_zeroed(arena_chunk_t *chunk, size_t run_ind)
|
||||||
|
{
|
||||||
|
|
||||||
|
VALGRIND_MAKE_MEM_DEFINED((void *)((uintptr_t)chunk + (run_ind <<
|
||||||
|
LG_PAGE)), PAGE);
|
||||||
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
arena_run_page_validate_zeroed(arena_chunk_t *chunk, size_t run_ind)
|
arena_run_page_validate_zeroed(arena_chunk_t *chunk, size_t run_ind)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
UNUSED size_t *p = (size_t *)((uintptr_t)chunk + (run_ind << LG_PAGE));
|
UNUSED size_t *p = (size_t *)((uintptr_t)chunk + (run_ind << LG_PAGE));
|
||||||
|
|
||||||
VALGRIND_MAKE_MEM_DEFINED((void *)((uintptr_t)chunk + (run_ind <<
|
arena_run_page_mark_zeroed(chunk, run_ind);
|
||||||
LG_PAGE)), PAGE);
|
|
||||||
for (i = 0; i < PAGE / sizeof(size_t); i++)
|
for (i = 0; i < PAGE / sizeof(size_t); i++)
|
||||||
assert(p[i] == 0);
|
assert(p[i] == 0);
|
||||||
}
|
}
|
||||||
|
|
@ -458,6 +465,9 @@ arena_run_split(arena_t *arena, arena_run_t *run, size_t size, bool large,
|
||||||
} else if (config_debug) {
|
} else if (config_debug) {
|
||||||
arena_run_page_validate_zeroed(
|
arena_run_page_validate_zeroed(
|
||||||
chunk, run_ind+i);
|
chunk, run_ind+i);
|
||||||
|
} else {
|
||||||
|
arena_run_page_mark_zeroed(
|
||||||
|
chunk, run_ind+i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -467,6 +477,9 @@ arena_run_split(arena_t *arena, arena_run_t *run, size_t size, bool large,
|
||||||
*/
|
*/
|
||||||
arena_run_zero(chunk, run_ind, need_pages);
|
arena_run_zero(chunk, run_ind, need_pages);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
VALGRIND_MAKE_MEM_UNDEFINED((void *)((uintptr_t)chunk +
|
||||||
|
(run_ind << LG_PAGE)), (need_pages << LG_PAGE));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -508,9 +521,9 @@ arena_run_split(arena_t *arena, arena_run_t *run, size_t size, bool large,
|
||||||
arena_run_page_validate_zeroed(chunk,
|
arena_run_page_validate_zeroed(chunk,
|
||||||
run_ind+need_pages-1);
|
run_ind+need_pages-1);
|
||||||
}
|
}
|
||||||
|
VALGRIND_MAKE_MEM_UNDEFINED((void *)((uintptr_t)chunk +
|
||||||
|
(run_ind << LG_PAGE)), (need_pages << LG_PAGE));
|
||||||
}
|
}
|
||||||
VALGRIND_MAKE_MEM_UNDEFINED((void *)((uintptr_t)chunk + (run_ind <<
|
|
||||||
LG_PAGE)), (need_pages << LG_PAGE));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static arena_chunk_t *
|
static arena_chunk_t *
|
||||||
|
|
@ -569,17 +582,24 @@ arena_chunk_alloc(arena_t *arena)
|
||||||
* unless the chunk is not zeroed.
|
* unless the chunk is not zeroed.
|
||||||
*/
|
*/
|
||||||
if (zero == false) {
|
if (zero == false) {
|
||||||
|
VALGRIND_MAKE_MEM_UNDEFINED(
|
||||||
|
(void *)arena_mapp_get(chunk, map_bias+1),
|
||||||
|
(size_t)((uintptr_t) arena_mapp_get(chunk,
|
||||||
|
chunk_npages-1) - (uintptr_t)arena_mapp_get(chunk,
|
||||||
|
map_bias+1)));
|
||||||
for (i = map_bias+1; i < chunk_npages-1; i++)
|
for (i = map_bias+1; i < chunk_npages-1; i++)
|
||||||
arena_mapbits_unzeroed_set(chunk, i, unzeroed);
|
arena_mapbits_unzeroed_set(chunk, i, unzeroed);
|
||||||
} else if (config_debug) {
|
} else {
|
||||||
VALGRIND_MAKE_MEM_DEFINED(
|
VALGRIND_MAKE_MEM_DEFINED(
|
||||||
(void *)arena_mapp_get(chunk, map_bias+1),
|
(void *)arena_mapp_get(chunk, map_bias+1),
|
||||||
(void *)((uintptr_t)
|
(size_t)((uintptr_t) arena_mapp_get(chunk,
|
||||||
arena_mapp_get(chunk, chunk_npages-1)
|
chunk_npages-1) - (uintptr_t)arena_mapp_get(chunk,
|
||||||
- (uintptr_t)arena_mapp_get(chunk, map_bias+1)));
|
map_bias+1)));
|
||||||
for (i = map_bias+1; i < chunk_npages-1; i++) {
|
if (config_debug) {
|
||||||
assert(arena_mapbits_unzeroed_get(chunk, i) ==
|
for (i = map_bias+1; i < chunk_npages-1; i++) {
|
||||||
unzeroed);
|
assert(arena_mapbits_unzeroed_get(chunk,
|
||||||
|
i) == unzeroed);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
arena_mapbits_unallocated_set(chunk, chunk_npages-1,
|
arena_mapbits_unallocated_set(chunk, chunk_npages-1,
|
||||||
|
|
@ -1458,6 +1478,7 @@ arena_malloc_small(arena_t *arena, size_t size, bool zero)
|
||||||
} else if (opt_zero)
|
} else if (opt_zero)
|
||||||
memset(ret, 0, size);
|
memset(ret, 0, size);
|
||||||
}
|
}
|
||||||
|
VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
|
||||||
} else {
|
} else {
|
||||||
if (config_fill && opt_junk) {
|
if (config_fill && opt_junk) {
|
||||||
arena_alloc_junk_small(ret, &arena_bin_info[binind],
|
arena_alloc_junk_small(ret, &arena_bin_info[binind],
|
||||||
|
|
@ -1466,7 +1487,6 @@ arena_malloc_small(arena_t *arena, size_t size, bool zero)
|
||||||
VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
|
VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
|
||||||
memset(ret, 0, size);
|
memset(ret, 0, size);
|
||||||
}
|
}
|
||||||
VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
|
|
||||||
|
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -33,4 +33,9 @@ SET(YASSL_SOURCES src/buffer.cpp src/cert_wrapper.cpp src/crypto_wrapper.cpp sr
|
||||||
ADD_CONVENIENCE_LIBRARY(yassl ${YASSL_SOURCES})
|
ADD_CONVENIENCE_LIBRARY(yassl ${YASSL_SOURCES})
|
||||||
RESTRICT_SYMBOL_EXPORTS(yassl)
|
RESTRICT_SYMBOL_EXPORTS(yassl)
|
||||||
|
|
||||||
|
INSTALL_DEBUG_SYMBOLS(yassl)
|
||||||
|
IF(MSVC)
|
||||||
|
INSTALL_DEBUG_TARGET(yassl DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (c) 2005, 2012, Oracle and/or its affiliates.
|
Copyright (c) 2005, 2013, Oracle and/or its affiliates.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (c) 2005, 2012, Oracle and/or its affiliates
|
Copyright (c) 2005, 2013, Oracle and/or its affiliates
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (c) 2005, 2012, Oracle and/or its affiliates
|
Copyright (c) 2005, 2013, Oracle and/or its affiliates
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -32,3 +32,8 @@ SET(TAOCRYPT_SOURCES src/aes.cpp src/aestables.cpp src/algebra.cpp src/arc4.cpp
|
||||||
ADD_CONVENIENCE_LIBRARY(taocrypt ${TAOCRYPT_SOURCES})
|
ADD_CONVENIENCE_LIBRARY(taocrypt ${TAOCRYPT_SOURCES})
|
||||||
RESTRICT_SYMBOL_EXPORTS(taocrypt)
|
RESTRICT_SYMBOL_EXPORTS(taocrypt)
|
||||||
|
|
||||||
|
INSTALL_DEBUG_SYMBOLS(taocrypt)
|
||||||
|
IF(MSVC)
|
||||||
|
INSTALL_DEBUG_TARGET(taocrypt DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,3 +78,4 @@
|
||||||
{ "HA_ERR_ROW_NOT_VISIBLE", HA_ERR_ROW_NOT_VISIBLE, "" },
|
{ "HA_ERR_ROW_NOT_VISIBLE", HA_ERR_ROW_NOT_VISIBLE, "" },
|
||||||
{ "HA_ERR_ABORTED_BY_USER", HA_ERR_ABORTED_BY_USER, "" },
|
{ "HA_ERR_ABORTED_BY_USER", HA_ERR_ABORTED_BY_USER, "" },
|
||||||
{ "HA_ERR_DISK_FULL", HA_ERR_DISK_FULL, "" },
|
{ "HA_ERR_DISK_FULL", HA_ERR_DISK_FULL, "" },
|
||||||
|
{ "HA_ERR_INCOMPATIBLE_DEFINITION", HA_ERR_INCOMPATIBLE_DEFINITION, "" },
|
||||||
|
|
|
||||||
|
|
@ -69,8 +69,8 @@ extern "C" {
|
||||||
#if MARIA_MAX_KEY > MARIA_KEYMAP_BITS
|
#if MARIA_MAX_KEY > MARIA_KEYMAP_BITS
|
||||||
#define maria_is_key_active(_keymap_,_keyno_) \
|
#define maria_is_key_active(_keymap_,_keyno_) \
|
||||||
(((_keyno_) < MARIA_KEYMAP_BITS) ? \
|
(((_keyno_) < MARIA_KEYMAP_BITS) ? \
|
||||||
test((_keymap_) & (1ULL << (_keyno_))) : \
|
MY_TEST((_keymap_) & (1ULL << (_keyno_))) : \
|
||||||
test((_keymap_) & MARIA_KEYMAP_HIGH_MASK))
|
MY_TEST((_keymap_) & MARIA_KEYMAP_HIGH_MASK))
|
||||||
#define maria_set_key_active(_keymap_,_keyno_) \
|
#define maria_set_key_active(_keymap_,_keyno_) \
|
||||||
(_keymap_)|= (((_keyno_) < MARIA_KEYMAP_BITS) ? \
|
(_keymap_)|= (((_keyno_) < MARIA_KEYMAP_BITS) ? \
|
||||||
(1ULL << (_keyno_)) : \
|
(1ULL << (_keyno_)) : \
|
||||||
|
|
@ -81,14 +81,14 @@ extern "C" {
|
||||||
(~ (0ULL)) /*ignore*/ )
|
(~ (0ULL)) /*ignore*/ )
|
||||||
#else
|
#else
|
||||||
#define maria_is_key_active(_keymap_,_keyno_) \
|
#define maria_is_key_active(_keymap_,_keyno_) \
|
||||||
test((_keymap_) & (1ULL << (_keyno_)))
|
MY_TEST((_keymap_) & (1ULL << (_keyno_)))
|
||||||
#define maria_set_key_active(_keymap_,_keyno_) \
|
#define maria_set_key_active(_keymap_,_keyno_) \
|
||||||
(_keymap_)|= (1ULL << (_keyno_))
|
(_keymap_)|= (1ULL << (_keyno_))
|
||||||
#define maria_clear_key_active(_keymap_,_keyno_) \
|
#define maria_clear_key_active(_keymap_,_keyno_) \
|
||||||
(_keymap_)&= (~ (1ULL << (_keyno_)))
|
(_keymap_)&= (~ (1ULL << (_keyno_)))
|
||||||
#endif
|
#endif
|
||||||
#define maria_is_any_key_active(_keymap_) \
|
#define maria_is_any_key_active(_keymap_) \
|
||||||
test((_keymap_))
|
MY_TEST((_keymap_))
|
||||||
#define maria_is_all_keys_active(_keymap_,_keys_) \
|
#define maria_is_all_keys_active(_keymap_,_keys_) \
|
||||||
((_keymap_) == maria_get_mask_all_keys_active(_keys_))
|
((_keymap_) == maria_get_mask_all_keys_active(_keys_))
|
||||||
#define maria_set_all_keys_active(_keymap_,_keys_) \
|
#define maria_set_all_keys_active(_keymap_,_keys_) \
|
||||||
|
|
|
||||||
|
|
@ -200,11 +200,6 @@ enum ha_extra_function {
|
||||||
HA_EXTRA_ATTACH_CHILDREN,
|
HA_EXTRA_ATTACH_CHILDREN,
|
||||||
HA_EXTRA_IS_ATTACHED_CHILDREN,
|
HA_EXTRA_IS_ATTACHED_CHILDREN,
|
||||||
HA_EXTRA_DETACH_CHILDREN,
|
HA_EXTRA_DETACH_CHILDREN,
|
||||||
/*
|
|
||||||
Prepare table for export
|
|
||||||
(e.g. quiesce the table and write table metadata).
|
|
||||||
*/
|
|
||||||
HA_EXTRA_EXPORT,
|
|
||||||
HA_EXTRA_DETACH_CHILD,
|
HA_EXTRA_DETACH_CHILD,
|
||||||
/* Inform handler we will force a close as part of flush */
|
/* Inform handler we will force a close as part of flush */
|
||||||
HA_EXTRA_PREPARE_FOR_FORCED_CLOSE
|
HA_EXTRA_PREPARE_FOR_FORCED_CLOSE
|
||||||
|
|
@ -264,13 +259,11 @@ enum ha_base_keytype {
|
||||||
#define HA_SPATIAL 1024 /* For spatial search */
|
#define HA_SPATIAL 1024 /* For spatial search */
|
||||||
#define HA_NULL_ARE_EQUAL 2048 /* NULL in key are cmp as equal */
|
#define HA_NULL_ARE_EQUAL 2048 /* NULL in key are cmp as equal */
|
||||||
#define HA_GENERATED_KEY 8192 /* Automaticly generated key */
|
#define HA_GENERATED_KEY 8192 /* Automaticly generated key */
|
||||||
#define HA_RTREE_INDEX 16384 /* For RTREE search */
|
|
||||||
|
|
||||||
/* The combination of the above can be used for key type comparison. */
|
/* The combination of the above can be used for key type comparison. */
|
||||||
#define HA_KEYFLAG_MASK (HA_NOSAME | HA_PACK_KEY | HA_AUTO_KEY | \
|
#define HA_KEYFLAG_MASK (HA_NOSAME | HA_PACK_KEY | HA_AUTO_KEY | \
|
||||||
HA_BINARY_PACK_KEY | HA_FULLTEXT | HA_UNIQUE_CHECK | \
|
HA_BINARY_PACK_KEY | HA_FULLTEXT | HA_UNIQUE_CHECK | \
|
||||||
HA_SPATIAL | HA_NULL_ARE_EQUAL | HA_GENERATED_KEY | \
|
HA_SPATIAL | HA_NULL_ARE_EQUAL | HA_GENERATED_KEY)
|
||||||
HA_RTREE_INDEX)
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Key contains partial segments.
|
Key contains partial segments.
|
||||||
|
|
@ -507,7 +500,8 @@ enum ha_base_keytype {
|
||||||
#define HA_ERR_ROW_NOT_VISIBLE 187
|
#define HA_ERR_ROW_NOT_VISIBLE 187
|
||||||
#define HA_ERR_ABORTED_BY_USER 188
|
#define HA_ERR_ABORTED_BY_USER 188
|
||||||
#define HA_ERR_DISK_FULL 189
|
#define HA_ERR_DISK_FULL 189
|
||||||
#define HA_ERR_LAST 189 /* Copy of last error nr */
|
#define HA_ERR_INCOMPATIBLE_DEFINITION 190
|
||||||
|
#define HA_ERR_LAST 190 /* Copy of last error nr */
|
||||||
|
|
||||||
/* Number of different errors */
|
/* Number of different errors */
|
||||||
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
|
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
|
||||||
|
|
|
||||||
|
|
@ -41,9 +41,14 @@ typedef struct st_bitmap
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* compatibility functions */
|
||||||
|
#define bitmap_init(A,B,C,D) my_bitmap_init(A,B,C,D)
|
||||||
|
#define bitmap_free(A) my_bitmap_free(A)
|
||||||
|
|
||||||
extern void create_last_word_mask(MY_BITMAP *map);
|
extern void create_last_word_mask(MY_BITMAP *map);
|
||||||
extern my_bool bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits,
|
extern my_bool my_bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits,
|
||||||
my_bool thread_safe);
|
my_bool thread_safe);
|
||||||
extern my_bool bitmap_is_clear_all(const MY_BITMAP *map);
|
extern my_bool bitmap_is_clear_all(const MY_BITMAP *map);
|
||||||
extern my_bool bitmap_is_prefix(const MY_BITMAP *map, uint prefix_size);
|
extern my_bool bitmap_is_prefix(const MY_BITMAP *map, uint prefix_size);
|
||||||
extern my_bool bitmap_is_set_all(const MY_BITMAP *map);
|
extern my_bool bitmap_is_set_all(const MY_BITMAP *map);
|
||||||
|
|
@ -64,7 +69,7 @@ extern uint bitmap_get_first(const MY_BITMAP *map);
|
||||||
extern uint bitmap_get_first_set(const MY_BITMAP *map);
|
extern uint bitmap_get_first_set(const MY_BITMAP *map);
|
||||||
extern uint bitmap_bits_set(const MY_BITMAP *map);
|
extern uint bitmap_bits_set(const MY_BITMAP *map);
|
||||||
extern uint bitmap_get_next_set(const MY_BITMAP *map, uint bitmap_bit);
|
extern uint bitmap_get_next_set(const MY_BITMAP *map, uint bitmap_bit);
|
||||||
extern void bitmap_free(MY_BITMAP *map);
|
extern void my_bitmap_free(MY_BITMAP *map);
|
||||||
extern void bitmap_set_above(MY_BITMAP *map, uint from_byte, uint use_bit);
|
extern void bitmap_set_above(MY_BITMAP *map, uint from_byte, uint use_bit);
|
||||||
extern void bitmap_set_prefix(MY_BITMAP *map, uint prefix_size);
|
extern void bitmap_set_prefix(MY_BITMAP *map, uint prefix_size);
|
||||||
extern void bitmap_intersect(MY_BITMAP *map, const MY_BITMAP *map2);
|
extern void bitmap_intersect(MY_BITMAP *map, const MY_BITMAP *map2);
|
||||||
|
|
|
||||||
76
include/my_check_opt.h
Normal file
76
include/my_check_opt.h
Normal file
|
|
@ -0,0 +1,76 @@
|
||||||
|
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
|
||||||
|
|
||||||
|
#ifndef _my_check_opt_h
|
||||||
|
#define _my_check_opt_h
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
All given definitions needed for MyISAM storage engine:
|
||||||
|
myisamchk.c or/and ha_myisam.cc or/and micheck.c
|
||||||
|
Some definitions are needed by the MySQL parser.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define T_AUTO_INC (1UL << 0)
|
||||||
|
#define T_AUTO_REPAIR (1UL << 1)
|
||||||
|
#define T_BACKUP_DATA (1UL << 2)
|
||||||
|
#define T_CALC_CHECKSUM (1UL << 3)
|
||||||
|
#define T_CHECK (1UL << 4)
|
||||||
|
#define T_CHECK_ONLY_CHANGED (1UL << 5)
|
||||||
|
#define T_CREATE_MISSING_KEYS (1UL << 6)
|
||||||
|
#define T_DESCRIPT (1UL << 7)
|
||||||
|
#define T_DONT_CHECK_CHECKSUM (1UL << 8)
|
||||||
|
#define T_EXTEND (1UL << 9)
|
||||||
|
#define T_FAST (1UL << 10)
|
||||||
|
#define T_FORCE_CREATE (1UL << 11)
|
||||||
|
#define T_FORCE_UNIQUENESS (1UL << 12)
|
||||||
|
#define T_INFO (1UL << 13)
|
||||||
|
/** CHECK TABLE...MEDIUM (the default) */
|
||||||
|
#define T_MEDIUM (1UL << 14)
|
||||||
|
/** CHECK TABLE...QUICK */
|
||||||
|
#define T_QUICK (1UL << 15)
|
||||||
|
#define T_READONLY (1UL << 16)
|
||||||
|
#define T_REP (1UL << 17)
|
||||||
|
#define T_REP_BY_SORT (1UL << 18)
|
||||||
|
#define T_REP_PARALLEL (1UL << 19)
|
||||||
|
#define T_RETRY_WITHOUT_QUICK (1UL << 20)
|
||||||
|
#define T_SAFE_REPAIR (1UL << 21)
|
||||||
|
#define T_SILENT (1UL << 22)
|
||||||
|
#define T_SORT_INDEX (1UL << 23)
|
||||||
|
#define T_SORT_RECORDS (1UL << 24)
|
||||||
|
#define T_STATISTICS (1UL << 25)
|
||||||
|
#define T_UNPACK (1UL << 26)
|
||||||
|
#define T_UPDATE_STATE (1UL << 27)
|
||||||
|
#define T_VERBOSE (1UL << 28)
|
||||||
|
#define T_VERY_SILENT (1UL << 29)
|
||||||
|
#define T_WAIT_FOREVER (1UL << 30)
|
||||||
|
#define T_WRITE_LOOP (1UL << 31)
|
||||||
|
#define T_ZEROFILL (1ULL << 32)
|
||||||
|
#define T_ZEROFILL_KEEP_LSN (1ULL << 33)
|
||||||
|
/** If repair should not bump create_rename_lsn */
|
||||||
|
#define T_NO_CREATE_RENAME_LSN (1ULL << 34)
|
||||||
|
#define T_CREATE_UNIQUE_BY_SORT (1ULL << 35)
|
||||||
|
#define T_SUPPRESS_ERR_HANDLING (1ULL << 36)
|
||||||
|
#define T_FORCE_SORT_MEMORY (1ULL << 37)
|
||||||
|
|
||||||
|
#define T_REP_ANY (T_REP | T_REP_BY_SORT | T_REP_PARALLEL)
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (c) 2002, 2012, Oracle and/or its affiliates.
|
Copyright (c) 2002, 2013, Oracle and/or its affiliates.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,7 @@
|
||||||
/* Workaround for _LARGE_FILES and _LARGE_FILE_API incompatibility on AIX */
|
/* Workaround for _LARGE_FILES and _LARGE_FILE_API incompatibility on AIX */
|
||||||
#if defined(_AIX) && defined(_LARGE_FILE_API)
|
#if defined(_AIX) && defined(_LARGE_FILE_API)
|
||||||
#undef _LARGE_FILE_API
|
#undef _LARGE_FILE_API
|
||||||
|
#undef __GNUG__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -264,6 +265,16 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _AIX
|
||||||
|
/*
|
||||||
|
AIX includes inttypes.h from sys/types.h
|
||||||
|
Explicitly request format macros before the first inclusion of inttypes.h
|
||||||
|
*/
|
||||||
|
#define __STDC_FORMAT_MACROS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if !defined(__WIN__)
|
#if !defined(__WIN__)
|
||||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||||
#define _POSIX_PTHREAD_SEMANTICS /* We want posix threads */
|
#define _POSIX_PTHREAD_SEMANTICS /* We want posix threads */
|
||||||
|
|
@ -316,6 +327,13 @@ C_MODE_END
|
||||||
#define _LONG_LONG 1 /* For AIX string library */
|
#define _LONG_LONG 1 /* For AIX string library */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Workaround for _LARGE_FILES and _LARGE_FILE_API incompatibility on AIX */
|
||||||
|
#if defined(_AIX) && defined(_LARGE_FILE_API)
|
||||||
|
#undef _LARGE_FILE_API
|
||||||
|
#undef __GNUG__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifndef stdin
|
#ifndef stdin
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -341,12 +359,17 @@ C_MODE_END
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Workaround for _LARGE_FILES and _LARGE_FILE_API incompatibility on AIX */
|
||||||
|
#if defined(_AIX) && defined(_LARGE_FILE_API)
|
||||||
|
#undef _LARGE_FILE_API
|
||||||
|
#undef __GNUG__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_FCNTL_H
|
#ifdef HAVE_FCNTL_H
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_SYS_TIMEB_H
|
|
||||||
#include <sys/timeb.h> /* Avoid warnings on SCO */
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_SYS_STAT_H
|
#ifdef HAVE_SYS_STAT_H
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -477,7 +500,7 @@ typedef unsigned short ushort;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define swap_variables(t, a, b) do { t dummy; dummy= a; a= b; b= dummy; } while(0)
|
#define swap_variables(t, a, b) do { t dummy; dummy= a; a= b; b= dummy; } while(0)
|
||||||
#define test(a) ((a) ? 1 : 0)
|
#define MY_TEST(a) ((a) ? 1 : 0)
|
||||||
#define set_if_bigger(a,b) do { if ((a) < (b)) (a)=(b); } while(0)
|
#define set_if_bigger(a,b) do { if ((a) < (b)) (a)=(b); } while(0)
|
||||||
#define set_if_smaller(a,b) do { if ((a) > (b)) (a)=(b); } while(0)
|
#define set_if_smaller(a,b) do { if ((a) > (b)) (a)=(b); } while(0)
|
||||||
#define set_bits(type, bit_count) (sizeof(type)*8 <= (bit_count) ? ~(type) 0 : ((((type) 1) << (bit_count)) - (type) 1))
|
#define set_bits(type, bit_count) (sizeof(type)*8 <= (bit_count) ? ~(type) 0 : ((((type) 1) << (bit_count)) - (type) 1))
|
||||||
|
|
@ -1217,11 +1240,10 @@ static inline double rint(double x)
|
||||||
#define HAVE_EXTERNAL_CLIENT
|
#define HAVE_EXTERNAL_CLIENT
|
||||||
#endif /* EMBEDDED_LIBRARY */
|
#endif /* EMBEDDED_LIBRARY */
|
||||||
|
|
||||||
/*
|
/* Workaround for _LARGE_FILES and _LARGE_FILE_API incompatibility on AIX */
|
||||||
Define default tmpdir if not already set.
|
#if defined(_AIX) && defined(_LARGE_FILE_API)
|
||||||
*/
|
#undef _LARGE_FILE_API
|
||||||
#if !defined(DEFAULT_TMPDIR)
|
#undef __GNUG__
|
||||||
#define DEFAULT_TMPDIR P_tmpdir
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* my_global_h */
|
#endif /* my_global_h */
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,8 @@ static const char *handler_error_messages[]=
|
||||||
"Row in wrong partition",
|
"Row in wrong partition",
|
||||||
"Row is not visible by the current transaction",
|
"Row is not visible by the current transaction",
|
||||||
"Operation was interrupted by end user (probably kill command?)",
|
"Operation was interrupted by end user (probably kill command?)",
|
||||||
"Disk full"
|
"Disk full",
|
||||||
|
"Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump and restore the table to fix this"
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* MYSYS_MY_HANDLER_ERRORS_INCLUDED */
|
#endif /* MYSYS_MY_HANDLER_ERRORS_INCLUDED */
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc,
|
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
|
||||||
2010-2011 Oracle and/or its affiliates, 2009-2010 Monty Program Ab.
|
Copyright (c) 2009, 2013, Monty Program Ab.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -96,7 +96,7 @@ int pthread_create(pthread_t *, const pthread_attr_t *, pthread_handler, void *)
|
||||||
int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr);
|
int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr);
|
||||||
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
|
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
|
||||||
int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
|
int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
|
||||||
struct timespec *abstime);
|
const struct timespec *abstime);
|
||||||
int pthread_cond_signal(pthread_cond_t *cond);
|
int pthread_cond_signal(pthread_cond_t *cond);
|
||||||
int pthread_cond_broadcast(pthread_cond_t *cond);
|
int pthread_cond_broadcast(pthread_cond_t *cond);
|
||||||
int pthread_cond_destroy(pthread_cond_t *cond);
|
int pthread_cond_destroy(pthread_cond_t *cond);
|
||||||
|
|
|
||||||
|
|
@ -74,8 +74,8 @@ extern uchar days_in_month[];
|
||||||
#define MYSQL_TIME_WARN_WARNINGS (MYSQL_TIME_WARN_TRUNCATED|MYSQL_TIME_WARN_OUT_OF_RANGE)
|
#define MYSQL_TIME_WARN_WARNINGS (MYSQL_TIME_WARN_TRUNCATED|MYSQL_TIME_WARN_OUT_OF_RANGE)
|
||||||
#define MYSQL_TIME_WARN_NOTES (MYSQL_TIME_NOTE_TRUNCATED)
|
#define MYSQL_TIME_WARN_NOTES (MYSQL_TIME_NOTE_TRUNCATED)
|
||||||
|
|
||||||
#define MYSQL_TIME_WARN_HAVE_WARNINGS(x) test((x) & MYSQL_TIME_WARN_WARNINGS)
|
#define MYSQL_TIME_WARN_HAVE_WARNINGS(x) MY_TEST((x) & MYSQL_TIME_WARN_WARNINGS)
|
||||||
#define MYSQL_TIME_WARN_HAVE_NOTES(x) test((x) & MYSQL_TIME_WARN_NOTES)
|
#define MYSQL_TIME_WARN_HAVE_NOTES(x) MY_TEST((x) & MYSQL_TIME_WARN_NOTES)
|
||||||
|
|
||||||
/* Limits for the TIME data type */
|
/* Limits for the TIME data type */
|
||||||
#define TIME_MAX_HOUR 838
|
#define TIME_MAX_HOUR 838
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,6 @@
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
|
|
||||||
/* Some defines to make it easier to use valgrind */
|
|
||||||
#include <m_string.h> /* bfill */
|
|
||||||
|
|
||||||
#ifdef HAVE_valgrind
|
#ifdef HAVE_valgrind
|
||||||
#define IF_VALGRIND(A,B) A
|
#define IF_VALGRIND(A,B) A
|
||||||
#else
|
#else
|
||||||
|
|
@ -37,7 +33,7 @@
|
||||||
#endif /* HAVE_VALGRIND */
|
#endif /* HAVE_VALGRIND */
|
||||||
|
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
#define TRASH_FILL(A,B,C) do { const size_t trash_tmp= (B) ; bfill(A, trash_tmp, C); MEM_UNDEFINED(A, trash_tmp); } while (0)
|
#define TRASH_FILL(A,B,C) do { const size_t trash_tmp= (B); memset(A, C, trash_tmp); MEM_UNDEFINED(A, trash_tmp); } while (0)
|
||||||
#else
|
#else
|
||||||
#define TRASH_FILL(A,B,C) do{ const size_t trash_tmp __attribute__((unused)) = (B) ; MEM_CHECK_ADDRESSABLE(A,trash_tmp);MEM_UNDEFINED(A,trash_tmp);} while (0)
|
#define TRASH_FILL(A,B,C) do{ const size_t trash_tmp __attribute__((unused)) = (B) ; MEM_CHECK_ADDRESSABLE(A,trash_tmp);MEM_UNDEFINED(A,trash_tmp);} while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (c) 2000, 2012, Oracle and/or its affiliates.
|
Copyright (c) 2000, 2013, Oracle and/or its affiliates.
|
||||||
Copyright (c) 2009, 2013, Monty Program Ab.
|
Copyright (c) 2009, 2013, Monty Program Ab.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
|
@ -29,7 +29,7 @@ extern "C" {
|
||||||
#include "my_compare.h"
|
#include "my_compare.h"
|
||||||
#include <myisamchk.h>
|
#include <myisamchk.h>
|
||||||
#include <mysql/plugin.h>
|
#include <mysql/plugin.h>
|
||||||
|
#include <my_check_opt.h>
|
||||||
/*
|
/*
|
||||||
Limit max keys according to HA_MAX_POSSIBLE_KEY; See myisamchk.h for details
|
Limit max keys according to HA_MAX_POSSIBLE_KEY; See myisamchk.h for details
|
||||||
*/
|
*/
|
||||||
|
|
@ -68,8 +68,8 @@ extern "C" {
|
||||||
|
|
||||||
#define mi_is_key_active(_keymap_,_keyno_) \
|
#define mi_is_key_active(_keymap_,_keyno_) \
|
||||||
(((_keyno_) < MI_KEYMAP_BITS) ? \
|
(((_keyno_) < MI_KEYMAP_BITS) ? \
|
||||||
test((_keymap_) & (1ULL << (_keyno_))) : \
|
MY_TEST((_keymap_) & (1ULL << (_keyno_))) : \
|
||||||
test((_keymap_) & MI_KEYMAP_HIGH_MASK))
|
MY_TEST((_keymap_) & MI_KEYMAP_HIGH_MASK))
|
||||||
#define mi_set_key_active(_keymap_,_keyno_) \
|
#define mi_set_key_active(_keymap_,_keyno_) \
|
||||||
(_keymap_)|= (((_keyno_) < MI_KEYMAP_BITS) ? \
|
(_keymap_)|= (((_keyno_) < MI_KEYMAP_BITS) ? \
|
||||||
(1ULL << (_keyno_)) : \
|
(1ULL << (_keyno_)) : \
|
||||||
|
|
@ -82,7 +82,7 @@ extern "C" {
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define mi_is_key_active(_keymap_,_keyno_) \
|
#define mi_is_key_active(_keymap_,_keyno_) \
|
||||||
test((_keymap_) & (1ULL << (_keyno_)))
|
MY_TEST((_keymap_) & (1ULL << (_keyno_)))
|
||||||
#define mi_set_key_active(_keymap_,_keyno_) \
|
#define mi_set_key_active(_keymap_,_keyno_) \
|
||||||
(_keymap_)|= (1ULL << (_keyno_))
|
(_keymap_)|= (1ULL << (_keyno_))
|
||||||
#define mi_clear_key_active(_keymap_,_keyno_) \
|
#define mi_clear_key_active(_keymap_,_keyno_) \
|
||||||
|
|
@ -91,7 +91,7 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define mi_is_any_key_active(_keymap_) \
|
#define mi_is_any_key_active(_keymap_) \
|
||||||
test((_keymap_))
|
MY_TEST((_keymap_))
|
||||||
#define mi_is_all_keys_active(_keymap_,_keys_) \
|
#define mi_is_all_keys_active(_keymap_,_keys_) \
|
||||||
((_keymap_) == mi_get_mask_all_keys_active(_keys_))
|
((_keymap_) == mi_get_mask_all_keys_active(_keys_))
|
||||||
#define mi_set_all_keys_active(_keymap_,_keys_) \
|
#define mi_set_all_keys_active(_keymap_,_keys_) \
|
||||||
|
|
@ -312,7 +312,6 @@ typedef struct st_mi_bit_buff
|
||||||
uint error;
|
uint error;
|
||||||
} MI_BIT_BUFF;
|
} MI_BIT_BUFF;
|
||||||
|
|
||||||
|
|
||||||
typedef struct st_sort_info
|
typedef struct st_sort_info
|
||||||
{
|
{
|
||||||
/* sync things */
|
/* sync things */
|
||||||
|
|
|
||||||
|
|
@ -27,48 +27,6 @@
|
||||||
#ifndef _myisamchk_h
|
#ifndef _myisamchk_h
|
||||||
#define _myisamchk_h
|
#define _myisamchk_h
|
||||||
|
|
||||||
#define T_AUTO_INC 1
|
|
||||||
#define T_AUTO_REPAIR 2 /* QQ to be removed */
|
|
||||||
#define T_BACKUP_DATA 4
|
|
||||||
#define T_CALC_CHECKSUM 8
|
|
||||||
#define T_CHECK 16
|
|
||||||
#define T_CHECK_ONLY_CHANGED 32
|
|
||||||
#define T_CREATE_MISSING_KEYS 64
|
|
||||||
#define T_DESCRIPT 128
|
|
||||||
#define T_DONT_CHECK_CHECKSUM 256
|
|
||||||
#define T_EXTEND 512
|
|
||||||
#define T_FAST (1L << 10)
|
|
||||||
#define T_FORCE_CREATE (1L << 11)
|
|
||||||
#define T_FORCE_UNIQUENESS (1L << 12)
|
|
||||||
#define T_INFO (1L << 13)
|
|
||||||
#define T_MEDIUM (1L << 14)
|
|
||||||
#define T_QUICK (1L << 15)
|
|
||||||
#define T_READONLY (1L << 16)
|
|
||||||
#define T_REP (1L << 17)
|
|
||||||
#define T_REP_BY_SORT (1L << 18)
|
|
||||||
#define T_REP_PARALLEL (1L << 19)
|
|
||||||
#define T_RETRY_WITHOUT_QUICK (1L << 20)
|
|
||||||
#define T_SAFE_REPAIR (1L << 21)
|
|
||||||
#define T_SILENT (1L << 22)
|
|
||||||
#define T_SORT_INDEX (1L << 23)
|
|
||||||
#define T_SORT_RECORDS (1L << 24)
|
|
||||||
#define T_STATISTICS (1L << 25)
|
|
||||||
#define T_UNPACK (1L << 26)
|
|
||||||
#define T_UPDATE_STATE (1L << 27)
|
|
||||||
#define T_VERBOSE (1L << 28)
|
|
||||||
#define T_VERY_SILENT (1L << 29)
|
|
||||||
#define T_WAIT_FOREVER (1L << 30)
|
|
||||||
#define T_WRITE_LOOP ((ulong) 1L << 31)
|
|
||||||
#define T_ZEROFILL ((ulonglong) 1L << 32)
|
|
||||||
#define T_ZEROFILL_KEEP_LSN ((ulonglong) 1L << 33)
|
|
||||||
/** If repair should not bump create_rename_lsn */
|
|
||||||
#define T_NO_CREATE_RENAME_LSN ((ulonglong) 1L << 34)
|
|
||||||
#define T_CREATE_UNIQUE_BY_SORT ((ulonglong) 1L << 35)
|
|
||||||
#define T_SUPPRESS_ERR_HANDLING ((ulonglong) 1L << 36)
|
|
||||||
#define T_FORCE_SORT_MEMORY ((ulonglong) 1L << 37)
|
|
||||||
|
|
||||||
#define T_REP_ANY (T_REP | T_REP_BY_SORT | T_REP_PARALLEL)
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Flags used by xxxxchk.c or/and ha_xxxx.cc that are NOT passed
|
Flags used by xxxxchk.c or/and ha_xxxx.cc that are NOT passed
|
||||||
to xxxcheck.c follows:
|
to xxxcheck.c follows:
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* Copyright (c) 2005, 2011, Oracle and/or its affiliates
|
/* Copyright (c) 2005, 2013, Oracle and/or its affiliates
|
||||||
Copyright (C) 2009, 2011, Monty Program Ab
|
Copyright (C) 2009, 2013, Monty Program Ab
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
|
/* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
|
/* Copyright (c) 2008, 2013, Oracle and/or its affiliates.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -518,7 +518,7 @@ typedef struct st_mysql_cond mysql_cond_t;
|
||||||
@c mysql_cond_timedwait is a drop-in replacement
|
@c mysql_cond_timedwait is a drop-in replacement
|
||||||
for @c pthread_cond_timedwait.
|
for @c pthread_cond_timedwait.
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_PSI_COND_INTERFACE
|
#if defined(HAVE_PSI_INTERFACE) || defined(SAFE_MUTEX)
|
||||||
#define mysql_cond_timedwait(C, M, W) \
|
#define mysql_cond_timedwait(C, M, W) \
|
||||||
inline_mysql_cond_timedwait(C, M, W, __FILE__, __LINE__)
|
inline_mysql_cond_timedwait(C, M, W, __FILE__, __LINE__)
|
||||||
#else
|
#else
|
||||||
|
|
@ -1170,8 +1170,8 @@ static inline int inline_mysql_cond_wait(
|
||||||
static inline int inline_mysql_cond_timedwait(
|
static inline int inline_mysql_cond_timedwait(
|
||||||
mysql_cond_t *that,
|
mysql_cond_t *that,
|
||||||
mysql_mutex_t *mutex,
|
mysql_mutex_t *mutex,
|
||||||
struct timespec *abstime
|
const struct timespec *abstime
|
||||||
#ifdef HAVE_PSI_COND_INTERFACE
|
#if defined(HAVE_PSI_INTERFACE) || defined(SAFE_MUTEX)
|
||||||
, const char *src_file, uint src_line
|
, const char *src_file, uint src_line
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ typedef struct st_queue {
|
||||||
|
|
||||||
#define queue_first_element(queue) 1
|
#define queue_first_element(queue) 1
|
||||||
#define queue_last_element(queue) (queue)->elements
|
#define queue_last_element(queue) (queue)->elements
|
||||||
|
#define queue_empty(queue) ((queue)->elements == 0)
|
||||||
#define queue_top(queue) ((queue)->root[1])
|
#define queue_top(queue) ((queue)->root[1])
|
||||||
#define queue_element(queue,index) ((queue)->root[index])
|
#define queue_element(queue,index) ((queue)->root[index])
|
||||||
#define queue_end(queue) ((queue)->root[(queue)->elements])
|
#define queue_end(queue) ((queue)->root[(queue)->elements])
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2011, 2012, Oracle and/or its affiliates.
|
/* Copyright (c) 2011, 2014, Oracle and/or its affiliates.
|
||||||
Copyright (c) 2011, 2012, Monty Program Ab
|
Copyright (c) 2011, 2012, Monty Program Ab
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
#ifndef _welcome_copyright_notice_h_
|
#ifndef _welcome_copyright_notice_h_
|
||||||
#define _welcome_copyright_notice_h_
|
#define _welcome_copyright_notice_h_
|
||||||
|
|
||||||
#define COPYRIGHT_NOTICE_CURRENT_YEAR "2013"
|
#define COPYRIGHT_NOTICE_CURRENT_YEAR "2014"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This define specifies copyright notice which is displayed by every MySQL
|
This define specifies copyright notice which is displayed by every MySQL
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
# Copyright (c) 2006, 2012, Oracle and/or its affiliates.
|
# Copyright (c) 2006, 2013, Oracle and/or its affiliates.
|
||||||
|
# Copyright (c) 2009, 2013, SkySQL Ab.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -26,8 +27,6 @@ ADD_DEFINITIONS(${SSL_DEFINES})
|
||||||
|
|
||||||
SET(CLIENT_API_FUNCTIONS_5_1
|
SET(CLIENT_API_FUNCTIONS_5_1
|
||||||
get_tty_password
|
get_tty_password
|
||||||
handle_options
|
|
||||||
load_defaults
|
|
||||||
mysql_thread_end
|
mysql_thread_end
|
||||||
mysql_thread_init
|
mysql_thread_init
|
||||||
myodbc_remove_escape
|
myodbc_remove_escape
|
||||||
|
|
@ -131,6 +130,12 @@ mysql_server_init
|
||||||
mysql_server_end
|
mysql_server_end
|
||||||
mysql_set_character_set
|
mysql_set_character_set
|
||||||
mysql_get_character_set_info
|
mysql_get_character_set_info
|
||||||
|
# These are documented in Paul DuBois' MySQL book,
|
||||||
|
# so we treat them as part of the de-facto API.
|
||||||
|
handle_options
|
||||||
|
load_defaults
|
||||||
|
free_defaults
|
||||||
|
my_print_help
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(CLIENT_API_FUNCTIONS_5_5
|
SET(CLIENT_API_FUNCTIONS_5_5
|
||||||
|
|
@ -153,6 +158,8 @@ mysql_close_cont
|
||||||
mysql_close_start
|
mysql_close_start
|
||||||
mysql_commit_cont
|
mysql_commit_cont
|
||||||
mysql_commit_start
|
mysql_commit_start
|
||||||
|
mysql_dump_debug_info_cont
|
||||||
|
mysql_dump_debug_info_start
|
||||||
mysql_fetch_row_cont
|
mysql_fetch_row_cont
|
||||||
mysql_fetch_row_start
|
mysql_fetch_row_start
|
||||||
mysql_free_result_cont
|
mysql_free_result_cont
|
||||||
|
|
@ -259,73 +266,76 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||||
# for compatibility with distribution packages, so client shared library can
|
# for compatibility with distribution packages, so client shared library can
|
||||||
# painlessly replace the one supplied by the distribution.
|
# painlessly replace the one supplied by the distribution.
|
||||||
|
|
||||||
# Also list of exported symbols in distributions may differ from what is considered
|
# Also list of exported symbols in distributions may differ from what is
|
||||||
# official API. Define CLIENT_API_EXTRA for the set of symbols, that required to
|
# considered official API. Define CLIENT_API_5_1_EXTRA for the set of
|
||||||
# be exported on different platforms.
|
# symbols, that required to be exported on different platforms.
|
||||||
|
|
||||||
IF(RPM)
|
# Fedora & Co declared following functions as part of API
|
||||||
# Fedora & Co declared following functions as part of API
|
SET(CLIENT_API_5_1_EXTRA
|
||||||
SET(CLIENT_API_EXTRA
|
# why does Fedora export these?
|
||||||
mysql_default_charset_info
|
_fini
|
||||||
mysql_get_charset
|
_init
|
||||||
mysql_get_charset_by_csname
|
my_init
|
||||||
mysql_net_realloc
|
|
||||||
mysql_client_errors
|
|
||||||
|
|
||||||
# Also export the non-renamed variants
|
# mysql-connector-odbc requires these
|
||||||
# (in case someone wants to rebuild mysqli-php or something similar)
|
mysql_default_charset_info
|
||||||
# See MDEV-4127
|
mysql_get_charset
|
||||||
default_charset_info
|
mysql_get_charset_by_csname
|
||||||
get_charset
|
mysql_net_realloc
|
||||||
get_charset_by_csname
|
|
||||||
net_realloc
|
|
||||||
client_errors
|
|
||||||
THR_KEY_mysys
|
|
||||||
)
|
|
||||||
|
|
||||||
# Add special script to fix symbols renames by Fedora
|
|
||||||
SET(CLIENT_SOURCES_EXTRA rpm_support.cc)
|
|
||||||
SET(VERSION_SCRIPT_TEMPLATE
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/libmysql_rpm_version.in)
|
|
||||||
ELSEIF(DEB)
|
|
||||||
# libmyodbc on Ubuntu is using functions below
|
|
||||||
# If we don't export them, linker would just remove
|
|
||||||
# them (they are not used inside libmysqlclient)
|
|
||||||
SET(CLIENT_API_EXTRA
|
|
||||||
strfill
|
|
||||||
init_dynamic_string
|
|
||||||
)
|
|
||||||
# MySQL supplied with Ubuntu does not have versioning, bug Debian does.
|
|
||||||
IF(DEB MATCHES "debian")
|
|
||||||
SET(VERSION_SCRIPT_TEMPLATE ${CMAKE_CURRENT_SOURCE_DIR}/libmysql.ver.in)
|
|
||||||
ENDIF()
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
IF(VERSION_SCRIPT_TEMPLATE)
|
# PHP's mysqli.so requires this (via the ER() macro)
|
||||||
# Generate version script.
|
mysql_client_errors
|
||||||
# Create semicolon separated lists of functions to export from
|
|
||||||
# Since RPM packages use separate versioning for 5.1 API
|
# Also export the non-renamed variants
|
||||||
# and 5.5 API (libmysqlclient_16 vs libmysqlclient_18),
|
# (in case someone wants to rebuild mysqli-php or something similar)
|
||||||
# we need 2 lists.
|
# See MDEV-4127
|
||||||
SET (CLIENT_API_5_1_LIST)
|
default_charset_info
|
||||||
FOREACH (f ${CLIENT_API_FUNCTIONS_5_1})
|
get_charset
|
||||||
SET(CLIENT_API_5_1_LIST "${CLIENT_API_5_1_LIST}\n${f};")
|
get_charset_by_csname
|
||||||
ENDFOREACH()
|
net_realloc
|
||||||
|
client_errors
|
||||||
SET (CLIENT_API_5_5_LIST)
|
|
||||||
FOREACH (f ${CLIENT_API_FUNCTIONS_5_5})
|
# pure-ftpd requires this
|
||||||
SET(CLIENT_API_5_5_LIST "${CLIENT_API_5_5_LIST}\n${f};")
|
my_make_scrambled_password
|
||||||
ENDFOREACH()
|
|
||||||
|
# hydra requires this
|
||||||
|
scramble
|
||||||
|
|
||||||
|
# ODB requires this: https://bugzilla.redhat.com/show_bug.cgi?id=846602
|
||||||
|
THR_KEY_mysys
|
||||||
|
|
||||||
|
# DBD::mysql requires this
|
||||||
|
is_prefix
|
||||||
|
)
|
||||||
|
|
||||||
|
# Linker script to version symbols in Fedora- and Debian- compatible way, MDEV-5529
|
||||||
|
SET(VERSION_SCRIPT_TEMPLATE ${CMAKE_CURRENT_SOURCE_DIR}/libmysql_versions.ld.in)
|
||||||
|
|
||||||
|
# Generate version script.
|
||||||
|
# Create semicolon separated lists of functions to export from
|
||||||
|
# Since RPM packages use separate versioning for 5.1 API
|
||||||
|
# and 5.5 API (libmysqlclient_16 vs libmysqlclient_18),
|
||||||
|
# we need 2 lists.
|
||||||
|
SET (CLIENT_API_5_1_LIST)
|
||||||
|
SET (CLIENT_API_5_1_ALIASES)
|
||||||
|
FOREACH (f ${CLIENT_API_FUNCTIONS_5_1} ${CLIENT_API_5_1_EXTRA})
|
||||||
|
SET(CLIENT_API_5_1_LIST "${CLIENT_API_5_1_LIST}\t${f};\n")
|
||||||
|
SET(CLIENT_API_5_1_ALIASES "${CLIENT_API_5_1_ALIASES}\"${f}@libmysqlclient_16\" = ${f};\n")
|
||||||
|
ENDFOREACH()
|
||||||
|
|
||||||
|
SET (CLIENT_API_5_5_LIST)
|
||||||
|
FOREACH (f ${CLIENT_API_FUNCTIONS_5_5})
|
||||||
|
SET(CLIENT_API_5_5_LIST "${CLIENT_API_5_5_LIST}\t${f};\n")
|
||||||
|
ENDFOREACH()
|
||||||
|
|
||||||
|
CONFIGURE_FILE(
|
||||||
|
${VERSION_SCRIPT_TEMPLATE}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/libmysql_versions.ld
|
||||||
|
@ONLY@
|
||||||
|
)
|
||||||
|
SET(VERSION_SCRIPT_LINK_FLAGS
|
||||||
|
"-Wl,${CMAKE_CURRENT_BINARY_DIR}/libmysql_versions.ld")
|
||||||
|
|
||||||
CONFIGURE_FILE(
|
|
||||||
${VERSION_SCRIPT_TEMPLATE}
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/libmysql.version
|
|
||||||
@ONLY@
|
|
||||||
)
|
|
||||||
SET(VERSION_SCRIPT_LINK_FLAGS
|
|
||||||
"-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/libmysql.version")
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -353,8 +363,10 @@ SET(LIBS clientlib dbug strings vio mysys mysys_ssl ${ZLIB_LIBRARY} ${SSL_LIBRAR
|
||||||
MERGE_LIBRARIES(mysqlclient STATIC ${LIBS} COMPONENT Development)
|
MERGE_LIBRARIES(mysqlclient STATIC ${LIBS} COMPONENT Development)
|
||||||
|
|
||||||
# Visual Studio users need debug static library for debug projects
|
# Visual Studio users need debug static library for debug projects
|
||||||
|
INSTALL_DEBUG_SYMBOLS(clientlib)
|
||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
INSTALL_DEBUG_TARGET(mysqlclient DESTINATION ${INSTALL_LIBDIR}/debug)
|
INSTALL_DEBUG_TARGET(mysqlclient DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||||
|
INSTALL_DEBUG_TARGET(clientlib DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
|
|
@ -373,7 +385,7 @@ IF(UNIX)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(NOT DISABLE_SHARED)
|
IF(NOT DISABLE_SHARED)
|
||||||
MERGE_LIBRARIES(libmysql SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS} ${CLIENT_API_EXTRA} COMPONENT SharedLibraries)
|
MERGE_LIBRARIES(libmysql SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS} ${CLIENT_API_5_1_EXTRA} COMPONENT SharedLibraries)
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
# libtool compatability
|
# libtool compatability
|
||||||
IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE)
|
IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE)
|
||||||
|
|
@ -390,9 +402,6 @@ IF(NOT DISABLE_SHARED)
|
||||||
SOVERSION "${SHARED_LIB_MAJOR_VERSION}")
|
SOVERSION "${SHARED_LIB_MAJOR_VERSION}")
|
||||||
IF(LINK_FLAG_NO_UNDEFINED OR VERSION_SCRIPT_LINK_FLAGS)
|
IF(LINK_FLAG_NO_UNDEFINED OR VERSION_SCRIPT_LINK_FLAGS)
|
||||||
GET_TARGET_PROPERTY(libmysql_link_flags libmysql LINK_FLAGS)
|
GET_TARGET_PROPERTY(libmysql_link_flags libmysql LINK_FLAGS)
|
||||||
IF(NOT libmysql_link_flag)
|
|
||||||
SET(libmysql_link_flags)
|
|
||||||
ENDIF()
|
|
||||||
SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS
|
SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS
|
||||||
"${libmysql_link_flags} ${LINK_FLAG_NO_UNDEFINED} ${VERSION_SCRIPT_LINK_FLAGS}")
|
"${libmysql_link_flags} ${LINK_FLAG_NO_UNDEFINED} ${VERSION_SCRIPT_LINK_FLAGS}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2000-2004 MySQL AB
|
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* Copyright (c) 2000, 2012, Oracle and/or its affiliates
|
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates
|
||||||
Copyright (c) 2009, 2012, Monty Program Ab
|
Copyright (c) 2009, 2013, Monty Program Ab
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -2083,8 +2083,8 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length)
|
||||||
buff[4]= (char) stmt->flags;
|
buff[4]= (char) stmt->flags;
|
||||||
int4store(buff+5, 1); /* iteration count */
|
int4store(buff+5, 1); /* iteration count */
|
||||||
|
|
||||||
res= test(cli_advanced_command(mysql, COM_STMT_EXECUTE, buff, sizeof(buff),
|
res= MY_TEST(cli_advanced_command(mysql, COM_STMT_EXECUTE, buff, sizeof(buff),
|
||||||
(uchar*) packet, length, 1, stmt) ||
|
(uchar*) packet, length, 1, stmt) ||
|
||||||
(*mysql->methods->read_query_result)(mysql));
|
(*mysql->methods->read_query_result)(mysql));
|
||||||
stmt->affected_rows= mysql->affected_rows;
|
stmt->affected_rows= mysql->affected_rows;
|
||||||
stmt->server_status= mysql->server_status;
|
stmt->server_status= mysql->server_status;
|
||||||
|
|
@ -2571,7 +2571,7 @@ int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt)
|
||||||
reinit_result_set_metadata(stmt);
|
reinit_result_set_metadata(stmt);
|
||||||
prepare_to_fetch_result(stmt);
|
prepare_to_fetch_result(stmt);
|
||||||
}
|
}
|
||||||
DBUG_RETURN(test(stmt->last_errno));
|
DBUG_RETURN(MY_TEST(stmt->last_errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -3187,14 +3187,14 @@ static void fetch_string_with_conversion(MYSQL_BIND *param, char *value,
|
||||||
{
|
{
|
||||||
double data= my_strntod(&my_charset_latin1, value, length, &endptr, &err);
|
double data= my_strntod(&my_charset_latin1, value, length, &endptr, &err);
|
||||||
float fdata= (float) data;
|
float fdata= (float) data;
|
||||||
*param->error= (fdata != data) | test(err);
|
*param->error= (fdata != data) | MY_TEST(err);
|
||||||
floatstore(buffer, fdata);
|
floatstore(buffer, fdata);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MYSQL_TYPE_DOUBLE:
|
case MYSQL_TYPE_DOUBLE:
|
||||||
{
|
{
|
||||||
double data= my_strntod(&my_charset_latin1, value, length, &endptr, &err);
|
double data= my_strntod(&my_charset_latin1, value, length, &endptr, &err);
|
||||||
*param->error= test(err);
|
*param->error= MY_TEST(err);
|
||||||
doublestore(buffer, data);
|
doublestore(buffer, data);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -3204,7 +3204,7 @@ static void fetch_string_with_conversion(MYSQL_BIND *param, char *value,
|
||||||
MYSQL_TIME_STATUS status;
|
MYSQL_TIME_STATUS status;
|
||||||
str_to_time(value, length, tm, 0, &status);
|
str_to_time(value, length, tm, 0, &status);
|
||||||
err= status.warnings;
|
err= status.warnings;
|
||||||
*param->error= test(err);
|
*param->error= MY_TEST(err);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MYSQL_TYPE_DATE:
|
case MYSQL_TYPE_DATE:
|
||||||
|
|
@ -3215,8 +3215,8 @@ static void fetch_string_with_conversion(MYSQL_BIND *param, char *value,
|
||||||
MYSQL_TIME_STATUS status;
|
MYSQL_TIME_STATUS status;
|
||||||
(void) str_to_datetime(value, length, tm, 0, &status);
|
(void) str_to_datetime(value, length, tm, 0, &status);
|
||||||
err= status.warnings;
|
err= status.warnings;
|
||||||
*param->error= test(err) && (param->buffer_type == MYSQL_TYPE_DATE &&
|
*param->error= MY_TEST(err) && (param->buffer_type == MYSQL_TYPE_DATE &&
|
||||||
tm->time_type != MYSQL_TIMESTAMP_DATE);
|
tm->time_type != MYSQL_TIMESTAMP_DATE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MYSQL_TYPE_TINY_BLOB:
|
case MYSQL_TYPE_TINY_BLOB:
|
||||||
|
|
@ -3338,7 +3338,7 @@ static void fetch_long_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
value= number_to_datetime(value, 0, (MYSQL_TIME *) buffer, 0, &error);
|
value= number_to_datetime(value, 0, (MYSQL_TIME *) buffer, 0, &error);
|
||||||
*param->error= test(error);
|
*param->error= MY_TEST(error);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
@ -3686,7 +3686,7 @@ static void fetch_result_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
|
||||||
static void fetch_result_tinyint(MYSQL_BIND *param, MYSQL_FIELD *field,
|
static void fetch_result_tinyint(MYSQL_BIND *param, MYSQL_FIELD *field,
|
||||||
uchar **row)
|
uchar **row)
|
||||||
{
|
{
|
||||||
my_bool field_is_unsigned= test(field->flags & UNSIGNED_FLAG);
|
my_bool field_is_unsigned= MY_TEST(field->flags & UNSIGNED_FLAG);
|
||||||
uchar data= **row;
|
uchar data= **row;
|
||||||
*(uchar *)param->buffer= data;
|
*(uchar *)param->buffer= data;
|
||||||
*param->error= param->is_unsigned != field_is_unsigned && data > INT_MAX8;
|
*param->error= param->is_unsigned != field_is_unsigned && data > INT_MAX8;
|
||||||
|
|
@ -3696,7 +3696,7 @@ static void fetch_result_tinyint(MYSQL_BIND *param, MYSQL_FIELD *field,
|
||||||
static void fetch_result_short(MYSQL_BIND *param, MYSQL_FIELD *field,
|
static void fetch_result_short(MYSQL_BIND *param, MYSQL_FIELD *field,
|
||||||
uchar **row)
|
uchar **row)
|
||||||
{
|
{
|
||||||
my_bool field_is_unsigned= test(field->flags & UNSIGNED_FLAG);
|
my_bool field_is_unsigned= MY_TEST(field->flags & UNSIGNED_FLAG);
|
||||||
ushort data= (ushort) sint2korr(*row);
|
ushort data= (ushort) sint2korr(*row);
|
||||||
shortstore(param->buffer, data);
|
shortstore(param->buffer, data);
|
||||||
*param->error= param->is_unsigned != field_is_unsigned && data > INT_MAX16;
|
*param->error= param->is_unsigned != field_is_unsigned && data > INT_MAX16;
|
||||||
|
|
@ -3707,7 +3707,7 @@ static void fetch_result_int32(MYSQL_BIND *param,
|
||||||
MYSQL_FIELD *field __attribute__((unused)),
|
MYSQL_FIELD *field __attribute__((unused)),
|
||||||
uchar **row)
|
uchar **row)
|
||||||
{
|
{
|
||||||
my_bool field_is_unsigned= test(field->flags & UNSIGNED_FLAG);
|
my_bool field_is_unsigned= MY_TEST(field->flags & UNSIGNED_FLAG);
|
||||||
uint32 data= (uint32) sint4korr(*row);
|
uint32 data= (uint32) sint4korr(*row);
|
||||||
longstore(param->buffer, data);
|
longstore(param->buffer, data);
|
||||||
*param->error= param->is_unsigned != field_is_unsigned && data > INT_MAX32;
|
*param->error= param->is_unsigned != field_is_unsigned && data > INT_MAX32;
|
||||||
|
|
@ -3718,7 +3718,7 @@ static void fetch_result_int64(MYSQL_BIND *param,
|
||||||
MYSQL_FIELD *field __attribute__((unused)),
|
MYSQL_FIELD *field __attribute__((unused)),
|
||||||
uchar **row)
|
uchar **row)
|
||||||
{
|
{
|
||||||
my_bool field_is_unsigned= test(field->flags & UNSIGNED_FLAG);
|
my_bool field_is_unsigned= MY_TEST(field->flags & UNSIGNED_FLAG);
|
||||||
ulonglong data= (ulonglong) sint8korr(*row);
|
ulonglong data= (ulonglong) sint8korr(*row);
|
||||||
*param->error= param->is_unsigned != field_is_unsigned && data > LONGLONG_MAX;
|
*param->error= param->is_unsigned != field_is_unsigned && data > LONGLONG_MAX;
|
||||||
longlongstore(param->buffer, data);
|
longlongstore(param->buffer, data);
|
||||||
|
|
@ -4711,7 +4711,7 @@ my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt)
|
||||||
my_free(stmt->extension);
|
my_free(stmt->extension);
|
||||||
my_free(stmt);
|
my_free(stmt);
|
||||||
|
|
||||||
DBUG_RETURN(test(rc));
|
DBUG_RETURN(MY_TEST(rc));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
libmysqlclient_@SHARED_LIB_MAJOR_VERSION@ { global: *; };
|
|
||||||
|
|
@ -1,62 +0,0 @@
|
||||||
# This version script is heavily inspired by Fedora's and Mageia's version scripts for
|
|
||||||
# MySQL client shared library. It is used in MariaDB for building RPMs.
|
|
||||||
|
|
||||||
libmysqlclient_16 {
|
|
||||||
global:
|
|
||||||
@CLIENT_API_5_1_LIST@
|
|
||||||
|
|
||||||
# some stuff from Mageia, I have no idea why it is there
|
|
||||||
# But too afraid to throw anything away
|
|
||||||
_fini;
|
|
||||||
_init;
|
|
||||||
my_init;
|
|
||||||
my_progname;
|
|
||||||
myodbc_remove_escape;
|
|
||||||
|
|
||||||
# These are documented in Paul DuBois' MySQL book, so we treat them as part
|
|
||||||
# of the de-facto API.
|
|
||||||
free_defaults;
|
|
||||||
handle_options;
|
|
||||||
load_defaults;
|
|
||||||
my_print_help;
|
|
||||||
# pure-ftpd requires this
|
|
||||||
my_make_scrambled_password;
|
|
||||||
# fedora18 export
|
|
||||||
THR_KEY_mysys;
|
|
||||||
# hydra requires this
|
|
||||||
scramble;
|
|
||||||
# DBD::mysql requires this
|
|
||||||
is_prefix;
|
|
||||||
local:
|
|
||||||
*;
|
|
||||||
};
|
|
||||||
|
|
||||||
libmysqlclient_18 {
|
|
||||||
global:
|
|
||||||
@CLIENT_API_5_5_LIST@
|
|
||||||
#
|
|
||||||
# Ideally the following symbols wouldn't be exported, but various applications
|
|
||||||
# require them. Fedora limits the namespace damage by prefixing mysql_
|
|
||||||
# (see mysql-dubious-exports.patch), which means the symbols are not present
|
|
||||||
# in libmysqlclient_16.
|
|
||||||
#
|
|
||||||
# MariaDB does not do the Fedora-style function renaming via #define in headers,
|
|
||||||
# however it exports mysql_ prefixed symbols in addition to the "normal" ones.
|
|
||||||
#
|
|
||||||
# To ensure successful recompilation of affected projects, as well as drop-in replacement
|
|
||||||
# for MySQL libraries, provided by distribution, both original symbols and their mysql_
|
|
||||||
# prefixed counterparts have to be exported.
|
|
||||||
|
|
||||||
# mysql-connector-odbc requires these
|
|
||||||
mysql_default_charset_info;
|
|
||||||
mysql_get_charset;
|
|
||||||
mysql_get_charset_by_csname;
|
|
||||||
mysql_net_realloc;
|
|
||||||
default_charset_info;
|
|
||||||
get_charset;
|
|
||||||
get_charset_by_csname;
|
|
||||||
net_realloc;
|
|
||||||
# PHP's mysqli.so requires this (via the ER() macro)
|
|
||||||
mysql_client_errors;
|
|
||||||
client_errors;
|
|
||||||
};
|
|
||||||
45
libmysql/libmysql_versions.ld.in
Normal file
45
libmysql/libmysql_versions.ld.in
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
/*
|
||||||
|
This version script is heavily inspired by Fedora's and Mageia's version
|
||||||
|
scripts for MySQL client shared library.
|
||||||
|
But it was modified to support Debian-compatible versioning too.
|
||||||
|
|
||||||
|
In RedHat universe, symbols from old libmysqlclient.so.16
|
||||||
|
keep their libmysqlclient_16 version. New symbols added in
|
||||||
|
libmysqlclient.so.18 get the new libmysqlclient_18 version.
|
||||||
|
|
||||||
|
In Debian all symbols in libmysqlclient.so.18 have libmysqlclient_18 version,
|
||||||
|
including symbols that existed in libmysqlclient.so.16
|
||||||
|
|
||||||
|
We solve this by putting all symbols into libmysqlclient_18 version node,
|
||||||
|
but creating aliases for old symbols in the libmysqlclient_16 version node.
|
||||||
|
*/
|
||||||
|
|
||||||
|
@CLIENT_API_5_1_ALIASES@
|
||||||
|
|
||||||
|
/*
|
||||||
|
On Fedora the following symbols are exported, but renamed into a mysql_
|
||||||
|
namespace. We export them as aliases, but keep original symbols too. See
|
||||||
|
MDEV-4127.
|
||||||
|
*/
|
||||||
|
mysql_default_charset_info = default_charset_info;
|
||||||
|
mysql_get_charset = get_charset;
|
||||||
|
mysql_get_charset_by_csname = get_charset_by_csname;
|
||||||
|
mysql_net_realloc = net_realloc;
|
||||||
|
mysql_client_errors = client_errors;
|
||||||
|
|
||||||
|
VERSION {
|
||||||
|
|
||||||
|
libmysqlclient_18 {
|
||||||
|
global:
|
||||||
|
@CLIENT_API_5_1_LIST@
|
||||||
|
@CLIENT_API_5_5_LIST@
|
||||||
|
|
||||||
|
local:
|
||||||
|
*;
|
||||||
|
};
|
||||||
|
|
||||||
|
libmysqlclient_16 {
|
||||||
|
/* empty here. aliases are added above */
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
/*
|
|
||||||
Provide aliases for several symbols, to support drop-in replacement for
|
|
||||||
MariaDB on Fedora and several derives distributions.
|
|
||||||
|
|
||||||
These distributions redefine several symbols (in a way that is no compatible
|
|
||||||
with either MySQL or MariaDB) and export it from the client library ( as seen
|
|
||||||
e.g from this patch)
|
|
||||||
http://lists.fedoraproject.org/pipermail/scm-commits/2010-December/537257.html
|
|
||||||
|
|
||||||
MariaDB handles compatibility distribution by providing the same symbols from
|
|
||||||
the client library if it is built with -DRPM
|
|
||||||
|
|
||||||
*/
|
|
||||||
#include <errmsg.h>
|
|
||||||
#include <my_sys.h>
|
|
||||||
#include <mysql.h>
|
|
||||||
extern "C" {
|
|
||||||
|
|
||||||
CHARSET_INFO *mysql_default_charset_info = default_charset_info;
|
|
||||||
|
|
||||||
CHARSET_INFO *mysql_get_charset(uint cs_number, myf flags)
|
|
||||||
{
|
|
||||||
return get_charset(cs_number, flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
CHARSET_INFO *mysql_get_charset_by_csname(const char *cs_name,
|
|
||||||
uint cs_flags, myf my_flags)
|
|
||||||
{
|
|
||||||
return get_charset_by_csname(cs_name, cs_flags, my_flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
my_bool mysql_net_realloc(NET *net, size_t length)
|
|
||||||
{
|
|
||||||
return net_realloc(net,length);
|
|
||||||
}
|
|
||||||
|
|
||||||
const char **mysql_client_errors = client_errors;
|
|
||||||
|
|
||||||
} /*extern "C" */
|
|
||||||
|
|
||||||
|
|
@ -332,8 +332,8 @@ static int emb_stmt_execute(MYSQL_STMT *stmt)
|
||||||
thd->client_param_count= stmt->param_count;
|
thd->client_param_count= stmt->param_count;
|
||||||
thd->client_params= stmt->params;
|
thd->client_params= stmt->params;
|
||||||
|
|
||||||
res= test(emb_advanced_command(stmt->mysql, COM_STMT_EXECUTE, 0, 0,
|
res= MY_TEST(emb_advanced_command(stmt->mysql, COM_STMT_EXECUTE, 0, 0,
|
||||||
header, sizeof(header), 1, stmt) ||
|
header, sizeof(header), 1, stmt) ||
|
||||||
emb_read_query_result(stmt->mysql));
|
emb_read_query_result(stmt->mysql));
|
||||||
stmt->affected_rows= stmt->mysql->affected_rows;
|
stmt->affected_rows= stmt->mysql->affected_rows;
|
||||||
stmt->insert_id= stmt->mysql->insert_id;
|
stmt->insert_id= stmt->mysql->insert_id;
|
||||||
|
|
@ -566,7 +566,7 @@ int init_embedded_server(int argc, char **argv, char **groups)
|
||||||
opt_mysql_tmpdir=getenv("TMP");
|
opt_mysql_tmpdir=getenv("TMP");
|
||||||
#endif
|
#endif
|
||||||
if (!opt_mysql_tmpdir || !opt_mysql_tmpdir[0])
|
if (!opt_mysql_tmpdir || !opt_mysql_tmpdir[0])
|
||||||
opt_mysql_tmpdir=(char*) DEFAULT_TMPDIR; /* purecov: inspected */
|
opt_mysql_tmpdir= const_cast<char*>(DEFAULT_TMPDIR); /* purecov: inspected*/
|
||||||
|
|
||||||
init_ssl();
|
init_ssl();
|
||||||
umask(((~my_umask) & 0666));
|
umask(((~my_umask) & 0666));
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
|
|
||||||
#include <service_versions.h>
|
#include <service_versions.h>
|
||||||
|
|
||||||
|
|
||||||
/* file reserved for the future use */
|
/* file reserved for the future use */
|
||||||
SERVICE_VERSION *logger_service= (void *) VERSION_logger;
|
SERVICE_VERSION logger_service= (void *) VERSION_logger;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -74,7 +74,7 @@ ENDIF()
|
||||||
|
|
||||||
IF(WITH_EMBEDDED_SERVER)
|
IF(WITH_EMBEDDED_SERVER)
|
||||||
SET(TEST_EMBEDDED ${MTR_FORCE} --comment=embedded --timer --embedded-server
|
SET(TEST_EMBEDDED ${MTR_FORCE} --comment=embedded --timer --embedded-server
|
||||||
--skip-rpl --skip-ndbcluster $(EXP))
|
--skip-rpl --skip-ndbcluster ${EXP})
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(TEST_EMBEDDED echo "Can not test embedded, not compiled in")
|
SET(TEST_EMBEDDED echo "Can not test embedded, not compiled in")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ main.wait_timeout @solaris # Bug#11758972 2010-04-26 alik wait_tim
|
||||||
|
|
||||||
rpl.rpl_innodb_bug28430 # Bug#11754425
|
rpl.rpl_innodb_bug28430 # Bug#11754425
|
||||||
rpl.rpl_row_sp011 @solaris # Bug#11753919 2011-07-25 sven Several test cases fail on Solaris with error Thread stack overrun
|
rpl.rpl_row_sp011 @solaris # Bug#11753919 2011-07-25 sven Several test cases fail on Solaris with error Thread stack overrun
|
||||||
|
rpl.rpl_spec_variables @solaris # Bug #17337114 2013-08-20 Luis Soares failing on pb2 with timeout for 'CHECK WARNINGS'
|
||||||
|
|
||||||
sys_vars.max_sp_recursion_depth_func @solaris # Bug#11753919 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
sys_vars.max_sp_recursion_depth_func @solaris # Bug#11753919 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||||
sys_vars.wait_timeout_func # Bug#11750645 2010-04-26 alik wait_timeout_func fails
|
sys_vars.wait_timeout_func # Bug#11750645 2010-04-26 alik wait_timeout_func fails
|
||||||
|
|
|
||||||
|
|
@ -5,3 +5,6 @@ perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment
|
||||||
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --skip-test-list=collections/disabled-weekly.list
|
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --skip-test-list=collections/disabled-weekly.list
|
||||||
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-row-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=row --skip-test-list=collections/disabled-weekly.list
|
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-row-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=row --skip-test-list=collections/disabled-weekly.list
|
||||||
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-mixed-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=mixed --skip-test-list=collections/disabled-weekly.list
|
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-mixed-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=mixed --skip-test-list=collections/disabled-weekly.list
|
||||||
|
|
||||||
|
# Run innodb compression tests
|
||||||
|
perl mysql-test-run.pl --force --debug-server --comment=innodb_compression --vardir=var-innodb-zip --big-test --testcase-timeout=60 --parallel=auto --experimental=collections/default.experimental --suite=innodb_zip
|
||||||
|
|
|
||||||
|
|
@ -608,6 +608,7 @@ use test;
|
||||||
--echo
|
--echo
|
||||||
--echo -------- switch to master -------
|
--echo -------- switch to master -------
|
||||||
connection master;
|
connection master;
|
||||||
|
DROP TEMPORARY TABLE mysqltest1.t22;
|
||||||
DROP DATABASE mysqltest1;
|
DROP DATABASE mysqltest1;
|
||||||
# mysqltest2 was alreday DROPPED some tests before.
|
# mysqltest2 was alreday DROPPED some tests before.
|
||||||
DROP DATABASE mysqltest3;
|
DROP DATABASE mysqltest3;
|
||||||
|
|
|
||||||
|
|
@ -187,10 +187,9 @@ if (`SELECT HEX(@commands) = HEX('configure')`)
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Drops tables and synchronizes master and slave. Note that temporary
|
# Drops tables and synchronizes master and slave.
|
||||||
# tables are not explitcily dropped as they will be dropped while
|
|
||||||
# closing the connection.
|
|
||||||
#
|
#
|
||||||
|
|
||||||
if (`SELECT HEX(@commands) = HEX('clean')`)
|
if (`SELECT HEX(@commands) = HEX('clean')`)
|
||||||
{
|
{
|
||||||
connection master;
|
connection master;
|
||||||
|
|
@ -207,10 +206,15 @@ if (`SELECT HEX(@commands) = HEX('clean')`)
|
||||||
|
|
||||||
DROP TABLE IF EXISTS nt_error_2;
|
DROP TABLE IF EXISTS nt_error_2;
|
||||||
|
|
||||||
|
DROP TEMPORARY TABLE IF EXISTS tt_tmp_xx_1;
|
||||||
|
DROP TEMPORARY TABLE IF EXISTS nt_tmp_xx_1;
|
||||||
|
|
||||||
--let $n= $tot_table
|
--let $n= $tot_table
|
||||||
while ($n)
|
while ($n)
|
||||||
{
|
{
|
||||||
--eval DROP TABLE IF EXISTS nt_$n
|
--eval DROP TABLE IF EXISTS nt_$n
|
||||||
|
--eval DROP TEMPORARY TABLE IF EXISTS tt_tmp_$n
|
||||||
|
--eval DROP TEMPORARY TABLE IF EXISTS nt_tmp_$n
|
||||||
--dec $n
|
--dec $n
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ FLUSH LOGS;
|
||||||
--echo -------- switch to master --------
|
--echo -------- switch to master --------
|
||||||
connection master;
|
connection master;
|
||||||
FLUSH LOGS;
|
FLUSH LOGS;
|
||||||
|
DROP TEMPORARY TABLE IF EXISTS mysqltest1.tmp2;
|
||||||
DROP DATABASE mysqltest1;
|
DROP DATABASE mysqltest1;
|
||||||
|
|
||||||
--echo End of 5.1 tests
|
--echo End of 5.1 tests
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,12 @@ start slave;
|
||||||
--source include/wait_for_slave_to_start.inc
|
--source include/wait_for_slave_to_start.inc
|
||||||
|
|
||||||
let $VERSION=`select version()`;
|
let $VERSION=`select version()`;
|
||||||
|
# Lets run this test in STRICT MODE (DROP TABLE is not DROP TABLE IF EXISTS)
|
||||||
|
connection slave;
|
||||||
|
set @save_slave_ddl_exec_mode=@@global.slave_ddl_exec_mode;
|
||||||
|
set @@global.slave_ddl_exec_mode=STRICT;
|
||||||
connection master;
|
connection master;
|
||||||
|
|
||||||
eval create table t1(n int not null auto_increment primary key)ENGINE=$engine_type;
|
eval create table t1(n int not null auto_increment primary key)ENGINE=$engine_type;
|
||||||
insert into t1 values (NULL);
|
insert into t1 values (NULL);
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
@ -141,3 +145,5 @@ drop table t1;
|
||||||
# End of 4.1 tests
|
# End of 4.1 tests
|
||||||
|
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
set @@global.slave_ddl_exec_mode=@save_slave_ddl_exec_mode;
|
||||||
|
connection master;
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,9 @@ reset slave;
|
||||||
source include/start_slave.inc;
|
source include/start_slave.inc;
|
||||||
sync_with_master;
|
sync_with_master;
|
||||||
show status like 'slave_open_temp_tables';
|
show status like 'slave_open_temp_tables';
|
||||||
|
connection master;
|
||||||
|
drop temporary table if exists t1;
|
||||||
|
sync_slave_with_master;
|
||||||
|
|
||||||
#
|
#
|
||||||
#Bug#34654 RESET SLAVE does not clear LAST_IO_Err*
|
#Bug#34654 RESET SLAVE does not clear LAST_IO_Err*
|
||||||
|
|
|
||||||
|
|
@ -59,3 +59,6 @@ source include/wait_for_slave_sql_to_stop.inc;
|
||||||
connection slave;
|
connection slave;
|
||||||
START SLAVE SQL_THREAD;
|
START SLAVE SQL_THREAD;
|
||||||
source include/wait_for_slave_sql_to_start.inc;
|
source include/wait_for_slave_sql_to_start.inc;
|
||||||
|
|
||||||
|
connection master;
|
||||||
|
sync_slave_with_master;
|
||||||
|
|
|
||||||
|
|
@ -751,7 +751,7 @@ call p_verify_status_increment(4, 4, 4, 4);
|
||||||
--echo # Sic: no table is created.
|
--echo # Sic: no table is created.
|
||||||
create table if not exists t2 (a int) select 6 union select 7;
|
create table if not exists t2 (a int) select 6 union select 7;
|
||||||
--echo # Sic: first commits the statement, and then the transaction.
|
--echo # Sic: first commits the statement, and then the transaction.
|
||||||
call p_verify_status_increment(2, 0, 2, 0);
|
call p_verify_status_increment(0, 0, 0, 0);
|
||||||
create table t3 select a from t2;
|
create table t3 select a from t2;
|
||||||
call p_verify_status_increment(2, 0, 4, 4);
|
call p_verify_status_increment(2, 0, 4, 4);
|
||||||
alter table t3 add column (b int);
|
alter table t3 add column (b int);
|
||||||
|
|
|
||||||
|
|
@ -14,3 +14,12 @@ SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a;
|
||||||
ALTER TABLE t1 ADD KEY(a);
|
ALTER TABLE t1 ADD KEY(a);
|
||||||
SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a;
|
SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a;
|
||||||
DROP TABLE IF EXISTS t1;
|
DROP TABLE IF EXISTS t1;
|
||||||
|
--echo #
|
||||||
|
--echo # BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES
|
||||||
|
--echo # OUT-OF-ORDER RESULTS
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1 SELECT ('a a') as n;
|
||||||
|
INSERT INTO t1 VALUES('a b');
|
||||||
|
SELECT * FROM t1 ORDER BY LOWER(n) ASC;
|
||||||
|
SELECT * FROM t1 ORDER BY LOWER(n) DESC;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
|
||||||
4
mysql-test/include/have_metadata_lock_info.inc
Normal file
4
mysql-test/include/have_metadata_lock_info.inc
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
if (!`SELECT count(*) FROM information_schema.plugins WHERE
|
||||||
|
(PLUGIN_STATUS = 'ACTIVE') AND PLUGIN_NAME = 'METADATA_LOCK_INFO'`){
|
||||||
|
skip Need archive METADATA_LOCK_INFO plugin;
|
||||||
|
}
|
||||||
2
mysql-test/include/have_metadata_lock_info.opt
Normal file
2
mysql-test/include/have_metadata_lock_info.opt
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
--loose-metadata-lock-info
|
||||||
|
--plugin-load-add=$METADATA_LOCK_INFO_SO
|
||||||
|
|
@ -79,8 +79,11 @@ select pk1,pk2 from t1 where key1 = 10 and key2=10 and 2*pk1+1 < 2*96+1;
|
||||||
# Verify that CPK is always used for index intersection scans
|
# Verify that CPK is always used for index intersection scans
|
||||||
# (this is because it is used as a filter, not for retrieval)
|
# (this is because it is used as a filter, not for retrieval)
|
||||||
explain select * from t1 where badkey=1 and key1=10;
|
explain select * from t1 where badkey=1 and key1=10;
|
||||||
|
set @tmp_index_merge_ror_cpk=@@optimizer_switch;
|
||||||
|
set optimizer_switch='extended_keys=off';
|
||||||
--replace_column 9 ROWS
|
--replace_column 9 ROWS
|
||||||
explain select * from t1 where pk1 < 7500 and key1 = 10;
|
explain select * from t1 where pk1 < 7500 and key1 = 10;
|
||||||
|
set optimizer_switch=@tmp_index_merge_ror_cpk;
|
||||||
|
|
||||||
# Verify that keys with 'tails' of PK members are ok.
|
# Verify that keys with 'tails' of PK members are ok.
|
||||||
explain select * from t1 where pktail1ok=1 and key1=10;
|
explain select * from t1 where pktail1ok=1 and key1=10;
|
||||||
|
|
|
||||||
|
|
@ -633,7 +633,7 @@ drop table t1;
|
||||||
drop table bug29807;
|
drop table bug29807;
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
call mtr.add_suppression("InnoDB: Error: table .test...bug29807. does not exist in the InnoDB internal");
|
call mtr.add_suppression("InnoDB: Error: table .test...bug29807. does not exist in the InnoDB internal");
|
||||||
call mtr.add_suppression("InnoDB: Cannot open table test\/bug29807 from");
|
call mtr.add_suppression("InnoDB: Cannot open table test/bug29807 from");
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
-- Copyright (c) 2008, 2011, Oracle and/or its affiliates
|
-- Copyright (c) 2008, 2013, Oracle and/or its affiliates
|
||||||
|
-- Copyright (c) 2009, 2013, SkySQL Ab
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -57,6 +58,16 @@ BEGIN
|
||||||
WHERE table_schema='mysql' AND table_name != 'ndb_apply_status'
|
WHERE table_schema='mysql' AND table_name != 'ndb_apply_status'
|
||||||
ORDER BY columns_in_mysql;
|
ORDER BY columns_in_mysql;
|
||||||
|
|
||||||
|
-- Dump all events, there should be none
|
||||||
|
SELECT * FROM INFORMATION_SCHEMA.EVENTS;
|
||||||
|
-- Dump all triggers except mtr internals, there should be none
|
||||||
|
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS
|
||||||
|
WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert');
|
||||||
|
-- Dump all created procedures, there should be none
|
||||||
|
SELECT * FROM INFORMATION_SCHEMA.ROUTINES;
|
||||||
|
|
||||||
|
SHOW STATUS LIKE 'slave_open_temp_tables';
|
||||||
|
|
||||||
-- Checksum system tables to make sure they have been properly
|
-- Checksum system tables to make sure they have been properly
|
||||||
-- restored after test
|
-- restored after test
|
||||||
checksum table
|
checksum table
|
||||||
|
|
@ -82,5 +93,8 @@ BEGIN
|
||||||
-- verify that no plugin changed its disabled/enabled state
|
-- verify that no plugin changed its disabled/enabled state
|
||||||
SELECT * FROM INFORMATION_SCHEMA.PLUGINS;
|
SELECT * FROM INFORMATION_SCHEMA.PLUGINS;
|
||||||
|
|
||||||
|
select * from information_schema.session_variables
|
||||||
|
where variable_name = 'debug_sync';
|
||||||
|
|
||||||
END||
|
END||
|
||||||
|
|
||||||
|
|
|
||||||
28
mysql-test/include/save_master_gtid.inc
Normal file
28
mysql-test/include/save_master_gtid.inc
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
# ==== Purpose ====
|
||||||
|
#
|
||||||
|
# Save the current binlog GTID position on the master, to be used
|
||||||
|
# with include/sync_with_master_gtid.inc.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# ==== Usage ====
|
||||||
|
#
|
||||||
|
# [--let $rpl_debug= 1]
|
||||||
|
# --source include/save_master_gtid.inc
|
||||||
|
#
|
||||||
|
# Parameters:
|
||||||
|
# $rpl_debug
|
||||||
|
# See include/rpl_init.inc
|
||||||
|
|
||||||
|
|
||||||
|
--let $include_filename= save_master_gtid.inc
|
||||||
|
--source include/begin_include_file.inc
|
||||||
|
|
||||||
|
--let $master_pos= `SELECT @@gtid_binlog_pos`
|
||||||
|
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo save_master_gtid saved master_pos='$master_pos'
|
||||||
|
}
|
||||||
|
|
||||||
|
--let $include_filename= save_master_gtid.inc
|
||||||
|
--source include/end_include_file.inc
|
||||||
66
mysql-test/include/search_pattern_in_file.inc
Normal file
66
mysql-test/include/search_pattern_in_file.inc
Normal file
|
|
@ -0,0 +1,66 @@
|
||||||
|
# Purpose:
|
||||||
|
# Simple search with Perl for a pattern in some file.
|
||||||
|
#
|
||||||
|
# The advantages compared to thinkable auxiliary constructs using the
|
||||||
|
# mysqltest language and SQL are:
|
||||||
|
# 1. We do not need a running MySQL server.
|
||||||
|
# 2. SQL causes "noise" during debugging and increases the size of logs.
|
||||||
|
# Perl code does not disturb at all.
|
||||||
|
#
|
||||||
|
# The environment variables SEARCH_FILE and SEARCH_PATTERN must be set
|
||||||
|
# before sourcing this routine.
|
||||||
|
#
|
||||||
|
# In case of
|
||||||
|
# - SEARCH_FILE and/or SEARCH_PATTERN is not set
|
||||||
|
# - SEARCH_FILE cannot be opened
|
||||||
|
# - SEARCH_FILE does not contain SEARCH_PATTERN
|
||||||
|
# the test will abort immediate.
|
||||||
|
# MTR will report something like
|
||||||
|
# ....
|
||||||
|
# worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
|
||||||
|
# main.1st [ pass ] 3
|
||||||
|
# innodb.innodb_page_size [ fail ]
|
||||||
|
# Test ended at 2011-11-11 18:15:58
|
||||||
|
#
|
||||||
|
# CURRENT_TEST: innodb.innodb_page_size
|
||||||
|
# # ERROR: The file '<name>' does not contain the expected pattern <pattern>
|
||||||
|
# mysqltest: In included file "./include/search_pattern_in_file.inc":
|
||||||
|
# included from ./include/search_pattern_in_file.inc at line 36:
|
||||||
|
# At line 25: command "perl" failed with error 255. my_errno=175
|
||||||
|
#
|
||||||
|
# The result from queries just before the failure was:
|
||||||
|
# ...
|
||||||
|
# - saving '<some path>' to '<some path>'
|
||||||
|
# main.1st [ pass ] 2
|
||||||
|
#
|
||||||
|
# Typical use case (check invalid server startup options):
|
||||||
|
# let $error_log= $MYSQLTEST_VARDIR/log/my_restart.err;
|
||||||
|
# --error 0,1
|
||||||
|
# --remove_file $error_log
|
||||||
|
# let SEARCH_FILE= $error_log;
|
||||||
|
# # Stop the server
|
||||||
|
# let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
|
||||||
|
# --exec echo "wait" > $restart_file
|
||||||
|
# --shutdown_server 10
|
||||||
|
# --source include/wait_until_disconnected.inc
|
||||||
|
#
|
||||||
|
# --error 1
|
||||||
|
# --exec $MYSQLD_CMD <whatever wrong setting> > $error_log 2>&1
|
||||||
|
# # The server restart aborts
|
||||||
|
# let SEARCH_PATTERN= \[ERROR\] Aborting;
|
||||||
|
# --source include/search_pattern_in_file.inc
|
||||||
|
#
|
||||||
|
# Created: 2011-11-11 mleich
|
||||||
|
#
|
||||||
|
|
||||||
|
perl;
|
||||||
|
use strict;
|
||||||
|
my $search_file= $ENV{'SEARCH_FILE'} or die "SEARCH_FILE not set";
|
||||||
|
my $search_pattern= $ENV{'SEARCH_PATTERN'} or die "SEARCH_PATTERN not set";
|
||||||
|
open(FILE, "$search_file") or die("Unable to open '$search_file': $!\n");
|
||||||
|
read(FILE, my $file_content, 50000, 0);
|
||||||
|
close(FILE);
|
||||||
|
if ( not $file_content =~ m{$search_pattern} ) {
|
||||||
|
die("# ERROR: The file '$search_file' does not contain the expected pattern $search_pattern\n->$file_content<-\n");
|
||||||
|
}
|
||||||
|
EOF
|
||||||
48
mysql-test/include/sync_with_master_gtid.inc
Normal file
48
mysql-test/include/sync_with_master_gtid.inc
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
# ==== Purpose ====
|
||||||
|
#
|
||||||
|
# Wait until the slave has reached a certain GTID position.
|
||||||
|
# Similar to --sync_with_master, but using GTID instead of old-style
|
||||||
|
# binlog file/offset coordinates.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# ==== Usage ====
|
||||||
|
#
|
||||||
|
# --let $master_pos= `SELECT @@GLOBAL.gtid_binlog_pos`
|
||||||
|
# [--let $slave_timeout= NUMBER]
|
||||||
|
# [--let $rpl_debug= 1]
|
||||||
|
# --source include/sync_with_master_gtid.inc
|
||||||
|
#
|
||||||
|
# Syncs slave to the specified GTID position.
|
||||||
|
#
|
||||||
|
# Must be called on the slave.
|
||||||
|
#
|
||||||
|
# Parameters:
|
||||||
|
# $master_pos
|
||||||
|
# The GTID position to sync to. Typically obtained from
|
||||||
|
# @@GLOBAL.gtid_binlog_pos on the master.
|
||||||
|
#
|
||||||
|
# $slave_timeout
|
||||||
|
# Timeout in seconds. The default is 2 minutes.
|
||||||
|
#
|
||||||
|
# $rpl_debug
|
||||||
|
# See include/rpl_init.inc
|
||||||
|
|
||||||
|
--let $include_filename= sync_with_master_gtid.inc
|
||||||
|
--source include/begin_include_file.inc
|
||||||
|
|
||||||
|
let $_slave_timeout= $slave_timeout;
|
||||||
|
if (!$_slave_timeout)
|
||||||
|
{
|
||||||
|
let $_slave_timeout= 120;
|
||||||
|
}
|
||||||
|
|
||||||
|
--let $_result= `SELECT master_gtid_wait('$master_pos', $_slave_timeout)`
|
||||||
|
if ($_result == -1)
|
||||||
|
{
|
||||||
|
--let $_current_gtid_pos= `SELECT @@GLOBAL.gtid_slave_pos`
|
||||||
|
--echo Timeout in master_gtid_wait('$master_pos', $_slave_timeout), current slave GTID position is: $_current_gtid_pos.
|
||||||
|
--die Failed to sync with master
|
||||||
|
}
|
||||||
|
|
||||||
|
--let $include_filename= sync_with_master_gtid.inc
|
||||||
|
--source include/end_include_file.inc
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2008, 2011, Oracle and/or its affiliates
|
/* Copyright (c) 2008, 2012, Oracle and/or its affiliates
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
# -*- cperl -*-
|
# -*- cperl -*-
|
||||||
# Copyright (c) 2013 MySQL AB, 2008 Sun Microsystems, Inc.
|
# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
# Use is subject to license terms.
|
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -337,15 +337,20 @@ sub parse_disabled {
|
||||||
#
|
#
|
||||||
sub collect_default_suites(@)
|
sub collect_default_suites(@)
|
||||||
{
|
{
|
||||||
my @dirs = my_find_dir(dirname($::glob_mysql_test_dir),
|
use File::Find;
|
||||||
[ @plugin_suitedirs ], '*');
|
my @dirs;
|
||||||
for my $d (@dirs) {
|
find(sub {
|
||||||
next unless -f "$d/suite.pm";
|
push @dirs, [$File::Find::topdir, $File::Find::name]
|
||||||
my $sname= basename($d);
|
if -d and -f "$File::Find::name/suite.pm";
|
||||||
|
}, my_find_dir(dirname($::glob_mysql_test_dir), \@plugin_suitedirs));
|
||||||
|
|
||||||
|
for (@dirs) {
|
||||||
|
my ($plugin_root, $dir) = @$_;
|
||||||
|
my $sname= substr $dir, 1 + length $plugin_root;
|
||||||
# ignore overlays here, otherwise we'd need accurate
|
# ignore overlays here, otherwise we'd need accurate
|
||||||
# duplicate detection with overlay support for the default suite list
|
# duplicate detection with overlay support for the default suite list
|
||||||
next if $sname eq 'main' or -d "$::glob_mysql_test_dir/suite/$sname";
|
next if $sname eq 'main' or -d "$::glob_mysql_test_dir/suite/$sname";
|
||||||
my $s = load_suite_object($sname, $d);
|
my $s = load_suite_object($sname, $dir);
|
||||||
push @_, $sname if $s->is_default();
|
push @_, $sname if $s->is_default();
|
||||||
}
|
}
|
||||||
return @_;
|
return @_;
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue