* bzr merge -rtag:mariadb-10.0.9 maria/10.0
* Fix for post-merge build failures.
This commit is contained in:
commit
90e4f7f9d3
@ -1463,4 +1463,4 @@ storage/tokudb/ft-index/utils/tokudb_gen
|
||||
storage/tokudb/ft-index/utils/tokudb_load
|
||||
storage/connect/connect.cnf
|
||||
storage/cassandra/cassandra.cnf
|
||||
libmysql/libmysql.version
|
||||
libmysql/libmysql_versions.ld
|
||||
|
@ -153,6 +153,7 @@ INCLUDE(readline)
|
||||
INCLUDE(libutils)
|
||||
INCLUDE(dtrace)
|
||||
INCLUDE(jemalloc)
|
||||
INCLUDE(pcre)
|
||||
INCLUDE(ctest)
|
||||
INCLUDE(plugin)
|
||||
INCLUDE(install_macros)
|
||||
@ -177,6 +178,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)
|
||||
|
||||
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)
|
||||
IF(ENABLE_DEBUG_SYNC)
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
|
||||
@ -261,13 +337,25 @@ SET(PLUGINDIR "${DEFAULT_MYSQL_HOME}/${INSTALL_PLUGINDIR}")
|
||||
IF(INSTALL_SYSCONFDIR)
|
||||
SET(DEFAULT_SYSCONFDIR "${INSTALL_SYSCONFDIR}")
|
||||
ENDIF()
|
||||
|
||||
OPTION(TMPDIR
|
||||
"PATH to MySQL TMP dir. If unspecified, defaults to P_tmpdir in <stdio.h>" OFF)
|
||||
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()
|
||||
|
||||
# Run platform tests
|
||||
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
|
||||
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/include)
|
||||
@ -279,8 +367,11 @@ MYSQL_CHECK_SSL()
|
||||
# Add readline or libedit.
|
||||
MYSQL_CHECK_READLINE()
|
||||
|
||||
SET(MALLOC_LIBRARY "system")
|
||||
CHECK_JEMALLOC()
|
||||
|
||||
CHECK_PCRE()
|
||||
|
||||
#
|
||||
# Setup maintainer mode options. Platform checks are
|
||||
# not run with the warning options as to not perturb fragile checks
|
||||
@ -316,7 +407,6 @@ ADD_SUBDIRECTORY(include)
|
||||
ADD_SUBDIRECTORY(dbug)
|
||||
ADD_SUBDIRECTORY(strings)
|
||||
ADD_SUBDIRECTORY(vio)
|
||||
ADD_SUBDIRECTORY(pcre)
|
||||
ADD_SUBDIRECTORY(mysys)
|
||||
ADD_SUBDIRECTORY(mysys_ssl)
|
||||
ADD_SUBDIRECTORY(libmysql)
|
||||
@ -347,6 +437,7 @@ IF(NOT WITHOUT_SERVER)
|
||||
ADD_SUBDIRECTORY(internal)
|
||||
ENDIF()
|
||||
ADD_SUBDIRECTORY(packaging/rpm-uln)
|
||||
ADD_SUBDIRECTORY(packaging/rpm-oel)
|
||||
ENDIF()
|
||||
|
||||
IF(UNIX)
|
||||
|
2
VERSION
2
VERSION
@ -4,5 +4,5 @@
|
||||
#
|
||||
MYSQL_VERSION_MAJOR=10
|
||||
MYSQL_VERSION_MINOR=0
|
||||
MYSQL_VERSION_PATCH=7
|
||||
MYSQL_VERSION_PATCH=9
|
||||
MYSQL_VERSION_EXTRA=
|
||||
|
@ -15,8 +15,7 @@
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
${CMAKE_SOURCE_DIR}/include
|
||||
${CMAKE_BINARY_DIR}/pcre
|
||||
${CMAKE_SOURCE_DIR}/pcre
|
||||
${PCRE_INCLUDES}
|
||||
${CMAKE_SOURCE_DIR}/mysys_ssl
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
${SSL_INCLUDE_DIRS}
|
||||
|
@ -915,6 +915,7 @@ static COMMANDS commands[] = {
|
||||
{ "MAKE_SET", 0, 0, 0, ""},
|
||||
{ "MAKEDATE", 0, 0, 0, ""},
|
||||
{ "MAKETIME", 0, 0, 0, ""},
|
||||
{ "MASTER_GTID_WAIT", 0, 0, 0, ""},
|
||||
{ "MASTER_POS_WAIT", 0, 0, 0, ""},
|
||||
{ "MAX", 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.",
|
||||
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",
|
||||
mysql_get_server_name(&mysql),
|
||||
mysql_thread_id(&mysql), server_version_string(&mysql));
|
||||
@ -1411,7 +1412,8 @@ sig_handler window_resize(int sig)
|
||||
struct winsize window_size;
|
||||
|
||||
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
|
||||
|
||||
@ -1675,8 +1677,9 @@ static void usage(int version)
|
||||
return;
|
||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
||||
printf("Usage: %s [OPTIONS] [database]\n", my_progname);
|
||||
my_print_help(my_long_options);
|
||||
print_defaults("my", load_default_groups);
|
||||
puts("");
|
||||
my_print_help(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
|
||||
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);
|
||||
#endif
|
||||
buff[sizeof(buff) - 1]= 0;
|
||||
my_delete(opt_basedir, MYF(0));
|
||||
my_free(opt_basedir);
|
||||
opt_basedir= my_strdup(buff, MYF(MY_FAE));
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
|
||||
|
||||
#define VER "1.3"
|
||||
#define VER "1.3a"
|
||||
|
||||
#ifdef HAVE_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)
|
||||
{
|
||||
/* Free memory allocated by 'load_defaults' */
|
||||
@ -180,6 +189,7 @@ static void die(const char *fmt, ...)
|
||||
DBUG_ENTER("die");
|
||||
|
||||
/* Print the error message */
|
||||
fflush(stdout);
|
||||
va_start(args, 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",
|
||||
my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
|
||||
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_variables(my_long_options);
|
||||
die(0);
|
||||
break;
|
||||
|
||||
@ -736,6 +749,7 @@ static int run_mysqlcheck_upgrade(void)
|
||||
!opt_silent || opt_verbose ? "--verbose": "",
|
||||
opt_silent ? "--silent": "",
|
||||
opt_write_binlog ? "--write-binlog" : "--skip-write-binlog",
|
||||
"2>&1",
|
||||
NULL);
|
||||
}
|
||||
|
||||
@ -754,6 +768,7 @@ static int run_mysqlcheck_fixnames(void)
|
||||
opt_verbose ? "--verbose": "",
|
||||
opt_silent ? "--silent": "",
|
||||
opt_write_binlog ? "--write-binlog" : "--skip-write-binlog",
|
||||
"2>&1",
|
||||
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 */
|
||||
"mysql_upgrade", /* Read special settings for mysql_upgrade */
|
||||
"client-server", /* Reads settings common between client & server */
|
||||
"client-mariadb", /* Read mariadb unique client settings */
|
||||
0
|
||||
};
|
||||
fprintf(stderr, "%s\n", error_msg);
|
||||
fprintf(stderr, "%s", output->str);
|
||||
}
|
||||
|
||||
|
||||
/* Convert the specified version string into the numeric format. */
|
||||
@ -914,6 +926,8 @@ static int check_version_match(void)
|
||||
&ds_version, FALSE) ||
|
||||
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);
|
||||
return 1; /* Query failed */
|
||||
}
|
||||
@ -982,7 +996,8 @@ int main(int argc, char **argv)
|
||||
}
|
||||
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("Administration program for the mysqld daemon.");
|
||||
printf("Usage: %s [OPTIONS] command command....\n", my_progname);
|
||||
print_defaults("my",load_default_groups);
|
||||
puts("");
|
||||
my_print_help(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\
|
||||
create databasename Create a new database\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\
|
||||
the mysql command line client.\n\n");
|
||||
printf("Usage: %s [options] log-files\n", my_progname);
|
||||
print_defaults("my",load_groups);
|
||||
puts("");
|
||||
my_print_help(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("this program.");
|
||||
print_defaults("my", load_default_groups);
|
||||
puts("");
|
||||
my_print_help(my_long_options);
|
||||
my_print_variables(my_long_options);
|
||||
DBUG_VOID_RETURN;
|
||||
@ -1046,7 +1047,7 @@ int main(int argc, char **argv)
|
||||
for (i = 0; i < alter_table_cmds.elements ; i++)
|
||||
run_query((char*) dynamic_array_ptr(&alter_table_cmds, i));
|
||||
}
|
||||
ret= test(first_error);
|
||||
ret= MY_TEST(first_error);
|
||||
|
||||
end:
|
||||
dbDisconnect(current_host);
|
||||
|
@ -39,7 +39,7 @@
|
||||
** 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_sys.h>
|
||||
@ -137,6 +137,12 @@ static uint opt_slave_data;
|
||||
static uint my_end_arg;
|
||||
static char * opt_mysql_unix_port=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;
|
||||
#include <sslopt-vars.h>
|
||||
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,
|
||||
uint length);
|
||||
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.
|
||||
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.");
|
||||
short_usage_sub();
|
||||
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);
|
||||
} /* usage */
|
||||
|
||||
@ -1493,6 +1502,8 @@ static void free_resources()
|
||||
|
||||
static void maybe_exit(int error)
|
||||
{
|
||||
if (opt_slave_data)
|
||||
do_start_slave_sql(mysql);
|
||||
if (!first_error)
|
||||
first_error= error;
|
||||
if (ignore_errors)
|
||||
@ -3648,7 +3659,8 @@ static void dump_table(char *table, char *db)
|
||||
field->type == MYSQL_TYPE_BLOB ||
|
||||
field->type == MYSQL_TYPE_LONG_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 (i == 0)
|
||||
@ -3992,7 +4004,13 @@ static int dump_tablespaces(char* ts_where)
|
||||
char *ubs;
|
||||
char *endsemi;
|
||||
DBUG_ENTER("dump_tablespaces");
|
||||
|
||||
|
||||
/*
|
||||
Try to turn off semi-join optimization (if that fails, this is a
|
||||
pre-optimizer_switch server, and the old query plan is ok for us.
|
||||
*/
|
||||
mysql_query(mysql, "set optimizer_switch='semijoin=off'");
|
||||
|
||||
init_dynamic_string_checked(&sqlbuf,
|
||||
"SELECT LOGFILE_GROUP_NAME,"
|
||||
" FILE_NAME,"
|
||||
@ -4152,6 +4170,8 @@ static int dump_tablespaces(char* ts_where)
|
||||
|
||||
mysql_free_result(tableres);
|
||||
dynstr_free(&sqlbuf);
|
||||
mysql_query(mysql, "set optimizer_switch=default");
|
||||
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
@ -4734,7 +4754,8 @@ static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos)
|
||||
}
|
||||
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;
|
||||
|
||||
row= mysql_fetch_row(master);
|
||||
@ -4779,29 +4800,37 @@ static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos)
|
||||
static int do_stop_slave_sql(MYSQL *mysql_con)
|
||||
{
|
||||
MYSQL_RES *slave;
|
||||
/* We need to check if the slave sql is running in the first place */
|
||||
if (mysql_query_with_error_report(mysql_con, &slave, "SHOW SLAVE STATUS"))
|
||||
MYSQL_ROW row;
|
||||
|
||||
if (mysql_query_with_error_report(mysql_con, &slave,
|
||||
multi_source ?
|
||||
"SHOW ALL SLAVES STATUS" :
|
||||
"SHOW SLAVE STATUS"))
|
||||
return(1);
|
||||
else
|
||||
|
||||
/* Loop over all slaves */
|
||||
while ((row= mysql_fetch_row(slave)))
|
||||
{
|
||||
MYSQL_ROW row= mysql_fetch_row(slave);
|
||||
if (row && row[11])
|
||||
if (row[11 + multi_source])
|
||||
{
|
||||
/* 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);
|
||||
/* Silently assume that they don't have the slave running */
|
||||
return(0);
|
||||
char query[160];
|
||||
if (multi_source)
|
||||
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);
|
||||
|
||||
/* now, stop slave if running */
|
||||
if (mysql_query_with_error_report(mysql_con, 0, "STOP SLAVE SQL_THREAD"))
|
||||
return(1);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
@ -4810,7 +4839,10 @@ static int add_stop_slave(void)
|
||||
if (opt_comments)
|
||||
fprintf(md_result_file,
|
||||
"\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);
|
||||
}
|
||||
|
||||
@ -4819,16 +4851,24 @@ static int add_slave_statements(void)
|
||||
if (opt_comments)
|
||||
fprintf(md_result_file,
|
||||
"\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);
|
||||
}
|
||||
|
||||
static int do_show_slave_status(MYSQL *mysql_con)
|
||||
{
|
||||
MYSQL_RES *UNINIT_VAR(slave);
|
||||
MYSQL_ROW row;
|
||||
const char *comment_prefix=
|
||||
(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)
|
||||
{
|
||||
@ -4838,10 +4878,10 @@ static int do_show_slave_status(MYSQL *mysql_con)
|
||||
mysql_free_result(slave);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
|
||||
while ((row= mysql_fetch_row(slave)))
|
||||
{
|
||||
MYSQL_ROW row= mysql_fetch_row(slave);
|
||||
if (row && row[9] && row[21])
|
||||
if (row[9 + multi_source] && row[21 + multi_source])
|
||||
{
|
||||
/* SHOW MASTER STATUS reports file and position */
|
||||
if (opt_comments)
|
||||
@ -4849,54 +4889,70 @@ static int do_show_slave_status(MYSQL *mysql_con)
|
||||
"\n--\n-- Position to start replication or point-in-time "
|
||||
"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 (row[1])
|
||||
fprintf(md_result_file, "MASTER_HOST='%s', ", row[1]);
|
||||
if (row[1 + multi_source])
|
||||
fprintf(md_result_file, "MASTER_HOST='%s', ", row[1 + multi_source]);
|
||||
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,
|
||||
"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);
|
||||
}
|
||||
mysql_free_result(slave);
|
||||
}
|
||||
mysql_free_result(slave);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int do_start_slave_sql(MYSQL *mysql_con)
|
||||
{
|
||||
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 */
|
||||
if (mysql_query_with_error_report(mysql_con, &slave, "SHOW SLAVE STATUS"))
|
||||
return(1);
|
||||
else
|
||||
if (mysql_query_with_error_report(mysql_con, &slave,
|
||||
multi_source ?
|
||||
"SHOW ALL SLAVES STATUS" :
|
||||
"SHOW SLAVE STATUS"))
|
||||
DBUG_RETURN(1);
|
||||
|
||||
while ((row= mysql_fetch_row(slave)))
|
||||
{
|
||||
MYSQL_ROW row= mysql_fetch_row(slave);
|
||||
if (row && row[11])
|
||||
DBUG_PRINT("info", ("Connection: '%s' status: '%s'",
|
||||
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 (!strcmp(row[11],"Yes"))
|
||||
if (strcmp(row[11 + multi_source], "Yes"))
|
||||
{
|
||||
mysql_free_result(slave);
|
||||
/* Silently assume that they don't have the slave running */
|
||||
return(0);
|
||||
char query[160];
|
||||
if (multi_source)
|
||||
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);
|
||||
|
||||
/* 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);
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
|
||||
@ -5574,6 +5630,10 @@ int main(int argc, char **argv)
|
||||
if (!path)
|
||||
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))
|
||||
goto err;
|
||||
|
||||
@ -5653,10 +5713,6 @@ int main(int argc, char **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 */
|
||||
if (opt_slave_apply && add_slave_statements())
|
||||
goto err;
|
||||
@ -5672,9 +5728,6 @@ int main(int argc, char **argv)
|
||||
if (opt_delete_master_logs && purge_bin_logs_to(mysql, bin_log_name))
|
||||
goto err;
|
||||
|
||||
#ifdef HAVE_SMEM
|
||||
my_free(shared_memory_base_name);
|
||||
#endif
|
||||
/*
|
||||
No reason to explicitely COMMIT the transaction, neither to explicitely
|
||||
UNLOCK TABLES: these will be automatically be done by the server when we
|
||||
@ -5682,6 +5735,14 @@ int main(int argc, char **argv)
|
||||
server.
|
||||
*/
|
||||
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);
|
||||
if (!path)
|
||||
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\
|
||||
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);
|
||||
puts("");
|
||||
my_print_help(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\
|
||||
are shown.");
|
||||
print_defaults("my",load_default_groups);
|
||||
puts("");
|
||||
my_print_help(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");
|
||||
printf("Usage: %s [OPTIONS]\n",my_progname);
|
||||
print_defaults("my",load_default_groups);
|
||||
puts("");
|
||||
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;
|
||||
DYNAMIC_STRING content;
|
||||
DYNAMIC_STRING eval_query;
|
||||
int first_word_len, query_len;
|
||||
my_bool abort_on_error, used_replace;
|
||||
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**);
|
||||
my_free((*q)->query_buf);
|
||||
if ((*q)->eval_query.str)
|
||||
dynstr_free(&(*q)->eval_query);
|
||||
if ((*q)->content.str)
|
||||
dynstr_free(&(*q)->content);
|
||||
my_free((*q));
|
||||
@ -7030,8 +7033,9 @@ void usage()
|
||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
||||
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);
|
||||
print_defaults("my",load_default_groups);
|
||||
puts("");
|
||||
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);
|
||||
}
|
||||
|
||||
@ -8341,7 +8345,6 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
|
||||
DYNAMIC_STRING ds_result;
|
||||
DYNAMIC_STRING ds_sorted;
|
||||
DYNAMIC_STRING ds_warnings;
|
||||
DYNAMIC_STRING eval_query;
|
||||
char *query;
|
||||
int query_len;
|
||||
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 ||
|
||||
command->type == Q_EVALP)
|
||||
{
|
||||
init_dynamic_string(&eval_query, "", command->query_len+256, 1024);
|
||||
do_eval(&eval_query, command->query, command->end, FALSE);
|
||||
query = eval_query.str;
|
||||
query_len = eval_query.length;
|
||||
if (!command->eval_query.str)
|
||||
init_dynamic_string(&command->eval_query, "", command->query_len + 256,
|
||||
1024);
|
||||
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
|
||||
{
|
||||
@ -8535,8 +8542,6 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
|
||||
|
||||
dynstr_free(&ds_warnings);
|
||||
ds_warn= 0;
|
||||
if (command->type == Q_EVAL || command->type == Q_SEND_EVAL)
|
||||
dynstr_free(&eval_query);
|
||||
|
||||
if (display_result_sorted)
|
||||
{
|
||||
@ -8583,7 +8588,7 @@ char *re_eprint(int err)
|
||||
{
|
||||
static char epbuf[100];
|
||||
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));
|
||||
return(epbuf);
|
||||
}
|
||||
@ -8940,7 +8945,7 @@ int main(int argc, char **argv)
|
||||
my_init_dynamic_array(&q_lines, sizeof(struct st_command*), 1024, 1024, MYF(0));
|
||||
|
||||
if (my_hash_init2(&var_hash, 64, charset_info,
|
||||
128, 0, 0, get_var_key, var_free, MYF(0)))
|
||||
128, 0, 0, get_var_key, 0, var_free, MYF(0)))
|
||||
die("Variable hash initialization failed");
|
||||
|
||||
var_set_string("MYSQL_SERVER_VERSION", MYSQL_SERVER_VERSION);
|
||||
|
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()
|
||||
|
@ -47,10 +47,10 @@ FUNCTION (INSTALL_DEBUG_SYMBOLS)
|
||||
)
|
||||
|
||||
IF(NOT ARG_COMPONENT)
|
||||
MESSAGE(FATAL_ERROR "No COMPONENT passed to INSTALL_DEBUG_SYMBOLS")
|
||||
SET(ARG_COMPONENT DebugBinaries)
|
||||
ENDIF()
|
||||
IF(NOT ARG_INSTALL_LOCATION)
|
||||
MESSAGE(FATAL_ERROR "No INSTALL_LOCATION passed to INSTALL_DEBUG_SYMBOLS")
|
||||
SET(ARG_INSTALL_LOCATION lib)
|
||||
ENDIF()
|
||||
SET(targets ${ARG_DEFAULT_ARGS})
|
||||
FOREACH(target ${targets})
|
||||
@ -420,6 +420,7 @@ FUNCTION(INSTALL_MYSQL_TEST from to)
|
||||
PATTERN "*.vcxproj.filters" EXCLUDE
|
||||
PATTERN "*.vcxproj.user" EXCLUDE
|
||||
PATTERN "CTest" EXCLUDE
|
||||
PATTERN "*~" EXCLUDE
|
||||
)
|
||||
ENDIF()
|
||||
ENDFUNCTION()
|
||||
|
@ -46,13 +46,14 @@ ELSE()
|
||||
ENDIF()
|
||||
|
||||
SET(WITH_JEMALLOC ${WITH_JEMALLOC_DEFAULT} CACHE STRING
|
||||
"Which jemalloc to use (possible values are 'no', 'bundled', 'system', 'yes' (system if possible, otherwise bundled)")
|
||||
"Which jemalloc to use. Possible values are 'no', 'bundled', 'system', 'yes' (system if possible, otherwise bundled)")
|
||||
|
||||
MACRO (CHECK_JEMALLOC)
|
||||
IF(WITH_JEMALLOC STREQUAL "system" OR WITH_JEMALLOC STREQUAL "yes")
|
||||
CHECK_LIBRARY_EXISTS(jemalloc malloc_stats_print "" HAVE_JEMALLOC)
|
||||
IF (HAVE_JEMALLOC)
|
||||
SET(LIBJEMALLOC jemalloc)
|
||||
SET(MALLOC_LIBRARY "system jemalloc")
|
||||
ELSEIF (WITH_JEMALLOC STREQUAL "system")
|
||||
MESSAGE(FATAL_ERROR "system jemalloc is not found")
|
||||
ELSEIF (WITH_JEMALLOC STREQUAL "yes")
|
||||
@ -61,5 +62,6 @@ MACRO (CHECK_JEMALLOC)
|
||||
ENDIF()
|
||||
IF(WITH_JEMALLOC STREQUAL "bundled" OR trybundled)
|
||||
USE_BUNDLED_JEMALLOC()
|
||||
SET(MALLOC_LIBRARY "bundled jemalloc")
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
@ -1,48 +1,48 @@
|
||||
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# Add executable plus some additional MySQL specific stuff
|
||||
# Usage (same as for standard CMake's ADD_EXECUTABLE)
|
||||
#
|
||||
# MYSQL_ADD_EXECUTABLE(target source1...sourceN)
|
||||
#
|
||||
# MySQL specifics:
|
||||
# - instruct CPack to install executable under ${CMAKE_INSTALL_PREFIX}/bin directory
|
||||
# On Windows :
|
||||
# - add version resource
|
||||
# - instruct CPack to do autenticode signing if SIGNCODE is set
|
||||
|
||||
INCLUDE(cmake_parse_arguments)
|
||||
|
||||
FUNCTION (MYSQL_ADD_EXECUTABLE)
|
||||
# Pass-through arguments for ADD_EXECUTABLE
|
||||
MYSQL_PARSE_ARGUMENTS(ARG
|
||||
"WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL;DESTINATION;COMPONENT"
|
||||
""
|
||||
${ARGN}
|
||||
)
|
||||
LIST(GET ARG_DEFAULT_ARGS 0 target)
|
||||
LIST(REMOVE_AT ARG_DEFAULT_ARGS 0)
|
||||
|
||||
SET(sources ${ARG_DEFAULT_ARGS})
|
||||
ADD_VERSION_INFO(${target} EXECUTABLE sources)
|
||||
ADD_EXECUTABLE(${target} ${ARG_WIN32} ${ARG_MACOSX_BUNDLE} ${ARG_EXCLUDE_FROM_ALL} ${sources})
|
||||
# tell CPack where to install
|
||||
IF(NOT ARG_EXCLUDE_FROM_ALL)
|
||||
IF(NOT ARG_DESTINATION)
|
||||
SET(ARG_DESTINATION ${INSTALL_BINDIR})
|
||||
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# Add executable plus some additional MySQL specific stuff
|
||||
# Usage (same as for standard CMake's ADD_EXECUTABLE)
|
||||
#
|
||||
# MYSQL_ADD_EXECUTABLE(target source1...sourceN)
|
||||
#
|
||||
# MySQL specifics:
|
||||
# - instruct CPack to install executable under ${CMAKE_INSTALL_PREFIX}/bin directory
|
||||
# On Windows :
|
||||
# - add version resource
|
||||
# - instruct CPack to do autenticode signing if SIGNCODE is set
|
||||
|
||||
INCLUDE(cmake_parse_arguments)
|
||||
|
||||
FUNCTION (MYSQL_ADD_EXECUTABLE)
|
||||
# Pass-through arguments for ADD_EXECUTABLE
|
||||
MYSQL_PARSE_ARGUMENTS(ARG
|
||||
"WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL;DESTINATION;COMPONENT"
|
||||
""
|
||||
${ARGN}
|
||||
)
|
||||
LIST(GET ARG_DEFAULT_ARGS 0 target)
|
||||
LIST(REMOVE_AT ARG_DEFAULT_ARGS 0)
|
||||
|
||||
SET(sources ${ARG_DEFAULT_ARGS})
|
||||
ADD_VERSION_INFO(${target} EXECUTABLE sources)
|
||||
ADD_EXECUTABLE(${target} ${ARG_WIN32} ${ARG_MACOSX_BUNDLE} ${ARG_EXCLUDE_FROM_ALL} ${sources})
|
||||
# tell CPack where to install
|
||||
IF(NOT ARG_EXCLUDE_FROM_ALL)
|
||||
IF(NOT ARG_DESTINATION)
|
||||
SET(ARG_DESTINATION ${INSTALL_BINDIR})
|
||||
ENDIF()
|
||||
IF(ARG_COMPONENT)
|
||||
SET(COMP COMPONENT ${ARG_COMPONENT})
|
||||
@ -50,7 +50,7 @@ FUNCTION (MYSQL_ADD_EXECUTABLE)
|
||||
SET(COMP COMPONENT ${MYSQL_INSTALL_COMPONENT})
|
||||
ELSE()
|
||||
SET(COMP COMPONENT Client)
|
||||
ENDIF()
|
||||
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} ${COMP})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} ${COMP})
|
||||
ENDIF()
|
||||
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
|
||||
# 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
|
||||
# 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
|
||||
SET(_FILE_OFFSET_BITS 64)
|
||||
|
16
cmake/pcre.cmake
Normal file
16
cmake/pcre.cmake
Normal file
@ -0,0 +1,16 @@
|
||||
SET(WITH_PCRE "auto" CACHE STRING
|
||||
"Which pcre to use (possible values are 'bundled', 'system', or 'auto')")
|
||||
|
||||
MACRO (CHECK_PCRE)
|
||||
IF(WITH_PCRE STREQUAL "system" OR WITH_PCRE STREQUAL "auto")
|
||||
CHECK_LIBRARY_EXISTS(pcre pcre_stack_guard "" HAVE_PCRE)
|
||||
ENDIF()
|
||||
IF(NOT HAVE_PCRE)
|
||||
IF (WITH_PCRE STREQUAL "system")
|
||||
MESSAGE(FATAL_ERROR "system pcre is not found or unusable")
|
||||
ENDIF()
|
||||
SET(PCRE_INCLUDES ${CMAKE_BINARY_DIR}/pcre ${CMAKE_SOURCE_DIR}/pcre)
|
||||
ADD_SUBDIRECTORY(pcre)
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
@ -37,8 +37,7 @@ MACRO(MYSQL_ADD_PLUGIN)
|
||||
# Add common include directories
|
||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
|
||||
${CMAKE_SOURCE_DIR}/sql
|
||||
${CMAKE_BINARY_DIR}/pcre
|
||||
${CMAKE_SOURCE_DIR}/pcre
|
||||
${PCRE_INCLUDES}
|
||||
${SSL_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIR})
|
||||
|
||||
|
@ -1,38 +1,38 @@
|
||||
// Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; version 2 of the License.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
#include <windows.h>
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@
|
||||
PRODUCTVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS__WINDOWS32
|
||||
FILETYPE @FILETYPE@
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904E4"
|
||||
BEGIN
|
||||
VALUE "FileVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0"
|
||||
VALUE "ProductVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1252
|
||||
END
|
||||
END
|
||||
// Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; version 2 of the License.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
#include <windows.h>
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@
|
||||
PRODUCTVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS__WINDOWS32
|
||||
FILETYPE @FILETYPE@
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904E4"
|
||||
BEGIN
|
||||
VALUE "FileVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0"
|
||||
VALUE "ProductVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1252
|
||||
END
|
||||
END
|
||||
|
@ -1,5 +1,4 @@
|
||||
# Copyright (c) 2009 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
# Copyright (c) 2009, 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
|
||||
|
@ -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
|
||||
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 PLUGINDIR "@PLUGINDIR@"
|
||||
#cmakedefine DEFAULT_SYSCONFDIR "@DEFAULT_SYSCONFDIR@"
|
||||
#cmakedefine DEFAULT_TMPDIR "@DEFAULT_TMPDIR@"
|
||||
#cmakedefine DEFAULT_TMPDIR @DEFAULT_TMPDIR@
|
||||
|
||||
#cmakedefine SO_EXT "@CMAKE_SHARED_MODULE_SUFFIX@"
|
||||
|
||||
@ -636,6 +636,7 @@
|
||||
#define VERSION "@VERSION@"
|
||||
#define PROTOCOL_VERSION 10
|
||||
|
||||
#define MALLOC_LIBRARY "@MALLOC_LIBRARY@"
|
||||
|
||||
/* time_t related defines */
|
||||
|
||||
|
@ -140,6 +140,10 @@ IF(UNIX)
|
||||
|
||||
SET(CMAKE_REQUIRED_LIBRARIES
|
||||
${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)
|
||||
LIST(REMOVE_DUPLICATES CMAKE_REQUIRED_LIBRARIES)
|
||||
|
2
debian/dist/Debian/control
vendored
2
debian/dist/Debian/control
vendored
@ -73,4 +73,4 @@ Depends: mariadb-test-10.0 (= ${source:Version})
|
||||
Description: MariaDB database regression test suite (metapackage depending on the latest version)
|
||||
This is an empty package that depends on the current "best" version of
|
||||
mariadb-test (currently mariadb-test-10.0), as determined by the MariaDB
|
||||
maintainers.
|
||||
maintainers.
|
||||
|
@ -3,8 +3,7 @@ usr/lib/mysql/plugin/auth_pam.so
|
||||
usr/lib/mysql/plugin/auth_socket.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_oqgraph.so
|
||||
usr/lib/mysql/plugin/ha_innodb.so
|
||||
usr/lib/mysql/plugin/handlersocket.so
|
||||
usr/lib/mysql/plugin/locales.so
|
||||
usr/lib/mysql/plugin/metadata_lock_info.so
|
||||
|
2
debian/dist/Ubuntu/control
vendored
2
debian/dist/Ubuntu/control
vendored
@ -73,4 +73,4 @@ Depends: mariadb-test-10.0 (= ${source:Version})
|
||||
Description: MariaDB database regression test suite (metapackage depending on the latest version)
|
||||
This is an empty package that depends on the current "best" version of
|
||||
mariadb-test (currently mariadb-test-10.0), as determined by the MariaDB
|
||||
maintainers.
|
||||
maintainers.
|
||||
|
@ -3,8 +3,7 @@ usr/lib/mysql/plugin/auth_pam.so
|
||||
usr/lib/mysql/plugin/auth_socket.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_oqgraph.so
|
||||
usr/lib/mysql/plugin/ha_innodb.so
|
||||
usr/lib/mysql/plugin/handlersocket.so
|
||||
usr/lib/mysql/plugin/locales.so
|
||||
usr/lib/mysql/plugin/metadata_lock_info.so
|
||||
|
@ -10,21 +10,30 @@
|
||||
@DPATCH@
|
||||
--- 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
|
||||
@@ -31,8 +31,6 @@
|
||||
-- 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;
|
||||
@@ -26,16 +26,6 @@
|
||||
-- a plain character
|
||||
SELECT LOWER( REPLACE((SELECT REPLACE(@@hostname,'_','\_')),'%','\%') )INTO @current_hostname;
|
||||
|
||||
-
|
||||
--- 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 db SELECT * FROM tmp_db WHERE @had_db_table=0;
|
||||
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';
|
||||
-INSERT INTO db SELECT * FROM tmp_db WHERE @had_db_table=0;
|
||||
-DROP TABLE tmp_db;
|
||||
-
|
||||
-
|
||||
-- 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 ('::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) 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;
|
||||
DROP TABLE tmp_user;
|
||||
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
--- a/scripts/mysqld_safe.sh 2013-01-11 16:02:41 +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_safe=mysqld_safe
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
# 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
|
||||
@@ -156,7 +155,7 @@
|
||||
@@ -163,7 +162,7 @@ eval_log_error () {
|
||||
# sed buffers output (only GNU sed supports a -u (unbuffered) option)
|
||||
# which means that messages may not get sent to syslog until the
|
||||
# mysqld process quits.
|
||||
@ -26,7 +26,7 @@
|
||||
;;
|
||||
*)
|
||||
echo "Internal program error (non-fatal):" \
|
||||
@@ -758,6 +757,13 @@
|
||||
@@ -805,6 +804,13 @@ then
|
||||
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/scripts/mysql_install_db.sh 2008-02-28 10:08:11.000000000 +0100
|
||||
@@ -306,7 +306,7 @@
|
||||
@@ -372,7 +372,7 @@ then
|
||||
fi
|
||||
|
||||
# Create database directories
|
||||
-for dir in "$ldata" "$ldata/mysql" "$ldata/test"
|
||||
+for dir in "$ldata" "$ldata/mysql"
|
||||
do
|
||||
if test ! -d $dir
|
||||
if test ! -d "$dir"
|
||||
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
|
||||
--- 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
|
||||
@@ -110,10 +110,10 @@
|
||||
@@ -106,10 +106,10 @@ fi
|
||||
|
||||
# Create options
|
||||
# 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
|
||||
+++ 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",
|
||||
$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, "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");
|
||||
|
13
debian/po/it.po
vendored
13
debian/po/it.po
vendored
@ -1,8 +1,8 @@
|
||||
# Italian (it) translation of debconf templates for mysql-dfsg-5.1
|
||||
# Copyright (C) 2009 Software in the Public Interest
|
||||
# This file is distributed under the same license as the mysql-dfsg-5.1 package.
|
||||
# Luca Monducci <luca.mo@tiscali.it>, 2006 - 2009.
|
||||
#
|
||||
# Italian (it) translation of debconf templates for mysql-dfsg-5.1
|
||||
# Copyright (C) 2009 Software in the Public Interest
|
||||
# This file is distributed under the same license as the mysql-dfsg-5.1 package.
|
||||
# Luca Monducci <luca.mo@tiscali.it>, 2006 - 2009.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: mysql-dfsg-5.1 5.1.37 italian debconf templates\n"
|
||||
@ -177,9 +177,6 @@ msgstr ""
|
||||
#. Description
|
||||
#: ../mariadb-galera-server-10.0.templates:8001
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Please read the /usr/share/doc/mariadb-server-10.0/README.Debian file for "
|
||||
#| "more information."
|
||||
msgid ""
|
||||
"Please read the /usr/share/doc/mariadb-server-10.0/README.Debian file for "
|
||||
"more information."
|
||||
|
15
debian/po/sv.po
vendored
15
debian/po/sv.po
vendored
@ -1,9 +1,9 @@
|
||||
# Translation of mysql-dfsg-5.1 debconf template to Swedish
|
||||
# Copyright (C) 2009 Martin Bagge <brother@bsnet.se>
|
||||
# This file is distributed under the same license as the mysql-dfsg-5.1 package.
|
||||
#
|
||||
# Andreas Henriksson <andreas@fatal.se>, 2007
|
||||
# Martin Bagge <brother@bsnet.se>, 2009
|
||||
# Translation of mysql-dfsg-5.1 debconf template to Swedish
|
||||
# Copyright (C) 2009 Martin Bagge <brother@bsnet.se>
|
||||
# This file is distributed under the same license as the mysql-dfsg-5.1 package.
|
||||
#
|
||||
# Andreas Henriksson <andreas@fatal.se>, 2007
|
||||
# Martin Bagge <brother@bsnet.se>, 2009
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: mysql-dfsg-5.1 5.0.21-3\n"
|
||||
@ -178,9 +178,6 @@ msgstr "Du bör kontrollera kontots lösenord efter installationen av paketet."
|
||||
#. Description
|
||||
#: ../mariadb-galera-server-10.0.templates:8001
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Please read the /usr/share/doc/mariadb-server-10.0/README.Debian file for "
|
||||
#| "more information."
|
||||
msgid ""
|
||||
"Please read the /usr/share/doc/mariadb-server-10.0/README.Debian file for "
|
||||
"more information."
|
||||
|
@ -6,6 +6,15 @@ found in the git revision history:
|
||||
http://www.canonware.com/cgi-bin/gitweb.cgi?p=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)
|
||||
|
||||
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
|
||||
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_read(size_t *mapbitsp);
|
||||
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 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_large_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,
|
||||
size_t size, size_t flags);
|
||||
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);
|
||||
}
|
||||
|
||||
JEMALLOC_ALWAYS_INLINE size_t
|
||||
arena_mapbitsp_read(size_t *mapbitsp)
|
||||
{
|
||||
|
||||
return (*mapbitsp);
|
||||
}
|
||||
|
||||
JEMALLOC_ALWAYS_INLINE size_t
|
||||
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
|
||||
@ -584,83 +593,90 @@ arena_mapbits_allocated_get(arena_chunk_t *chunk, size_t pageind)
|
||||
return (mapbits & CHUNK_MAP_ALLOCATED);
|
||||
}
|
||||
|
||||
JEMALLOC_ALWAYS_INLINE void
|
||||
arena_mapbitsp_write(size_t *mapbitsp, size_t mapbits)
|
||||
{
|
||||
|
||||
*mapbitsp = mapbits;
|
||||
}
|
||||
|
||||
JEMALLOC_ALWAYS_INLINE void
|
||||
arena_mapbits_unallocated_set(arena_chunk_t *chunk, size_t pageind, size_t size,
|
||||
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((flags & ~CHUNK_MAP_FLAGS_MASK) == 0);
|
||||
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
|
||||
arena_mapbits_unallocated_size_set(arena_chunk_t *chunk, size_t pageind,
|
||||
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((*mapbitsp & (CHUNK_MAP_LARGE|CHUNK_MAP_ALLOCATED)) == 0);
|
||||
*mapbitsp = size | (*mapbitsp & PAGE_MASK);
|
||||
assert((mapbits & (CHUNK_MAP_LARGE|CHUNK_MAP_ALLOCATED)) == 0);
|
||||
arena_mapbitsp_write(mapbitsp, size | (mapbits & PAGE_MASK));
|
||||
}
|
||||
|
||||
JEMALLOC_ALWAYS_INLINE void
|
||||
arena_mapbits_large_set(arena_chunk_t *chunk, size_t pageind, size_t size,
|
||||
size_t flags)
|
||||
{
|
||||
size_t *mapbitsp;
|
||||
size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind);
|
||||
size_t mapbits = arena_mapbitsp_read(mapbitsp);
|
||||
size_t unzeroed;
|
||||
|
||||
mapbitsp = arena_mapbitsp_get(chunk, pageind);
|
||||
assert((size & PAGE_MASK) == 0);
|
||||
assert((flags & CHUNK_MAP_DIRTY) == flags);
|
||||
unzeroed = *mapbitsp & CHUNK_MAP_UNZEROED; /* Preserve unzeroed. */
|
||||
*mapbitsp = size | CHUNK_MAP_BININD_INVALID | flags | unzeroed |
|
||||
CHUNK_MAP_LARGE | CHUNK_MAP_ALLOCATED;
|
||||
unzeroed = mapbits & CHUNK_MAP_UNZEROED; /* Preserve unzeroed. */
|
||||
arena_mapbitsp_write(mapbitsp, size | CHUNK_MAP_BININD_INVALID | flags
|
||||
| unzeroed | CHUNK_MAP_LARGE | CHUNK_MAP_ALLOCATED);
|
||||
}
|
||||
|
||||
JEMALLOC_ALWAYS_INLINE void
|
||||
arena_mapbits_large_binind_set(arena_chunk_t *chunk, size_t pageind,
|
||||
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);
|
||||
mapbitsp = arena_mapbitsp_get(chunk, pageind);
|
||||
assert(arena_mapbits_large_size_get(chunk, pageind) == PAGE);
|
||||
*mapbitsp = (*mapbitsp & ~CHUNK_MAP_BININD_MASK) | (binind <<
|
||||
CHUNK_MAP_BININD_SHIFT);
|
||||
arena_mapbitsp_write(mapbitsp, (mapbits & ~CHUNK_MAP_BININD_MASK) |
|
||||
(binind << CHUNK_MAP_BININD_SHIFT));
|
||||
}
|
||||
|
||||
JEMALLOC_ALWAYS_INLINE void
|
||||
arena_mapbits_small_set(arena_chunk_t *chunk, size_t pageind, size_t runind,
|
||||
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;
|
||||
|
||||
assert(binind < BININD_INVALID);
|
||||
mapbitsp = arena_mapbitsp_get(chunk, pageind);
|
||||
assert(pageind - runind >= map_bias);
|
||||
assert((flags & CHUNK_MAP_DIRTY) == flags);
|
||||
unzeroed = *mapbitsp & CHUNK_MAP_UNZEROED; /* Preserve unzeroed. */
|
||||
*mapbitsp = (runind << LG_PAGE) | (binind << CHUNK_MAP_BININD_SHIFT) |
|
||||
flags | unzeroed | CHUNK_MAP_ALLOCATED;
|
||||
unzeroed = mapbits & CHUNK_MAP_UNZEROED; /* Preserve unzeroed. */
|
||||
arena_mapbitsp_write(mapbitsp, (runind << LG_PAGE) | (binind <<
|
||||
CHUNK_MAP_BININD_SHIFT) | flags | unzeroed | CHUNK_MAP_ALLOCATED);
|
||||
}
|
||||
|
||||
JEMALLOC_ALWAYS_INLINE void
|
||||
arena_mapbits_unzeroed_set(arena_chunk_t *chunk, size_t pageind,
|
||||
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);
|
||||
*mapbitsp = (*mapbitsp & ~CHUNK_MAP_UNZEROED) | unzeroed;
|
||||
arena_mapbitsp_write(mapbitsp, (mapbits & ~CHUNK_MAP_UNZEROED) |
|
||||
unzeroed);
|
||||
}
|
||||
|
||||
JEMALLOC_INLINE bool
|
||||
|
@ -235,6 +235,7 @@ static const bool config_ivsalloc =
|
||||
#ifdef JEMALLOC_DEBUG
|
||||
/* Disable inlining to make debugging easier. */
|
||||
# define JEMALLOC_ALWAYS_INLINE
|
||||
# define JEMALLOC_ALWAYS_INLINE_C static
|
||||
# define JEMALLOC_INLINE
|
||||
# define inline
|
||||
#else
|
||||
@ -242,8 +243,11 @@ static const bool config_ivsalloc =
|
||||
# ifdef JEMALLOC_HAVE_ATTR
|
||||
# define JEMALLOC_ALWAYS_INLINE \
|
||||
static inline JEMALLOC_ATTR(unused) JEMALLOC_ATTR(always_inline)
|
||||
# define JEMALLOC_ALWAYS_INLINE_C \
|
||||
static inline JEMALLOC_ATTR(always_inline)
|
||||
# else
|
||||
# define JEMALLOC_ALWAYS_INLINE static inline
|
||||
# define JEMALLOC_ALWAYS_INLINE_C static inline
|
||||
# endif
|
||||
# define JEMALLOC_INLINE static inline
|
||||
# ifdef _MSC_VER
|
||||
|
@ -33,6 +33,8 @@
|
||||
#define arena_mapbits_unzeroed_get JEMALLOC_N(arena_mapbits_unzeroed_get)
|
||||
#define arena_mapbits_unzeroed_set JEMALLOC_N(arena_mapbits_unzeroed_set)
|
||||
#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_maxclass JEMALLOC_N(arena_maxclass)
|
||||
#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)
|
||||
memset(ret, 0, size);
|
||||
}
|
||||
VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
|
||||
} else {
|
||||
if (config_fill && opt_junk) {
|
||||
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);
|
||||
memset(ret, 0, size);
|
||||
}
|
||||
VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
|
||||
|
||||
if (config_stats)
|
||||
tbin->tstats.nrequests++;
|
||||
@ -368,11 +368,11 @@ tcache_alloc_large(tcache_t *tcache, size_t size, bool zero)
|
||||
else if (opt_zero)
|
||||
memset(ret, 0, size);
|
||||
}
|
||||
VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
|
||||
} else {
|
||||
VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
|
||||
memset(ret, 0, size);
|
||||
}
|
||||
VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
|
||||
|
||||
if (config_stats)
|
||||
tbin->tstats.nrequests++;
|
||||
|
@ -368,14 +368,21 @@ arena_run_zero(arena_chunk_t *chunk, size_t run_ind, size_t npages)
|
||||
(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
|
||||
arena_run_page_validate_zeroed(arena_chunk_t *chunk, size_t run_ind)
|
||||
{
|
||||
size_t i;
|
||||
UNUSED size_t *p = (size_t *)((uintptr_t)chunk + (run_ind << LG_PAGE));
|
||||
|
||||
VALGRIND_MAKE_MEM_DEFINED((void *)((uintptr_t)chunk + (run_ind <<
|
||||
LG_PAGE)), PAGE);
|
||||
arena_run_page_mark_zeroed(chunk, run_ind);
|
||||
for (i = 0; i < PAGE / sizeof(size_t); i++)
|
||||
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) {
|
||||
arena_run_page_validate_zeroed(
|
||||
chunk, run_ind+i);
|
||||
} else {
|
||||
arena_run_page_mark_zeroed(
|
||||
chunk, run_ind+i);
|
||||
}
|
||||
}
|
||||
} 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);
|
||||
}
|
||||
} 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,
|
||||
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 *
|
||||
@ -569,17 +582,24 @@ arena_chunk_alloc(arena_t *arena)
|
||||
* unless the chunk is not zeroed.
|
||||
*/
|
||||
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++)
|
||||
arena_mapbits_unzeroed_set(chunk, i, unzeroed);
|
||||
} else if (config_debug) {
|
||||
} else {
|
||||
VALGRIND_MAKE_MEM_DEFINED(
|
||||
(void *)arena_mapp_get(chunk, map_bias+1),
|
||||
(void *)((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++) {
|
||||
assert(arena_mapbits_unzeroed_get(chunk, i) ==
|
||||
unzeroed);
|
||||
(size_t)((uintptr_t) arena_mapp_get(chunk,
|
||||
chunk_npages-1) - (uintptr_t)arena_mapp_get(chunk,
|
||||
map_bias+1)));
|
||||
if (config_debug) {
|
||||
for (i = map_bias+1; i < chunk_npages-1; i++) {
|
||||
assert(arena_mapbits_unzeroed_get(chunk,
|
||||
i) == unzeroed);
|
||||
}
|
||||
}
|
||||
}
|
||||
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)
|
||||
memset(ret, 0, size);
|
||||
}
|
||||
VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
|
||||
} else {
|
||||
if (config_fill && opt_junk) {
|
||||
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);
|
||||
memset(ret, 0, size);
|
||||
}
|
||||
VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
|
||||
|
||||
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
|
||||
# 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})
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
# 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})
|
||||
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_ABORTED_BY_USER", HA_ERR_ABORTED_BY_USER, "" },
|
||||
{ "HA_ERR_DISK_FULL", HA_ERR_DISK_FULL, "" },
|
||||
{ "HA_ERR_INCOMPATIBLE_DEFINITION", HA_ERR_INCOMPATIBLE_DEFINITION, "" },
|
||||
|
@ -44,6 +44,8 @@ extern "C" {
|
||||
|
||||
typedef uint my_hash_value_type;
|
||||
typedef uchar *(*my_hash_get_key)(const uchar *,size_t*,my_bool);
|
||||
typedef my_hash_value_type (*my_hash_function)(const CHARSET_INFO *,
|
||||
const uchar *, size_t);
|
||||
typedef void (*my_hash_free_key)(void *);
|
||||
typedef my_bool (*my_hash_walk_action)(void *,void *);
|
||||
|
||||
@ -54,6 +56,7 @@ typedef struct st_hash {
|
||||
uint flags;
|
||||
DYNAMIC_ARRAY array; /* Place for hash_keys */
|
||||
my_hash_get_key get_key;
|
||||
my_hash_function hash_function;
|
||||
void (*free)(void *);
|
||||
CHARSET_INFO *charset;
|
||||
} HASH;
|
||||
@ -61,10 +64,11 @@ typedef struct st_hash {
|
||||
/* A search iterator state */
|
||||
typedef uint HASH_SEARCH_STATE;
|
||||
|
||||
#define my_hash_init(A,B,C,D,E,F,G,H) my_hash_init2(A,0,B,C,D,E,F,G,H)
|
||||
#define my_hash_init(A,B,C,D,E,F,G,H) my_hash_init2(A,0,B,C,D,E,F,0,G,H)
|
||||
my_bool my_hash_init2(HASH *hash, uint growth_size, CHARSET_INFO *charset,
|
||||
ulong default_array_elements, size_t key_offset,
|
||||
size_t key_length, my_hash_get_key get_key,
|
||||
my_hash_function hash_function,
|
||||
void (*free_element)(void*),
|
||||
uint flags);
|
||||
void my_hash_free(HASH *tree);
|
||||
@ -74,8 +78,9 @@ uchar *my_hash_search(const HASH *info, const uchar *key, size_t length);
|
||||
uchar *my_hash_search_using_hash_value(const HASH *info,
|
||||
my_hash_value_type hash_value,
|
||||
const uchar *key, size_t length);
|
||||
my_hash_value_type my_calc_hash(const HASH *info,
|
||||
my_hash_value_type my_hash_sort(const CHARSET_INFO *cs,
|
||||
const uchar *key, size_t length);
|
||||
#define my_calc_hash(A, B, C) my_hash_sort((A)->charset, B, C)
|
||||
uchar *my_hash_first(const HASH *info, const uchar *key, size_t length,
|
||||
HASH_SEARCH_STATE *state);
|
||||
uchar *my_hash_first_from_hash_value(const HASH *info,
|
||||
|
@ -69,8 +69,8 @@ extern "C" {
|
||||
#if MARIA_MAX_KEY > MARIA_KEYMAP_BITS
|
||||
#define maria_is_key_active(_keymap_,_keyno_) \
|
||||
(((_keyno_) < MARIA_KEYMAP_BITS) ? \
|
||||
test((_keymap_) & (1ULL << (_keyno_))) : \
|
||||
test((_keymap_) & MARIA_KEYMAP_HIGH_MASK))
|
||||
MY_TEST((_keymap_) & (1ULL << (_keyno_))) : \
|
||||
MY_TEST((_keymap_) & MARIA_KEYMAP_HIGH_MASK))
|
||||
#define maria_set_key_active(_keymap_,_keyno_) \
|
||||
(_keymap_)|= (((_keyno_) < MARIA_KEYMAP_BITS) ? \
|
||||
(1ULL << (_keyno_)) : \
|
||||
@ -81,14 +81,14 @@ extern "C" {
|
||||
(~ (0ULL)) /*ignore*/ )
|
||||
#else
|
||||
#define maria_is_key_active(_keymap_,_keyno_) \
|
||||
test((_keymap_) & (1ULL << (_keyno_)))
|
||||
MY_TEST((_keymap_) & (1ULL << (_keyno_)))
|
||||
#define maria_set_key_active(_keymap_,_keyno_) \
|
||||
(_keymap_)|= (1ULL << (_keyno_))
|
||||
#define maria_clear_key_active(_keymap_,_keyno_) \
|
||||
(_keymap_)&= (~ (1ULL << (_keyno_)))
|
||||
#endif
|
||||
#define maria_is_any_key_active(_keymap_) \
|
||||
test((_keymap_))
|
||||
MY_TEST((_keymap_))
|
||||
#define maria_is_all_keys_active(_keymap_,_keys_) \
|
||||
((_keymap_) == maria_get_mask_all_keys_active(_keys_))
|
||||
#define maria_set_all_keys_active(_keymap_,_keys_) \
|
||||
|
@ -200,11 +200,6 @@ enum ha_extra_function {
|
||||
HA_EXTRA_ATTACH_CHILDREN,
|
||||
HA_EXTRA_IS_ATTACHED_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,
|
||||
/* Inform handler we will force a close as part of flush */
|
||||
HA_EXTRA_PREPARE_FOR_FORCED_CLOSE
|
||||
@ -264,13 +259,11 @@ enum ha_base_keytype {
|
||||
#define HA_SPATIAL 1024 /* For spatial search */
|
||||
#define HA_NULL_ARE_EQUAL 2048 /* NULL in key are cmp as equal */
|
||||
#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. */
|
||||
#define HA_KEYFLAG_MASK (HA_NOSAME | HA_PACK_KEY | HA_AUTO_KEY | \
|
||||
HA_BINARY_PACK_KEY | HA_FULLTEXT | HA_UNIQUE_CHECK | \
|
||||
HA_SPATIAL | HA_NULL_ARE_EQUAL | HA_GENERATED_KEY | \
|
||||
HA_RTREE_INDEX)
|
||||
HA_SPATIAL | HA_NULL_ARE_EQUAL | HA_GENERATED_KEY)
|
||||
|
||||
/*
|
||||
Key contains partial segments.
|
||||
@ -507,7 +500,8 @@ enum ha_base_keytype {
|
||||
#define HA_ERR_ROW_NOT_VISIBLE 187
|
||||
#define HA_ERR_ABORTED_BY_USER 188
|
||||
#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 */
|
||||
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
|
||||
|
@ -41,9 +41,14 @@ typedef struct st_bitmap
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#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 my_bool bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits,
|
||||
my_bool thread_safe);
|
||||
extern my_bool my_bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits,
|
||||
my_bool thread_safe);
|
||||
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_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_bits_set(const MY_BITMAP *map);
|
||||
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_prefix(MY_BITMAP *map, uint prefix_size);
|
||||
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
|
||||
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 */
|
||||
#if defined(_AIX) && defined(_LARGE_FILE_API)
|
||||
#undef _LARGE_FILE_API
|
||||
#undef __GNUG__
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -264,6 +265,16 @@
|
||||
#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__)
|
||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||
#define _POSIX_PTHREAD_SEMANTICS /* We want posix threads */
|
||||
@ -316,6 +327,13 @@ C_MODE_END
|
||||
#define _LONG_LONG 1 /* For AIX string library */
|
||||
#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
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
@ -341,12 +359,17 @@ C_MODE_END
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#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
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TIMEB_H
|
||||
#include <sys/timeb.h> /* Avoid warnings on SCO */
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
@ -477,7 +500,7 @@ typedef unsigned short ushort;
|
||||
#endif
|
||||
|
||||
#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_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))
|
||||
@ -1217,11 +1240,10 @@ static inline double rint(double x)
|
||||
#define HAVE_EXTERNAL_CLIENT
|
||||
#endif /* EMBEDDED_LIBRARY */
|
||||
|
||||
/*
|
||||
Define default tmpdir if not already set.
|
||||
*/
|
||||
#if !defined(DEFAULT_TMPDIR)
|
||||
#define DEFAULT_TMPDIR P_tmpdir
|
||||
/* 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
|
||||
|
||||
#endif /* my_global_h */
|
||||
|
@ -92,7 +92,8 @@ static const char *handler_error_messages[]=
|
||||
"Row in wrong partition",
|
||||
"Row is not visible by the current transaction",
|
||||
"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 */
|
||||
|
@ -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
|
||||
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,
|
||||
2010-2011 Oracle and/or its affiliates, 2009-2010 Monty Program Ab.
|
||||
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2013, Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -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_wait(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_broadcast(pthread_cond_t *cond);
|
||||
int pthread_cond_destroy(pthread_cond_t *cond);
|
||||
|
@ -74,8 +74,11 @@ extern uchar days_in_month[];
|
||||
#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_HAVE_WARNINGS(x) test((x) & MYSQL_TIME_WARN_WARNINGS)
|
||||
#define MYSQL_TIME_WARN_HAVE_NOTES(x) test((x) & MYSQL_TIME_WARN_NOTES)
|
||||
#define MYSQL_TIME_WARN_HAVE_WARNINGS(x) MY_TEST((x) & MYSQL_TIME_WARN_WARNINGS)
|
||||
#define MYSQL_TIME_WARN_HAVE_NOTES(x) MY_TEST((x) & MYSQL_TIME_WARN_NOTES)
|
||||
|
||||
/* Usefull constants */
|
||||
#define SECONDS_IN_24H 86400L
|
||||
|
||||
/* Limits for the TIME data type */
|
||||
#define TIME_MAX_HOUR 838
|
||||
|
@ -13,10 +13,6 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
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
|
||||
#define IF_VALGRIND(A,B) A
|
||||
#else
|
||||
@ -37,7 +33,7 @@
|
||||
#endif /* HAVE_VALGRIND */
|
||||
|
||||
#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
|
||||
#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
|
||||
|
@ -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.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@ -29,7 +29,7 @@ extern "C" {
|
||||
#include "my_compare.h"
|
||||
#include <myisamchk.h>
|
||||
#include <mysql/plugin.h>
|
||||
|
||||
#include <my_check_opt.h>
|
||||
/*
|
||||
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_) \
|
||||
(((_keyno_) < MI_KEYMAP_BITS) ? \
|
||||
test((_keymap_) & (1ULL << (_keyno_))) : \
|
||||
test((_keymap_) & MI_KEYMAP_HIGH_MASK))
|
||||
MY_TEST((_keymap_) & (1ULL << (_keyno_))) : \
|
||||
MY_TEST((_keymap_) & MI_KEYMAP_HIGH_MASK))
|
||||
#define mi_set_key_active(_keymap_,_keyno_) \
|
||||
(_keymap_)|= (((_keyno_) < MI_KEYMAP_BITS) ? \
|
||||
(1ULL << (_keyno_)) : \
|
||||
@ -82,7 +82,7 @@ extern "C" {
|
||||
#else
|
||||
|
||||
#define mi_is_key_active(_keymap_,_keyno_) \
|
||||
test((_keymap_) & (1ULL << (_keyno_)))
|
||||
MY_TEST((_keymap_) & (1ULL << (_keyno_)))
|
||||
#define mi_set_key_active(_keymap_,_keyno_) \
|
||||
(_keymap_)|= (1ULL << (_keyno_))
|
||||
#define mi_clear_key_active(_keymap_,_keyno_) \
|
||||
@ -91,7 +91,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#define mi_is_any_key_active(_keymap_) \
|
||||
test((_keymap_))
|
||||
MY_TEST((_keymap_))
|
||||
#define mi_is_all_keys_active(_keymap_,_keys_) \
|
||||
((_keymap_) == mi_get_mask_all_keys_active(_keys_))
|
||||
#define mi_set_all_keys_active(_keymap_,_keys_) \
|
||||
@ -312,7 +312,6 @@ typedef struct st_mi_bit_buff
|
||||
uint error;
|
||||
} MI_BIT_BUFF;
|
||||
|
||||
|
||||
typedef struct st_sort_info
|
||||
{
|
||||
/* sync things */
|
||||
|
@ -27,48 +27,6 @@
|
||||
#ifndef _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
|
||||
to xxxcheck.c follows:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2005, 2011, Oracle and/or its affiliates
|
||||
Copyright (C) 2009, 2011, Monty Program Ab
|
||||
/* Copyright (c) 2005, 2013, Oracle and/or its affiliates
|
||||
Copyright (C) 2009, 2013, Monty Program Ab
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -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
|
||||
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
|
||||
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
|
||||
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) \
|
||||
inline_mysql_cond_timedwait(C, M, W, __FILE__, __LINE__)
|
||||
#else
|
||||
@ -1170,8 +1170,8 @@ static inline int inline_mysql_cond_wait(
|
||||
static inline int inline_mysql_cond_timedwait(
|
||||
mysql_cond_t *that,
|
||||
mysql_mutex_t *mutex,
|
||||
struct timespec *abstime
|
||||
#ifdef HAVE_PSI_COND_INTERFACE
|
||||
const struct timespec *abstime
|
||||
#if defined(HAVE_PSI_INTERFACE) || defined(SAFE_MUTEX)
|
||||
, const char *src_file, uint src_line
|
||||
#endif
|
||||
)
|
||||
|
@ -51,6 +51,7 @@ typedef struct st_queue {
|
||||
|
||||
#define queue_first_element(queue) 1
|
||||
#define queue_last_element(queue) (queue)->elements
|
||||
#define queue_empty(queue) ((queue)->elements == 0)
|
||||
#define queue_top(queue) ((queue)->root[1])
|
||||
#define queue_element(queue,index) ((queue)->root[index])
|
||||
#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
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@ -17,7 +17,7 @@
|
||||
#ifndef _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
|
||||
|
@ -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
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -16,8 +17,7 @@
|
||||
INCLUDE_DIRECTORIES(
|
||||
${CMAKE_SOURCE_DIR}/include
|
||||
${CMAKE_SOURCE_DIR}/libmysql
|
||||
${CMAKE_BINARY_DIR}/pcre
|
||||
${CMAKE_SOURCE_DIR}/pcre
|
||||
${PCRE_INCLUDES}
|
||||
${CMAKE_SOURCE_DIR}/strings
|
||||
${SSL_INCLUDE_DIRS}
|
||||
${SSL_INTERNAL_INCLUDE_DIRS}
|
||||
@ -26,8 +26,6 @@ ADD_DEFINITIONS(${SSL_DEFINES})
|
||||
|
||||
SET(CLIENT_API_FUNCTIONS_5_1
|
||||
get_tty_password
|
||||
handle_options
|
||||
load_defaults
|
||||
mysql_thread_end
|
||||
mysql_thread_init
|
||||
myodbc_remove_escape
|
||||
@ -131,6 +129,12 @@ mysql_server_init
|
||||
mysql_server_end
|
||||
mysql_set_character_set
|
||||
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
|
||||
@ -153,6 +157,8 @@ mysql_close_cont
|
||||
mysql_close_start
|
||||
mysql_commit_cont
|
||||
mysql_commit_start
|
||||
mysql_dump_debug_info_cont
|
||||
mysql_dump_debug_info_start
|
||||
mysql_fetch_row_cont
|
||||
mysql_fetch_row_start
|
||||
mysql_free_result_cont
|
||||
@ -259,73 +265,76 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
# for compatibility with distribution packages, so client shared library can
|
||||
# painlessly replace the one supplied by the distribution.
|
||||
|
||||
# Also list of exported symbols in distributions may differ from what is considered
|
||||
# official API. Define CLIENT_API_EXTRA for the set of symbols, that required to
|
||||
# be exported on different platforms.
|
||||
# Also list of exported symbols in distributions may differ from what is
|
||||
# considered official API. Define CLIENT_API_5_1_EXTRA for the set of
|
||||
# symbols, that required to be exported on different platforms.
|
||||
|
||||
IF(RPM)
|
||||
# Fedora & Co declared following functions as part of API
|
||||
SET(CLIENT_API_EXTRA
|
||||
mysql_default_charset_info
|
||||
mysql_get_charset
|
||||
mysql_get_charset_by_csname
|
||||
mysql_net_realloc
|
||||
mysql_client_errors
|
||||
# Fedora & Co declared following functions as part of API
|
||||
SET(CLIENT_API_5_1_EXTRA
|
||||
# why does Fedora export these?
|
||||
_fini
|
||||
_init
|
||||
my_init
|
||||
|
||||
# Also export the non-renamed variants
|
||||
# (in case someone wants to rebuild mysqli-php or something similar)
|
||||
# See MDEV-4127
|
||||
default_charset_info
|
||||
get_charset
|
||||
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()
|
||||
# mysql-connector-odbc requires these
|
||||
mysql_default_charset_info
|
||||
mysql_get_charset
|
||||
mysql_get_charset_by_csname
|
||||
mysql_net_realloc
|
||||
|
||||
IF(VERSION_SCRIPT_TEMPLATE)
|
||||
# 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)
|
||||
FOREACH (f ${CLIENT_API_FUNCTIONS_5_1})
|
||||
SET(CLIENT_API_5_1_LIST "${CLIENT_API_5_1_LIST}\n${f};")
|
||||
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}\n${f};")
|
||||
ENDFOREACH()
|
||||
# PHP's mysqli.so requires this (via the ER() macro)
|
||||
mysql_client_errors
|
||||
|
||||
# Also export the non-renamed variants
|
||||
# (in case someone wants to rebuild mysqli-php or something similar)
|
||||
# See MDEV-4127
|
||||
default_charset_info
|
||||
get_charset
|
||||
get_charset_by_csname
|
||||
net_realloc
|
||||
client_errors
|
||||
|
||||
# pure-ftpd requires this
|
||||
my_make_scrambled_password
|
||||
|
||||
# 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()
|
||||
|
||||
|
||||
@ -353,8 +362,10 @@ SET(LIBS clientlib dbug strings vio mysys mysys_ssl ${ZLIB_LIBRARY} ${SSL_LIBRAR
|
||||
MERGE_LIBRARIES(mysqlclient STATIC ${LIBS} COMPONENT Development)
|
||||
|
||||
# Visual Studio users need debug static library for debug projects
|
||||
INSTALL_DEBUG_SYMBOLS(clientlib)
|
||||
IF(MSVC)
|
||||
INSTALL_DEBUG_TARGET(mysqlclient DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||
INSTALL_DEBUG_TARGET(clientlib DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||
ENDIF()
|
||||
|
||||
IF(UNIX)
|
||||
@ -373,7 +384,7 @@ IF(UNIX)
|
||||
ENDIF()
|
||||
|
||||
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)
|
||||
# libtool compatability
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE)
|
||||
@ -390,9 +401,6 @@ IF(NOT DISABLE_SHARED)
|
||||
SOVERSION "${SHARED_LIB_MAJOR_VERSION}")
|
||||
IF(LINK_FLAG_NO_UNDEFINED OR VERSION_SCRIPT_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
|
||||
"${libmysql_link_flags} ${LINK_FLAG_NO_UNDEFINED} ${VERSION_SCRIPT_LINK_FLAGS}")
|
||||
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
|
||||
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) 2009, 2012, Monty Program Ab
|
||||
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates
|
||||
Copyright (c) 2009, 2013, Monty Program Ab
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -1273,6 +1273,7 @@ static my_bool setup_one_fetch_function(MYSQL_BIND *, MYSQL_FIELD *field);
|
||||
#define RESET_LONG_DATA 2
|
||||
#define RESET_STORE_RESULT 4
|
||||
#define RESET_CLEAR_ERROR 8
|
||||
#define RESET_ALL_BUFFERS 16
|
||||
|
||||
static my_bool reset_stmt_handle(MYSQL_STMT *stmt, uint flags);
|
||||
|
||||
@ -2083,8 +2084,8 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length)
|
||||
buff[4]= (char) stmt->flags;
|
||||
int4store(buff+5, 1); /* iteration count */
|
||||
|
||||
res= test(cli_advanced_command(mysql, COM_STMT_EXECUTE, buff, sizeof(buff),
|
||||
(uchar*) packet, length, 1, stmt) ||
|
||||
res= MY_TEST(cli_advanced_command(mysql, COM_STMT_EXECUTE, buff, sizeof(buff),
|
||||
(uchar*) packet, length, 1, stmt) ||
|
||||
(*mysql->methods->read_query_result)(mysql));
|
||||
stmt->affected_rows= mysql->affected_rows;
|
||||
stmt->server_status= mysql->server_status;
|
||||
@ -2571,7 +2572,7 @@ int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt)
|
||||
reinit_result_set_metadata(stmt);
|
||||
prepare_to_fetch_result(stmt);
|
||||
}
|
||||
DBUG_RETURN(test(stmt->last_errno));
|
||||
DBUG_RETURN(MY_TEST(stmt->last_errno));
|
||||
}
|
||||
|
||||
|
||||
@ -3187,14 +3188,14 @@ static void fetch_string_with_conversion(MYSQL_BIND *param, char *value,
|
||||
{
|
||||
double data= my_strntod(&my_charset_latin1, value, length, &endptr, &err);
|
||||
float fdata= (float) data;
|
||||
*param->error= (fdata != data) | test(err);
|
||||
*param->error= (fdata != data) | MY_TEST(err);
|
||||
floatstore(buffer, fdata);
|
||||
break;
|
||||
}
|
||||
case MYSQL_TYPE_DOUBLE:
|
||||
{
|
||||
double data= my_strntod(&my_charset_latin1, value, length, &endptr, &err);
|
||||
*param->error= test(err);
|
||||
*param->error= MY_TEST(err);
|
||||
doublestore(buffer, data);
|
||||
break;
|
||||
}
|
||||
@ -3204,7 +3205,7 @@ static void fetch_string_with_conversion(MYSQL_BIND *param, char *value,
|
||||
MYSQL_TIME_STATUS status;
|
||||
str_to_time(value, length, tm, 0, &status);
|
||||
err= status.warnings;
|
||||
*param->error= test(err);
|
||||
*param->error= MY_TEST(err);
|
||||
break;
|
||||
}
|
||||
case MYSQL_TYPE_DATE:
|
||||
@ -3215,8 +3216,8 @@ static void fetch_string_with_conversion(MYSQL_BIND *param, char *value,
|
||||
MYSQL_TIME_STATUS status;
|
||||
(void) str_to_datetime(value, length, tm, 0, &status);
|
||||
err= status.warnings;
|
||||
*param->error= test(err) && (param->buffer_type == MYSQL_TYPE_DATE &&
|
||||
tm->time_type != MYSQL_TIMESTAMP_DATE);
|
||||
*param->error= MY_TEST(err) && (param->buffer_type == MYSQL_TYPE_DATE &&
|
||||
tm->time_type != MYSQL_TIMESTAMP_DATE);
|
||||
break;
|
||||
}
|
||||
case MYSQL_TYPE_TINY_BLOB:
|
||||
@ -3338,7 +3339,7 @@ static void fetch_long_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
|
||||
{
|
||||
int error;
|
||||
value= number_to_datetime(value, 0, (MYSQL_TIME *) buffer, 0, &error);
|
||||
*param->error= test(error);
|
||||
*param->error= MY_TEST(error);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -3686,7 +3687,7 @@ static void fetch_result_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
|
||||
static void fetch_result_tinyint(MYSQL_BIND *param, MYSQL_FIELD *field,
|
||||
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 *)param->buffer= data;
|
||||
*param->error= param->is_unsigned != field_is_unsigned && data > INT_MAX8;
|
||||
@ -3696,7 +3697,7 @@ static void fetch_result_tinyint(MYSQL_BIND *param, MYSQL_FIELD *field,
|
||||
static void fetch_result_short(MYSQL_BIND *param, MYSQL_FIELD *field,
|
||||
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);
|
||||
shortstore(param->buffer, data);
|
||||
*param->error= param->is_unsigned != field_is_unsigned && data > INT_MAX16;
|
||||
@ -3707,7 +3708,7 @@ static void fetch_result_int32(MYSQL_BIND *param,
|
||||
MYSQL_FIELD *field __attribute__((unused)),
|
||||
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);
|
||||
longstore(param->buffer, data);
|
||||
*param->error= param->is_unsigned != field_is_unsigned && data > INT_MAX32;
|
||||
@ -3718,7 +3719,7 @@ static void fetch_result_int64(MYSQL_BIND *param,
|
||||
MYSQL_FIELD *field __attribute__((unused)),
|
||||
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);
|
||||
*param->error= param->is_unsigned != field_is_unsigned && data > LONGLONG_MAX;
|
||||
longlongstore(param->buffer, data);
|
||||
@ -4615,6 +4616,14 @@ static my_bool reset_stmt_handle(MYSQL_STMT *stmt, uint flags)
|
||||
*mysql->unbuffered_fetch_owner= TRUE;
|
||||
mysql->status= MYSQL_STATUS_READY;
|
||||
}
|
||||
if (flags & RESET_ALL_BUFFERS)
|
||||
{
|
||||
/* mysql_stmt_next_result will flush all pending
|
||||
result sets
|
||||
*/
|
||||
while (mysql_more_results(mysql) &&
|
||||
mysql_stmt_next_result(stmt) == 0);
|
||||
}
|
||||
}
|
||||
if (flags & RESET_SERVER_SIDE)
|
||||
{
|
||||
@ -4679,27 +4688,18 @@ my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt)
|
||||
{
|
||||
mysql->stmts= list_delete(mysql->stmts, &stmt->list);
|
||||
/*
|
||||
Clear NET error state: if the following commands come through
|
||||
successfully, connection will still be usable for other commands.
|
||||
Clear NET error state: if the following commands come through
|
||||
successfully, connection will still be usable for other commands.
|
||||
*/
|
||||
net_clear_error(&mysql->net);
|
||||
|
||||
if ((int) stmt->state > (int) MYSQL_STMT_INIT_DONE)
|
||||
{
|
||||
uchar buff[MYSQL_STMT_HEADER]; /* 4 bytes - stmt id */
|
||||
|
||||
if (mysql->unbuffered_fetch_owner == &stmt->unbuffered_fetch_cancelled)
|
||||
mysql->unbuffered_fetch_owner= 0;
|
||||
if (mysql->status != MYSQL_STATUS_READY)
|
||||
{
|
||||
/*
|
||||
Flush result set of the connection. If it does not belong
|
||||
to this statement, set a warning.
|
||||
*/
|
||||
(*mysql->methods->flush_use_result)(mysql, TRUE);
|
||||
if (mysql->unbuffered_fetch_owner)
|
||||
*mysql->unbuffered_fetch_owner= TRUE;
|
||||
mysql->status= MYSQL_STATUS_READY;
|
||||
}
|
||||
if ((rc= reset_stmt_handle(stmt, RESET_ALL_BUFFERS | RESET_CLEAR_ERROR)))
|
||||
return rc;
|
||||
|
||||
int4store(buff, stmt->stmt_id);
|
||||
if ((rc= stmt_command(mysql, COM_STMT_CLOSE, buff, 4, stmt)))
|
||||
{
|
||||
@ -4711,7 +4711,7 @@ my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt)
|
||||
my_free(stmt->extension);
|
||||
my_free(stmt);
|
||||
|
||||
DBUG_RETURN(test(rc));
|
||||
DBUG_RETURN(MY_TEST(rc));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -4731,7 +4731,7 @@ my_bool STDCALL mysql_stmt_reset(MYSQL_STMT *stmt)
|
||||
/* Reset the client and server sides of the prepared statement */
|
||||
DBUG_RETURN(reset_stmt_handle(stmt,
|
||||
RESET_SERVER_SIDE | RESET_LONG_DATA |
|
||||
RESET_CLEAR_ERROR));
|
||||
RESET_ALL_BUFFERS | RESET_CLEAR_ERROR));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -4843,7 +4843,6 @@ int STDCALL mysql_next_result(MYSQL *mysql)
|
||||
DBUG_RETURN(-1); /* No more results */
|
||||
}
|
||||
|
||||
|
||||
int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt)
|
||||
{
|
||||
MYSQL *mysql= stmt->mysql;
|
||||
|
@ -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" */
|
||||
|
@ -22,8 +22,7 @@ ${CMAKE_SOURCE_DIR}/libmysql
|
||||
${CMAKE_SOURCE_DIR}/libmysqld
|
||||
${CMAKE_SOURCE_DIR}/sql
|
||||
${CMAKE_BINARY_DIR}/sql
|
||||
${CMAKE_BINARY_DIR}/pcre
|
||||
${CMAKE_SOURCE_DIR}/pcre
|
||||
${PCRE_INCLUDES}
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
${SSL_INCLUDE_DIRS}
|
||||
${SSL_INTERNAL_INCLUDE_DIRS}
|
||||
|
@ -15,8 +15,7 @@
|
||||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
|
||||
${CMAKE_SOURCE_DIR}/libmysqld/include
|
||||
${CMAKE_BINARY_DIR}/pcre
|
||||
${CMAKE_SOURCE_DIR}/pcre
|
||||
${PCRE_INCLUDES}
|
||||
${CMAKE_SOURCE_DIR}/sql
|
||||
${MY_READLINE_INCLUDE_DIR}
|
||||
)
|
||||
|
@ -332,8 +332,8 @@ static int emb_stmt_execute(MYSQL_STMT *stmt)
|
||||
thd->client_param_count= stmt->param_count;
|
||||
thd->client_params= stmt->params;
|
||||
|
||||
res= test(emb_advanced_command(stmt->mysql, COM_STMT_EXECUTE, 0, 0,
|
||||
header, sizeof(header), 1, stmt) ||
|
||||
res= MY_TEST(emb_advanced_command(stmt->mysql, COM_STMT_EXECUTE, 0, 0,
|
||||
header, sizeof(header), 1, stmt) ||
|
||||
emb_read_query_result(stmt->mysql));
|
||||
stmt->affected_rows= stmt->mysql->affected_rows;
|
||||
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");
|
||||
#endif
|
||||
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();
|
||||
umask(((~my_umask) & 0666));
|
||||
|
@ -15,7 +15,6 @@
|
||||
|
||||
#include <service_versions.h>
|
||||
|
||||
|
||||
/* 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
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -74,7 +74,7 @@ ENDIF()
|
||||
|
||||
IF(WITH_EMBEDDED_SERVER)
|
||||
SET(TEST_EMBEDDED ${MTR_FORCE} --comment=embedded --timer --embedded-server
|
||||
--skip-rpl --skip-ndbcluster $(EXP))
|
||||
--skip-rpl --skip-ndbcluster ${EXP})
|
||||
ELSE()
|
||||
SET(TEST_EMBEDDED echo "Can not test embedded, not compiled in")
|
||||
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_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.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-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
|
||||
|
||||
# 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 -------- switch to master -------
|
||||
connection master;
|
||||
DROP TEMPORARY TABLE mysqltest1.t22;
|
||||
DROP DATABASE mysqltest1;
|
||||
# mysqltest2 was alreday DROPPED some tests before.
|
||||
DROP DATABASE mysqltest3;
|
||||
|
@ -187,10 +187,9 @@ if (`SELECT HEX(@commands) = HEX('configure')`)
|
||||
}
|
||||
|
||||
#
|
||||
# Drops tables and synchronizes master and slave. Note that temporary
|
||||
# tables are not explitcily dropped as they will be dropped while
|
||||
# closing the connection.
|
||||
# Drops tables and synchronizes master and slave.
|
||||
#
|
||||
|
||||
if (`SELECT HEX(@commands) = HEX('clean')`)
|
||||
{
|
||||
connection master;
|
||||
@ -207,10 +206,15 @@ if (`SELECT HEX(@commands) = HEX('clean')`)
|
||||
|
||||
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
|
||||
while ($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
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ FLUSH LOGS;
|
||||
--echo -------- switch to master --------
|
||||
connection master;
|
||||
FLUSH LOGS;
|
||||
|
||||
DROP TEMPORARY TABLE IF EXISTS mysqltest1.tmp2;
|
||||
DROP DATABASE mysqltest1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
@ -18,8 +18,12 @@ start slave;
|
||||
--source include/wait_for_slave_to_start.inc
|
||||
|
||||
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;
|
||||
|
||||
eval create table t1(n int not null auto_increment primary key)ENGINE=$engine_type;
|
||||
insert into t1 values (NULL);
|
||||
drop table t1;
|
||||
@ -141,3 +145,5 @@ drop table t1;
|
||||
# End of 4.1 tests
|
||||
|
||||
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;
|
||||
sync_with_master;
|
||||
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*
|
||||
|
@ -59,3 +59,6 @@ source include/wait_for_slave_sql_to_stop.inc;
|
||||
connection slave;
|
||||
START SLAVE SQL_THREAD;
|
||||
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.
|
||||
create table if not exists t2 (a int) select 6 union select 7;
|
||||
--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;
|
||||
call p_verify_status_increment(2, 0, 4, 4);
|
||||
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);
|
||||
SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a;
|
||||
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;
|
||||
|
@ -24,7 +24,7 @@ innodb-sys-foreign
|
||||
innodb-sys-foreign-col
|
||||
innodb-metrics
|
||||
|
||||
[innodb]
|
||||
[xtradb]
|
||||
innodb
|
||||
innodb-cmpmem
|
||||
innodb-trx
|
||||
|
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
|
||||
# (this is because it is used as a filter, not for retrieval)
|
||||
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
|
||||
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.
|
||||
explain select * from t1 where pktail1ok=1 and key1=10;
|
||||
|
@ -633,7 +633,7 @@ drop table t1;
|
||||
drop table bug29807;
|
||||
--disable_query_log
|
||||
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
|
||||
|
||||
|
||||
|
@ -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
|
||||
-- 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'
|
||||
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
|
||||
-- restored after test
|
||||
checksum table
|
||||
@ -82,5 +93,8 @@ BEGIN
|
||||
-- verify that no plugin changed its disabled/enabled state
|
||||
SELECT * FROM INFORMATION_SCHEMA.PLUGINS;
|
||||
|
||||
select * from information_schema.session_variables
|
||||
where variable_name = 'debug_sync';
|
||||
|
||||
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
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user