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

Imported upstream 5.5.36

parent cdd04139
......@@ -328,8 +328,15 @@ 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
......@@ -407,6 +414,7 @@ IF(NOT WITHOUT_SERVER)
ADD_SUBDIRECTORY(internal)
ENDIF()
ADD_SUBDIRECTORY(packaging/rpm-uln)
ADD_SUBDIRECTORY(packaging/rpm-oel)
ENDIF()
IF(UNIX)
......
revision-id: sergii@pisem.net-20140128095818-vsggmte8np40osk4
date: 2014-01-28 10:58:18 +0100
build-date: 2014-01-28 15:14:30 +0100
revno: 4052
revision-id: sergii@pisem.net-20140222215120-1thda2f7s8luzgaq
date: 2014-02-22 22:51:20 +0100
build-date: 2014-02-24 00:50:31 +0100
revno: 4095
branch-nick: 5.5
MySQL source 5.5.35
MySQL source 5.5.36
MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=5
MYSQL_VERSION_PATCH=35
MYSQL_VERSION_PATCH=36
MYSQL_VERSION_EXTRA=
/*
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));
}
}
......
/*
Copyright (c) 2001, 2012, Oracle and/or its affiliates.
Copyright (c) 2001, 2011, Oracle and/or its affiliates.
Copyright (c) 2010, 2011, Monty Program Ab.
This program is free software; you can redistribute it and/or modify
......
......@@ -160,6 +160,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
......@@ -1494,6 +1496,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)
......@@ -3642,7 +3646,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)
......@@ -5646,10 +5651,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;
......@@ -5665,9 +5666,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
......@@ -5675,6 +5673,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);
......
......@@ -521,6 +521,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;
......@@ -1392,6 +1393,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));
......@@ -8315,7 +8318,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;
......@@ -8337,10 +8339,14 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
*/
if (command->type == Q_EVAL || command->type == Q_SEND_EVAL)
{
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
{
......@@ -8498,8 +8504,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)
{
......
#
# 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()
......@@ -30,7 +30,7 @@ SET(CPACK_COMPONENTS_ALL Server ManPagesServer IniFiles Server_Scripts
SET(CPACK_RPM_PACKAGE_NAME "MariaDB")
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_RELOCATABLE FALSE)
SET(CPACK_RPM_PACKAGE_GROUP "Applications/Databases")
......@@ -94,55 +94,128 @@ SET(CPACK_RPM_compat_USER_FILELIST ${ignored})
SET(CPACK_RPM_devel_USER_FILELIST ${ignored})
SET(CPACK_RPM_test_USER_FILELIST ${ignored})
SET(CPACK_RPM_client_PACKAGE_OBSOLETES "mysql-client MySQL-client MySQL-OurDelta-client")
SET(CPACK_RPM_client_PACKAGE_PROVIDES "MySQL-client mysql-client")
# "set/append array" - append a set of strings, separated by a space
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_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_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_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)
SET(ver "%{version}-%{release}")
IF (${epoch})
SET(ver "${epoch}:${ver}")
ENDIF()
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} "${${o}} ${alt}")
SET(${o} "${${o}} ${alt} ${alt}%{_isa}")
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")
ALTERNATIVE_NAME("shared" "mysql")
ELSEIF(RPM MATCHES "(rhel|centos)6")
ALTERNATIVE_NAME("client" "mysql")
ALTERNATIVE_NAME("shared" "mysql-libs")
ELSEIF(RPM MATCHES "fedora")
SET(epoch 1) # this is fedora
ALTERNATIVE_NAME("client" "mariadb")
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("test" "mariadb-test")
SET(CPACK_RPM_common_PACKAGE_CONFLICTS "mariadb-libs < 1:%{version}-%{release}")
ENDIF()
# 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,
# extract compat libraries from MariaDB-shared-5.3 rpm
......@@ -170,7 +243,6 @@ IF (compat_rpm)
ENDIF()
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_OBSOLETES "mysql-libs < 5.3.5")
......
......@@ -397,6 +397,7 @@ FUNCTION(INSTALL_MYSQL_TEST from to)
PATTERN "*.vcxproj.filters" EXCLUDE
PATTERN "*.vcxproj.user" EXCLUDE
PATTERN "CTest" EXCLUDE
PATTERN "*~" EXCLUDE
)
ENDIF()
ENDFUNCTION()
# 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
......
/* 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
......@@ -619,7 +619,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@"
......
# 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
......
/*
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
......
/*
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
......
/*
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
......
/*
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
......
/*
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
......
# 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
......
/*
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
......
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