Commit 61756679 authored by Otto Kekäläinen's avatar Otto Kekäläinen
Browse files

Imported Upstream version 10.0.9

parent 28192e02
...@@ -153,6 +153,7 @@ INCLUDE(readline) ...@@ -153,6 +153,7 @@ INCLUDE(readline)
INCLUDE(libutils) INCLUDE(libutils)
INCLUDE(dtrace) INCLUDE(dtrace)
INCLUDE(jemalloc) INCLUDE(jemalloc)
INCLUDE(pcre)
INCLUDE(ctest) INCLUDE(ctest)
INCLUDE(plugin) INCLUDE(plugin)
INCLUDE(install_macros) INCLUDE(install_macros)
...@@ -329,8 +330,15 @@ SET(PLUGINDIR "${DEFAULT_MYSQL_HOME}/${INSTALL_PLUGINDIR}") ...@@ -329,8 +330,15 @@ SET(PLUGINDIR "${DEFAULT_MYSQL_HOME}/${INSTALL_PLUGINDIR}")
IF(INSTALL_SYSCONFDIR) IF(INSTALL_SYSCONFDIR)
SET(DEFAULT_SYSCONFDIR "${INSTALL_SYSCONFDIR}") SET(DEFAULT_SYSCONFDIR "${INSTALL_SYSCONFDIR}")
ENDIF() ENDIF()
OPTION(TMPDIR
"PATH to MySQL TMP dir. If unspecified, defaults to P_tmpdir in <stdio.h>" OFF)
IF(TMPDIR) IF(TMPDIR)
SET(DEFAULT_TMPDIR "${TMPDIR}") # Quote it, to make it a const char string.
SET(DEFAULT_TMPDIR "\"${TMPDIR}\"")
ELSE()
# Do not quote it, to refer to the P_tmpdir macro in <stdio.h>.
SET(DEFAULT_TMPDIR "P_tmpdir")
ENDIF() ENDIF()
# Run platform tests # Run platform tests
...@@ -355,6 +363,8 @@ MYSQL_CHECK_READLINE() ...@@ -355,6 +363,8 @@ MYSQL_CHECK_READLINE()
SET(MALLOC_LIBRARY "system") SET(MALLOC_LIBRARY "system")
CHECK_JEMALLOC() CHECK_JEMALLOC()
CHECK_PCRE()
# #
# Setup maintainer mode options. Platform checks are # Setup maintainer mode options. Platform checks are
# not run with the warning options as to not perturb fragile checks # not run with the warning options as to not perturb fragile checks
...@@ -390,7 +400,6 @@ ADD_SUBDIRECTORY(include) ...@@ -390,7 +400,6 @@ ADD_SUBDIRECTORY(include)
ADD_SUBDIRECTORY(dbug) ADD_SUBDIRECTORY(dbug)
ADD_SUBDIRECTORY(strings) ADD_SUBDIRECTORY(strings)
ADD_SUBDIRECTORY(vio) ADD_SUBDIRECTORY(vio)
ADD_SUBDIRECTORY(pcre)
ADD_SUBDIRECTORY(mysys) ADD_SUBDIRECTORY(mysys)
ADD_SUBDIRECTORY(mysys_ssl) ADD_SUBDIRECTORY(mysys_ssl)
ADD_SUBDIRECTORY(libmysql) ADD_SUBDIRECTORY(libmysql)
...@@ -418,6 +427,7 @@ IF(NOT WITHOUT_SERVER) ...@@ -418,6 +427,7 @@ IF(NOT WITHOUT_SERVER)
ADD_SUBDIRECTORY(internal) ADD_SUBDIRECTORY(internal)
ENDIF() ENDIF()
ADD_SUBDIRECTORY(packaging/rpm-uln) ADD_SUBDIRECTORY(packaging/rpm-uln)
ADD_SUBDIRECTORY(packaging/rpm-oel)
ENDIF() ENDIF()
IF(UNIX) IF(UNIX)
......
revision-id: sergii@pisem.net-20140206205838-yowrr3g6hk8ntc8v revision-id: sergii@pisem.net-20140308113351-mkvpzkaclhoontiw
date: 2014-02-06 21:58:38 +0100 date: 2014-03-08 12:33:51 +0100
build-date: 2014-02-07 23:52:37 +0100 build-date: 2014-03-08 13:41:47 +0100
revno: 3994 revno: 4040
branch-nick: 10.0 branch-nick: 10.0
MySQL source 10.0.8 MySQL source 10.0.9
...@@ -4,5 +4,5 @@ ...@@ -4,5 +4,5 @@
# #
MYSQL_VERSION_MAJOR=10 MYSQL_VERSION_MAJOR=10
MYSQL_VERSION_MINOR=0 MYSQL_VERSION_MINOR=0
MYSQL_VERSION_PATCH=8 MYSQL_VERSION_PATCH=9
MYSQL_VERSION_EXTRA= MYSQL_VERSION_EXTRA=
...@@ -15,8 +15,7 @@ ...@@ -15,8 +15,7 @@
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/include
${CMAKE_BINARY_DIR}/pcre ${PCRE_INCLUDES}
${CMAKE_SOURCE_DIR}/pcre
${CMAKE_SOURCE_DIR}/mysys_ssl ${CMAKE_SOURCE_DIR}/mysys_ssl
${ZLIB_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR}
${SSL_INCLUDE_DIRS} ${SSL_INCLUDE_DIRS}
......
...@@ -915,6 +915,7 @@ static COMMANDS commands[] = { ...@@ -915,6 +915,7 @@ static COMMANDS commands[] = {
{ "MAKE_SET", 0, 0, 0, ""}, { "MAKE_SET", 0, 0, 0, ""},
{ "MAKEDATE", 0, 0, 0, ""}, { "MAKEDATE", 0, 0, 0, ""},
{ "MAKETIME", 0, 0, 0, ""}, { "MAKETIME", 0, 0, 0, ""},
{ "MASTER_GTID_WAIT", 0, 0, 0, ""},
{ "MASTER_POS_WAIT", 0, 0, 0, ""}, { "MASTER_POS_WAIT", 0, 0, 0, ""},
{ "MAX", 0, 0, 0, ""}, { "MAX", 0, 0, 0, ""},
{ "MBRCONTAINS", 0, 0, 0, ""}, { "MBRCONTAINS", 0, 0, 0, ""},
......
/* /*
Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -857,7 +857,7 @@ static int process_options(int argc, char *argv[], char *operation) ...@@ -857,7 +857,7 @@ static int process_options(int argc, char *argv[], char *operation)
strncat(buff, FN_DIRSEP, sizeof(buff) - strlen(buff) - 1); strncat(buff, FN_DIRSEP, sizeof(buff) - strlen(buff) - 1);
#endif #endif
buff[sizeof(buff) - 1]= 0; buff[sizeof(buff) - 1]= 0;
my_delete(opt_basedir, MYF(0)); my_free(opt_basedir);
opt_basedir= my_strdup(buff, MYF(MY_FAE)); opt_basedir= my_strdup(buff, MYF(MY_FAE));
} }
} }
......
...@@ -1047,7 +1047,7 @@ int main(int argc, char **argv) ...@@ -1047,7 +1047,7 @@ int main(int argc, char **argv)
for (i = 0; i < alter_table_cmds.elements ; i++) for (i = 0; i < alter_table_cmds.elements ; i++)
run_query((char*) dynamic_array_ptr(&alter_table_cmds, i)); run_query((char*) dynamic_array_ptr(&alter_table_cmds, i));
} }
ret= test(first_error); ret= MY_TEST(first_error);
end: end:
dbDisconnect(current_host); dbDisconnect(current_host);
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
** 10 Jun 2003: SET NAMES and --no-set-names by Alexander Barkov ** 10 Jun 2003: SET NAMES and --no-set-names by Alexander Barkov
*/ */
#define DUMP_VERSION "10.14" #define DUMP_VERSION "10.15"
#include <my_global.h> #include <my_global.h>
#include <my_sys.h> #include <my_sys.h>
...@@ -137,6 +137,12 @@ static uint opt_slave_data; ...@@ -137,6 +137,12 @@ static uint opt_slave_data;
static uint my_end_arg; static uint my_end_arg;
static char * opt_mysql_unix_port=0; static char * opt_mysql_unix_port=0;
static int first_error=0; static int first_error=0;
/*
multi_source is 0 if old server or 2 if server that support multi source
This is choosen this was as multi_source has 2 extra columns first in
SHOW ALL SLAVES STATUS.
*/
static uint multi_source= 0;
static DYNAMIC_STRING extended_row; static DYNAMIC_STRING extended_row;
#include <sslopt-vars.h> #include <sslopt-vars.h>
FILE *md_result_file= 0; FILE *md_result_file= 0;
...@@ -160,6 +166,8 @@ static void dynstr_set_checked(DYNAMIC_STRING *str, const char *init_str); ...@@ -160,6 +166,8 @@ static void dynstr_set_checked(DYNAMIC_STRING *str, const char *init_str);
static void dynstr_append_mem_checked(DYNAMIC_STRING *str, const char *append, static void dynstr_append_mem_checked(DYNAMIC_STRING *str, const char *append,
uint length); uint length);
static void dynstr_realloc_checked(DYNAMIC_STRING *str, ulong additional_size); static void dynstr_realloc_checked(DYNAMIC_STRING *str, ulong additional_size);
static int do_start_slave_sql(MYSQL *mysql_con);
/* /*
Constant for detection of default value of default_charset. Constant for detection of default value of default_charset.
If default_charset is equal to mysql_universal_client_charset, then If default_charset is equal to mysql_universal_client_charset, then
...@@ -1494,6 +1502,8 @@ static void free_resources() ...@@ -1494,6 +1502,8 @@ static void free_resources()
static void maybe_exit(int error) static void maybe_exit(int error)
{ {
if (opt_slave_data)
do_start_slave_sql(mysql);
if (!first_error) if (!first_error)
first_error= error; first_error= error;
if (ignore_errors) if (ignore_errors)
...@@ -3649,7 +3659,8 @@ static void dump_table(char *table, char *db) ...@@ -3649,7 +3659,8 @@ static void dump_table(char *table, char *db)
field->type == MYSQL_TYPE_BLOB || field->type == MYSQL_TYPE_BLOB ||
field->type == MYSQL_TYPE_LONG_BLOB || field->type == MYSQL_TYPE_LONG_BLOB ||
field->type == MYSQL_TYPE_MEDIUM_BLOB || field->type == MYSQL_TYPE_MEDIUM_BLOB ||
field->type == MYSQL_TYPE_TINY_BLOB)) ? 1 : 0; field->type == MYSQL_TYPE_TINY_BLOB ||
field->type == MYSQL_TYPE_GEOMETRY)) ? 1 : 0;
if (extended_insert && !opt_xml) if (extended_insert && !opt_xml)
{ {
if (i == 0) if (i == 0)
...@@ -3993,7 +4004,13 @@ static int dump_tablespaces(char* ts_where) ...@@ -3993,7 +4004,13 @@ static int dump_tablespaces(char* ts_where)
char *ubs; char *ubs;
char *endsemi; char *endsemi;
DBUG_ENTER("dump_tablespaces"); 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, init_dynamic_string_checked(&sqlbuf,
"SELECT LOGFILE_GROUP_NAME," "SELECT LOGFILE_GROUP_NAME,"
" FILE_NAME," " FILE_NAME,"
...@@ -4153,6 +4170,8 @@ static int dump_tablespaces(char* ts_where) ...@@ -4153,6 +4170,8 @@ static int dump_tablespaces(char* ts_where)
mysql_free_result(tableres); mysql_free_result(tableres);
dynstr_free(&sqlbuf); dynstr_free(&sqlbuf);
mysql_query(mysql, "set optimizer_switch=default");
DBUG_RETURN(0); DBUG_RETURN(0);
} }
...@@ -4735,7 +4754,8 @@ static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos) ...@@ -4735,7 +4754,8 @@ static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos)
} }
else else
{ {
if (mysql_query_with_error_report(mysql_con, &master, "SHOW MASTER STATUS")) if (mysql_query_with_error_report(mysql_con, &master,
"SHOW MASTER STATUS"))
return 1; return 1;
row= mysql_fetch_row(master); row= mysql_fetch_row(master);
...@@ -4780,29 +4800,37 @@ static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos) ...@@ -4780,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) static int do_stop_slave_sql(MYSQL *mysql_con)
{ {
MYSQL_RES *slave; MYSQL_RES *slave;
/* We need to check if the slave sql is running in the first place */ MYSQL_ROW row;
if (mysql_query_with_error_report(mysql_con, &slave, "SHOW SLAVE STATUS"))
if (mysql_query_with_error_report(mysql_con, &slave,
multi_source ?
"SHOW ALL SLAVES STATUS" :
"SHOW SLAVE STATUS"))
return(1); return(1);
else
/* Loop over all slaves */
while ((row= mysql_fetch_row(slave)))
{ {
MYSQL_ROW row= mysql_fetch_row(slave); if (row[11 + multi_source])
if (row && row[11])
{ {
/* if SLAVE SQL is not running, we don't stop it */ /* if SLAVE SQL is not running, we don't stop it */
if (!strcmp(row[11],"No")) if (strcmp(row[11 + multi_source], "No"))
{ {
mysql_free_result(slave); char query[160];
/* Silently assume that they don't have the slave running */ if (multi_source)
return(0); sprintf(query, "STOP SLAVE '%.80s' SQL_THREAD", row[0]);
else
strmov(query, "STOP SLAVE SQL_THREAD");
if (mysql_query_with_error_report(mysql_con, 0, query))
{
mysql_free_result(slave);
return 1;
}
} }
} }
} }
mysql_free_result(slave); mysql_free_result(slave);
/* now, stop slave if running */
if (mysql_query_with_error_report(mysql_con, 0, "STOP SLAVE SQL_THREAD"))
return(1);
return(0); return(0);
} }
...@@ -4811,7 +4839,10 @@ static int add_stop_slave(void) ...@@ -4811,7 +4839,10 @@ static int add_stop_slave(void)
if (opt_comments) if (opt_comments)
fprintf(md_result_file, fprintf(md_result_file,
"\n--\n-- stop slave statement to make a recovery dump)\n--\n\n"); "\n--\n-- stop slave statement to make a recovery dump)\n--\n\n");
fprintf(md_result_file, "STOP SLAVE;\n"); if (multi_source)
fprintf(md_result_file, "STOP ALL SLAVES;\n");
else
fprintf(md_result_file, "STOP SLAVE;\n");
return(0); return(0);
} }
...@@ -4820,16 +4851,24 @@ static int add_slave_statements(void) ...@@ -4820,16 +4851,24 @@ static int add_slave_statements(void)
if (opt_comments) if (opt_comments)
fprintf(md_result_file, fprintf(md_result_file,
"\n--\n-- start slave statement to make a recovery dump)\n--\n\n"); "\n--\n-- start slave statement to make a recovery dump)\n--\n\n");
fprintf(md_result_file, "START SLAVE;\n"); if (multi_source)
fprintf(md_result_file, "START ALL SLAVES;\n");
else
fprintf(md_result_file, "START SLAVE;\n");
return(0); return(0);
} }
static int do_show_slave_status(MYSQL *mysql_con) static int do_show_slave_status(MYSQL *mysql_con)
{ {
MYSQL_RES *UNINIT_VAR(slave); MYSQL_RES *UNINIT_VAR(slave);
MYSQL_ROW row;
const char *comment_prefix= const char *comment_prefix=
(opt_slave_data == MYSQL_OPT_SLAVE_DATA_COMMENTED_SQL) ? "-- " : ""; (opt_slave_data == MYSQL_OPT_SLAVE_DATA_COMMENTED_SQL) ? "-- " : "";
if (mysql_query_with_error_report(mysql_con, &slave, "SHOW SLAVE STATUS"))
if (mysql_query_with_error_report(mysql_con, &slave,
multi_source ?
"SHOW ALL SLAVES STATUS" :
"SHOW SLAVE STATUS"))
{ {
if (!ignore_errors) if (!ignore_errors)
{ {
...@@ -4839,10 +4878,10 @@ static int do_show_slave_status(MYSQL *mysql_con) ...@@ -4839,10 +4878,10 @@ static int do_show_slave_status(MYSQL *mysql_con)
mysql_free_result(slave); mysql_free_result(slave);
return 1; return 1;
} }
else
while ((row= mysql_fetch_row(slave)))
{ {
MYSQL_ROW row= mysql_fetch_row(slave); if (row[9 + multi_source] && row[21 + multi_source])
if (row && row[9] && row[21])
{ {
/* SHOW MASTER STATUS reports file and position */ /* SHOW MASTER STATUS reports file and position */
if (opt_comments) if (opt_comments)
...@@ -4850,54 +4889,70 @@ static int do_show_slave_status(MYSQL *mysql_con) ...@@ -4850,54 +4889,70 @@ static int do_show_slave_status(MYSQL *mysql_con)
"\n--\n-- Position to start replication or point-in-time " "\n--\n-- Position to start replication or point-in-time "
"recovery from (the master of this slave)\n--\n\n"); "recovery from (the master of this slave)\n--\n\n");
fprintf(md_result_file, "%sCHANGE MASTER TO ", comment_prefix); if (multi_source)
fprintf(md_result_file, "%sCHANGE MASTER '%.80s' TO ",
comment_prefix, row[0]);
else
fprintf(md_result_file, "%sCHANGE MASTER TO ", comment_prefix);
if (opt_include_master_host_port) if (opt_include_master_host_port)
{ {
if (row[1]) if (row[1 + multi_source])
fprintf(md_result_file, "MASTER_HOST='%s', ", row[1]); fprintf(md_result_file, "MASTER_HOST='%s', ", row[1 + multi_source]);
if (row[3]) if (row[3])
fprintf(md_result_file, "MASTER_PORT=%s, ", row[3]); fprintf(md_result_file, "MASTER_PORT=%s, ", row[3 + multi_source]);
} }
fprintf(md_result_file, fprintf(md_result_file,
"MASTER_LOG_FILE='%s', MASTER_LOG_POS=%s;\n", row[9], row[21]); "MASTER_LOG_FILE='%s', MASTER_LOG_POS=%s;\n",
row[9 + multi_source], row[21 + multi_source]);
check_io(md_result_file); check_io(md_result_file);
} }
mysql_free_result(slave);
} }
mysql_free_result(slave);
return 0; return 0;
} }
static int do_start_slave_sql(MYSQL *mysql_con) static int do_start_slave_sql(MYSQL *mysql_con)
{ {
MYSQL_RES *slave; MYSQL_RES *slave;
MYSQL_ROW row;
int error= 0;
DBUG_ENTER("do_start_slave_sql");
/* We need to check if the slave sql is stopped in the first place */ /* We need to check if the slave sql is stopped in the first place */
if (mysql_query_with_error_report(mysql_con, &slave, "SHOW SLAVE STATUS")) if (mysql_query_with_error_report(mysql_con, &slave,
return(1); multi_source ?
else "SHOW ALL SLAVES STATUS" :
"SHOW SLAVE STATUS"))
DBUG_RETURN(1);
while ((row= mysql_fetch_row(slave)))
{ {
MYSQL_ROW row= mysql_fetch_row(slave); DBUG_PRINT("info", ("Connection: '%s' status: '%s'",
if (row && row[11]) multi_source ? row[0] : "", row[11 + multi_source]));
if (row[11 + multi_source])
{ {
/* if SLAVE SQL is not running, we don't start it */ /* if SLAVE SQL is not running, we don't start it */
if (!strcmp(row[11],"Yes")) if (strcmp(row[11 + multi_source], "Yes"))
{ {
mysql_free_result(slave); char query[160];
/* Silently assume that they don't have the slave running */ if (multi_source)
return(0); sprintf(query, "START SLAVE '%.80s'", row[0]);
else
strmov(query, "START SLAVE");
if (mysql_query_with_error_report(mysql_con, 0, query))
{
fprintf(stderr, "%s: Error: Unable to start slave '%s'\n",
my_progname_short, multi_source ? row[0] : "");
error= 1;
}
} }
} }
} }
mysql_free_result(slave); mysql_free_result(slave);
DBUG_RETURN(error);
/* now, start slave if stopped */
if (mysql_query_with_error_report(mysql_con, 0, "START SLAVE"))
{
fprintf(stderr, "%s: Error: Unable to start slave\n", my_progname_short);
return 1;
}
return(0);
} }
...@@ -5575,6 +5630,10 @@ int main(int argc, char **argv) ...@@ -5575,6 +5630,10 @@ int main(int argc, char **argv)
if (!path) if (!path)
write_header(md_result_file, *argv); write_header(md_result_file, *argv);
/* Check if the server support multi source */
if (mysql_get_server_version(mysql) >= 100000)
multi_source= 2;
if (opt_slave_data && do_stop_slave_sql(mysql)) if (opt_slave_data && do_stop_slave_sql(mysql))
goto err; goto err;
...@@ -5654,10 +5713,6 @@ int main(int argc, char **argv) ...@@ -5654,10 +5713,6 @@ int main(int argc, char **argv)
dump_databases(argv); dump_databases(argv);
} }
/* if --dump-slave , start the slave sql thread */
if (opt_slave_data && do_start_slave_sql(mysql))
goto err;
/* add 'START SLAVE' to end of dump */ /* add 'START SLAVE' to end of dump */
if (opt_slave_apply && add_slave_statements()) if (opt_slave_apply && add_slave_statements())
goto err; goto err;
...@@ -5673,9 +5728,6 @@ int main(int argc, char **argv) ...@@ -5673,9 +5728,6 @@ int main(int argc, char **argv)
if (opt_delete_master_logs && purge_bin_logs_to(mysql, bin_log_name)) if (opt_delete_master_logs && purge_bin_logs_to(mysql, bin_log_name))
goto err; goto err;
#ifdef HAVE_SMEM
my_free(shared_memory_base_name);
#endif
/* /*
No reason to explicitely COMMIT the transaction, neither to explicitely No reason to explicitely COMMIT the transaction, neither to explicitely
UNLOCK TABLES: these will be automatically be done by the server when we UNLOCK TABLES: these will be automatically be done by the server when we
...@@ -5683,6 +5735,14 @@ int main(int argc, char **argv) ...@@ -5683,6 +5735,14 @@ int main(int argc, char **argv)
server. server.
*/ */
err: err:
/* if --dump-slave , start the slave sql thread */
if (opt_slave_data && do_start_slave_sql(mysql))
goto err;
#ifdef HAVE_SMEM
my_free(shared_memory_base_name);
#endif
dbDisconnect(current_host); dbDisconnect(current_host);
if (!path) if (!path)
write_footer(md_result_file); write_footer(md_result_file);
......
...@@ -528,6 +528,7 @@ struct st_command ...@@ -528,6 +528,7 @@ struct st_command
{ {
char *query, *query_buf,*first_argument,*last_argument,*end; char *query, *query_buf,*first_argument,*last_argument,*end;
DYNAMIC_STRING content; DYNAMIC_STRING content;
DYNAMIC_STRING eval_query;
int first_word_len, query_len; int first_word_len, query_len;
my_bool abort_on_error, used_replace; my_bool abort_on_error, used_replace;
struct st_expected_errors expected_errors; struct st_expected_errors expected_errors;
...@@ -1399,6 +1400,8 @@ void free_used_memory() ...@@ -1399,6 +1400,8 @@ void free_used_memory()
{ {
struct st_command **q= dynamic_element(&q_lines, i, struct st_command**); struct st_command **q= dynamic_element(&q_lines, i, struct st_command**);
my_free((*q)->query_buf); my_free((*q)->query_buf);
if ((*q)->eval_query.str)
dynstr_free(&(*q)->eval_query);
if ((*q)->content.str) if ((*q)->content.str)
dynstr_free(&(*q)->content); dynstr_free(&(*q)->content);
my_free((*q)); my_free((*q));
...@@ -8342,7 +8345,6 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags) ...@@ -8342,7 +8345,6 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
DYNAMIC_STRING ds_result; DYNAMIC_STRING ds_result;
DYNAMIC_STRING ds_sorted; DYNAMIC_STRING ds_sorted;
DYNAMIC_STRING ds_warnings; DYNAMIC_STRING ds_warnings;
DYNAMIC_STRING eval_query;
char *query; char *query;
int query_len; int query_len;
my_bool view_created= 0, sp_created= 0; my_bool view_created= 0, sp_created= 0;
...@@ -8365,10 +8367,14 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags) ...@@ -8365,10 +8367,14 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
if (command->type == Q_EVAL || command->type == Q_SEND_EVAL || if (command->type == Q_EVAL || command->type == Q_SEND_EVAL ||
command->type == Q_EVALP) command->type == Q_EVALP)
{ {
init_dynamic_string(&eval_query, "", command->query_len+256, 1024); if (!command->eval_query.str)
do_eval(&eval_query, command->query, command->end, FALSE); init_dynamic_string(&command->eval_query, "", command->query_len + 256,
query = eval_query.str; 1024);
query_len = eval_query.length; else
dynstr_set(&command->eval_query, 0);
do_eval(&command->eval_query, command->query, command->end, FALSE);
query= command->eval_query.str;
query_len= command->eval_query.length;
} }
else else
{ {
...@@ -8536,8 +8542,6 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags) ...@@ -8536,8 +8542,6 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
dynstr_free(&ds_warnings); dynstr_free(&ds_warnings);
ds_warn= 0; ds_warn= 0;
if (command->type == Q_EVAL || command->type == Q_SEND_EVAL)
dynstr_free(&eval_query);
if (display_result_sorted) if (display_result_sorted)
{ {
...@@ -8941,7 +8945,7 @@ int main(int argc, char **argv) ...@@ -8941,7 +8945,7 @@ int main(int argc, char **argv)
my_init_dynamic_array(&q_lines, sizeof(struct st_command*), 1024, 1024, MYF(0)); my_init_dynamic_array(&q_lines, sizeof(struct st_command*), 1024, 1024, MYF(0));
if (my_hash_init2(&var_hash, 64, charset_info, 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"); die("Variable hash initialization failed");
var_set_string("MYSQL_SERVER_VERSION", MYSQL_SERVER_VERSION); var_set_string("MYSQL_SERVER_VERSION", MYSQL_SERVER_VERSION);
......
#
# Wrapper for CPackRPM.cmake
#
# load the original CPackRPM.cmake
set(orig_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
unset(CMAKE_MODULE_PATH)
include(CPackRPM)
set(CMAKE_MODULE_PATH ${orig_CMAKE_MODULE_PATH})
# per-component cleanup
foreach(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLICTS AUTOPROV AUTOREQ AUTOREQPROV)
unset(TMP_RPM_${_RPM_SPEC_HEADER})
unset(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
endforeach()
...@@ -23,14 +23,14 @@ SET(CPACK_COMPONENT_SHAREDLIBRARIES_GROUP "shared") ...@@ -23,14 +23,14 @@ SET(CPACK_COMPONENT_SHAREDLIBRARIES_GROUP "shared")
SET(CPACK_COMPONENT_COMMON_GROUP "common") SET(CPACK_COMPONENT_COMMON_GROUP "common")
SET(CPACK_COMPONENT_COMPAT_GROUP "compat") SET(CPACK_COMPONENT_COMPAT_GROUP "compat")
SET(CPACK_COMPONENTS_ALL Server ManPagesServer IniFiles Server_Scripts SET(CPACK_COMPONENTS_ALL Server ManPagesServer IniFiles Server_Scripts
SupportFiles Development ManPagesDevelopment SupportFiles Development ManPagesDevelopment
ManPagesTest Readme ManPagesClient Test ManPagesTest Readme ManPagesClient Test
Common Client SharedLibraries) Common Client SharedLibraries)
SET(CPACK_RPM_PACKAGE_NAME "MariaDB") SET(CPACK_RPM_PACKAGE_NAME "MariaDB")
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${VERSION}-${RPM}-${CMAKE_SYSTEM_PROCESSOR}") SET(CPACK_PACKAGE_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${VERSION}-${RPM}-${CMAKE_SYSTEM_PROCESSOR}")
SET(CPACK_RPM_PACKAGE_RELEASE 1) # FIX: add distribution name here SET(CPACK_RPM_PACKAGE_RELEASE "1%{?dist}")
SET(CPACK_RPM_PACKAGE_LICENSE "GPL") SET(CPACK_RPM_PACKAGE_LICENSE "GPL")
SET(CPACK_RPM_PACKAGE_RELOCATABLE FALSE) SET(CPACK_RPM_PACKAGE_RELOCATABLE FALSE)
SET(CPACK_RPM_PACKAGE_GROUP "Applications/Databases") SET(CPACK_RPM_PACKAGE_GROUP "Applications/Databases")
...@@ -94,55 +94,128 @@ SET(CPACK_RPM_compat_USER_FILELIST ${ignored}) ...@@ -94,55 +94,128 @@ SET(CPACK_RPM_compat_USER_FILELIST ${ignored})
SET(CPACK_RPM_devel_USER_FILELIST ${ignored}) SET(CPACK_RPM_devel_USER_FILELIST ${ignored})
SET(CPACK_RPM_test_USER_FILELIST ${ignored}) SET(CPACK_RPM_test_USER_FILELIST ${ignored})
SET(CPACK_RPM_client_PACKAGE_OBSOLETES "mysql-client MySQL-client MySQL-OurDelta-client") # "set/append array" - append a set of strings, separated by a space
SET(CPACK_RPM_client_PACKAGE_PROVIDES "MySQL-client mysql-client") MACRO(SETA var)
FOREACH(v ${ARGN})
SET(${var} "${${var}} ${v}")
ENDFOREACH()
ENDMACRO(SETA)
SETA(CPACK_RPM_client_PACKAGE_OBSOLETES
"mysql-client"
"MySQL-client"
"MySQL-OurDelta-client")
SETA(CPACK_RPM_client_PACKAGE_PROVIDES
"MySQL-client"
"mysql-client")
SETA(CPACK_RPM_devel_PACKAGE_OBSOLETES
"MySQL-devel"
"MySQL-OurDelta-devel")
SETA(CPACK_RPM_devel_PACKAGE_PROVIDES
"MySQL-devel")
SETA(CPACK_RPM_server_PACKAGE_OBSOLETES
"MariaDB"
"MySQL"
"mysql-server"
"MySQL-server"
"MySQL-OurDelta-server")
SETA(CPACK_RPM_server_PACKAGE_PROVIDES
"MariaDB"
"MySQL"
"MySQL-server"
"msqlormysql"
"mysql-server")
SETA(CPACK_RPM_shared_PACKAGE_OBSOLETES
"mysql-shared"
"MySQL-shared-standard"
"MySQL-shared-pro"
"MySQL-shared-pro-cert"
"MySQL-shared-pro-gpl"
"MySQL-shared-pro-gpl-cert"
"MySQL-shared"
"MySQL-OurDelta-shared")
SETA(CPACK_RPM_shared_PACKAGE_PROVIDES
"MySQL-shared"
"mysql-shared")
SETA(CPACK_RPM_test_PACKAGE_OBSOLETES
"MySQL-test"
"MySQL-OurDelta-test")
SETA(CPACK_RPM_test_PACKAGE_PROVIDES
"MySQL-test")
# this is a workaround for CPackRPM.cmake (as of 2.8.8) bug.
# If a package group does not specify OBSOLETES/REQUIRES the values of the
# previous (alphabetically) group will apply.
SET(CPACK_RPM_common_PACKAGE_OBSOLETES "MySQL-common")
SET(CPACK_RPM_common_PACKAGE_PROVIDES "MariaDB-common")
SET(CPACK_RPM_devel_PACKAGE_OBSOLETES "mysql-devel MySQL-devel MySQL-OurDelta-devel")
SET(CPACK_RPM_devel_PACKAGE_PROVIDES "MySQL-devel mysql-devel")
SET(CPACK_RPM_server_PACKAGE_OBSOLETES "MariaDB MySQL mysql-server MySQL-server MySQL-OurDelta-server")
SET(CPACK_RPM_server_PACKAGE_PROVIDES "MariaDB MySQL MySQL-server msqlormysql mysql-server")
SET(CPACK_RPM_server_PRE_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-prein.sh) SET(CPACK_RPM_server_PRE_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-prein.sh)
SET(CPACK_RPM_server_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-preun.sh) SET(CPACK_RPM_server_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-preun.sh)
SET(CPACK_RPM_server_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-postin.sh) SET(CPACK_RPM_server_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-postin.sh)
SET(CPACK_RPM_server_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-postun.sh) SET(CPACK_RPM_server_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-postun.sh)
SET(CPACK_RPM_shared_PACKAGE_OBSOLETES "mysql-shared MySQL-shared-standard MySQL-shared-pro MySQL-shared-pro-cert MySQL-shared-pro-gpl MySQL-shared-pro-gpl-cert MySQL-shared MySQL-OurDelta-shared mysql-libs")
SET(CPACK_RPM_shared_PACKAGE_PROVIDES "MySQL-shared mysql-shared")
SET(CPACK_RPM_shared_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh) SET(CPACK_RPM_shared_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)
SET(CPACK_RPM_shared_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh) SET(CPACK_RPM_shared_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)
SET(CPACK_RPM_test_PACKAGE_OBSOLETES "mysql-test MySQL-test MySQL-OurDelta-test")
SET(CPACK_RPM_test_PACKAGE_PROVIDES "MySQL-test mysql-test")
# Argh! Different distributions call packages differently, to be a drop-in replacement
# we have to fake distribution-speficic dependencies
MACRO(ALTERNATIVE_NAME real alt) MACRO(ALTERNATIVE_NAME real alt)
SET(ver "%{version}-%{release}")
IF (${epoch})
SET(ver "${epoch}:${ver}")
ENDIF()
SET(p "CPACK_RPM_${real}_PACKAGE_PROVIDES") SET(p "CPACK_RPM_${real}_PACKAGE_PROVIDES")
SET(${p} "${${p}} ${alt} ${alt}(x86-32) ${alt}(x86-64) config(${alt})") SET(${p} "${${p}} ${alt} = ${ver} ${alt}%{?_isa} = ${ver} config(${alt}) = ${ver}")
SET(o "CPACK_RPM_${real}_PACKAGE_OBSOLETES") SET(o "CPACK_RPM_${real}_PACKAGE_OBSOLETES")
SET(${o} "${${o}} ${alt}") SET(${o} "${${o}} ${alt} ${alt}%{_isa}")
ENDMACRO(ALTERNATIVE_NAME) ENDMACRO(ALTERNATIVE_NAME)
# Argh! Different distributions call packages differently, to be a drop-in
# replacement we have to fake distribution-speficic dependencies
ALTERNATIVE_NAME("devel" "mysql-devel")
ALTERNATIVE_NAME("server" "mysql-server")
ALTERNATIVE_NAME("test" "mysql-test")
IF(RPM MATCHES "(rhel|centos)5") IF(RPM MATCHES "(rhel|centos)5")
ALTERNATIVE_NAME("shared" "mysql") ALTERNATIVE_NAME("shared" "mysql")
ELSEIF(RPM MATCHES "(rhel|centos)6") ELSEIF(RPM MATCHES "(rhel|centos)6")
ALTERNATIVE_NAME("client" "mysql") ALTERNATIVE_NAME("client" "mysql")
ALTERNATIVE_NAME("shared" "mysql-libs") ALTERNATIVE_NAME("shared" "mysql-libs")
ELSEIF(RPM MATCHES "fedora") ELSEIF(RPM MATCHES "fedora")
SET(epoch 1) # this is fedora
ALTERNATIVE_NAME("client" "mariadb")
ALTERNATIVE_NAME("client" "mysql") ALTERNATIVE_NAME("client" "mysql")
ALTERNATIVE_NAME("devel" "mariadb-devel")
ALTERNATIVE_NAME("server" "mariadb-server")
ALTERNATIVE_NAME("shared" "mariadb-libs")
ALTERNATIVE_NAME("shared" "mysql-libs") ALTERNATIVE_NAME("shared" "mysql-libs")
ALTERNATIVE_NAME("test" "mariadb-test")
SET(CPACK_RPM_common_PACKAGE_CONFLICTS "mariadb-libs < 1:%{version}-%{release}")
ENDIF() ENDIF()
# workaround for lots of perl dependencies added by rpmbuild # workaround for lots of perl dependencies added by rpmbuild
SET(CPACK_RPM_test_PACKAGE_PROVIDES "${CPACK_RPM_test_PACKAGE_PROVIDES} perl(lib::mtr_gcov.pl) perl(lib::mtr_gprof.pl) perl(lib::mtr_io.pl) perl(lib::mtr_misc.pl) perl(lib::mtr_process.pl) perl(lib::v1/mtr_cases.pl) perl(lib::v1/mtr_gcov.pl) perl(lib::v1/mtr_gprof.pl) perl(lib::v1/mtr_im.pl) perl(lib::v1/mtr_io.pl) perl(lib::v1/mtr_match.pl) perl(lib::v1/mtr_misc.pl) perl(lib::v1/mtr_process.pl) perl(lib::v1/mtr_report.pl) perl(lib::v1/mtr_stress.pl) perl(lib::v1/mtr_timer.pl) perl(lib::v1/mtr_unique.pl) perl(mtr_cases) perl(mtr_io.pl) perl(mtr_match) perl(mtr_misc.pl) perl(mtr_report) perl(mtr_results) perl(mtr_unique)") SETA(CPACK_RPM_test_PACKAGE_PROVIDES
"perl(lib::mtr_gcov.pl)"
"perl(lib::mtr_gprof.pl)"
"perl(lib::mtr_io.pl)"
"perl(lib::mtr_misc.pl)"
"perl(lib::mtr_process.pl)"
"perl(lib::v1/mtr_cases.pl)"
"perl(lib::v1/mtr_gcov.pl)"
"perl(lib::v1/mtr_gprof.pl)"
"perl(lib::v1/mtr_im.pl)"
"perl(lib::v1/mtr_io.pl)"
"perl(lib::v1/mtr_match.pl)"
"perl(lib::v1/mtr_misc.pl)"
"perl(lib::v1/mtr_process.pl)"
"perl(lib::v1/mtr_report.pl)"
"perl(lib::v1/mtr_stress.pl)"
"perl(lib::v1/mtr_timer.pl)"
"perl(lib::v1/mtr_unique.pl)"
"perl(mtr_cases)"
"perl(mtr_io.pl)"
"perl(mtr_match)"
"perl(mtr_misc.pl)"
"perl(mtr_report)"
"perl(mtr_results)"
"perl(mtr_unique)")
# If we want to build build MariaDB-shared-compat, # If we want to build build MariaDB-shared-compat,
# extract compat libraries from MariaDB-shared-5.3 rpm # extract compat libraries from MariaDB-shared-5.3 rpm
...@@ -170,7 +243,6 @@ IF (compat_rpm) ...@@ -170,7 +243,6 @@ IF (compat_rpm)
ENDIF() ENDIF()
ENDIF(compat_rpm) ENDIF(compat_rpm)
SET(CPACK_RPM_compat_PACKAGE_REQUIRES "/bin/sh") # to mask CPACK_RPM_PACKAGE_REQUIRES
SET(CPACK_RPM_compat_PACKAGE_PROVIDES "mysql-libs = 5.3.5") # exact version doesn't matter as long as it greater than 5.1 SET(CPACK_RPM_compat_PACKAGE_PROVIDES "mysql-libs = 5.3.5") # exact version doesn't matter as long as it greater than 5.1
SET(CPACK_RPM_compat_PACKAGE_OBSOLETES "mysql-libs < 5.3.5") SET(CPACK_RPM_compat_PACKAGE_OBSOLETES "mysql-libs < 5.3.5")
......
...@@ -397,6 +397,7 @@ FUNCTION(INSTALL_MYSQL_TEST from to) ...@@ -397,6 +397,7 @@ FUNCTION(INSTALL_MYSQL_TEST from to)
PATTERN "*.vcxproj.filters" EXCLUDE PATTERN "*.vcxproj.filters" EXCLUDE
PATTERN "*.vcxproj.user" EXCLUDE PATTERN "*.vcxproj.user" EXCLUDE
PATTERN "CTest" EXCLUDE PATTERN "CTest" EXCLUDE
PATTERN "*~" EXCLUDE
) )
ENDIF() ENDIF()
ENDFUNCTION() ENDFUNCTION()
...@@ -46,7 +46,7 @@ ELSE() ...@@ -46,7 +46,7 @@ ELSE()
ENDIF() ENDIF()
SET(WITH_JEMALLOC ${WITH_JEMALLOC_DEFAULT} CACHE STRING 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) MACRO (CHECK_JEMALLOC)
IF(WITH_JEMALLOC STREQUAL "system" OR WITH_JEMALLOC STREQUAL "yes") IF(WITH_JEMALLOC STREQUAL "system" OR WITH_JEMALLOC STREQUAL "yes")
......
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. # the Free Software Foundation; version 2 of the License.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Add executable plus some additional MySQL specific stuff # Add executable plus some additional MySQL specific stuff
# Usage (same as for standard CMake's ADD_EXECUTABLE) # Usage (same as for standard CMake's ADD_EXECUTABLE)
# #
# MYSQL_ADD_EXECUTABLE(target source1...sourceN) # MYSQL_ADD_EXECUTABLE(target source1...sourceN)
# #
# MySQL specifics: # MySQL specifics:
# - instruct CPack to install executable under ${CMAKE_INSTALL_PREFIX}/bin directory # - instruct CPack to install executable under ${CMAKE_INSTALL_PREFIX}/bin directory
# On Windows : # On Windows :
# - add version resource # - add version resource
# - instruct CPack to do autenticode signing if SIGNCODE is set # - instruct CPack to do autenticode signing if SIGNCODE is set
INCLUDE(cmake_parse_arguments) INCLUDE(cmake_parse_arguments)
FUNCTION (MYSQL_ADD_EXECUTABLE) FUNCTION (MYSQL_ADD_EXECUTABLE)
# Pass-through arguments for ADD_EXECUTABLE # Pass-through arguments for ADD_EXECUTABLE
MYSQL_PARSE_ARGUMENTS(ARG MYSQL_PARSE_ARGUMENTS(ARG
"WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL;DESTINATION;COMPONENT" "WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL;DESTINATION;COMPONENT"
"" ""
${ARGN} ${ARGN}
) )
LIST(GET ARG_DEFAULT_ARGS 0 target) LIST(GET ARG_DEFAULT_ARGS 0 target)
LIST(REMOVE_AT ARG_DEFAULT_ARGS 0) LIST(REMOVE_AT ARG_DEFAULT_ARGS 0)
SET(sources ${ARG_DEFAULT_ARGS}) SET(sources ${ARG_DEFAULT_ARGS})
ADD_VERSION_INFO(${target} EXECUTABLE sources) ADD_VERSION_INFO(${target} EXECUTABLE sources)
ADD_EXECUTABLE(${target} ${ARG_WIN32} ${ARG_MACOSX_BUNDLE} ${ARG_EXCLUDE_FROM_ALL} ${sources}) ADD_EXECUTABLE(${target} ${ARG_WIN32} ${ARG_MACOSX_BUNDLE} ${ARG_EXCLUDE_FROM_ALL} ${sources})
# tell CPack where to install # tell CPack where to install
IF(NOT ARG_EXCLUDE_FROM_ALL) IF(NOT ARG_EXCLUDE_FROM_ALL)
IF(NOT ARG_DESTINATION) IF(NOT ARG_DESTINATION)
SET(ARG_DESTINATION ${INSTALL_BINDIR}) SET(ARG_DESTINATION ${INSTALL_BINDIR})
ENDIF() ENDIF()
IF(ARG_COMPONENT) IF(ARG_COMPONENT)
SET(COMP COMPONENT ${ARG_COMPONENT}) SET(COMP COMPONENT ${ARG_COMPONENT})
...@@ -50,7 +50,7 @@ FUNCTION (MYSQL_ADD_EXECUTABLE) ...@@ -50,7 +50,7 @@ FUNCTION (MYSQL_ADD_EXECUTABLE)
SET(COMP COMPONENT ${MYSQL_INSTALL_COMPONENT}) SET(COMP COMPONENT ${MYSQL_INSTALL_COMPONENT})
ELSE() ELSE()
SET(COMP COMPONENT Client) SET(COMP COMPONENT Client)
ENDIF() ENDIF()
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} ${COMP}) MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} ${COMP})
ENDIF() ENDIF()
ENDFUNCTION() ENDFUNCTION()
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) ...@@ -37,8 +37,7 @@ MACRO(MYSQL_ADD_PLUGIN)
# Add common include directories # Add common include directories
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/sql ${CMAKE_SOURCE_DIR}/sql
${CMAKE_BINARY_DIR}/pcre ${PCRE_INCLUDES}
${CMAKE_SOURCE_DIR}/pcre
${SSL_INCLUDE_DIRS} ${SSL_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIR}) ${ZLIB_INCLUDE_DIR})
......
// Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. // Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation; version 2 of the License. // the Free Software Foundation; version 2 of the License.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <windows.h> #include <windows.h>
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@ FILEVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@
PRODUCTVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@ PRODUCTVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0 FILEFLAGS 0
FILEOS VOS__WINDOWS32 FILEOS VOS__WINDOWS32
FILETYPE @FILETYPE@ FILETYPE @FILETYPE@
FILESUBTYPE VFT2_UNKNOWN FILESUBTYPE VFT2_UNKNOWN
BEGIN BEGIN
BLOCK "StringFileInfo" BLOCK "StringFileInfo"
BEGIN BEGIN
BLOCK "040904E4" BLOCK "040904E4"
BEGIN BEGIN
VALUE "FileVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0" VALUE "FileVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0"
VALUE "ProductVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0" VALUE "ProductVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"
BEGIN BEGIN
VALUE "Translation", 0x409, 1252 VALUE "Translation", 0x409, 1252
END END
END END
# Copyright (c) 2009 Sun Microsystems, Inc. # Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
# Use is subject to license terms.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
......
/* Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. /* Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -618,7 +618,7 @@ ...@@ -618,7 +618,7 @@
#cmakedefine DEFAULT_CHARSET_HOME "@DEFAULT_CHARSET_HOME@" #cmakedefine DEFAULT_CHARSET_HOME "@DEFAULT_CHARSET_HOME@"
#cmakedefine PLUGINDIR "@PLUGINDIR@" #cmakedefine PLUGINDIR "@PLUGINDIR@"
#cmakedefine DEFAULT_SYSCONFDIR "@DEFAULT_SYSCONFDIR@" #cmakedefine DEFAULT_SYSCONFDIR "@DEFAULT_SYSCONFDIR@"
#cmakedefine DEFAULT_TMPDIR "@DEFAULT_TMPDIR@" #cmakedefine DEFAULT_TMPDIR @DEFAULT_TMPDIR@
#cmakedefine SO_EXT "@CMAKE_SHARED_MODULE_SUFFIX@" #cmakedefine SO_EXT "@CMAKE_SHARED_MODULE_SUFFIX@"
......
...@@ -2,7 +2,7 @@ usr/lib/mysql/plugin/auth_pam.so ...@@ -2,7 +2,7 @@ usr/lib/mysql/plugin/auth_pam.so
usr/lib/mysql/plugin/auth_socket.so usr/lib/mysql/plugin/auth_socket.so
usr/lib/mysql/plugin/ha_sequence.so usr/lib/mysql/plugin/ha_sequence.so
usr/lib/mysql/plugin/ha_sphinx.so usr/lib/mysql/plugin/ha_sphinx.so
usr/lib/mysql/plugin/ha_xtradb.so usr/lib/mysql/plugin/ha_innodb.so
usr/lib/mysql/plugin/handlersocket.so usr/lib/mysql/plugin/handlersocket.so
usr/lib/mysql/plugin/locales.so usr/lib/mysql/plugin/locales.so
usr/lib/mysql/plugin/metadata_lock_info.so usr/lib/mysql/plugin/metadata_lock_info.so
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment