Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Faustin Lammler
mariadb-10.1
Commits
18012179
Commit
18012179
authored
Mar 02, 2015
by
Otto Kekäläinen
Browse files
Imported Upstream version 10.0.17
parent
0a72492b
Changes
713
Hide whitespace changes
Inline
Side-by-side
.gitattributes
0 → 100644
View file @
18012179
*.c diff=cpp
*.h diff=cpp
*.cc diff=cpp
*.ic diff=cpp
*.cpp diff=cpp
.gitignore
0 → 100644
View file @
18012179
*-t
*.a
*.ctest
*.o
*.reject
*.so
*.so.*
*.spec
*~
.*.swp
*.ninja
.ninja_*
.gdb_history
errmsg.sys
typescript
CMakeCache.txt
CMakeFiles/
CPackConfig.cmake
CPackSourceConfig.cmake
CTestTestfile.cmake
Docs/INFO_BIN
Docs/INFO_SRC
Makefile
TAGS
Testing/
VERSION.dep
configure
client/async_example
client/mysql
client/mysql_plugin
client/mysql_upgrade
client/mysqladmin
client/mysqlbinlog
client/mysqlcheck
client/mysqldump
client/mysqlimport
client/mysqlshow
client/mysqlslap
client/mysqltest
cmake_install.cmake
dbug/*.r
dbug/factorial
dbug/tests
dbug/user.ps
dbug/user.t
extra/comp_err
extra/innochecksum
extra/jemalloc/build/
extra/jemalloc/tmp/
extra/my_print_defaults
extra/mysql_waitpid
extra/perror
extra/replace
extra/resolve_stack_dump
extra/resolveip
import_executables.cmake
include/*.h.tmp
include/config.h
include/my_config.h
include/mysql_version.h
include/mysqld_ername.h
include/mysqld_error.h
include/sql_state.h
info_macros.cmake
libmysql*/libmysql*_exports_file.cc
libmysql*/merge_archives_mysql*.cmake
libmysql*/mysql*_depends.c
libmysql/libmysql_versions.ld
libmysqld/examples/mysql_client_test_embedded
libmysqld/examples/mysql_embedded
libmysqld/examples/mysqltest_embedded
make_dist.cmake
mariadb-*.*.*.tar.gz
mariadb-*.*.*/
mysql-test/lib/My/SafeProcess/my_safe_process
mysql-test/mtr
mysql-test/mysql-test-run
mysql-test/var
mysys/thr_lock
mysys/thr_timer
packaging/rpm-oel/mysql.spec
packaging/rpm-uln/mysql.10.0.11.spec
packaging/solaris/postinstall-solaris
pcre/config.h
pcre/pcre*test.sh
pcre/pcre.h
pcre/pcre_chartables.c
pcre/pcregrep
pcre/pcretest
pcre/test*grep
scripts/comp_sql
scripts/make_binary_distribution
scripts/msql2mysql
scripts/mysql_config
scripts/mysql_config.pl
scripts/mysql_convert_table_format
scripts/mysql_find_rows
scripts/mysql_fix_extensions
scripts/mysql_fix_privilege_tables.sql
scripts/mysql_fix_privilege_tables_sql.c
scripts/mysql_install_db
scripts/mysql_secure_installation
scripts/mysql_setpermission
scripts/mysql_zap
scripts/mysqlaccess
scripts/mysqlbug
scripts/mysqld_multi
scripts/mysqld_safe
scripts/mysqldumpslow
scripts/mysqlhotcopy
scripts/mytop
scripts/wsrep_sst_common
scripts/wsrep_sst_mysqldump
scripts/wsrep_sst_rsync
scripts/wsrep_sst_xtrabackup
scripts/wsrep_sst_xtrabackup-v2
sql-bench/bench-count-distinct
sql-bench/bench-init.pl
sql-bench/compare-results
sql-bench/copy-db
sql-bench/crash-me
sql-bench/graph-compare-results
sql-bench/innotest1
sql-bench/innotest1a
sql-bench/innotest1b
sql-bench/innotest2
sql-bench/innotest2a
sql-bench/innotest2b
sql-bench/run-all-tests
sql-bench/server-cfg
sql-bench/test-ATIS
sql-bench/test-alter-table
sql-bench/test-big-tables
sql-bench/test-connect
sql-bench/test-create
sql-bench/test-insert
sql-bench/test-select
sql-bench/test-table-elimination
sql-bench/test-transactions
sql-bench/test-wisconsin
sql/gen_lex_hash
sql/lex_hash.h
sql/mysql_tzinfo_to_sql
sql/mysqld
sql/sql_builtin.cc
sql/sql_yacc.cc
sql/sql_yacc.h
storage/heap/hp_test1
storage/heap/hp_test2
storage/maria/aria_chk
storage/maria/aria_dump_log
storage/maria/aria_ftdump
storage/maria/aria_pack
storage/maria/aria_read_log
storage/maria/ma_rt_test
storage/maria/ma_sp_test
storage/maria/ma_test1
storage/maria/ma_test2
storage/maria/ma_test3
storage/myisam/mi_test1
storage/myisam/mi_test2
storage/myisam/mi_test3
storage/myisam/myisam_ftdump
storage/myisam/myisamchk
storage/myisam/myisamlog
storage/myisam/myisampack
storage/myisam/rt_test
storage/myisam/sp_test
storage/perfschema/gen_pfs_lex_token
storage/perfschema/pfs_lex_token.h
storage/tokudb/ft-index/buildheader/db.h
storage/tokudb/ft-index/buildheader/make_tdb
storage/tokudb/ft-index/buildheader/runcat.sh
storage/tokudb/ft-index/ft/log_code.cc
storage/tokudb/ft-index/ft/log_header.h
storage/tokudb/ft-index/ft/log_print.cc
storage/tokudb/ft-index/ft/logformat
storage/tokudb/ft-index/ft/ftverify
storage/tokudb/ft-index/ft/tdb-recover
storage/tokudb/ft-index/ft/tdb_logprint
storage/tokudb/ft-index/ft/tokuftdump
storage/tokudb/ft-index/portability/merge_archives_tokuportability_static.cmake
storage/tokudb/ft-index/portability/toku_config.h
storage/tokudb/ft-index/portability/tokuportability_static_depends.cc
storage/tokudb/ft-index/src/merge_archives_tokufractaltree_static.cmake
storage/tokudb/ft-index/src/tokufractaltree_static_depends.cc
storage/tokudb/ft-index/toku_include/toku_config.h
storage/tokudb/ft-index/tools/ba_replay
storage/tokudb/ft-index/tools/ftverify
storage/tokudb/ft-index/tools/tdb-recover
storage/tokudb/ft-index/tools/tdb_logprint
storage/tokudb/ft-index/tools/tokudb_dump
storage/tokudb/ft-index/tools/tokudb_gen
storage/tokudb/ft-index/tools/tokudb_load
storage/tokudb/ft-index/tools/tokuftdump
storage/tokudb/ft-index/ft/ftverify
storage/tokudb/ft-index/ft/tdb-recover
storage/tokudb/ft-index/ft/tdb_logprint
storage/tokudb/ft-index/ft/tokuftdump
storage/tokudb/ft-index/xz/
support-files/MySQL-shared-compat.spec
support-files/binary-configure
support-files/config.huge.ini
support-files/config.medium.ini
support-files/config.small.ini
support-files/mariadb.pc
support-files/my-huge.cnf
support-files/my-innodb-heavy-4G.cnf
support-files/my-large.cnf
support-files/my-medium.cnf
support-files/my-small.cnf
support-files/mysql-log-rotate
support-files/mysql.10.0.11.spec
support-files/mysql.server
support-files/mysql.spec
support-files/mysqld_multi.server
support-files/wsrep.cnf
support-files/wsrep_notify
tags
tests/async_queries
tests/bug25714
tests/mysql_client_test
storage/mroonga/config.sh
storage/mroonga/mrn_version.h
storage/mroonga/data/install.sql
storage/mroonga/vendor/groonga/config.h
storage/mroonga/vendor/groonga/config.sh
storage/mroonga/vendor/groonga/groonga.pc
storage/mroonga/vendor/groonga/src/grnslap
storage/mroonga/vendor/groonga/src/groonga
storage/mroonga/vendor/groonga/src/groonga-benchmark
storage/mroonga/vendor/groonga/src/suggest/groonga-suggest-create-dataset
CMakeLists.txt
View file @
18012179
...
...
@@ -362,6 +362,11 @@ CHECK_JEMALLOC()
CHECK_PCRE
()
IF
(
CMAKE_CROSSCOMPILING
)
SET
(
IMPORT_EXECUTABLES
"IMPORTFILE-NOTFOUND"
CACHE FILEPATH
"Path to import_executables.cmake from a native build"
)
INCLUDE
(
${
IMPORT_EXECUTABLES
}
)
ENDIF
()
#
# Setup maintainer mode options. Platform checks are
# not run with the warning options as to not perturb fragile checks
...
...
@@ -452,7 +457,8 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql_version.h.in
CONFIGURE_FILE
(
${
CMAKE_SOURCE_DIR
}
/sql/sql_builtin.cc.in
${
CMAKE_BINARY_DIR
}
/sql/sql_builtin.cc
)
CONFIGURE_FILE
(
${
CMAKE_SOURCE_DIR
}
/cmake/info_macros.cmake.in
${
CMAKE_BINARY_DIR
}
/info_macros.cmake @ONLY
)
${
CMAKE_SOURCE_DIR
}
/cmake/info_macros.cmake.in
${
CMAKE_BINARY_DIR
}
/info_macros.cmake @ONLY
)
IF
(
DEB
)
CONFIGURE_FILE
(
...
...
@@ -464,7 +470,7 @@ ENDIF(DEB)
INCLUDE
(
${
CMAKE_BINARY_DIR
}
/info_macros.cmake
)
# Source: This can be done during the cmake phase, all information is
# available, but should be repeated on each "make" just in case someone
# does "cmake ; make ;
bzr
pull ; make".
# does "cmake ; make ;
git
pull ; make".
CREATE_INFO_SRC
(
${
CMAKE_BINARY_DIR
}
/Docs
)
ADD_CUSTOM_TARGET
(
INFO_SRC ALL
COMMAND
${
CMAKE_COMMAND
}
-P
${
CMAKE_SOURCE_DIR
}
/cmake/info_src.cmake
...
...
Docs/INFO_SRC
View file @
18012179
revision-id: psergey@askmonty.org-20150125151625-ws9svxbjcv1wwte9
date: 2015-0
1
-25 16:
16:25
+0100
build-date: 2015-0
1
-25 16:
2
1:
41
+0100
revno: 4588
branch
-nick: 10.0
commit: 5c66abf0b0de6d632f85a57c841f80d28a7e0337
date: 2015-0
2
-25 16:
34:33
+0100
build-date: 2015-0
2
-25 16:
4
1:
06
+0100
short: 5c66abf
branch
: HEAD
MySQL source 10.0.1
6
MySQL source 10.0.1
7
VERSION
View file @
18012179
MYSQL_VERSION_MAJOR=10
MYSQL_VERSION_MINOR=0
MYSQL_VERSION_PATCH=1
6
MYSQL_VERSION_PATCH=1
7
client/mysqlbinlog.cc
View file @
18012179
...
...
@@ -49,6 +49,8 @@
#include
"mysqld.h"
#include
<algorithm>
Rpl_filter
*
binlog_filter
=
0
;
#define BIN_LOG_HEADER_SIZE 4
...
...
@@ -67,6 +69,7 @@ ulong server_id = 0;
ulong
bytes_sent
=
0L
,
bytes_received
=
0L
;
ulong
mysqld_net_retry_count
=
10L
;
ulong
open_files_limit
;
ulong
opt_binlog_rows_event_max_size
;
uint
test_flags
=
0
;
static
uint
opt_protocol
=
0
;
static
FILE
*
result_file
;
...
...
@@ -1436,6 +1439,12 @@ that may lead to an endless loop.",
"Used to reserve file descriptors for use by this program."
,
&
open_files_limit
,
&
open_files_limit
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
MY_NFILE
,
8
,
OS_FILE_LIMIT
,
0
,
1
,
0
},
{
"binlog-row-event-max-size"
,
0
,
"The maximum size of a row-based binary log event in bytes. Rows will be "
"grouped into events smaller than this size if possible. "
"This value must be a multiple of 256."
,
&
opt_binlog_rows_event_max_size
,
&
opt_binlog_rows_event_max_size
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
UINT_MAX
,
256
,
ULONG_MAX
,
0
,
256
,
0
},
{
"verify-binlog-checksum"
,
'c'
,
"Verify checksum binlog events."
,
(
uchar
**
)
&
opt_verify_binlog_checksum
,
(
uchar
**
)
&
opt_verify_binlog_checksum
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
...
...
client/mysqlcheck.c
View file @
18012179
...
...
@@ -521,9 +521,6 @@ static uint fixed_name_length(const char *name)
{
if
(
*
p
==
'`'
)
extra_length
++
;
else
if
(
*
p
==
'.'
)
extra_length
+=
2
;
}
DBUG_RETURN
((
uint
)
((
p
-
name
)
+
extra_length
));
}
...
...
@@ -537,11 +534,6 @@ static char *fix_table_name(char *dest, char *src)
for
(;
*
src
;
src
++
)
{
switch
(
*
src
)
{
case
'.'
:
/* add backticks around '.' */
*
dest
++=
'`'
;
*
dest
++=
'.'
;
*
dest
++=
'`'
;
break
;
case
'`'
:
/* escape backtick character */
*
dest
++=
'`'
;
/* fall through */
...
...
@@ -836,13 +828,17 @@ static void print_result()
{
MYSQL_RES
*
res
;
MYSQL_ROW
row
;
char
prev
[(
NAME_LEN
+
9
)
*
2
+
2
];
char
prev
[(
NAME_LEN
+
9
)
*
3
+
2
];
char
prev_alter
[
MAX_ALTER_STR_SIZE
];
char
*
db_name
;
uint
length_of_db
;
uint
i
;
my_bool
found_error
=
0
,
table_rebuild
=
0
;
DBUG_ENTER
(
"print_result"
);
res
=
mysql_use_result
(
sock
);
db_name
=
sock
->
db
;
length_of_db
=
strlen
(
db_name
);
prev
[
0
]
=
'\0'
;
prev_alter
[
0
]
=
0
;
...
...
@@ -866,10 +862,16 @@ static void print_result()
if
(
prev_alter
[
0
])
insert_dynamic
(
&
alter_table_cmds
,
(
uchar
*
)
prev_alter
);
else
insert_dynamic
(
&
tables4rebuild
,
(
uchar
*
)
prev
);
{
char
*
table_name
=
prev
+
(
length_of_db
+
1
);
insert_dynamic
(
&
tables4rebuild
,
(
uchar
*
)
table_name
);
}
}
else
insert_dynamic
(
&
tables4repair
,
prev
);
{
char
*
table_name
=
prev
+
(
length_of_db
+
1
);
insert_dynamic
(
&
tables4repair
,
table_name
);
}
}
found_error
=
0
;
table_rebuild
=
0
;
...
...
@@ -910,10 +912,16 @@ static void print_result()
if
(
prev_alter
[
0
])
insert_dynamic
(
&
alter_table_cmds
,
prev_alter
);
else
insert_dynamic
(
&
tables4rebuild
,
prev
);
{
char
*
table_name
=
prev
+
(
length_of_db
+
1
);
insert_dynamic
(
&
tables4rebuild
,
table_name
);
}
}
else
insert_dynamic
(
&
tables4repair
,
prev
);
{
char
*
table_name
=
prev
+
(
length_of_db
+
1
);
insert_dynamic
(
&
tables4repair
,
table_name
);
}
}
mysql_free_result
(
res
);
DBUG_VOID_RETURN
;
...
...
client/mysqldump.c
View file @
18012179
...
...
@@ -114,7 +114,6 @@ static my_bool verbose= 0, opt_no_create_info= 0, opt_no_data= 0,
opt_slave_apply
=
0
,
opt_include_master_host_port
=
0
,
opt_events
=
0
,
opt_comments_used
=
0
,
opt_galera_sst_mode
=
0
,
opt_alltspcs
=
0
,
opt_notspcs
=
0
;
static
my_bool
insert_pat_inited
=
0
,
debug_info_flag
=
0
,
debug_check_flag
=
0
;
static
ulong
opt_max_allowed_packet
,
opt_net_buffer_length
;
...
...
@@ -351,14 +350,6 @@ static struct my_option my_long_options[] =
{
"force"
,
'f'
,
"Continue even if we get an SQL error."
,
&
ignore_errors
,
&
ignore_errors
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"galera-sst-mode"
,
OPT_GALERA_SST_MODE
,
"This mode should normally be used in mysqldump snapshot state transfer "
"(SST) in a Galera cluster. If enabled, mysqldump additionally dumps "
"commands to turn off binary logging and SET global gtid_binlog_state "
"with the current value. Note: RESET MASTER needs to be executed on the "
"server receiving the resulting dump."
,
&
opt_galera_sst_mode
,
&
opt_galera_sst_mode
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"gtid"
,
OPT_USE_GTID
,
"Used together with --master-data=1 or --dump-slave=1."
"When enabled, the output from those options will set the GTID position "
"instead of the binlog file and offset; the file/offset will appear only as "
...
...
@@ -4903,43 +4894,6 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
}
/* dump_selected_tables */
/**
Add the following statements to the generated dump:
a) SET @@session.sql_log_bin=OFF;
b) SET @@global.gtid_binlog_state='[N-N-N,...]'
*/
static
int
wsrep_set_sst_cmds
(
MYSQL
*
mysql
)
{
MYSQL_RES
*
res
;
MYSQL_ROW
row
;
if
(
mysql_get_server_version
(
mysql
)
<
100005
)
{
/* @@gtid_binlog_state does not exist. */
return
0
;
}
if
(
mysql_query_with_error_report
(
mysql
,
&
res
,
"SELECT "
"@@global.gtid_binlog_state"
))
return
1
;
if
(
mysql_num_rows
(
res
)
!=
1
)
/* No entry for @@global.gtid_binlog_state, nothing needs to be done. */
return
0
;
if
(
!
(
row
=
mysql_fetch_row
(
res
))
||
!
(
char
*
)
row
[
0
])
return
1
;
/* first, add a command to turn off binary logging, */
fprintf
(
md_result_file
,
"SET @@session.sql_log_bin=OFF;
\n
"
);
/* followed by, a command to set global gtid_binlog_state. */
fprintf
(
md_result_file
,
"SET @@global.gtid_binlog_state='%s';
\n
"
,
(
char
*
)
row
[
0
]);
mysql_free_result
(
res
);
return
0
;
}
static
int
do_show_master_status
(
MYSQL
*
mysql_con
,
int
consistent_binlog_pos
,
int
have_mariadb_gtid
,
int
use_gtid
)
{
...
...
@@ -5936,9 +5890,6 @@ int main(int argc, char **argv)
if
(
opt_slave_apply
&&
add_stop_slave
())
goto
err
;
if
(
opt_galera_sst_mode
&&
wsrep_set_sst_cmds
(
mysql
))
goto
err
;
if
(
opt_master_data
&&
do_show_master_status
(
mysql
,
consistent_binlog_pos
,
have_mariadb_gtid
,
opt_use_gtid
))
goto
err
;
...
...
cmake/cpack_source_ignore_files.cmake
View file @
18012179
# Copyright (c) 2009, 201
0
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2009, 201
4
, 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
...
...
@@ -14,9 +14,6 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
SET
(
CPACK_SOURCE_IGNORE_FILES
\\\\.bzr/
\\\\.bzr-mysql
\\\\.bzrignore
CMakeCache\\\\.txt
cmake_dist\\\\.cmake
CPackSourceConfig\\\\.cmake
...
...
cmake/info_macros.cmake.in
View file @
18012179
# Copyright (c) 2011, 201
2
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 201
4
, 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
...
...
@@ -23,11 +23,14 @@
# If further variables are used in this file, add them to this list.
SET(VERSION "@VERSION@")
SET(MAJOR_VERSION "@MAJOR_VERSION@")
SET(MINOR_VERSION "@MINOR_VERSION@")
SET(PATCH_VERSION "@PATCH_VERSION@")
SET(CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@")
SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@")
SET(CMAKE_GENERATOR "@CMAKE_GENERATOR@")
SET(CMAKE_SIZEOF_VOID_P "@CMAKE_SIZEOF_VOID_P@")
SET(
BZR
_EXECUTABLE "@
BZR
_EXECUTABLE@")
SET(
GIT
_EXECUTABLE "@
GIT
_EXECUTABLE@")
SET(CMAKE_CROSSCOMPILING "@CMAKE_CROSSCOMPILING@")
SET(CMAKE_HOST_SYSTEM "@CMAKE_HOST_SYSTEM@")
SET(CMAKE_HOST_SYSTEM_PROCESSOR "@CMAKE_HOST_SYSTEM_PROCESSOR@")
...
...
@@ -36,27 +39,51 @@ SET(CMAKE_SYSTEM_PROCESSOR "@CMAKE_SYSTEM_PROCESSOR@")
# Create an "INFO_SRC" file with information about the source (only).
# We use "
bzr version-info
", if possible, and the "VERSION" contents.
# We use "
git log
", if possible, and the "VERSION" contents.
#
# Outside development (
BZR
tree), the "INFO_SRC" file will not be modified
# Outside development (
git
tree), the "INFO_SRC" file will not be modified
# provided it exists (from "make dist" or a source tarball creation).
MACRO(CREATE_INFO_SRC target_dir)
SET(INFO_SRC "${target_dir}/INFO_SRC")
IF(EXISTS ${CMAKE_SOURCE_DIR}/.bzr)
# Sources are in a BZR repository: Always update.
SET(PERLSCRIPT
"use warnings; use POSIX qw(strftime); "
"print strftime \"%F %T %z\", localtime;")
EXECUTE_PROCESS(
COMMAND perl -e "${PERLSCRIPT}"
RESULT_VARIABLE result
OUTPUT_VARIABLE bdate
ERROR_VARIABLE error
)
IF(error)
MESSAGE(STATUS "Could not determine build-date: <${error}>")
ENDIF()
IF(GIT_EXECUTABLE AND EXISTS ${CMAKE_SOURCE_DIR}/.git)
# Sources are in a GIT repository: Always update.
EXECUTE_PROCESS(
COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE bname
)
EXECUTE_PROCESS(
COMMAND ${BZR_EXECUTABLE} version-info ${CMAKE_SOURCE_DIR}
COMMAND ${GIT_EXECUTABLE} log -1
--pretty="commit: %H%ndate: %ci%nbuild-date: ${bdate} %nshort: %h%nbranch: ${bname}"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE VERSION_INFO
RESULT_VARIABLE RESULT
)
## Output from git is quoted with "", remove them.
STRING(REPLACE "\"" "" VERSION_INFO "${VERSION_INFO}")
FILE(WRITE ${INFO_SRC} "${VERSION_INFO}\n")
# to debug, add: FILE(APPEND ${INFO_SRC} "\nResult ${RESULT}\n")
# For better readability ...
FILE(APPEND ${INFO_SRC} "\nMySQL source ${VERSION}\n")
FILE(APPEND ${INFO_SRC}
"MySQL source ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}\n")
ELSEIF(EXISTS ${INFO_SRC})
# Outside a
BZR
tree, there is no need to change an existing "INFO_SRC",
# Outside a
git
tree, there is no need to change an existing "INFO_SRC",
# it cannot be improved.
ELSEIF(EXISTS ${CMAKE_SOURCE_DIR}/Docs/INFO_SRC)
# If we are building from a source distribution, it also contains "INFO_SRC".
...
...
cmake/info_src.cmake
View file @
18012179
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011,
2014,
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
...
...
@@ -16,11 +16,11 @@
# The sole purpose of this cmake control file is to create the "INFO_SRC" file.
# As long as and "
bzr
pull" (or "
bzr
commit") is followed by a "cmake",
# As long as and "
git
pull" (or "
git
commit") is followed by a "cmake",
# the call in top level "CMakeLists.txt" is sufficient.
# This file is to provide a separate target for the "make" phase,
# to ensure the
BZR revision-id
is correct even after a sequence
# cmake ; make ;
bzr
pull ; make
# to ensure the
git commit hash
is correct even after a sequence
# cmake ; make ;
git
pull ; make
# Get the macros which handle the "INFO_*" files.
...
...
cmake/maintainer.cmake
View file @
18012179
...
...
@@ -35,7 +35,7 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
ENDIF
()
# Turn on Werror (warning => error) when using maintainer mode.
IF
(
MYSQL_MAINTAINER_MODE MATCHES
"
ON
"
)
IF
(
MYSQL_MAINTAINER_MODE MATCHES
"
ERR
"
)
SET
(
MY_C_WARNING_FLAGS
"
${
MY_C_WARNING_FLAGS
}
-DFORCE_INIT_OF_VARS -Werror"
)
SET
(
MY_CXX_WARNING_FLAGS
"
${
MY_CXX_WARNING_FLAGS
}
-DFORCE_INIT_OF_VARS -Werror"
)
ENDIF
()
...
...
cmake/make_dist.cmake.in
View file @
18012179
...
...
@@ -22,13 +22,12 @@ SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "@CPACK_SOURCE_PACKAGE_FILE_NAME@")
SET(CMAKE_CPACK_COMMAND "@CMAKE_CPACK_COMMAND@")
SET(CMAKE_COMMAND "@CMAKE_COMMAND@")
SET(
BZR
_EXECUTABLE "@
BZR
_EXECUTABLE@")
SET(
GIT
_EXECUTABLE "@
GIT
_EXECUTABLE@")
SET(GTAR_EXECUTABLE "@GTAR_EXECUTABLE@")
SET(TAR_EXECUTABLE "@TAR_EXECUTABLE@")
SET(CMAKE_GENERATOR "@CMAKE_GENERATOR@")
SET(CMAKE_MAKE_PROGRAM "@CMAKE_MAKE_PROGRAM@")
SET(CMAKE_SYSTEM_NAME "@CMAKE_SYSTEM_NAME@")
SET(PLUGIN_REPOS "@PLUGIN_REPOS@")
SET(VERSION "@VERSION@")
...
...
@@ -40,38 +39,21 @@ SET(PACKAGE_DIR ${CMAKE_BINARY_DIR}/${CPACK_SOURCE_PACKAGE_FILE_NAME})
FILE(REMOVE_RECURSE ${PACKAGE_DIR})
FILE(REMOVE ${PACKAGE_DIR}.tar.gz )
IF(
BZR
_EXECUTABLE)
MESSAGE(STATUS "Running
bzr export
")
IF(
GIT
_EXECUTABLE)
MESSAGE(STATUS "Running
git checkout-index
")
EXECUTE_PROCESS(
COMMAND "${BZR_EXECUTABLE}" export
${PACKAGE_DIR}
COMMAND "${GIT_EXECUTABLE}" checkout-index --all --prefix=${PACKAGE_DIR}/
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
RESULT_VARIABLE RESULT
)
IF(NOT RESULT EQUAL 0)
SET(
BZR
_EXECUTABLE)
SET(
GIT
_EXECUTABLE)
ENDIF()
ENDIF()
IF(BZR_EXECUTABLE)
FOREACH(REPO ${PLUGIN_REPOS})
GET_FILENAME_COMPONENT(PLUGIN_NAME ${REPO} NAME)
SET(DEST ${PACKAGE_DIR}/plugin/${PLUGIN_NAME})
MESSAGE(STATUS "Running bzr export for plugin/${PLUGIN_NAME}")
EXECUTE_PROCESS(
COMMAND "${BZR_EXECUTABLE}" export ${DEST}
WORKING_DIRECTORY ${REPO}
RESULT_VARIABLE RESULT
)
IF(NOT RESULT EQUAL 0)
MESSAGE(STATUS "bzr export failed")
ENDIF()
ENDFOREACH()
ENDIF()
IF(NOT BZR_EXECUTABLE)
MESSAGE(STATUS "bzr not found or source dir is not a repo, use CPack")
IF(NOT GIT_EXECUTABLE)
MESSAGE(STATUS "git not found or source dir is not a repo, use CPack")
IF(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
# In-source build is the worst option, we have to cleanup source tree.
...
...
@@ -119,15 +101,6 @@ CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.h
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.cc
${PACKAGE_DIR}/sql/sql_yacc.cc COPYONLY)
# Copy spec files
SET(SPECFILENAME "mysql.${VERSION}.spec")
IF("${VERSION}" MATCHES "-ndb-")
STRING(REGEX REPLACE "^.*-ndb-" "" NDBVERSION "${VERSION}")
SET(SPECFILENAME "mysql-cluster-${NDBVERSION}.spec")
ENDIF()
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/support-files/${SPECFILENAME}
${PACKAGE_DIR}/support-files/${SPECFILENAME} COPYONLY)
# Add documentation, if user has specified where to find them
IF(MYSQL_DOCS_LOCATION)
MESSAGE("Copying documentation files from " ${MYSQL_DOCS_LOCATION})
...
...
cmake/plugin.cmake
View file @
18012179
...
...
@@ -245,11 +245,4 @@ MACRO(CONFIGURE_PLUGINS)
ADD_SUBDIRECTORY
(
${
dir
}
)
ENDIF
()
ENDFOREACH
()
FOREACH
(
dir
${
dirs_plugin
}
)
IF
(
EXISTS
${
dir
}
/.bzr
)
MESSAGE
(
STATUS
"Found repo
${
dir
}
/.bzr"
)
LIST
(
APPEND PLUGIN_BZR_REPOS
"
${
dir
}
"
)
ENDIF
()
ENDFOREACH
()
SET
(
PLUGIN_REPOS
"
${
PLUGIN_BZR_REPOS
}
"
CACHE INTERNAL
""
)
ENDMACRO
()
cmake/ssl.cmake
View file @
18012179
...
...
@@ -156,37 +156,37 @@ MACRO (MYSQL_CHECK_SSL)
LIST
(
REVERSE CMAKE_FIND_LIBRARY_SUFFIXES
)
ENDIF
()
# Verify version number. Version information looks like:
# #define OPENSSL_VERSION_NUMBER 0x1000103fL
# Encoded as MNNFFPPS: major minor fix patch status
FILE
(
STRINGS
"
${
OPENSSL_INCLUDE_DIR
}
/openssl/opensslv.h"
OPENSSL_VERSION_NUMBER
REGEX
"^#define[
\t
]+OPENSSL_VERSION_NUMBER[
\t
]+0x[0-9].*"
)
STRING
(
REGEX REPLACE
"^.*OPENSSL_VERSION_NUMBER[
\t
]+0x([0-9]).*$"
"
\\
1"
OPENSSL_MAJOR_VERSION
"
${
OPENSSL_VERSION_NUMBER
}
"
)
IF
(
OPENSSL_INCLUDE_DIR AND
OPENSSL_LIBRARIES AND
CRYPTO_LIBRARY
)
# Verify version number. Version information looks like:
# #define OPENSSL_VERSION_NUMBER 0x1000103fL
# Encoded as MNNFFPPS: major minor fix patch status
FILE
(
STRINGS
"
${
OPENSSL_INCLUDE_DIR
}
/openssl/opensslv.h"
OPENSSL_VERSION_NUMBER
REGEX
"^#define[
\t
]+OPENSSL_VERSION_NUMBER[
\t
]+0x[0-9].*"
)
STRING
(
REGEX REPLACE
"^.*OPENSSL_VERSION_NUMBER[
\t
]+0x([0-9]).*$"
"
\\
1"
OPENSSL_MAJOR_VERSION
"
${
OPENSSL_VERSION_NUMBER
}
"
)
INCLUDE
(
CheckSymbolExists
)
SET
(
CMAKE_REQUIRED_INCLUDES
${
OPENSSL_INCLUDE_DIR
}
)
CHECK_SYMBOL_EXISTS
(
SHA512_DIGEST_LENGTH
"openssl/sha.h"
HAVE_SHA512_DIGEST_LENGTH
)
SET
(
OPENSSL_FOUND TRUE
)
ELSE
()
SET
(
OPENSSL_FOUND FALSE
)
ENDIF
()
MESSAGE
(
STATUS
"OPENSSL_INCLUDE_DIR =
${
OPENSSL_INCLUDE_DIR
}
"
)
MESSAGE
(
STATUS
"OPENSSL_LIBRARIES =
${
OPENSSL_LIBRARIES
}
"
)
MESSAGE
(
STATUS
"CRYPTO_LIBRARY =
${
CRYPTO_LIBRARY
}
"
)
MESSAGE
(
STATUS
"OPENSSL_MAJOR_VERSION =
${
OPENSSL_MAJOR_VERSION
}
"
)
INCLUDE
(
CheckSymbolExists
)
SET
(
CMAKE_REQUIRED_INCLUDES
${
OPENSSL_INCLUDE_DIR
}
)
CHECK_SYMBOL_EXISTS
(
SHA512_DIGEST_LENGTH
"openssl/sha.h"
HAVE_SHA512_DIGEST_LENGTH
)
IF
(
OPENSSL_FOUND AND HAVE_SHA512_DIGEST_LENGTH
)
MESSAGE
(
STATUS
"OPENSSL_INCLUDE_DIR =
${
OPENSSL_INCLUDE_DIR
}
"
)
MESSAGE
(
STATUS
"OPENSSL_LIBRARIES =
${
OPENSSL_LIBRARIES
}
"
)
MESSAGE
(
STATUS
"CRYPTO_LIBRARY =
${
CRYPTO_LIBRARY
}
"
)
MESSAGE
(
STATUS
"OPENSSL_MAJOR_VERSION =
${
OPENSSL_MAJOR_VERSION
}
"
)
SET
(
SSL_SOURCES
""
)
SET
(
SSL_LIBRARIES
${
OPENSSL_LIBRARIES
}
${
CRYPTO_LIBRARY
}
)
IF
(
CMAKE_SYSTEM_NAME MATCHES
"SunOS"
)
...
...
debian/dist/Debian/mariadb-server-10.0.postinst
View file @
18012179
...
...
@@ -21,7 +21,7 @@ invoke() {
fi
}
MYSQL_BOOTSTRAP
=
"/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --default-storage-engine=myisam"
MYSQL_BOOTSTRAP
=
"/usr/sbin/mysqld --bootstrap --user=mysql
--disable-log-bin
--skip-grant-tables --default-storage-engine=myisam"
test_mysql_access
()
{
mysql
--no-defaults
-u
root
-h
localhost </dev/null
>
/dev/null 2>&1
...
...
@@ -40,6 +40,7 @@ set_mysql_rootpw() {
# this avoids us having to call "test" or "[" on $rootpw
cat
<<
EOF
>
$tfile
USE mysql;
SET sql_log_bin=0;
UPDATE user SET password=PASSWORD("
$rootpw
") WHERE user='root';
FLUSH PRIVILEGES;
EOF
...
...
@@ -144,7 +145,7 @@ EOF
# Debian: beware of the bashisms...
# Debian: can safely run on upgrades with existing databases
set
+e
/bin/bash /usr/bin/mysql_install_db
--rpm
--user
=
mysql 2>&1 |
$ERR_LOGGER
/bin/bash /usr/bin/mysql_install_db
--rpm
--user
=
mysql
--disable-log-bin
2>&1 |
$ERR_LOGGER
set
-e
## On every reconfiguration the maintenance user is recreated.
...
...
debian/dist/Ubuntu/mariadb-server-10.0.postinst
View file @
18012179
...
...
@@ -21,7 +21,7 @@ invoke() {
fi
}
MYSQL_BOOTSTRAP
=
"/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --default-storage-engine=myisam"
MYSQL_BOOTSTRAP
=
"/usr/sbin/mysqld --bootstrap --user=mysql
--disable-log-bin
--skip-grant-tables --default-storage-engine=myisam"
test_mysql_access
()
{
mysql
--no-defaults
-u
root
-h
localhost </dev/null
>
/dev/null 2>&1
...
...
@@ -41,6 +41,7 @@ set_mysql_rootpw() {
# this avoids us having to call "test" or "[" on $rootpw
cat
<<
EOF
>
$tfile
USE mysql;
SET sql_log_bin=0;
UPDATE user SET password=PASSWORD("
$rootpw
") WHERE user='root';
FLUSH PRIVILEGES;
EOF
...
...
@@ -145,7 +146,7 @@ EOF
# Debian: beware of the bashisms...
# Debian: can safely run on upgrades with existing databases
set
+e
/bin/bash /usr/bin/mysql_install_db
--rpm
--user
=
mysql 2>&1 |
$ERR_LOGGER
/bin/bash /usr/bin/mysql_install_db
--rpm
--user
=
mysql
--disable-log-bin
2>&1 |
$ERR_LOGGER
set
-e
## On every reconfiguration the maintenance user is recreated.
...
...
@@ -213,7 +214,7 @@ EOF
# admin might already have chosen to remove one or more plugins. Newlines are necessary.
install_plugins
=
`
/bin/echo
-e
\
"USE mysql;
\n
"
\
"CREATE TABLE plugin (name char(64) COLLATE utf8_bin NOT NULL DEFAULT '', "
\
"CREATE TABLE
IF NOT EXISTS
plugin (name char(64) COLLATE utf8_bin NOT NULL DEFAULT '', "
\
" dl char(128) COLLATE utf8_bin NOT NULL DEFAULT '', "
\
" PRIMARY KEY (name)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='MySQL plugins';"
`
...
...
extra/yassl/README
View file @
18012179
...
...
@@ -12,6 +12,16 @@ before calling SSL_new();
*** end Note ***
yaSSL Release notes, version 2.3.7 (12/10/2014)
This release of yaSSL fixes the potential to process duplicate handshake
messages by explicitly marking/checking received handshake messages.
yaSSL Release notes, version 2.3.6 (11/25/2014)
This release of yaSSL fixes some valgrind warnings/errors including
uninitialized reads and off by one index errors induced from fuzzing
the handshake. These were reported by Oracle.
yaSSL Release notes, version 2.3.5 (9/29/2014)
This release of yaSSL fixes an RSA Padding check vulnerability reported by
...
...
extra/yassl/examples/client/client.cpp
View file @
18012179
...
...
@@ -18,6 +18,10 @@
/* client.cpp */
// takes an optional command line argument of cipher list to make scripting
// easier
#include
"../../testsuite/test.hpp"
//#define TEST_RESUME
...
...
@@ -73,11 +77,16 @@ void client_test(void* args)
#ifdef NON_BLOCKING
tcp_set_nonblocking
(
sockfd
);
#endif
SSL_METHOD
*
method
=
TLSv1_client_method
();
SSL_CTX
*
ctx
=
SSL_CTX_new
(
method
);
set_certs
(
ctx
);
if
(
argc
>=
2
)
{
printf
(
"setting cipher list to %s
\n
"
,
argv
[
1
]);
if
(
SSL_CTX_set_cipher_list
(
ctx
,
argv
[
1
])
!=
SSL_SUCCESS
)
{
ClientError
(
ctx
,
NULL
,
sockfd
,
"set_cipher_list error
\n
"
);
}
}
SSL
*
ssl
=
SSL_new
(
ctx
);
SSL_set_fd
(
ssl
,
sockfd
);
...
...
extra/yassl/examples/server/server.cpp
View file @
18012179
...
...
@@ -18,6 +18,9 @@
/* server.cpp */
// takes 2 optional command line argument to make scripting
// if the first command line argument is 'n' client auth is disabled
// if the second command line argument is 'd' DSA certs are used instead of RSA
#include
"../../testsuite/test.hpp"
...
...
@@ -69,6 +72,9 @@ THREAD_RETURN YASSL_API server_test(void* args)
char
**
argv
=
0
;
set_args
(
argc
,
argv
,
*
static_cast
<
func_args
*>
(
args
));
#ifdef SERVER_READY_FILE
set_file_ready
(
"server_ready"
,
*
static_cast
<
func_args
*>
(
args
));
#endif
tcp_accept
(
sockfd
,
clientfd
,
*
static_cast
<
func_args
*>
(
args
));
tcp_close
(
sockfd
);
...
...
@@ -77,8 +83,21 @@ THREAD_RETURN YASSL_API server_test(void* args)
SSL_CTX
*
ctx
=
SSL_CTX_new
(
method
);
//SSL_CTX_set_cipher_list(ctx, "RC4-SHA:RC4-MD5");
SSL_CTX_set_verify
(
ctx
,
SSL_VERIFY_PEER
,
0
);
set_serverCerts
(
ctx
);
// should we disable client auth
if
(
argc
>=
2
&&
argv
[
1
][
0
]
==
'n'
)
printf
(
"disabling client auth
\n
"
);
else
SSL_CTX_set_verify
(
ctx
,
SSL_VERIFY_PEER
,
0
);
// are we using DSA certs
if
(
argc
>=
3
&&
argv
[
2
][
0
]
==
'd'
)
{
printf
(
"using DSA certs
\n
"
);
set_dsaServerCerts
(
ctx
);
}
else
{
set_serverCerts
(
ctx
);
}
DH
*
dh
=
set_tmpDH
(
ctx
);
SSL
*
ssl
=
SSL_new
(
ctx
);
...
...
Prev
1
2
3
4
5
…
36
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment