From 8ba44294b85aa6ec4eb763d89ad10c9b3c25a1ce Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 1 Jul 2014 08:31:52 +0200 Subject: Raise version number after cloning 5.5.39 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 67a35621511..ae997143dac 100644 --- a/VERSION +++ b/VERSION @@ -1,4 +1,4 @@ MYSQL_VERSION_MAJOR=5 MYSQL_VERSION_MINOR=5 -MYSQL_VERSION_PATCH=39 +MYSQL_VERSION_PATCH=40 MYSQL_VERSION_EXTRA= -- cgit v1.2.1 From a69ab08b0b30a9c49047257f3eaf51dc0f041c06 Mon Sep 17 00:00:00 2001 From: Marcin Babij Date: Wed, 2 Jul 2014 10:45:22 +0200 Subject: BUG#18779944: MYSQLDUMP BUFFER OVERFLOW Mysqldump overflows stack buffer when copying table name from commandline arguments resulting in stack corruption and ability to execute arbitrary code. Fix: Check length of all positional arguments passed to mysqldump is smaller than NAME_LEN. Note: Mysqldump heavily depends on that database objects (databases, tablespaces, tables, etc) are limited to small size (now it is 64). --- client/mysqldump.c | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/client/mysqldump.c b/client/mysqldump.c index c19b0b1822a..2a873903d60 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -5538,19 +5538,36 @@ int main(int argc, char **argv) dump_all_tablespaces(); dump_all_databases(); } - else if (argc > 1 && !opt_databases) - { - /* Only one database and selected table(s) */ - if (!opt_alltspcs && !opt_notspcs) - dump_tablespaces_for_tables(*argv, (argv + 1), (argc -1)); - dump_selected_tables(*argv, (argv + 1), (argc - 1)); - } else { - /* One or more databases, all tables */ - if (!opt_alltspcs && !opt_notspcs) - dump_tablespaces_for_databases(argv); - dump_databases(argv); + // Check all arguments meet length condition. Currently database and table + // names are limited to NAME_LEN bytes and stack-based buffers assumes + // that escaped name will be not longer than NAME_LEN*2 + 2 bytes long. + int argument; + for (argument= 0; argument < argc; argument++) + { + size_t argument_length= strlen(argv[argument]); + if (argument_length > NAME_LEN) + { + die(EX_CONSCHECK, "[ERROR] Argument '%s' is too long, it cannot be " + "name for any table or database.\n", argv[argument]); + } + } + + if (argc > 1 && !opt_databases) + { + /* Only one database and selected table(s) */ + if (!opt_alltspcs && !opt_notspcs) + dump_tablespaces_for_tables(*argv, (argv + 1), (argc - 1)); + dump_selected_tables(*argv, (argv + 1), (argc - 1)); + } + else + { + /* One or more databases, all tables */ + if (!opt_alltspcs && !opt_notspcs) + dump_tablespaces_for_databases(argv); + dump_databases(argv); + } } /* if --dump-slave , start the slave sql thread */ -- cgit v1.2.1 From 8a4ec676ed051494fb233173c2565fc11ee3083c Mon Sep 17 00:00:00 2001 From: Arun Kuruvila Date: Wed, 2 Jul 2014 14:52:52 +0530 Subject: Bug#17873011 NO DEPRECATION WARNING FOR THREAD_CONCURRENCY Description: THREAD_CONCURRENCY is deprecated and there is no deprecation warning message while setting this variable while starting the server. Analysis: This variable is specific to Solaris 8 and earlier systems and is ignored on all other platforms. But since many customers, who uses other than Solaris, still has this variable in their configuration file, it is important to have a deprecation warning. Fix: THREAD_CONCURRENCY deprecation warning message is added. --- sql/mysqld.cc | 3 +++ sql/mysqld.h | 1 + sql/sql_priv.h | 29 ++++++++++++++++++++++++++++- sql/sys_vars.cc | 3 ++- 4 files changed, 34 insertions(+), 2 deletions(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 1489e3cdc31..f8f50313dad 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -7060,6 +7060,9 @@ mysqld_get_one_option(int optid, test_flags= argument ? (uint) atoi(argument) : 0; opt_endinfo=1; break; + case OPT_THREAD_CONCURRENCY: + WARN_DEPRECATED_NO_REPLACEMENT(NULL, "THREAD_CONCURRENCY"); + break; case (int) OPT_ISAM_LOG: opt_myisam_log=1; break; diff --git a/sql/mysqld.h b/sql/mysqld.h index bd93264d50d..655fb93df73 100644 --- a/sql/mysqld.h +++ b/sql/mysqld.h @@ -411,6 +411,7 @@ enum options_mysqld OPT_SSL_CERT, OPT_SSL_CIPHER, OPT_SSL_KEY, + OPT_THREAD_CONCURRENCY, OPT_UPDATE_LOG, OPT_WANT_CORE, OPT_ENGINE_CONDITION_PUSHDOWN, diff --git a/sql/sql_priv.h b/sql/sql_priv.h index 970b921d6e6..523220b3c03 100644 --- a/sql/sql_priv.h +++ b/sql/sql_priv.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 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 @@ -59,6 +59,33 @@ (Old), (New)); \ } while(0) + +/* + Generates a warning that a feature is deprecated and there is no replacement. + + Using it as + + WARN_DEPRECATED_NO_REPLACEMENT(thd, "BAD"); + + Will result in a warning + + "'BAD' is deprecated and will be removed in a future release." + + Note that in macro arguments BAD is not quoted. +*/ + +#define WARN_DEPRECATED_NO_REPLACEMENT(Thd,Old) \ + do { \ + if (((THD *) Thd) != NULL) \ + push_warning_printf(((THD *) Thd), MYSQL_ERROR::WARN_LEVEL_WARN, \ + ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT, \ + ER(ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT), \ + (Old)); \ + else \ + sql_print_warning("'%s' is deprecated and will be removed " \ + "in a future release.", (Old)); \ + } while(0) + /*************************************************************************/ #endif diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index f8b2c022ba5..3cb72480341 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -1800,7 +1800,8 @@ static Sys_var_ulong Sys_thread_concurrency( "the desired number of threads that should be run at the same time." "This variable has no effect, and is deprecated. " "It will be removed in a future release.", - READ_ONLY GLOBAL_VAR(concurrency), CMD_LINE(REQUIRED_ARG), + READ_ONLY GLOBAL_VAR(concurrency), + CMD_LINE(REQUIRED_ARG, OPT_THREAD_CONCURRENCY), VALID_RANGE(1, 512), DEFAULT(DEFAULT_CONCURRENCY), BLOCK_SIZE(1), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0), DEPRECATED("")); -- cgit v1.2.1 From 301032d20a4488af019e56124391cbd24ed365eb Mon Sep 17 00:00:00 2001 From: Annamalai Gurusami Date: Thu, 3 Jul 2014 10:13:29 +0530 Subject: Bug #19140907 DUPLICATES IN UNIQUE SECONDARY INDEX BECAUSE OF FIX OF BUG#68021 Problem: When a unique secondary index is scanned for duplicate checking, gap locks were not taken if the transaction had isolation level <= READ COMMITTED. This change was done while fixing Bug #16133801 UNEXPLAINABLE INNODB UNIQUE INDEX LOCKS ON DELETE + INSERT WITH SAME VALUES (rb#2035). Because of this the duplicate check logic failed, and resulted in duplicate values in unique secondary index. Solution: When a unique secondary index is scanned for duplicate checking, gap locks must be taken irrespective of the transaction isolation level. This is achieved by reverting rb#2035. rb#5910 approved by Jimmy --- storage/innobase/row/row0ins.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/storage/innobase/row/row0ins.c b/storage/innobase/row/row0ins.c index d9be81e461d..5bdaf4b722b 100644 --- a/storage/innobase/row/row0ins.c +++ b/storage/innobase/row/row0ins.c @@ -1702,7 +1702,7 @@ row_ins_scan_sec_index_for_duplicate( do { const rec_t* rec = btr_pcur_get_rec(&pcur); const buf_block_t* block = btr_pcur_get_block(&pcur); - ulint lock_type; + const ulint lock_type = LOCK_ORDINARY; if (page_rec_is_infimum(rec)) { @@ -1712,16 +1712,6 @@ row_ins_scan_sec_index_for_duplicate( offsets = rec_get_offsets(rec, index, offsets, ULINT_UNDEFINED, &heap); - /* If the transaction isolation level is no stronger than - READ COMMITTED, then avoid gap locks. */ - if (!page_rec_is_supremum(rec) - && thr_get_trx(thr)->isolation_level - <= TRX_ISO_READ_COMMITTED) { - lock_type = LOCK_REC_NOT_GAP; - } else { - lock_type = LOCK_ORDINARY; - } - if (allow_duplicates) { /* If the SQL-query will update or replace -- cgit v1.2.1 From 8ded41105758327cae175660fc53051d6d374eeb Mon Sep 17 00:00:00 2001 From: Chaithra Reddy Date: Thu, 3 Jul 2014 14:12:02 +0530 Subject: Bug#18469276: MOD FOR SMALL DECIMALS FAILS Problem: If leading zeroes of fractional part of a decimal number exceeds 45, mod operation on the same fails. Analysis: Currently there is a miscalcultion of fractional part for very small decimals in do_div_mod. For ex: For 0.000(45 times).....3 length of the integer part becomes -5 (for a length of one, buffer can hold 9 digits. Since number of zeroes are 45, integer part becomes 5) and it is negative because of the leading zeroes present in the fractional part. Fractional part is the number of digits present after the point which is 46 and therefore rounded off to the nearest 9 multiple which is 54. So the length of the resulting fractional part becomes 6. Because of this, the combined length of integer part and fractional part exceeds the max length allocated which is 9 and thereby failing. Solution: In case of negative integer value, it indicates there are leading zeroes in fractional part. As a result stop1 pointer should be set not just based on frac0 but also intg0. This is because the detination buffer will be filled with 0's for the length of intg0. strings/decimal.c: Calculate stop1 pointer based on the length of intg0 and frac0. --- strings/decimal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/strings/decimal.c b/strings/decimal.c index 39dff0723b9..4f5528fcccc 100644 --- a/strings/decimal.c +++ b/strings/decimal.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2004, 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 @@ -2322,7 +2322,7 @@ static int do_div_mod(const decimal_t *from1, const decimal_t *from2, error=E_DEC_TRUNCATED; goto done; } - stop1=start1+frac0; + stop1= start1 + frac0 + intg0; frac0+=intg0; to->intg=0; while (intg0++ < 0) -- cgit v1.2.1 From e12dd225ea2161753d37ae80776cb4d98a903e8d Mon Sep 17 00:00:00 2001 From: Ashish Agarwal Date: Fri, 4 Jul 2014 03:29:34 +0530 Subject: WL#7219: Implement audit filter --- sql/sql_audit.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_audit.cc b/sql/sql_audit.cc index bf672b6ea48..6ccdcefe8eb 100644 --- a/sql/sql_audit.cc +++ b/sql/sql_audit.cc @@ -353,7 +353,7 @@ int initialize_audit_plugin(st_plugin_int *plugin) return 1; } - if (plugin->plugin->init && plugin->plugin->init(NULL)) + if (plugin->plugin->init && plugin->plugin->init(plugin)) { sql_print_error("Plugin '%s' init function returned error.", plugin->name.str); -- cgit v1.2.1 From dbed459a6f572046d16bbdfe50d09426603aaec6 Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Mon, 7 Jul 2014 12:05:30 +0200 Subject: Bug#18935421 RPAD DIES WITH CERTAIN PADSTR INTPUTS.... For rpad() and lpad(): verify that the padding string is well-formed. --- sql/item.cc | 14 +++++++++++++- sql/item_strfunc.cc | 20 ++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/sql/item.cc b/sql/item.cc index ccef2b6321a..10ba48ab1c8 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 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 @@ -5143,6 +5143,18 @@ enum_field_types Item::field_type() const } +/** + Verifies that the input string is well-formed according to its character set. + @param send_error If true, call my_error if string is not well-formed. + + Will truncate input string if it is not well-formed. + + @return + If well-formed: input string. + If not well-formed: + if strict mode: NULL pointer and we set this Item's value to NULL + if not strict mode: input string truncated up to last good character + */ String *Item::check_well_formed_result(String *str, bool send_error) { /* Check whether we got a well-formed string */ diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index bc7d488a41d..eab8b4ddb00 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -2814,6 +2814,16 @@ String *Item_func_rpad::val_str(String *str) rpad->set_charset(&my_charset_bin); } +#ifdef USE_MB + if (use_mb(rpad->charset())) + { + // This will chop off any trailing illegal characters from rpad. + String *well_formed_pad= args[2]->check_well_formed_result(rpad, false); + if (!well_formed_pad) + goto err; + } +#endif + if (count <= (res_char_length= res->numchars())) { // String to pad is big enough res->length(res->charpos((int) count)); // Shorten result if longer @@ -2917,6 +2927,16 @@ String *Item_func_lpad::val_str(String *str) pad->set_charset(&my_charset_bin); } +#ifdef USE_MB + if (use_mb(pad->charset())) + { + // This will chop off any trailing illegal characters from pad. + String *well_formed_pad= args[2]->check_well_formed_result(pad, false); + if (!well_formed_pad) + goto err; + } +#endif + res_char_length= res->numchars(); if (count <= res_char_length) -- cgit v1.2.1 From de0c78c0190f884cad14a4eca1ed8bddb68338e9 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 Jul 2014 15:10:15 +0800 Subject: BUG#18942294 - SEGV IN DICT_FIND_TABLE_BY_SPACE TRYING TO MARK SPACE CORRUPT IN RECOVERY During redo log processing, the data dictionary is not available. We should check it in dict_find_table_by_space() to prevent SEGV error. rb#5678, approved by Jimmy. --- storage/innobase/buf/buf0buf.c | 9 +++++++++ storage/innobase/dict/dict0dict.c | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c index a799f3b8556..2249d20e2ea 100644 --- a/storage/innobase/buf/buf0buf.c +++ b/storage/innobase/buf/buf0buf.c @@ -3562,6 +3562,10 @@ buf_page_io_complete( (ulong) bpage->offset); } + DBUG_EXECUTE_IF("set_dict_sys_to_null", + dict_sys = NULL; + goto corrupt;); + /* From version 3.23.38 up we store the page checksum to the 4 first bytes of the page end lsn field */ @@ -3616,6 +3620,11 @@ corrupt: " because of" " a corrupt database page.\n", stderr); + + DBUG_EXECUTE_IF( + "set_dict_sys_to_null", + DBUG_SUICIDE();); + ut_error; } } diff --git a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c index 4ed0051b77a..e225966afe6 100644 --- a/storage/innobase/dict/dict0dict.c +++ b/storage/innobase/dict/dict0dict.c @@ -5364,6 +5364,11 @@ dict_find_table_by_space( ut_ad(space_id > 0); + if (dict_sys == NULL) { + /* This could happen when it's in redo processing. */ + return(NULL); + } + table = UT_LIST_GET_FIRST(dict_sys->table_LRU); num_item = UT_LIST_GET_LEN(dict_sys->table_LRU); -- cgit v1.2.1 -- cgit v1.2.1 From fa164a61e3c5d85fe1347f3cd77173116207ebdd Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Wed, 9 Jul 2014 10:11:38 +0200 Subject: Bug #19149091 5.5 BUILD BREAKS ON LINUX IF SUN DTRACE IS INSTALLED Add some code adapted from 5.6 to check for "real" DTrace. If found, and system is Linux, we simply set DTRACE to OFF. Otherwise no change. Build will still break if one tries to manually set DTRACE to ON. --- cmake/dtrace.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmake/dtrace.cmake b/cmake/dtrace.cmake index 66b07c03e9b..0a772ca2ba8 100644 --- a/cmake/dtrace.cmake +++ b/cmake/dtrace.cmake @@ -37,7 +37,15 @@ MACRO(CHECK_DTRACE) # On FreeBSD, dtrace does not handle userland tracing yet IF(DTRACE AND NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD" AND NOT BUGGY_GCC_NO_DTRACE_MODULES) - SET(ENABLE_DTRACE ON CACHE BOOL "Enable dtrace") + # 5.5 not able to do Sun dtrace on linux, just disable it + EXECUTE_PROCESS( + COMMAND ${DTRACE} -V + OUTPUT_VARIABLE out) + IF(out MATCHES "Sun D" AND CMAKE_SYSTEM_NAME MATCHES "Linux") + SET(ENABLE_DTRACE OFF CACHE BOOL "Sun DTrace on Linux not supported") + ELSE() + SET(ENABLE_DTRACE ON CACHE BOOL "Enable dtrace") + ENDIF() ENDIF() SET(HAVE_DTRACE ${ENABLE_DTRACE}) IF(CMAKE_SYSTEM_NAME MATCHES "SunOS") -- cgit v1.2.1 From 97744101f4665b49b20c388f4d24b4364f299d64 Mon Sep 17 00:00:00 2001 From: Praveenkumar Hulakund Date: Thu, 17 Jul 2014 11:21:18 +0530 Subject: Bug#14757009: WHEN THE GENERAL_LOG IS A SOCKET AND THE READER GOES AWAY, MYSQL QUITS WORKING. Analysis: ----------------- Issue in this bug and in bug 11907705 is, the socket file or fifo file is set for general log at command line while starting the server. But currently, only regular file can be set for the general log. Instead of reporting any error, the provided files are opened for writing and continued. Because of this issues mentioned in the bug reports are seen. As mentioned, only when any non-regular file is set for general log at command line while starting the server, these issues are seen. If general log file is set to non-regular file from CLI using system variable general_log_file then error is reported. These issues can also be faced with slow query log file, if it is set to non-regular file. Fix: ----------------- Currently while starting the server if we fail to open log file then we report an error, disable logging to file and continue. To fix issue reported code is modified to check whether file is regular file or not before opening it. If file is not a regular file then error is logged to error log and logging to file is disabled. --- mysql-test/r/log_errchk.result | 10 +++++++ mysql-test/t/log_errchk.test | 65 ++++++++++++++++++++++++++++++++++++++++++ sql/log.cc | 5 ++++ 3 files changed, 80 insertions(+) create mode 100644 mysql-test/r/log_errchk.result create mode 100644 mysql-test/t/log_errchk.test diff --git a/mysql-test/r/log_errchk.result b/mysql-test/r/log_errchk.result new file mode 100644 index 00000000000..407fba2323e --- /dev/null +++ b/mysql-test/r/log_errchk.result @@ -0,0 +1,10 @@ +call mtr.add_suppression("Could not use"); +# Case 1: Setting fife file to general_log_file and slow_query_log_file +# system variable. +SET GLOBAL general_log_file="MYSQLTEST_VARDIR/tmp/general_log.fifo";; +ERROR 42000: Variable 'general_log_file' can't be set to the value of 'MYSQLTEST_VARDIR/tmp/general_log.fifo' +SET GLOBAL slow_query_log_file="MYSQLTEST_VARDIR/tmp/slow_log.fifo";; +ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of 'MYSQLTEST_VARDIR/tmp/slow_log.fifo' +# Case 2: Starting server with fifo file as general log file +# and slow query log file. +Setting fifo file as general log file and slow query log failed. diff --git a/mysql-test/t/log_errchk.test b/mysql-test/t/log_errchk.test new file mode 100644 index 00000000000..6a213fa3cee --- /dev/null +++ b/mysql-test/t/log_errchk.test @@ -0,0 +1,65 @@ +# +--source include/not_windows.inc +--source include/force_restart.inc +--source include/not_embedded.inc + +# +# Bug#14757009 : WHEN THE GENERAL_LOG IS A SOCKET AND THE READER GOES AWAY, +# MYSQL QUITS WORKING. +# +call mtr.add_suppression("Could not use"); + +--let $gen_log_file= $MYSQLTEST_VARDIR/tmp/general_log.fifo +--let $slow_query_log_file= $MYSQLTEST_VARDIR/tmp/slow_log.fifo +--let GREP_FILE=$MYSQLTEST_VARDIR/log/mysqld.1.err + +--exec mkfifo $gen_log_file +--exec mkfifo $slow_query_log_file + +--echo # Case 1: Setting fife file to general_log_file and slow_query_log_file +--echo # system variable. +# Only regular files can be set to general log. Setting fifo file to general log +# reports an error. +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--error ER_WRONG_VALUE_FOR_VAR +--eval SET GLOBAL general_log_file="$gen_log_file"; + +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--error ER_WRONG_VALUE_FOR_VAR +--eval SET GLOBAL slow_query_log_file="$slow_query_log_file"; + +--echo # Case 2: Starting server with fifo file as general log file +--echo # and slow query log file. +# Restart server with fifo file as general log file. +--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--shutdown_server 60 +--source include/wait_until_disconnected.inc +--enable_reconnect +# Write file to make mysql-test-run.pl start up the server again +--exec echo "restart: --general-log-file=$gen_log_file --slow-query-log-file=$slow_query_log_file" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--source include/wait_until_connected_again.inc + +# With fix error should be reported in the error log file if file is not a +# regular file. +--perl + my $file= $ENV{'GREP_FILE'}; + my $pattern= "Turning logging off for the whole duration"; + open(FILE, "$file") or die("Unable to open $file: $!\n"); + my $count = 0; + while () { + if ($_ =~ m/$pattern/) { + $count++; + break; + } + } + if ($count >= 2){ + print "Setting fifo file as general log file and slow query log failed.\n"; + } else { + print "test failed.\n"; + } + close(FILE); +EOF + +# Cleanup +--remove_file $gen_log_file +--remove_file $slow_query_log_file diff --git a/sql/log.cc b/sql/log.cc index 7327015deb5..d322abcd742 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -2322,6 +2322,7 @@ bool MYSQL_LOG::open( const char *new_name, enum cache_type io_cache_type_arg) { char buff[FN_REFLEN]; + MY_STAT f_stat; File file= -1; int open_flags= O_CREAT | O_BINARY; DBUG_ENTER("MYSQL_LOG::open"); @@ -2339,6 +2340,10 @@ bool MYSQL_LOG::open( log_type_arg, io_cache_type_arg)) goto err; + /* File is regular writable file */ + if (my_stat(log_file_name, &f_stat, MYF(0)) && !MY_S_ISREG(f_stat.st_mode)) + goto err; + if (io_cache_type == SEQ_READ_APPEND) open_flags |= O_RDWR | O_APPEND; else -- cgit v1.2.1 From a0537faa8b3ad6c0ead04e2e0c4b15a0f974dbbd Mon Sep 17 00:00:00 2001 From: Venkata Sidagam Date: Mon, 21 Jul 2014 11:26:50 +0530 Subject: Bug #17297324 GLIBC DOUBLE FREE OR CORRUPTION WHEN KILLING CLIENT; CTRL+C Description: Sometimes when killing the mysql command line client with KILL -2(SIGINT), mysql client core dumps as a result of a double free or corruption. Analysis: When we run the mysql client in command line mode it will goes to mysql_end() and frees many data structures. At the same time (i.e after some data structures are freed), if we give "KILL -2" signal then the signal will be handled with function handle_kill_signal() and as part of it will again calls mysql_end() and goes with free() to the already freed data structure for batch_readline_end() function, which causes core dump. Fix: Ignoring SIGQUIT and SIGINT signals when cleanup process starts. This will help in resolving the double free issues, which occurs in case the signal handler function is started in between of the clean up function. For 5.6 we need to ignore SIGHUP also. --- client/mysql.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/client/mysql.cc b/client/mysql.cc index 6520dce076a..84f5f097f06 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1242,6 +1242,16 @@ int main(int argc,char *argv[]) sig_handler mysql_end(int sig) { +#ifndef _WIN32 + /* + Ingnoring SIGQUIT and SIGINT signals when cleanup process starts. + This will help in resolving the double free issues, which occures in case + the signal handler function is started in between the clean up function. + */ + signal(SIGQUIT, SIG_IGN); + signal(SIGINT, SIG_IGN); +#endif + mysql_close(&mysql); #ifdef HAVE_READLINE if (!status.batch && !quick && !opt_html && !opt_xml && -- cgit v1.2.1 From ea208f9da17cec761ff8b3270f010edecbe68653 Mon Sep 17 00:00:00 2001 From: Balasubramanian Kandasamy Date: Thu, 24 Jul 2014 11:37:40 +0200 Subject: Bug#19223915 Provide mysql-compat-server dependencies --- packaging/rpm-oel/mysql.spec.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packaging/rpm-oel/mysql.spec.in b/packaging/rpm-oel/mysql.spec.in index ba57515678c..ab247599bf8 100644 --- a/packaging/rpm-oel/mysql.spec.in +++ b/packaging/rpm-oel/mysql.spec.in @@ -85,7 +85,7 @@ Name: mysql-%{product_suffix} Summary: A very fast and reliable SQL database server Group: Applications/Databases Version: @VERSION@ -Release: 4%{?commercial:.1}%{?dist} +Release: 5%{?commercial:.1}%{?dist} License: Copyright (c) 2000, @MYSQL_COPYRIGHT_YEAR@, %{mysql_vendor}. All rights reserved. Under %{?license_type} license as shown in the Description field. Source0: https://cdn.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/%{src_dir}.tar.gz URL: http://www.mysql.com/ @@ -169,6 +169,8 @@ Obsoletes: mariadb-server Obsoletes: mariadb-galera-server Provides: mysql-server = %{version}-%{release} Provides: mysql-server%{?_isa} = %{version}-%{release} +Provides: mysql-compat-server = %{version}-%{release} +Provides: mysql-compat-server%{?_isa} = %{version}-%{release} %if 0%{?systemd} Requires(post): systemd Requires(preun): systemd @@ -911,6 +913,9 @@ fi %endif %changelog +* Tue Jul 22 2014 Balasubramanian Kandasamy - 5.5.39-5 +- Provide mysql-compat-server dependencies + * Tue Jul 08 2014 Balasubramanian Kandasamy - 5.5.39-4 - Remove perl(GD) and dtrace dependencies -- cgit v1.2.1 -- cgit v1.2.1 From 229cb8ec8889b304f6a9d8abc06ed3f22ab14ad6 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Thu, 31 Jul 2014 12:52:49 +0300 Subject: Bug #18384260: MULTIPLE SECURITY ISSUES IN CERTIFICATE VALIDATION the 5.5 version of the fix. Added a call to X509_verify_cert_error_string() into the client certificate verification code. --- sql-common/client.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sql-common/client.c b/sql-common/client.c index f2c091261b4..850daa38750 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -1909,6 +1909,12 @@ static int ssl_verify_server_cert(Vio *vio, const char* server_hostname, const c DBUG_RETURN(1); } + if (X509_V_OK != SSL_get_verify_result(ssl)) + { + *errptr= "Failed to verify the server certificate"; + X509_free(server_cert); + DBUG_RETURN(1); + } /* We already know that the certificate exchanged was valid; the SSL library handled that. Now we need to verify that the contents of the certificate -- cgit v1.2.1 From ace82cadcdff69a401f4c713caaeaa2148dfafbf Mon Sep 17 00:00:00 2001 From: Venkata Sidagam Date: Fri, 1 Aug 2014 14:18:28 +0530 Subject: Bug #18415196 MYSQL_UPGRADE DUPLICATE KEY ERROR FOR MYSQL.USER FOR 5.5.35+, 5.6.15+, 5.7.3+ Description: mysql_upgrade fails with below error, when there are duplicate entries(like 'root'@'LOCALHOST' and 'root'@'localhost') in mysql.user table. ERROR 1062 (23000) at line 1140: Duplicate entry 'localhost-root' for key 'PRIMARY' FATAL ERROR: Upgrade failed Analysis: As part of the bug 12917151 fix we are making all the hostnames as lower case hostnames. So, this has been done by mysql_upgrade. In case of above mentioned duplicate entries mysql_upgrade tries to change hostname to lowercase. Since there is already 'root'@'localhost' exists. it is failing with "duplicate entry" error. Fix: Since its a valid error failure. We are making the error more verbose. So, that user will delete the duplicate errors manually. Along with existing error we are printing below error as well. ERROR 1644 (45000) at line 1153: Multiple accounts exist for @user_name, @host_name that differ only in Host lettercase; remove all except one of them --- scripts/mysql_system_tables_fix.sql | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql index 23c8b7f7e5a..0578e37fb7a 100644 --- a/scripts/mysql_system_tables_fix.sql +++ b/scripts/mysql_system_tables_fix.sql @@ -652,6 +652,25 @@ INSERT INTO tmp_proxies_priv VALUES ('localhost', 'root', '', '', TRUE, '', now( INSERT INTO proxies_priv SELECT * FROM tmp_proxies_priv WHERE @had_proxies_priv_table=0; DROP TABLE tmp_proxies_priv; +-- Checking for any duplicate hostname and username combination are exists. +-- If exits we will throw error. +DROP PROCEDURE IF EXISTS mysql.count_duplicate_host_names; +DELIMITER // +CREATE PROCEDURE mysql.count_duplicate_host_names() +BEGIN + SET @duplicate_hosts=0; + SET @duplicate_hosts=(SELECT count(*) FROM mysql.user GROUP BY user, lower(host) HAVING count(*) > 1 LIMIT 1); + select @duplicate_hosts; + IF @duplicate_hosts > 1 THEN + SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Multiple accounts exist for @user_name, @host_name that differ only in Host lettercase; remove all except one of them'; + END IF; +END // +DELIMITER ; +CALL mysql.count_duplicate_host_names(); +-- Get warnings (if any) +SHOW WARNINGS; +DROP PROCEDURE mysql.count_duplicate_host_names; + # Convering the host name to lower case for existing users UPDATE user SET host=LOWER( host ) WHERE LOWER( host ) <> host; -- cgit v1.2.1 From 81f79aee3cd51414c5c3240f8d1e9b35674da829 Mon Sep 17 00:00:00 2001 From: Venkata Sidagam Date: Fri, 1 Aug 2014 17:09:55 +0530 Subject: Bug #18415196 MYSQL_UPGRADE DUPLICATE KEY ERROR FOR MYSQL.USER FOR 5.5.35+, 5.6.15+, 5.7.3+ Follow-up patch. Removed unwanted code. --- scripts/mysql_system_tables_fix.sql | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql index 0578e37fb7a..c101fd63308 100644 --- a/scripts/mysql_system_tables_fix.sql +++ b/scripts/mysql_system_tables_fix.sql @@ -658,9 +658,7 @@ DROP PROCEDURE IF EXISTS mysql.count_duplicate_host_names; DELIMITER // CREATE PROCEDURE mysql.count_duplicate_host_names() BEGIN - SET @duplicate_hosts=0; SET @duplicate_hosts=(SELECT count(*) FROM mysql.user GROUP BY user, lower(host) HAVING count(*) > 1 LIMIT 1); - select @duplicate_hosts; IF @duplicate_hosts > 1 THEN SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Multiple accounts exist for @user_name, @host_name that differ only in Host lettercase; remove all except one of them'; END IF; -- cgit v1.2.1 From 0bd28ebe2d1bb32c431c111c776a584a8ab7543f Mon Sep 17 00:00:00 2001 From: Balasubramanian Kandasamy Date: Mon, 4 Aug 2014 15:56:19 +0200 Subject: Updated for el7 regular rpms --- support-files/mysql.spec.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 7908e1b5d50..db75d1a8191 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -142,9 +142,9 @@ %else %if %(test -f /etc/oracle-release && echo 1 || echo 0) %define elver %(rpm -qf --qf '%%{version}\\n' /etc/oracle-release | sed -e 's/^\\([0-9]*\\).*/\\1/g') - %if "%elver" == "6" - %define distro_description Oracle Linux 6 - %define distro_releasetag el6 + %if "%elver" == "6" || "%elver" == "7" + %define distro_description Oracle Linux %elver + %define distro_releasetag el%elver %define distro_buildreq gcc-c++ ncurses-devel perl readline-devel time zlib-devel cmake libaio-devel %define distro_requires chkconfig coreutils grep procps shadow-utils net-tools %else -- cgit v1.2.1 From 07668e6751fef106d1859a9e6f292e47b6d01253 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 6 Aug 2014 09:51:20 +0800 Subject: Remove unstable test case innodb_bug18942294, approved by Jimmy over IM. --- storage/innobase/buf/buf0buf.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c index 2249d20e2ea..b6bfcc3dbc0 100644 --- a/storage/innobase/buf/buf0buf.c +++ b/storage/innobase/buf/buf0buf.c @@ -3562,10 +3562,6 @@ buf_page_io_complete( (ulong) bpage->offset); } - DBUG_EXECUTE_IF("set_dict_sys_to_null", - dict_sys = NULL; - goto corrupt;); - /* From version 3.23.38 up we store the page checksum to the 4 first bytes of the page end lsn field */ @@ -3621,10 +3617,6 @@ corrupt: " a corrupt database page.\n", stderr); - DBUG_EXECUTE_IF( - "set_dict_sys_to_null", - DBUG_SUICIDE();); - ut_error; } } -- cgit v1.2.1 From f8893dc472570383d2445c026c1488a010865a84 Mon Sep 17 00:00:00 2001 From: mithun Date: Tue, 12 Aug 2014 17:16:51 +0530 Subject: Bug #11755818 : LIKE DOESN'T MATCH WHEN CP932_BIN/SJIS_BIN COLLATIONS ARE USED. ISSUE : ------- Code points of HALF WIDTH KATAKANA in SJIS/CP932 range from A1 to DF. In function my_wildcmp_mb_bin_impl while comparing such single byte code points, there is a code which compares signed character with unsigned character. Because of this, comparisons of two same code points representing a HALF WIDTH KATAKANA character always fails. Solution: --------- A code point of HALF WIDTH KATAKANA at-least need 8 bits. Promoting the variable from uchar to int will fix the issue. mysql-test/t/ctype_cp932.test: Tests which have conditions LIKE 'STRING PATTERN WITH HALF WIDTH KATAKANA'. strings/ctype-mb.c: A code point of HALF WIDTH KATAKANA at-least need 8 bits. Promoting the variable from uchar to int will fix the issue. --- mysql-test/r/ctype_cp932.result | 35 +++++++++++++++++++++++++++++++++++ mysql-test/t/ctype_cp932.test | 29 +++++++++++++++++++++++++++++ strings/ctype-mb.c | 4 ++-- 3 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 mysql-test/r/ctype_cp932.result create mode 100644 mysql-test/t/ctype_cp932.test diff --git a/mysql-test/r/ctype_cp932.result b/mysql-test/r/ctype_cp932.result new file mode 100644 index 00000000000..4b170ee4c9b --- /dev/null +++ b/mysql-test/r/ctype_cp932.result @@ -0,0 +1,35 @@ +# +# Bug #11755818 LIKE DOESN'T MATCH WHEN CP932_BIN/SJIS_BIN COLLATIONS ARE +# USED. +# +SET @old_character_set_client= @@character_set_client; +SET @old_character_set_connection= @@character_set_connection; +SET @old_character_set_results= @@character_set_results; +SET character_set_client= 'utf8'; +SET character_set_connection= 'utf8'; +SET character_set_results= 'utf8'; +CREATE TABLE t1 (a VARCHAR(10) COLLATE cp932_bin); +INSERT INTO t1 VALUES('カカ'); +SELECT * FROM t1 WHERE a LIKE '%カ'; +a +カカ +SELECT * FROM t1 WHERE a LIKE '_カ'; +a +カカ +SELECT * FROM t1 WHERE a LIKE '%_カ'; +a +カカ +ALTER TABLE t1 MODIFY a VARCHAR(100) COLLATE sjis_bin; +SELECT * FROM t1 WHERE a LIKE '%カ'; +a +カカ +SELECT * FROM t1 WHERE a LIKE '_カ'; +a +カカ +SELECT * FROM t1 WHERE a LIKE '%_カ'; +a +カカ +DROP TABLE t1; +SET @@character_set_client= @old_character_set_client; +SET @@character_set_connection= @old_character_set_connection; +SET @@character_set_results= @old_character_set_results; diff --git a/mysql-test/t/ctype_cp932.test b/mysql-test/t/ctype_cp932.test new file mode 100644 index 00000000000..96a2666f69b --- /dev/null +++ b/mysql-test/t/ctype_cp932.test @@ -0,0 +1,29 @@ +-- source include/have_cp932.inc +--echo # +--echo # Bug #11755818 LIKE DOESN'T MATCH WHEN CP932_BIN/SJIS_BIN COLLATIONS ARE +--echo # USED. +--echo # + +SET @old_character_set_client= @@character_set_client; +SET @old_character_set_connection= @@character_set_connection; +SET @old_character_set_results= @@character_set_results; +SET character_set_client= 'utf8'; +SET character_set_connection= 'utf8'; +SET character_set_results= 'utf8'; + +CREATE TABLE t1 (a VARCHAR(10) COLLATE cp932_bin); +INSERT INTO t1 VALUES('カカ'); +SELECT * FROM t1 WHERE a LIKE '%カ'; +SELECT * FROM t1 WHERE a LIKE '_カ'; +SELECT * FROM t1 WHERE a LIKE '%_カ'; + +ALTER TABLE t1 MODIFY a VARCHAR(100) COLLATE sjis_bin; +SELECT * FROM t1 WHERE a LIKE '%カ'; +SELECT * FROM t1 WHERE a LIKE '_カ'; +SELECT * FROM t1 WHERE a LIKE '%_カ'; +DROP TABLE t1; + +## Reset to initial values +SET @@character_set_client= @old_character_set_client; +SET @@character_set_connection= @old_character_set_connection; +SET @@character_set_results= @old_character_set_results; diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c index 258613d3b05..02373304672 100644 --- a/strings/ctype-mb.c +++ b/strings/ctype-mb.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2002, 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 @@ -1044,7 +1044,7 @@ static int my_wildcmp_mb_bin_impl(CHARSET_INFO *cs, } if (*wildstr == w_many) { /* Found w_many */ - uchar cmp; + int cmp; const char* mb = wildstr; int mb_len=0; -- cgit v1.2.1 From 34bc0829c3464315bd454d9766611be313c82eb3 Mon Sep 17 00:00:00 2001 From: Balasubramanian Kandasamy Date: Tue, 12 Aug 2014 14:32:16 +0200 Subject: Add patch mysql-5.5-libmysqlclient-symbols.patch for el7 --- support-files/CMakeLists.txt | 1 + .../mysql-5.5-libmysqlclient-symbols.patch | 982 +++++++++++++++++++++ support-files/mysql.spec.sh | 4 +- 3 files changed, 986 insertions(+), 1 deletion(-) create mode 100644 support-files/mysql-5.5-libmysqlclient-symbols.patch diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt index 6aef51a5c16..ff3d40a92b0 100644 --- a/support-files/CMakeLists.txt +++ b/support-files/CMakeLists.txt @@ -81,6 +81,7 @@ IF(UNIX) CONFIGURE_FILE(mysql.spec.sh ${CMAKE_CURRENT_BINARY_DIR}/${SPECFILENAME} @ONLY) CONFIGURE_FILE(MySQL-shared-compat.spec.sh ${CMAKE_CURRENT_BINARY_DIR}/MySQL-shared-compat.spec @ONLY) + CONFIGURE_FILE(mysql-5.5-libmysqlclient-symbols.patch ${CMAKE_CURRENT_BINARY_DIR}/mysql-5.5-libmysqlclient-symbols.patch @ONLY) SET(bindir ${prefix}/${INSTALL_BINDIR}) SET(sbindir ${prefix}/${INSTALL_SBINDIR}) diff --git a/support-files/mysql-5.5-libmysqlclient-symbols.patch b/support-files/mysql-5.5-libmysqlclient-symbols.patch new file mode 100644 index 00000000000..ce5455ee29b --- /dev/null +++ b/support-files/mysql-5.5-libmysqlclient-symbols.patch @@ -0,0 +1,982 @@ +diff -rup old/libmysql/CMakeLists.txt new/libmysql/CMakeLists.txt +--- old/libmysql/CMakeLists.txt 2013-11-05 08:19:26.000000000 +0100 ++++ new/libmysql/CMakeLists.txt 2014-01-10 15:41:30.530068723 +0100 +@@ -205,13 +205,14 @@ IF(NOT DISABLE_SHARED) + OUTPUT_NAME mysqlclient + VERSION "${OS_SHARED_LIB_VERSION}" + SOVERSION "${SHARED_LIB_MAJOR_VERSION}") ++ CONFIGURE_FILE(libmysql.ver.in ${CMAKE_CURRENT_BINARY_DIR}/libmysql.ver) + IF(LINK_FLAG_NO_UNDEFINED) + 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}") ++ "${libmysql_link_flags} -Wl,--version-script=libmysql.ver ${LINK_FLAG_NO_UNDEFINED}") + ENDIF() + # clean direct output needs to be set several targets have the same name + #(mysqlclient in this case) +diff -rup old/libmysql/libmysql.c new/libmysql/libmysql.c +--- old/libmysql/libmysql.c 2013-11-05 08:19:26.000000000 +0100 ++++ new/libmysql/libmysql.c 2014-01-10 15:46:35.708928462 +0100 +@@ -4870,3 +4870,612 @@ my_bool STDCALL mysql_read_query_result( + return (*mysql->methods->read_query_result)(mysql); + } + ++#ifndef EMBEDDED_LIBRARY ++ ++// Hack to provide both libmysqlclient_16 and libmysqlclient_18 symbol versions ++ ++#define SYM_16(_exportedsym) __asm__(".symver symver16_" #_exportedsym "," #_exportedsym "@libmysqlclient_16") ++ ++void STDCALL symver16_myodbc_remove_escape(MYSQL *mysql,char *name) ++{ ++ return myodbc_remove_escape(mysql, name); ++} ++SYM_16(myodbc_remove_escape); ++ ++ ++my_ulonglong STDCALL symver16_mysql_affected_rows(MYSQL *mysql) ++{ ++ return mysql_affected_rows(mysql); ++} ++SYM_16(mysql_affected_rows); ++ ++ ++my_bool STDCALL symver16_mysql_autocommit(MYSQL * mysql, my_bool auto_mode) ++{ ++ return mysql_autocommit(mysql, auto_mode); ++} ++SYM_16(mysql_autocommit); ++ ++ ++my_bool STDCALL symver16_mysql_change_user(MYSQL *mysql, const char *user, const char *passwd, const char *db) ++{ ++ return mysql_change_user(mysql, user, passwd, db); ++} ++SYM_16(mysql_change_user); ++ ++ ++const char * STDCALL symver16_mysql_character_set_name(MYSQL *mysql) ++{ ++ return mysql_character_set_name(mysql); ++} ++SYM_16(mysql_character_set_name); ++ ++ ++my_bool STDCALL symver16_mysql_commit(MYSQL * mysql) ++{ ++ return mysql_commit(mysql); ++} ++SYM_16(mysql_commit); ++ ++ ++void STDCALL symver16_mysql_data_seek(MYSQL_RES *result, my_ulonglong row) ++{ ++ return mysql_data_seek(result, row); ++} ++SYM_16(mysql_data_seek); ++ ++ ++void STDCALL symver16_mysql_debug(const char *debug __attribute__((unused))) ++{ ++ return mysql_debug(debug); ++} ++SYM_16(mysql_debug); ++ ++ ++int STDCALL symver16_mysql_dump_debug_info(MYSQL *mysql) ++{ ++ return mysql_dump_debug_info(mysql); ++} ++SYM_16(mysql_dump_debug_info); ++ ++ ++my_bool STDCALL symver16_mysql_embedded(void) ++{ ++ return mysql_embedded(); ++} ++SYM_16(mysql_embedded); ++ ++ ++my_bool STDCALL symver16_mysql_eof(MYSQL_RES *res) ++{ ++ return mysql_eof(res); ++} ++SYM_16(mysql_eof); ++ ++ ++ulong STDCALL symver16_mysql_escape_string(char *to,const char *from,ulong length) ++{ ++ return mysql_escape_string(to, from, length); ++} ++SYM_16(mysql_escape_string); ++ ++ ++MYSQL_FIELD * STDCALL symver16_mysql_fetch_field(MYSQL_RES *result) ++{ ++ return mysql_fetch_field(result); ++} ++SYM_16(mysql_fetch_field); ++ ++ ++MYSQL_FIELD * STDCALL symver16_mysql_fetch_field_direct(MYSQL_RES *res,uint fieldnr) ++{ ++ return mysql_fetch_field_direct(res, fieldnr); ++} ++SYM_16(mysql_fetch_field_direct); ++ ++ ++MYSQL_FIELD * STDCALL symver16_mysql_fetch_fields(MYSQL_RES *res) ++{ ++ return mysql_fetch_fields(res); ++} ++SYM_16(mysql_fetch_fields); ++ ++ ++unsigned int STDCALL symver16_mysql_field_count(MYSQL *mysql) ++{ ++ return mysql_field_count(mysql); ++} ++SYM_16(mysql_field_count); ++ ++ ++MYSQL_FIELD_OFFSET STDCALL symver16_mysql_field_seek(MYSQL_RES *result, MYSQL_FIELD_OFFSET field_offset) ++{ ++ return mysql_field_seek(result, field_offset); ++} ++SYM_16(mysql_field_seek); ++ ++ ++MYSQL_FIELD_OFFSET STDCALL symver16_mysql_field_tell(MYSQL_RES *res) ++{ ++ return mysql_field_tell(res); ++} ++SYM_16(mysql_field_tell); ++ ++ ++void STDCALL symver16_mysql_get_character_set_info(MYSQL *mysql, MY_CHARSET_INFO *csinfo) ++{ ++ return mysql_get_character_set_info(mysql, csinfo); ++} ++SYM_16(mysql_get_character_set_info); ++ ++ ++const char * STDCALL symver16_mysql_get_client_info(void) ++{ ++ return mysql_get_client_info(); ++} ++SYM_16(mysql_get_client_info); ++ ++ulong STDCALL symver16_mysql_get_client_version(void) ++{ ++ return mysql_get_client_version(); ++} ++SYM_16(mysql_get_client_version); ++ ++ ++const char * STDCALL symver16_mysql_get_host_info(MYSQL *mysql) ++{ ++ return mysql_get_host_info(mysql); ++} ++SYM_16(mysql_get_host_info); ++ ++ ++MYSQL_PARAMETERS *STDCALL symver16_mysql_get_parameters(void) ++{ ++ return mysql_get_parameters(); ++} ++SYM_16(mysql_get_parameters); ++ ++ ++uint STDCALL symver16_mysql_get_proto_info(MYSQL *mysql) ++{ ++ return mysql_get_proto_info(mysql); ++} ++SYM_16(mysql_get_proto_info); ++ ++ ++const char * STDCALL symver16_mysql_get_server_info(MYSQL *mysql) ++{ ++ return mysql_get_server_info(mysql); ++} ++SYM_16(mysql_get_server_info); ++ ++ ++ulong STDCALL symver16_mysql_hex_string(char *to, const char *from, ulong length) ++{ ++ return mysql_hex_string(to, from, length); ++} ++SYM_16(mysql_hex_string); ++ ++ ++const char *STDCALL symver16_mysql_info(MYSQL *mysql) ++{ ++ return mysql_info(mysql); ++} ++SYM_16(mysql_info); ++ ++ ++my_ulonglong STDCALL symver16_mysql_insert_id(MYSQL *mysql) ++{ ++ return mysql_insert_id(mysql); ++} ++SYM_16(mysql_insert_id); ++ ++ ++int STDCALL symver16_mysql_kill(MYSQL *mysql,ulong pid) ++{ ++ return mysql_kill(mysql, pid); ++} ++SYM_16(mysql_kill); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_list_dbs(MYSQL *mysql, const char *wild) ++{ ++ return mysql_list_dbs(mysql, wild); ++} ++SYM_16(mysql_list_dbs); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_list_fields(MYSQL *mysql, const char *table, const char *wild) ++{ ++ return mysql_list_fields(mysql, table, wild); ++} ++SYM_16(mysql_list_fields); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_list_processes(MYSQL *mysql) ++{ ++ return mysql_list_processes(mysql); ++} ++SYM_16(mysql_list_processes); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_list_tables(MYSQL *mysql, const char *wild) ++{ ++ return mysql_list_tables(mysql, wild); ++} ++SYM_16(mysql_list_tables); ++ ++ ++my_bool STDCALL symver16_mysql_more_results(MYSQL *mysql) ++{ ++ return mysql_more_results(mysql); ++} ++SYM_16(mysql_more_results); ++ ++ ++int STDCALL symver16_mysql_next_result(MYSQL *mysql) ++{ ++ return mysql_next_result(mysql); ++} ++SYM_16(mysql_next_result); ++ ++ ++int STDCALL symver16_mysql_ping(MYSQL *mysql) ++{ ++ return mysql_ping(mysql); ++} ++SYM_16(mysql_ping); ++ ++ ++int STDCALL symver16_mysql_query(MYSQL *mysql, const char *query) ++{ ++ return mysql_query(mysql, query); ++} ++SYM_16(mysql_query); ++ ++ ++my_bool STDCALL symver16_mysql_read_query_result(MYSQL *mysql) ++{ ++ return mysql_read_query_result(mysql); ++} ++SYM_16(mysql_read_query_result); ++ ++ ++ulong STDCALL symver16_mysql_real_escape_string(MYSQL *mysql, char *to,const char *from, ulong length) ++{ ++ return mysql_real_escape_string(mysql, to, from, length); ++} ++SYM_16(mysql_real_escape_string); ++ ++ ++int STDCALL symver16_mysql_refresh(MYSQL *mysql,uint options) ++{ ++ return mysql_refresh(mysql, options); ++} ++SYM_16(mysql_refresh); ++ ++ ++my_bool STDCALL symver16_mysql_rollback(MYSQL * mysql) ++{ ++ return mysql_rollback(mysql); ++} ++SYM_16(mysql_rollback); ++ ++ ++MYSQL_ROW_OFFSET STDCALL symver16_mysql_row_seek(MYSQL_RES *result, MYSQL_ROW_OFFSET row) ++{ ++ return mysql_row_seek(result, row); ++} ++SYM_16(mysql_row_seek); ++ ++ ++MYSQL_ROW_OFFSET STDCALL symver16_mysql_row_tell(MYSQL_RES *res) ++{ ++ return mysql_row_tell(res); ++} ++SYM_16(mysql_row_tell); ++ ++ ++void STDCALL symver16_mysql_server_end() ++{ ++ return mysql_server_end(); ++} ++SYM_16(mysql_server_end); ++ ++ ++int STDCALL symver16_mysql_server_init(int argc __attribute__((unused)), char **argv __attribute__((unused)), char **groups __attribute__((unused))) ++{ ++ return mysql_server_init(argc, argv, groups); ++} ++SYM_16(mysql_server_init); ++ ++ ++void symver16_mysql_set_local_infile_default(MYSQL *mysql) ++{ ++ return mysql_set_local_infile_default(mysql); ++} ++SYM_16(mysql_set_local_infile_default); ++ ++ ++void symver16_mysql_set_local_infile_handler(MYSQL *mysql, int (*local_infile_init)(void **, const char *, void *), int (*local_infile_read)(void *, char *, uint), void (*local_infile_end)(void *), int (*local_infile_error)(void *, char *, uint), void *userdata) ++{ ++ return mysql_set_local_infile_handler(mysql, local_infile_init, local_infile_read, local_infile_end, local_infile_error, userdata); ++} ++SYM_16(mysql_set_local_infile_handler); ++ ++ ++int STDCALL symver16_mysql_set_server_option(MYSQL *mysql, enum enum_mysql_set_option option) ++{ ++ return mysql_set_server_option(mysql, option); ++} ++SYM_16(mysql_set_server_option); ++ ++ ++int STDCALL symver16_mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level) ++{ ++ return mysql_shutdown(mysql, shutdown_level); ++} ++SYM_16(mysql_shutdown); ++ ++ ++const char *STDCALL symver16_mysql_sqlstate(MYSQL *mysql) ++{ ++ return mysql_sqlstate(mysql); ++} ++SYM_16(mysql_sqlstate); ++ ++ ++const char * STDCALL symver16_mysql_stat(MYSQL *mysql) ++{ ++ return mysql_stat(mysql); ++} ++SYM_16(mysql_stat); ++ ++ ++my_ulonglong STDCALL symver16_mysql_stmt_affected_rows(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_affected_rows(stmt); ++} ++SYM_16(mysql_stmt_affected_rows); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_attr_get(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, void *value) ++{ ++ return mysql_stmt_attr_get(stmt, attr_type, value); ++} ++SYM_16(mysql_stmt_attr_get); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_attr_set(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, const void *value) ++{ ++ return mysql_stmt_attr_set(stmt, attr_type, value); ++} ++SYM_16(mysql_stmt_attr_set); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_bind_param(MYSQL_STMT *stmt, MYSQL_BIND *my_bind) ++{ ++ return mysql_stmt_bind_param(stmt, my_bind); ++} ++SYM_16(mysql_stmt_bind_param); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *my_bind) ++{ ++ return mysql_stmt_bind_result(stmt, my_bind); ++} ++SYM_16(mysql_stmt_bind_result); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_close(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_close(stmt); ++} ++SYM_16(mysql_stmt_close); ++ ++ ++void STDCALL symver16_mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong row) ++{ ++ return mysql_stmt_data_seek(stmt, row); ++} ++SYM_16(mysql_stmt_data_seek); ++ ++ ++uint STDCALL symver16_mysql_stmt_errno(MYSQL_STMT * stmt) ++{ ++ return mysql_stmt_errno(stmt); ++} ++SYM_16(mysql_stmt_errno); ++ ++ ++const char *STDCALL symver16_mysql_stmt_error(MYSQL_STMT * stmt) ++{ ++ return mysql_stmt_error(stmt); ++} ++SYM_16(mysql_stmt_error); ++ ++ ++int STDCALL symver16_mysql_stmt_execute(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_execute(stmt); ++} ++SYM_16(mysql_stmt_execute); ++ ++ ++int STDCALL symver16_mysql_stmt_fetch(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_fetch(stmt); ++} ++SYM_16(mysql_stmt_fetch); ++ ++ ++int STDCALL symver16_mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *my_bind, uint column, ulong offset) ++{ ++ return mysql_stmt_fetch_column(stmt, my_bind, column, offset); ++} ++SYM_16(mysql_stmt_fetch_column); ++ ++ ++unsigned int STDCALL symver16_mysql_stmt_field_count(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_field_count(stmt); ++} ++SYM_16(mysql_stmt_field_count); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_free_result(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_free_result(stmt); ++} ++SYM_16(mysql_stmt_free_result); ++ ++ ++MYSQL_STMT * STDCALL symver16_mysql_stmt_init(MYSQL *mysql) ++{ ++ return mysql_stmt_init(mysql); ++} ++SYM_16(mysql_stmt_init); ++ ++ ++my_ulonglong STDCALL symver16_mysql_stmt_insert_id(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_insert_id(stmt); ++} ++SYM_16(mysql_stmt_insert_id); ++ ++ ++my_ulonglong STDCALL symver16_mysql_stmt_num_rows(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_num_rows(stmt); ++} ++SYM_16(mysql_stmt_num_rows); ++ ++ ++ulong STDCALL symver16_mysql_stmt_param_count(MYSQL_STMT * stmt) ++{ ++ return mysql_stmt_param_count(stmt); ++} ++SYM_16(mysql_stmt_param_count); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_stmt_param_metadata(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_param_metadata(stmt); ++} ++SYM_16(mysql_stmt_param_metadata); ++ ++ ++int STDCALL symver16_mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length) ++{ ++ return mysql_stmt_prepare(stmt, query, length); ++} ++SYM_16(mysql_stmt_prepare); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_reset(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_reset(stmt); ++} ++SYM_16(mysql_stmt_reset); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_stmt_result_metadata(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_result_metadata(stmt); ++} ++SYM_16(mysql_stmt_result_metadata); ++ ++ ++MYSQL_ROW_OFFSET STDCALL symver16_mysql_stmt_row_seek(MYSQL_STMT *stmt, MYSQL_ROW_OFFSET row) ++{ ++ return mysql_stmt_row_seek(stmt, row); ++} ++SYM_16(mysql_stmt_row_seek); ++ ++ ++MYSQL_ROW_OFFSET STDCALL symver16_mysql_stmt_row_tell(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_row_tell(stmt); ++} ++SYM_16(mysql_stmt_row_tell); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number, const char *data, ulong length) ++{ ++ return mysql_stmt_send_long_data(stmt, param_number, data, length); ++} ++SYM_16(mysql_stmt_send_long_data); ++ ++ ++const char *STDCALL symver16_mysql_stmt_sqlstate(MYSQL_STMT * stmt) ++{ ++ return mysql_stmt_sqlstate(stmt); ++} ++SYM_16(mysql_stmt_sqlstate); ++ ++ ++int STDCALL symver16_mysql_stmt_store_result(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_store_result(stmt); ++} ++SYM_16(mysql_stmt_store_result); ++ ++ ++void STDCALL symver16_mysql_thread_end() ++{ ++ return mysql_thread_end(); ++} ++SYM_16(mysql_thread_end); ++ ++ ++ulong STDCALL symver16_mysql_thread_id(MYSQL *mysql) ++{ ++ return mysql_thread_id(mysql); ++} ++SYM_16(mysql_thread_id); ++ ++ ++my_bool STDCALL symver16_mysql_thread_init() ++{ ++ return mysql_thread_init(); ++} ++SYM_16(mysql_thread_init); ++ ++ ++uint STDCALL symver16_mysql_thread_safe(void) ++{ ++ return mysql_thread_safe(); ++} ++SYM_16(mysql_thread_safe); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_use_result(MYSQL *mysql) ++{ ++ return mysql_use_result(mysql); ++} ++SYM_16(mysql_use_result); ++ ++ ++uint STDCALL symver16_mysql_warning_count(MYSQL *mysql) ++{ ++ return mysql_warning_count(mysql); ++} ++SYM_16(mysql_warning_count); ++ ++/*****/ ++ ++MYSQL * STDCALL symver16_mysql_real_connect(MYSQL *mysql,const char *host, const char *user, const char *passwd, const char *db, uint port, const char *unix_socket,ulong client_flag) ++{ ++ return mysql_real_connect(mysql, host, user, passwd, db, port, unix_socket, client_flag); ++} ++SYM_16(mysql_real_connect); ++ ++/*****/ ++ ++my_bool symver16_my_init(void) ++{ ++ return my_init(); ++} ++SYM_16(my_init); ++ ++#endif +diff -rup old/libmysql/libmysql.ver.in new/libmysql/libmysql.ver.in +--- old/libmysql/libmysql.ver.in 2013-11-05 08:19:26.000000000 +0100 ++++ new/libmysql/libmysql.ver.in 2014-01-10 15:41:30.545182782 +0100 +@@ -1 +1,136 @@ +-libmysqlclient_@SHARED_LIB_MAJOR_VERSION@ { global: *; }; ++libmysqlclient_16 ++{ ++ local: ++ symver16_*; ++}; ++ ++libmysqlclient_18 ++{ ++ global: ++ my_init; ++ myodbc_remove_escape; ++ mysql_affected_rows; ++ mysql_autocommit; ++ mysql_change_user; ++ mysql_character_set_name; ++ mysql_close; ++ mysql_commit; ++ mysql_data_seek; ++ mysql_debug; ++ mysql_dump_debug_info; ++ mysql_embedded; ++ mysql_eof; ++ mysql_errno; ++ mysql_error; ++ mysql_escape_string; ++ mysql_fetch_field; ++ mysql_fetch_field_direct; ++ mysql_fetch_fields; ++ mysql_fetch_lengths; ++ mysql_fetch_row; ++ mysql_field_count; ++ mysql_field_seek; ++ mysql_field_tell; ++ mysql_free_result; ++ mysql_get_character_set_info; ++ mysql_get_client_info; ++ mysql_get_client_version; ++ mysql_get_host_info; ++ mysql_get_parameters; ++ mysql_get_proto_info; ++ mysql_get_server_info; ++ mysql_get_server_version; ++ mysql_get_ssl_cipher; ++ mysql_hex_string; ++ mysql_info; ++ mysql_init; ++ mysql_insert_id; ++ mysql_kill; ++ mysql_list_dbs; ++ mysql_list_fields; ++ mysql_list_processes; ++ mysql_list_tables; ++ mysql_more_results; ++ mysql_next_result; ++ mysql_num_fields; ++ mysql_num_rows; ++ mysql_options; ++ mysql_ping; ++ mysql_query; ++ mysql_read_query_result; ++ mysql_real_connect; ++ mysql_real_escape_string; ++ mysql_real_query; ++ mysql_refresh; ++ mysql_rollback; ++ mysql_row_seek; ++ mysql_row_tell; ++ mysql_select_db; ++ mysql_send_query; ++ mysql_server_end; ++ mysql_server_init; ++ mysql_set_character_set; ++ mysql_set_local_infile_default; ++ mysql_set_local_infile_handler; ++ mysql_set_server_option; ++ mysql_shutdown; ++ mysql_sqlstate; ++ mysql_ssl_set; ++ mysql_stat; ++ mysql_stmt_affected_rows; ++ mysql_stmt_attr_get; ++ mysql_stmt_attr_set; ++ mysql_stmt_bind_param; ++ mysql_stmt_bind_result; ++ mysql_stmt_close; ++ mysql_stmt_data_seek; ++ mysql_stmt_errno; ++ mysql_stmt_error; ++ mysql_stmt_execute; ++ mysql_stmt_fetch; ++ mysql_stmt_fetch_column; ++ mysql_stmt_field_count; ++ mysql_stmt_free_result; ++ mysql_stmt_init; ++ mysql_stmt_insert_id; ++ mysql_stmt_num_rows; ++ mysql_stmt_param_count; ++ mysql_stmt_param_metadata; ++ mysql_stmt_prepare; ++ mysql_stmt_reset; ++ mysql_stmt_result_metadata; ++ mysql_stmt_row_seek; ++ mysql_stmt_row_tell; ++ mysql_stmt_send_long_data; ++ mysql_stmt_sqlstate; ++ mysql_stmt_store_result; ++ mysql_store_result; ++ mysql_thread_end; ++ mysql_thread_id; ++ mysql_thread_init; ++ mysql_thread_safe; ++ mysql_use_result; ++ mysql_warning_count; ++ ++ free_defaults; ++ handle_options; ++ load_defaults; ++ my_print_help; ++ ++ #my_make_scrambled_password; ++ THR_KEY_mysys; ++ ++ mysql_client_find_plugin; ++ mysql_client_register_plugin; ++ mysql_load_plugin; ++ mysql_load_plugin_v; ++ mysql_plugin_options; ++ mysql_stmt_next_result; ++ ++ #mysql_default_charset_info; ++ mysql_get_charset; ++ mysql_get_charset_by_csname; ++ mysql_net_realloc; ++ #mysql_client_errors; ++ *; ++} libmysqlclient_16; +diff -rup old/mysys/charset.c new/mysys/charset.c +--- old/mysys/charset.c 2013-11-05 08:19:26.000000000 +0100 ++++ new/mysys/charset.c 2014-01-10 15:41:30.552919678 +0100 +@@ -941,3 +941,20 @@ size_t escape_quotes_for_mysql(CHARSET_I + *to= 0; + return overflow ? (ulong)~0 : (ulong) (to - to_start); + } ++ ++#ifndef EMBEDDED_LIBRARY ++ ++// Hack to provide Fedora symbols ++ ++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 flags) ++{ ++ return get_charset_by_csname(cs_name, cs_flags, flags); ++} ++ ++#endif +diff -rup old/sql/net_serv.cc new/sql/net_serv.cc +--- old/sql/net_serv.cc 2013-11-05 08:19:26.000000000 +0100 ++++ new/sql/net_serv.cc 2014-01-10 15:41:30.563377346 +0100 +@@ -1190,3 +1190,17 @@ void my_net_set_write_timeout(NET *net, + #endif + DBUG_VOID_RETURN; + } ++ ++#ifndef EMBEDDED_LIBRARY ++C_MODE_START ++ ++// Hack to provide Fedora symbols ++ ++my_bool mysql_net_realloc(NET *net, size_t length) ++{ ++ return net_realloc(net, length); ++} ++ ++C_MODE_END ++#endif ++ +diff -rup old/sql/password.c new/sql/password.c +--- old/sql/password.c 2013-11-05 08:19:26.000000000 +0100 ++++ new/sql/password.c 2014-01-10 15:41:30.567134663 +0100 +@@ -563,3 +563,17 @@ void make_password_from_salt(char *to, c + *to++= PVERSION41_CHAR; + octet2hex(to, (const char*) hash_stage2, SHA1_HASH_SIZE); + } ++ ++#ifndef EMBEDDED_LIBRARY ++ ++// Hack to provide both libmysqlclient_16 and libmysqlclient_18 symbol versions ++ ++#define SYM_16(_exportedsym) __asm__(".symver symver16_" #_exportedsym "," #_exportedsym "@libmysqlclient_16") ++ ++void symver16_my_make_scrambled_password(char *to, const char *password, size_t pass_len) ++{ ++ my_make_scrambled_password(to, password, pass_len); ++} ++SYM_16(my_make_scrambled_password); ++ ++#endif +diff -rup old/sql-common/client.c new/sql-common/client.c +--- old/sql-common/client.c 2013-11-05 08:19:26.000000000 +0100 ++++ new/sql-common/client.c 2014-01-10 15:41:30.574151024 +0100 +@@ -4399,3 +4399,136 @@ static int clear_password_auth_client(MY + + return res ? CR_ERROR : CR_OK; + } ++ ++#ifndef EMBEDDED_LIBRARY ++ ++// Hack to provide both libmysqlclient_16 and libmysqlclient_18 symbol versions ++ ++#define SYM_16(_exportedsym) __asm__(".symver symver16_" #_exportedsym "," #_exportedsym "@libmysqlclient_16") ++ ++void STDCALL symver16_mysql_close(MYSQL *mysql) ++{ ++ return mysql_close(mysql); ++} ++SYM_16(mysql_close); ++ ++ ++uint STDCALL symver16_mysql_errno(MYSQL *mysql) ++{ ++ return mysql_errno(mysql); ++} ++SYM_16(mysql_errno); ++ ++ ++const char * STDCALL symver16_mysql_error(MYSQL *mysql) ++{ ++ return mysql_error(mysql); ++} ++SYM_16(mysql_error); ++ ++ ++ulong * STDCALL symver16_mysql_fetch_lengths(MYSQL_RES *res) ++{ ++ return mysql_fetch_lengths(res); ++} ++SYM_16(mysql_fetch_lengths); ++ ++ ++MYSQL_ROW STDCALL symver16_mysql_fetch_row(MYSQL_RES *res) ++{ ++ return mysql_fetch_row(res); ++} ++SYM_16(mysql_fetch_row); ++ ++ ++void STDCALL symver16_mysql_free_result(MYSQL_RES *result) ++{ ++ return mysql_free_result(result); ++} ++SYM_16(mysql_free_result); ++ ++ ++ulong STDCALL symver16_mysql_get_server_version(MYSQL *mysql) ++{ ++ return mysql_get_server_version(mysql); ++} ++SYM_16(mysql_get_server_version); ++ ++ ++const char * STDCALL symver16_mysql_get_ssl_cipher(MYSQL *mysql __attribute__((unused))) ++{ ++ return mysql_get_ssl_cipher(mysql); ++} ++SYM_16(mysql_get_ssl_cipher); ++ ++ ++MYSQL * STDCALL symver16_mysql_init(MYSQL *mysql) ++{ ++ return mysql_init(mysql); ++} ++SYM_16(mysql_init); ++ ++ ++unsigned int STDCALL symver16_mysql_num_fields(MYSQL_RES *res) ++{ ++ return mysql_num_fields(res); ++} ++SYM_16(mysql_num_fields); ++ ++ ++my_ulonglong STDCALL symver16_mysql_num_rows(MYSQL_RES *res) ++{ ++ return mysql_num_rows(res); ++} ++SYM_16(mysql_num_rows); ++ ++ ++int STDCALL symver16_mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg) ++{ ++ return mysql_options(mysql, option, arg); ++} ++SYM_16(mysql_options); ++ ++ ++int STDCALL symver16_mysql_real_query(MYSQL *mysql, const char *query, ulong length) ++{ ++ return mysql_real_query(mysql, query, length); ++} ++SYM_16(mysql_real_query); ++ ++ ++int STDCALL symver16_mysql_select_db(MYSQL *mysql, const char *db) ++{ ++ return mysql_select_db(mysql, db); ++} ++SYM_16(mysql_select_db); ++ ++ ++int STDCALL symver16_mysql_send_query(MYSQL* mysql, const char* query, ulong length) ++{ ++ return mysql_send_query(mysql, query, length); ++} ++SYM_16(mysql_send_query); ++ ++ ++int STDCALL symver16_mysql_set_character_set(MYSQL *mysql, const char *cs_name) ++{ ++ return mysql_set_character_set(mysql, cs_name); ++} ++SYM_16(mysql_set_character_set); ++ ++ ++my_bool STDCALL symver16_mysql_ssl_set(MYSQL *mysql __attribute__((unused)), const char *key __attribute__((unused)), const char *cert __attribute__((unused)), const char *ca __attribute__((unused)), const char *capath __attribute__((unused)), const char *cipher __attribute__((unused))) ++{ ++ return mysql_ssl_set(mysql, key, cert, ca, capath, cipher); ++} ++SYM_16(mysql_ssl_set); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_store_result(MYSQL *mysql) ++{ ++ return mysql_store_result(mysql); ++} ++SYM_16(mysql_store_result); ++ ++#endif diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index db75d1a8191..77fcbd84c8b 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -251,6 +251,7 @@ URL: http://www.mysql.com/ Packager: MySQL Release Engineering Vendor: %{mysql_vendor} BuildRequires: %{distro_buildreq} +%{?el7:Patch0: mysql-5.5-libmysqlclient-symbols.patch} # Regression tests may take a long time, override the default to skip them %{!?runselftest:%global runselftest 1} @@ -443,7 +444,7 @@ For a description of MySQL see the base MySQL RPM or http://www.mysql.com/ ############################################################################## %prep %setup -T -a 0 -c -n %{src_dir} - +%{?el7:%patch0 -p1} ############################################################################## %build @@ -1094,6 +1095,7 @@ echo "=====" >> $STATUS_HISTORY %doc %attr(644, root, man) %{_mandir}/man1/resolveip.1* %ghost %config(noreplace,missingok) %{_sysconfdir}/my.cnf +%dir %{_sysconfdir}/my.cnf.d %attr(755, root, root) %{_bindir}/innochecksum %attr(755, root, root) %{_bindir}/my_print_defaults -- cgit v1.2.1 From 414c596fee576006dbc7cdbe0ad1916850f183fa Mon Sep 17 00:00:00 2001 From: Balasubramanian Kandasamy Date: Tue, 12 Aug 2014 16:53:31 +0200 Subject: Added my.cnf.d directory, removed mysql-5.5-libmysqlclient-symbols.patch --- support-files/CMakeLists.txt | 1 - .../mysql-5.5-libmysqlclient-symbols.patch | 982 --------------------- support-files/mysql.spec.sh | 2 + 3 files changed, 2 insertions(+), 983 deletions(-) delete mode 100644 support-files/mysql-5.5-libmysqlclient-symbols.patch diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt index ff3d40a92b0..6aef51a5c16 100644 --- a/support-files/CMakeLists.txt +++ b/support-files/CMakeLists.txt @@ -81,7 +81,6 @@ IF(UNIX) CONFIGURE_FILE(mysql.spec.sh ${CMAKE_CURRENT_BINARY_DIR}/${SPECFILENAME} @ONLY) CONFIGURE_FILE(MySQL-shared-compat.spec.sh ${CMAKE_CURRENT_BINARY_DIR}/MySQL-shared-compat.spec @ONLY) - CONFIGURE_FILE(mysql-5.5-libmysqlclient-symbols.patch ${CMAKE_CURRENT_BINARY_DIR}/mysql-5.5-libmysqlclient-symbols.patch @ONLY) SET(bindir ${prefix}/${INSTALL_BINDIR}) SET(sbindir ${prefix}/${INSTALL_SBINDIR}) diff --git a/support-files/mysql-5.5-libmysqlclient-symbols.patch b/support-files/mysql-5.5-libmysqlclient-symbols.patch deleted file mode 100644 index ce5455ee29b..00000000000 --- a/support-files/mysql-5.5-libmysqlclient-symbols.patch +++ /dev/null @@ -1,982 +0,0 @@ -diff -rup old/libmysql/CMakeLists.txt new/libmysql/CMakeLists.txt ---- old/libmysql/CMakeLists.txt 2013-11-05 08:19:26.000000000 +0100 -+++ new/libmysql/CMakeLists.txt 2014-01-10 15:41:30.530068723 +0100 -@@ -205,13 +205,14 @@ IF(NOT DISABLE_SHARED) - OUTPUT_NAME mysqlclient - VERSION "${OS_SHARED_LIB_VERSION}" - SOVERSION "${SHARED_LIB_MAJOR_VERSION}") -+ CONFIGURE_FILE(libmysql.ver.in ${CMAKE_CURRENT_BINARY_DIR}/libmysql.ver) - IF(LINK_FLAG_NO_UNDEFINED) - 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}") -+ "${libmysql_link_flags} -Wl,--version-script=libmysql.ver ${LINK_FLAG_NO_UNDEFINED}") - ENDIF() - # clean direct output needs to be set several targets have the same name - #(mysqlclient in this case) -diff -rup old/libmysql/libmysql.c new/libmysql/libmysql.c ---- old/libmysql/libmysql.c 2013-11-05 08:19:26.000000000 +0100 -+++ new/libmysql/libmysql.c 2014-01-10 15:46:35.708928462 +0100 -@@ -4870,3 +4870,612 @@ my_bool STDCALL mysql_read_query_result( - return (*mysql->methods->read_query_result)(mysql); - } - -+#ifndef EMBEDDED_LIBRARY -+ -+// Hack to provide both libmysqlclient_16 and libmysqlclient_18 symbol versions -+ -+#define SYM_16(_exportedsym) __asm__(".symver symver16_" #_exportedsym "," #_exportedsym "@libmysqlclient_16") -+ -+void STDCALL symver16_myodbc_remove_escape(MYSQL *mysql,char *name) -+{ -+ return myodbc_remove_escape(mysql, name); -+} -+SYM_16(myodbc_remove_escape); -+ -+ -+my_ulonglong STDCALL symver16_mysql_affected_rows(MYSQL *mysql) -+{ -+ return mysql_affected_rows(mysql); -+} -+SYM_16(mysql_affected_rows); -+ -+ -+my_bool STDCALL symver16_mysql_autocommit(MYSQL * mysql, my_bool auto_mode) -+{ -+ return mysql_autocommit(mysql, auto_mode); -+} -+SYM_16(mysql_autocommit); -+ -+ -+my_bool STDCALL symver16_mysql_change_user(MYSQL *mysql, const char *user, const char *passwd, const char *db) -+{ -+ return mysql_change_user(mysql, user, passwd, db); -+} -+SYM_16(mysql_change_user); -+ -+ -+const char * STDCALL symver16_mysql_character_set_name(MYSQL *mysql) -+{ -+ return mysql_character_set_name(mysql); -+} -+SYM_16(mysql_character_set_name); -+ -+ -+my_bool STDCALL symver16_mysql_commit(MYSQL * mysql) -+{ -+ return mysql_commit(mysql); -+} -+SYM_16(mysql_commit); -+ -+ -+void STDCALL symver16_mysql_data_seek(MYSQL_RES *result, my_ulonglong row) -+{ -+ return mysql_data_seek(result, row); -+} -+SYM_16(mysql_data_seek); -+ -+ -+void STDCALL symver16_mysql_debug(const char *debug __attribute__((unused))) -+{ -+ return mysql_debug(debug); -+} -+SYM_16(mysql_debug); -+ -+ -+int STDCALL symver16_mysql_dump_debug_info(MYSQL *mysql) -+{ -+ return mysql_dump_debug_info(mysql); -+} -+SYM_16(mysql_dump_debug_info); -+ -+ -+my_bool STDCALL symver16_mysql_embedded(void) -+{ -+ return mysql_embedded(); -+} -+SYM_16(mysql_embedded); -+ -+ -+my_bool STDCALL symver16_mysql_eof(MYSQL_RES *res) -+{ -+ return mysql_eof(res); -+} -+SYM_16(mysql_eof); -+ -+ -+ulong STDCALL symver16_mysql_escape_string(char *to,const char *from,ulong length) -+{ -+ return mysql_escape_string(to, from, length); -+} -+SYM_16(mysql_escape_string); -+ -+ -+MYSQL_FIELD * STDCALL symver16_mysql_fetch_field(MYSQL_RES *result) -+{ -+ return mysql_fetch_field(result); -+} -+SYM_16(mysql_fetch_field); -+ -+ -+MYSQL_FIELD * STDCALL symver16_mysql_fetch_field_direct(MYSQL_RES *res,uint fieldnr) -+{ -+ return mysql_fetch_field_direct(res, fieldnr); -+} -+SYM_16(mysql_fetch_field_direct); -+ -+ -+MYSQL_FIELD * STDCALL symver16_mysql_fetch_fields(MYSQL_RES *res) -+{ -+ return mysql_fetch_fields(res); -+} -+SYM_16(mysql_fetch_fields); -+ -+ -+unsigned int STDCALL symver16_mysql_field_count(MYSQL *mysql) -+{ -+ return mysql_field_count(mysql); -+} -+SYM_16(mysql_field_count); -+ -+ -+MYSQL_FIELD_OFFSET STDCALL symver16_mysql_field_seek(MYSQL_RES *result, MYSQL_FIELD_OFFSET field_offset) -+{ -+ return mysql_field_seek(result, field_offset); -+} -+SYM_16(mysql_field_seek); -+ -+ -+MYSQL_FIELD_OFFSET STDCALL symver16_mysql_field_tell(MYSQL_RES *res) -+{ -+ return mysql_field_tell(res); -+} -+SYM_16(mysql_field_tell); -+ -+ -+void STDCALL symver16_mysql_get_character_set_info(MYSQL *mysql, MY_CHARSET_INFO *csinfo) -+{ -+ return mysql_get_character_set_info(mysql, csinfo); -+} -+SYM_16(mysql_get_character_set_info); -+ -+ -+const char * STDCALL symver16_mysql_get_client_info(void) -+{ -+ return mysql_get_client_info(); -+} -+SYM_16(mysql_get_client_info); -+ -+ulong STDCALL symver16_mysql_get_client_version(void) -+{ -+ return mysql_get_client_version(); -+} -+SYM_16(mysql_get_client_version); -+ -+ -+const char * STDCALL symver16_mysql_get_host_info(MYSQL *mysql) -+{ -+ return mysql_get_host_info(mysql); -+} -+SYM_16(mysql_get_host_info); -+ -+ -+MYSQL_PARAMETERS *STDCALL symver16_mysql_get_parameters(void) -+{ -+ return mysql_get_parameters(); -+} -+SYM_16(mysql_get_parameters); -+ -+ -+uint STDCALL symver16_mysql_get_proto_info(MYSQL *mysql) -+{ -+ return mysql_get_proto_info(mysql); -+} -+SYM_16(mysql_get_proto_info); -+ -+ -+const char * STDCALL symver16_mysql_get_server_info(MYSQL *mysql) -+{ -+ return mysql_get_server_info(mysql); -+} -+SYM_16(mysql_get_server_info); -+ -+ -+ulong STDCALL symver16_mysql_hex_string(char *to, const char *from, ulong length) -+{ -+ return mysql_hex_string(to, from, length); -+} -+SYM_16(mysql_hex_string); -+ -+ -+const char *STDCALL symver16_mysql_info(MYSQL *mysql) -+{ -+ return mysql_info(mysql); -+} -+SYM_16(mysql_info); -+ -+ -+my_ulonglong STDCALL symver16_mysql_insert_id(MYSQL *mysql) -+{ -+ return mysql_insert_id(mysql); -+} -+SYM_16(mysql_insert_id); -+ -+ -+int STDCALL symver16_mysql_kill(MYSQL *mysql,ulong pid) -+{ -+ return mysql_kill(mysql, pid); -+} -+SYM_16(mysql_kill); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_list_dbs(MYSQL *mysql, const char *wild) -+{ -+ return mysql_list_dbs(mysql, wild); -+} -+SYM_16(mysql_list_dbs); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_list_fields(MYSQL *mysql, const char *table, const char *wild) -+{ -+ return mysql_list_fields(mysql, table, wild); -+} -+SYM_16(mysql_list_fields); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_list_processes(MYSQL *mysql) -+{ -+ return mysql_list_processes(mysql); -+} -+SYM_16(mysql_list_processes); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_list_tables(MYSQL *mysql, const char *wild) -+{ -+ return mysql_list_tables(mysql, wild); -+} -+SYM_16(mysql_list_tables); -+ -+ -+my_bool STDCALL symver16_mysql_more_results(MYSQL *mysql) -+{ -+ return mysql_more_results(mysql); -+} -+SYM_16(mysql_more_results); -+ -+ -+int STDCALL symver16_mysql_next_result(MYSQL *mysql) -+{ -+ return mysql_next_result(mysql); -+} -+SYM_16(mysql_next_result); -+ -+ -+int STDCALL symver16_mysql_ping(MYSQL *mysql) -+{ -+ return mysql_ping(mysql); -+} -+SYM_16(mysql_ping); -+ -+ -+int STDCALL symver16_mysql_query(MYSQL *mysql, const char *query) -+{ -+ return mysql_query(mysql, query); -+} -+SYM_16(mysql_query); -+ -+ -+my_bool STDCALL symver16_mysql_read_query_result(MYSQL *mysql) -+{ -+ return mysql_read_query_result(mysql); -+} -+SYM_16(mysql_read_query_result); -+ -+ -+ulong STDCALL symver16_mysql_real_escape_string(MYSQL *mysql, char *to,const char *from, ulong length) -+{ -+ return mysql_real_escape_string(mysql, to, from, length); -+} -+SYM_16(mysql_real_escape_string); -+ -+ -+int STDCALL symver16_mysql_refresh(MYSQL *mysql,uint options) -+{ -+ return mysql_refresh(mysql, options); -+} -+SYM_16(mysql_refresh); -+ -+ -+my_bool STDCALL symver16_mysql_rollback(MYSQL * mysql) -+{ -+ return mysql_rollback(mysql); -+} -+SYM_16(mysql_rollback); -+ -+ -+MYSQL_ROW_OFFSET STDCALL symver16_mysql_row_seek(MYSQL_RES *result, MYSQL_ROW_OFFSET row) -+{ -+ return mysql_row_seek(result, row); -+} -+SYM_16(mysql_row_seek); -+ -+ -+MYSQL_ROW_OFFSET STDCALL symver16_mysql_row_tell(MYSQL_RES *res) -+{ -+ return mysql_row_tell(res); -+} -+SYM_16(mysql_row_tell); -+ -+ -+void STDCALL symver16_mysql_server_end() -+{ -+ return mysql_server_end(); -+} -+SYM_16(mysql_server_end); -+ -+ -+int STDCALL symver16_mysql_server_init(int argc __attribute__((unused)), char **argv __attribute__((unused)), char **groups __attribute__((unused))) -+{ -+ return mysql_server_init(argc, argv, groups); -+} -+SYM_16(mysql_server_init); -+ -+ -+void symver16_mysql_set_local_infile_default(MYSQL *mysql) -+{ -+ return mysql_set_local_infile_default(mysql); -+} -+SYM_16(mysql_set_local_infile_default); -+ -+ -+void symver16_mysql_set_local_infile_handler(MYSQL *mysql, int (*local_infile_init)(void **, const char *, void *), int (*local_infile_read)(void *, char *, uint), void (*local_infile_end)(void *), int (*local_infile_error)(void *, char *, uint), void *userdata) -+{ -+ return mysql_set_local_infile_handler(mysql, local_infile_init, local_infile_read, local_infile_end, local_infile_error, userdata); -+} -+SYM_16(mysql_set_local_infile_handler); -+ -+ -+int STDCALL symver16_mysql_set_server_option(MYSQL *mysql, enum enum_mysql_set_option option) -+{ -+ return mysql_set_server_option(mysql, option); -+} -+SYM_16(mysql_set_server_option); -+ -+ -+int STDCALL symver16_mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level) -+{ -+ return mysql_shutdown(mysql, shutdown_level); -+} -+SYM_16(mysql_shutdown); -+ -+ -+const char *STDCALL symver16_mysql_sqlstate(MYSQL *mysql) -+{ -+ return mysql_sqlstate(mysql); -+} -+SYM_16(mysql_sqlstate); -+ -+ -+const char * STDCALL symver16_mysql_stat(MYSQL *mysql) -+{ -+ return mysql_stat(mysql); -+} -+SYM_16(mysql_stat); -+ -+ -+my_ulonglong STDCALL symver16_mysql_stmt_affected_rows(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_affected_rows(stmt); -+} -+SYM_16(mysql_stmt_affected_rows); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_attr_get(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, void *value) -+{ -+ return mysql_stmt_attr_get(stmt, attr_type, value); -+} -+SYM_16(mysql_stmt_attr_get); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_attr_set(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, const void *value) -+{ -+ return mysql_stmt_attr_set(stmt, attr_type, value); -+} -+SYM_16(mysql_stmt_attr_set); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_bind_param(MYSQL_STMT *stmt, MYSQL_BIND *my_bind) -+{ -+ return mysql_stmt_bind_param(stmt, my_bind); -+} -+SYM_16(mysql_stmt_bind_param); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *my_bind) -+{ -+ return mysql_stmt_bind_result(stmt, my_bind); -+} -+SYM_16(mysql_stmt_bind_result); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_close(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_close(stmt); -+} -+SYM_16(mysql_stmt_close); -+ -+ -+void STDCALL symver16_mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong row) -+{ -+ return mysql_stmt_data_seek(stmt, row); -+} -+SYM_16(mysql_stmt_data_seek); -+ -+ -+uint STDCALL symver16_mysql_stmt_errno(MYSQL_STMT * stmt) -+{ -+ return mysql_stmt_errno(stmt); -+} -+SYM_16(mysql_stmt_errno); -+ -+ -+const char *STDCALL symver16_mysql_stmt_error(MYSQL_STMT * stmt) -+{ -+ return mysql_stmt_error(stmt); -+} -+SYM_16(mysql_stmt_error); -+ -+ -+int STDCALL symver16_mysql_stmt_execute(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_execute(stmt); -+} -+SYM_16(mysql_stmt_execute); -+ -+ -+int STDCALL symver16_mysql_stmt_fetch(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_fetch(stmt); -+} -+SYM_16(mysql_stmt_fetch); -+ -+ -+int STDCALL symver16_mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *my_bind, uint column, ulong offset) -+{ -+ return mysql_stmt_fetch_column(stmt, my_bind, column, offset); -+} -+SYM_16(mysql_stmt_fetch_column); -+ -+ -+unsigned int STDCALL symver16_mysql_stmt_field_count(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_field_count(stmt); -+} -+SYM_16(mysql_stmt_field_count); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_free_result(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_free_result(stmt); -+} -+SYM_16(mysql_stmt_free_result); -+ -+ -+MYSQL_STMT * STDCALL symver16_mysql_stmt_init(MYSQL *mysql) -+{ -+ return mysql_stmt_init(mysql); -+} -+SYM_16(mysql_stmt_init); -+ -+ -+my_ulonglong STDCALL symver16_mysql_stmt_insert_id(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_insert_id(stmt); -+} -+SYM_16(mysql_stmt_insert_id); -+ -+ -+my_ulonglong STDCALL symver16_mysql_stmt_num_rows(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_num_rows(stmt); -+} -+SYM_16(mysql_stmt_num_rows); -+ -+ -+ulong STDCALL symver16_mysql_stmt_param_count(MYSQL_STMT * stmt) -+{ -+ return mysql_stmt_param_count(stmt); -+} -+SYM_16(mysql_stmt_param_count); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_stmt_param_metadata(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_param_metadata(stmt); -+} -+SYM_16(mysql_stmt_param_metadata); -+ -+ -+int STDCALL symver16_mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length) -+{ -+ return mysql_stmt_prepare(stmt, query, length); -+} -+SYM_16(mysql_stmt_prepare); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_reset(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_reset(stmt); -+} -+SYM_16(mysql_stmt_reset); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_stmt_result_metadata(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_result_metadata(stmt); -+} -+SYM_16(mysql_stmt_result_metadata); -+ -+ -+MYSQL_ROW_OFFSET STDCALL symver16_mysql_stmt_row_seek(MYSQL_STMT *stmt, MYSQL_ROW_OFFSET row) -+{ -+ return mysql_stmt_row_seek(stmt, row); -+} -+SYM_16(mysql_stmt_row_seek); -+ -+ -+MYSQL_ROW_OFFSET STDCALL symver16_mysql_stmt_row_tell(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_row_tell(stmt); -+} -+SYM_16(mysql_stmt_row_tell); -+ -+ -+my_bool STDCALL symver16_mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number, const char *data, ulong length) -+{ -+ return mysql_stmt_send_long_data(stmt, param_number, data, length); -+} -+SYM_16(mysql_stmt_send_long_data); -+ -+ -+const char *STDCALL symver16_mysql_stmt_sqlstate(MYSQL_STMT * stmt) -+{ -+ return mysql_stmt_sqlstate(stmt); -+} -+SYM_16(mysql_stmt_sqlstate); -+ -+ -+int STDCALL symver16_mysql_stmt_store_result(MYSQL_STMT *stmt) -+{ -+ return mysql_stmt_store_result(stmt); -+} -+SYM_16(mysql_stmt_store_result); -+ -+ -+void STDCALL symver16_mysql_thread_end() -+{ -+ return mysql_thread_end(); -+} -+SYM_16(mysql_thread_end); -+ -+ -+ulong STDCALL symver16_mysql_thread_id(MYSQL *mysql) -+{ -+ return mysql_thread_id(mysql); -+} -+SYM_16(mysql_thread_id); -+ -+ -+my_bool STDCALL symver16_mysql_thread_init() -+{ -+ return mysql_thread_init(); -+} -+SYM_16(mysql_thread_init); -+ -+ -+uint STDCALL symver16_mysql_thread_safe(void) -+{ -+ return mysql_thread_safe(); -+} -+SYM_16(mysql_thread_safe); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_use_result(MYSQL *mysql) -+{ -+ return mysql_use_result(mysql); -+} -+SYM_16(mysql_use_result); -+ -+ -+uint STDCALL symver16_mysql_warning_count(MYSQL *mysql) -+{ -+ return mysql_warning_count(mysql); -+} -+SYM_16(mysql_warning_count); -+ -+/*****/ -+ -+MYSQL * STDCALL symver16_mysql_real_connect(MYSQL *mysql,const char *host, const char *user, const char *passwd, const char *db, uint port, const char *unix_socket,ulong client_flag) -+{ -+ return mysql_real_connect(mysql, host, user, passwd, db, port, unix_socket, client_flag); -+} -+SYM_16(mysql_real_connect); -+ -+/*****/ -+ -+my_bool symver16_my_init(void) -+{ -+ return my_init(); -+} -+SYM_16(my_init); -+ -+#endif -diff -rup old/libmysql/libmysql.ver.in new/libmysql/libmysql.ver.in ---- old/libmysql/libmysql.ver.in 2013-11-05 08:19:26.000000000 +0100 -+++ new/libmysql/libmysql.ver.in 2014-01-10 15:41:30.545182782 +0100 -@@ -1 +1,136 @@ --libmysqlclient_@SHARED_LIB_MAJOR_VERSION@ { global: *; }; -+libmysqlclient_16 -+{ -+ local: -+ symver16_*; -+}; -+ -+libmysqlclient_18 -+{ -+ global: -+ my_init; -+ myodbc_remove_escape; -+ mysql_affected_rows; -+ mysql_autocommit; -+ mysql_change_user; -+ mysql_character_set_name; -+ mysql_close; -+ mysql_commit; -+ mysql_data_seek; -+ mysql_debug; -+ mysql_dump_debug_info; -+ mysql_embedded; -+ mysql_eof; -+ mysql_errno; -+ mysql_error; -+ mysql_escape_string; -+ mysql_fetch_field; -+ mysql_fetch_field_direct; -+ mysql_fetch_fields; -+ mysql_fetch_lengths; -+ mysql_fetch_row; -+ mysql_field_count; -+ mysql_field_seek; -+ mysql_field_tell; -+ mysql_free_result; -+ mysql_get_character_set_info; -+ mysql_get_client_info; -+ mysql_get_client_version; -+ mysql_get_host_info; -+ mysql_get_parameters; -+ mysql_get_proto_info; -+ mysql_get_server_info; -+ mysql_get_server_version; -+ mysql_get_ssl_cipher; -+ mysql_hex_string; -+ mysql_info; -+ mysql_init; -+ mysql_insert_id; -+ mysql_kill; -+ mysql_list_dbs; -+ mysql_list_fields; -+ mysql_list_processes; -+ mysql_list_tables; -+ mysql_more_results; -+ mysql_next_result; -+ mysql_num_fields; -+ mysql_num_rows; -+ mysql_options; -+ mysql_ping; -+ mysql_query; -+ mysql_read_query_result; -+ mysql_real_connect; -+ mysql_real_escape_string; -+ mysql_real_query; -+ mysql_refresh; -+ mysql_rollback; -+ mysql_row_seek; -+ mysql_row_tell; -+ mysql_select_db; -+ mysql_send_query; -+ mysql_server_end; -+ mysql_server_init; -+ mysql_set_character_set; -+ mysql_set_local_infile_default; -+ mysql_set_local_infile_handler; -+ mysql_set_server_option; -+ mysql_shutdown; -+ mysql_sqlstate; -+ mysql_ssl_set; -+ mysql_stat; -+ mysql_stmt_affected_rows; -+ mysql_stmt_attr_get; -+ mysql_stmt_attr_set; -+ mysql_stmt_bind_param; -+ mysql_stmt_bind_result; -+ mysql_stmt_close; -+ mysql_stmt_data_seek; -+ mysql_stmt_errno; -+ mysql_stmt_error; -+ mysql_stmt_execute; -+ mysql_stmt_fetch; -+ mysql_stmt_fetch_column; -+ mysql_stmt_field_count; -+ mysql_stmt_free_result; -+ mysql_stmt_init; -+ mysql_stmt_insert_id; -+ mysql_stmt_num_rows; -+ mysql_stmt_param_count; -+ mysql_stmt_param_metadata; -+ mysql_stmt_prepare; -+ mysql_stmt_reset; -+ mysql_stmt_result_metadata; -+ mysql_stmt_row_seek; -+ mysql_stmt_row_tell; -+ mysql_stmt_send_long_data; -+ mysql_stmt_sqlstate; -+ mysql_stmt_store_result; -+ mysql_store_result; -+ mysql_thread_end; -+ mysql_thread_id; -+ mysql_thread_init; -+ mysql_thread_safe; -+ mysql_use_result; -+ mysql_warning_count; -+ -+ free_defaults; -+ handle_options; -+ load_defaults; -+ my_print_help; -+ -+ #my_make_scrambled_password; -+ THR_KEY_mysys; -+ -+ mysql_client_find_plugin; -+ mysql_client_register_plugin; -+ mysql_load_plugin; -+ mysql_load_plugin_v; -+ mysql_plugin_options; -+ mysql_stmt_next_result; -+ -+ #mysql_default_charset_info; -+ mysql_get_charset; -+ mysql_get_charset_by_csname; -+ mysql_net_realloc; -+ #mysql_client_errors; -+ *; -+} libmysqlclient_16; -diff -rup old/mysys/charset.c new/mysys/charset.c ---- old/mysys/charset.c 2013-11-05 08:19:26.000000000 +0100 -+++ new/mysys/charset.c 2014-01-10 15:41:30.552919678 +0100 -@@ -941,3 +941,20 @@ size_t escape_quotes_for_mysql(CHARSET_I - *to= 0; - return overflow ? (ulong)~0 : (ulong) (to - to_start); - } -+ -+#ifndef EMBEDDED_LIBRARY -+ -+// Hack to provide Fedora symbols -+ -+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 flags) -+{ -+ return get_charset_by_csname(cs_name, cs_flags, flags); -+} -+ -+#endif -diff -rup old/sql/net_serv.cc new/sql/net_serv.cc ---- old/sql/net_serv.cc 2013-11-05 08:19:26.000000000 +0100 -+++ new/sql/net_serv.cc 2014-01-10 15:41:30.563377346 +0100 -@@ -1190,3 +1190,17 @@ void my_net_set_write_timeout(NET *net, - #endif - DBUG_VOID_RETURN; - } -+ -+#ifndef EMBEDDED_LIBRARY -+C_MODE_START -+ -+// Hack to provide Fedora symbols -+ -+my_bool mysql_net_realloc(NET *net, size_t length) -+{ -+ return net_realloc(net, length); -+} -+ -+C_MODE_END -+#endif -+ -diff -rup old/sql/password.c new/sql/password.c ---- old/sql/password.c 2013-11-05 08:19:26.000000000 +0100 -+++ new/sql/password.c 2014-01-10 15:41:30.567134663 +0100 -@@ -563,3 +563,17 @@ void make_password_from_salt(char *to, c - *to++= PVERSION41_CHAR; - octet2hex(to, (const char*) hash_stage2, SHA1_HASH_SIZE); - } -+ -+#ifndef EMBEDDED_LIBRARY -+ -+// Hack to provide both libmysqlclient_16 and libmysqlclient_18 symbol versions -+ -+#define SYM_16(_exportedsym) __asm__(".symver symver16_" #_exportedsym "," #_exportedsym "@libmysqlclient_16") -+ -+void symver16_my_make_scrambled_password(char *to, const char *password, size_t pass_len) -+{ -+ my_make_scrambled_password(to, password, pass_len); -+} -+SYM_16(my_make_scrambled_password); -+ -+#endif -diff -rup old/sql-common/client.c new/sql-common/client.c ---- old/sql-common/client.c 2013-11-05 08:19:26.000000000 +0100 -+++ new/sql-common/client.c 2014-01-10 15:41:30.574151024 +0100 -@@ -4399,3 +4399,136 @@ static int clear_password_auth_client(MY - - return res ? CR_ERROR : CR_OK; - } -+ -+#ifndef EMBEDDED_LIBRARY -+ -+// Hack to provide both libmysqlclient_16 and libmysqlclient_18 symbol versions -+ -+#define SYM_16(_exportedsym) __asm__(".symver symver16_" #_exportedsym "," #_exportedsym "@libmysqlclient_16") -+ -+void STDCALL symver16_mysql_close(MYSQL *mysql) -+{ -+ return mysql_close(mysql); -+} -+SYM_16(mysql_close); -+ -+ -+uint STDCALL symver16_mysql_errno(MYSQL *mysql) -+{ -+ return mysql_errno(mysql); -+} -+SYM_16(mysql_errno); -+ -+ -+const char * STDCALL symver16_mysql_error(MYSQL *mysql) -+{ -+ return mysql_error(mysql); -+} -+SYM_16(mysql_error); -+ -+ -+ulong * STDCALL symver16_mysql_fetch_lengths(MYSQL_RES *res) -+{ -+ return mysql_fetch_lengths(res); -+} -+SYM_16(mysql_fetch_lengths); -+ -+ -+MYSQL_ROW STDCALL symver16_mysql_fetch_row(MYSQL_RES *res) -+{ -+ return mysql_fetch_row(res); -+} -+SYM_16(mysql_fetch_row); -+ -+ -+void STDCALL symver16_mysql_free_result(MYSQL_RES *result) -+{ -+ return mysql_free_result(result); -+} -+SYM_16(mysql_free_result); -+ -+ -+ulong STDCALL symver16_mysql_get_server_version(MYSQL *mysql) -+{ -+ return mysql_get_server_version(mysql); -+} -+SYM_16(mysql_get_server_version); -+ -+ -+const char * STDCALL symver16_mysql_get_ssl_cipher(MYSQL *mysql __attribute__((unused))) -+{ -+ return mysql_get_ssl_cipher(mysql); -+} -+SYM_16(mysql_get_ssl_cipher); -+ -+ -+MYSQL * STDCALL symver16_mysql_init(MYSQL *mysql) -+{ -+ return mysql_init(mysql); -+} -+SYM_16(mysql_init); -+ -+ -+unsigned int STDCALL symver16_mysql_num_fields(MYSQL_RES *res) -+{ -+ return mysql_num_fields(res); -+} -+SYM_16(mysql_num_fields); -+ -+ -+my_ulonglong STDCALL symver16_mysql_num_rows(MYSQL_RES *res) -+{ -+ return mysql_num_rows(res); -+} -+SYM_16(mysql_num_rows); -+ -+ -+int STDCALL symver16_mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg) -+{ -+ return mysql_options(mysql, option, arg); -+} -+SYM_16(mysql_options); -+ -+ -+int STDCALL symver16_mysql_real_query(MYSQL *mysql, const char *query, ulong length) -+{ -+ return mysql_real_query(mysql, query, length); -+} -+SYM_16(mysql_real_query); -+ -+ -+int STDCALL symver16_mysql_select_db(MYSQL *mysql, const char *db) -+{ -+ return mysql_select_db(mysql, db); -+} -+SYM_16(mysql_select_db); -+ -+ -+int STDCALL symver16_mysql_send_query(MYSQL* mysql, const char* query, ulong length) -+{ -+ return mysql_send_query(mysql, query, length); -+} -+SYM_16(mysql_send_query); -+ -+ -+int STDCALL symver16_mysql_set_character_set(MYSQL *mysql, const char *cs_name) -+{ -+ return mysql_set_character_set(mysql, cs_name); -+} -+SYM_16(mysql_set_character_set); -+ -+ -+my_bool STDCALL symver16_mysql_ssl_set(MYSQL *mysql __attribute__((unused)), const char *key __attribute__((unused)), const char *cert __attribute__((unused)), const char *ca __attribute__((unused)), const char *capath __attribute__((unused)), const char *cipher __attribute__((unused))) -+{ -+ return mysql_ssl_set(mysql, key, cert, ca, capath, cipher); -+} -+SYM_16(mysql_ssl_set); -+ -+ -+MYSQL_RES * STDCALL symver16_mysql_store_result(MYSQL *mysql) -+{ -+ return mysql_store_result(mysql); -+} -+SYM_16(mysql_store_result); -+ -+#endif diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 77fcbd84c8b..2e6aa7552b1 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -560,6 +560,8 @@ install -d $RBR%{_libdir} install -d $RBR%{_mandir} install -d $RBR%{_sbindir} +mkdir -p %{$RBR}%{_sysconfdir}/my.cnf.d + # Install all binaries ( cd $MBD/release -- cgit v1.2.1 From c744cc960f5a0a055af00c96fa4792c2c4186c96 Mon Sep 17 00:00:00 2001 From: Balasubramanian Kandasamy Date: Tue, 12 Aug 2014 18:26:46 +0200 Subject: Experimental testing for patch --- support-files/mysql.spec.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 2e6aa7552b1..4eb91dc3ff8 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -444,7 +444,7 @@ For a description of MySQL see the base MySQL RPM or http://www.mysql.com/ ############################################################################## %prep %setup -T -a 0 -c -n %{src_dir} -%{?el7:%patch0 -p1} +%{?el7:%patch0 -p0} ############################################################################## %build -- cgit v1.2.1 From e8afbf1e38a5b994b19c82956bd59e6b04b0f412 Mon Sep 17 00:00:00 2001 From: Balasubramanian Kandasamy Date: Tue, 12 Aug 2014 18:55:05 +0200 Subject: Experimental testing --- support-files/mysql.spec.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 4eb91dc3ff8..3c0dc277971 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -444,7 +444,8 @@ For a description of MySQL see the base MySQL RPM or http://www.mysql.com/ ############################################################################## %prep %setup -T -a 0 -c -n %{src_dir} -%{?el7:%patch0 -p0} +pushd %{src_dir} +%{?el7:%patch0 -p1} ############################################################################## %build -- cgit v1.2.1 From 94f265ba2cc73d5a27beb97b83ba5952863ba013 Mon Sep 17 00:00:00 2001 From: Balasubramanian Kandasamy Date: Tue, 12 Aug 2014 19:37:49 +0200 Subject: Corrected typo --- support-files/mysql.spec.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 3c0dc277971..3c1f90b7314 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -561,7 +561,7 @@ install -d $RBR%{_libdir} install -d $RBR%{_mandir} install -d $RBR%{_sbindir} -mkdir -p %{$RBR}%{_sysconfdir}/my.cnf.d +mkdir -p $RBR%{_sysconfdir}/my.cnf.d # Install all binaries ( -- cgit v1.2.1 From ab727cec049d20a86e1ca8ab2860d73dc476b73a Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Thu, 21 Aug 2014 16:42:04 +0200 Subject: Bug#18928848 II. MALLOC OF UNINITIALIZED MEMORY SIZE Several string functions have optimizations for constant sub-expressions which lead to setting max_length == 0. For subqueries, where we need a temporary table to holde the result, we need to ensure that we use a VARCHAR(0) column rather than a CHAR(0) column when such expressions take part in grouping. With CHAR(0) end_update() may write garbage into the next field. --- sql/item.cc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/sql/item.cc b/sql/item.cc index 10ba48ab1c8..96f15b92a54 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -5241,7 +5241,7 @@ bool Item::eq_by_collation(Item *item, bool binary_cmp, CHARSET_INFO *cs) If max_length > CONVERT_IF_BIGGER_TO_BLOB create a blob @n If max_length > 0 create a varchar @n - If max_length == 0 create a CHAR(0) + If max_length == 0 create a CHAR(0) (or VARCHAR(0) if we are grouping) @param table Table for which the field is created */ @@ -5259,8 +5259,19 @@ Field *Item::make_string_field(TABLE *table) field= new Field_varstring(max_length, maybe_null, name, table->s, collation.collation); else - field= new Field_string(max_length, maybe_null, name, - collation.collation); + { + /* + marker == 4 : see create_tmp_table() + With CHAR(0) end_update() may write garbage into the next field. + */ + if (max_length == 0 && marker == 4 && maybe_null && + field_type() == MYSQL_TYPE_VAR_STRING && type() != Item::TYPE_HOLDER) + field= new Field_varstring(max_length, maybe_null, name, table->s, + collation.collation); + else + field= new Field_string(max_length, maybe_null, name, + collation.collation); + } if (field) field->init(table); return field; -- cgit v1.2.1 From b9f2b1c1354342424f26c276c6e1e9556fa7576a Mon Sep 17 00:00:00 2001 From: Harin Vadodaria Date: Sat, 23 Aug 2014 08:59:03 +0530 Subject: Bug#19370676 : YASSL PRE-AUTH BUFFER OVERFLOW WHEN CLIENT LIES ABOUT SUITE_LEN_ and Bug#19355577 : YASSL PRE-AUTH BUFFER OVERFLOW WHEN CLIENT LIES ABOUT COMP_LEN_ Description : Updating yaSSL to version 2.3.4. --- extra/yassl/README | 22 +++- extra/yassl/certs/ca-cert.pem | 100 +++++++------- extra/yassl/certs/client-cert.der | Bin 782 -> 1198 bytes extra/yassl/certs/client-cert.pem | 100 +++++++------- extra/yassl/certs/client-key.der | Bin 319 -> 1192 bytes extra/yassl/certs/client-keyEnc.pem | 34 ++--- extra/yassl/certs/dsa1024.der | Bin 0 -> 448 bytes extra/yassl/certs/dsa1024.pem | 12 ++ extra/yassl/certs/dsa512.der | Bin 249 -> 0 bytes extra/yassl/certs/dsa512.pem | 8 -- extra/yassl/certs/server-cert.pem | 210 ++++++++++++++++-------------- extra/yassl/certs/server-keyEnc.pem | 52 ++++---- extra/yassl/include/buffer.hpp | 18 ++- extra/yassl/include/openssl/ssl.h | 2 +- extra/yassl/src/buffer.cpp | 113 ++++++++++++---- extra/yassl/src/handshake.cpp | 25 ++-- extra/yassl/src/yassl_imp.cpp | 179 ++++++++++++++++++++++--- extra/yassl/src/yassl_int.cpp | 7 +- extra/yassl/taocrypt/include/asn.hpp | 11 +- extra/yassl/taocrypt/include/block.hpp | 6 +- extra/yassl/taocrypt/include/integer.hpp | 4 +- extra/yassl/taocrypt/include/pwdbased.hpp | 8 +- extra/yassl/taocrypt/include/runtime.hpp | 17 ++- extra/yassl/taocrypt/include/sha.hpp | 9 +- extra/yassl/taocrypt/src/aes.cpp | 19 ++- extra/yassl/taocrypt/src/algebra.cpp | 8 +- extra/yassl/taocrypt/src/arc4.cpp | 11 +- extra/yassl/taocrypt/src/asn.cpp | 48 +++++-- extra/yassl/taocrypt/src/blowfish.cpp | 8 +- extra/yassl/taocrypt/src/des.cpp | 11 +- extra/yassl/taocrypt/src/integer.cpp | 31 ++--- extra/yassl/taocrypt/src/md5.cpp | 10 +- extra/yassl/taocrypt/src/misc.cpp | 22 ++-- extra/yassl/taocrypt/src/rabbit.cpp | 10 +- extra/yassl/taocrypt/src/random.cpp | 3 +- extra/yassl/taocrypt/src/ripemd.cpp | 13 +- extra/yassl/taocrypt/src/sha.cpp | 11 +- extra/yassl/taocrypt/src/twofish.cpp | 13 +- 38 files changed, 717 insertions(+), 438 deletions(-) create mode 100644 extra/yassl/certs/dsa1024.der create mode 100644 extra/yassl/certs/dsa1024.pem delete mode 100644 extra/yassl/certs/dsa512.der delete mode 100644 extra/yassl/certs/dsa512.pem diff --git a/extra/yassl/README b/extra/yassl/README index 2c144815f19..b18e2baeea8 100644 --- a/extra/yassl/README +++ b/extra/yassl/README @@ -12,15 +12,31 @@ before calling SSL_new(); *** end Note *** -yaSSL Release notes, version 2.3.0 (12/5/2013) +yaSSL Release notes, version 2.3.4 (8/15/2014) - This release of yaSSL updates asm for newer GCC versions. + This release of yaSSL adds checking to the input_buffer class itself. See normal build instructions below under 1.0.6. See libcurl build instructions below under 1.3.0 and note in 1.5.8. -*****************yaSSL Release notes, version 2.2.3b (4/23/2013) +yaSSL Release notes, version 2.3.2 (7/25/2014) + + This release of yaSSL updates test certs. + +See normal build instructions below under 1.0.6. +See libcurl build instructions below under 1.3.0 and note in 1.5.8. + + +*****************yaSSL Release notes, version 2.3.0 (12/5/2013) + + This release of yaSSL updates asm for newer GCC versions. + +See normal build instructions below under 1.0.6. +See libcurl build instructions below under 1.3.0 and note in 1.5.8. + + +*****************yaSSL Release notes, version 2.2.3 (4/23/2013) This release of yaSSL updates the test certificates as they were expired diff --git a/extra/yassl/certs/ca-cert.pem b/extra/yassl/certs/ca-cert.pem index b2dc6ae6ee3..7e64eb47961 100644 --- a/extra/yassl/certs/ca-cert.pem +++ b/extra/yassl/certs/ca-cert.pem @@ -1,45 +1,45 @@ -----BEGIN CERTIFICATE----- -MIIEnjCCA4agAwIBAgIJAOnQp195JfQ8MA0GCSqGSIb3DQEBBQUAMIGQMQswCQYD -VQQGEwJVUzEQMA4GA1UECBMHTW9udGFuYTEQMA4GA1UEBxMHQm96ZW1hbjERMA8G -A1UEChMIU2F3dG9vdGgxEzARBgNVBAsTCkNvbnN1bHRpbmcxFjAUBgNVBAMTDXd3 -dy55YXNzbC5jb20xHTAbBgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tMB4XDTEx -MTAyNDE4MTgxNVoXDTE0MDcyMDE4MTgxNVowgZAxCzAJBgNVBAYTAlVTMRAwDgYD -VQQIEwdNb250YW5hMRAwDgYDVQQHEwdCb3plbWFuMREwDwYDVQQKEwhTYXd0b290 -aDETMBEGA1UECxMKQ29uc3VsdGluZzEWMBQGA1UEAxMNd3d3Lnlhc3NsLmNvbTEd -MBsGCSqGSIb3DQEJARYOaW5mb0B5YXNzbC5jb20wggEiMA0GCSqGSIb3DQEBAQUA -A4IBDwAwggEKAoIBAQC/DMotFLIehEJbzTgfSvJNdRDxtjWf38p9A5jTrN4DZu4q -8diwfW4HVAsQmCFNgMsSIOfMT95FfclydzLqypC7aVIQAy+o85XF8YtiVhvvZ2+k -EEGVrQqb46XAsNJwdlAwW6joCCx87aeieo04KRysx+3yfJWwlYJ9SVw4zXcl772A -dVOUPD3KY1ufFbXTHRMvGdE823Y6zLh9yeXC19pAb9gh3HMbQi1TnP4a/H2rejY/ -mN6EfAVnzmoUOIep8Yy1aMtof3EgK/WgY/VWL6Mm0rdvsVoX1ziZCP6TWG/+wxNJ -CBYLp01nAFIxZyNOmO1RRR25BNkL7Ngos0u97TZ5AgMBAAGjgfgwgfUwHQYDVR0O -BBYEFCeOZxF0wyYdP+0zY7Ok2B0w5ejVMIHFBgNVHSMEgb0wgbqAFCeOZxF0wyYd -P+0zY7Ok2B0w5ejVoYGWpIGTMIGQMQswCQYDVQQGEwJVUzEQMA4GA1UECBMHTW9u -dGFuYTEQMA4GA1UEBxMHQm96ZW1hbjERMA8GA1UEChMIU2F3dG9vdGgxEzARBgNV -BAsTCkNvbnN1bHRpbmcxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkqhkiG -9w0BCQEWDmluZm9AeWFzc2wuY29tggkA6dCnX3kl9DwwDAYDVR0TBAUwAwEB/zAN -BgkqhkiG9w0BAQUFAAOCAQEAX4YU9FGLvKVOMNperJr4bNkmS5P54xyJb57us513 -PokgdqPm6IYVIdviM7I01dCf88Gkh5Jc+dH/MC+OA7yzPAwyo5BfGpAer53zntcH -Aql9J2ZjL68Y16wYmIyDjzjzC6w2EHX7ynYTUFsCj3O/46Dug1IlVM4mzpy9L3mr -G2C4kvEDwPw7CNnArdVyCCWAYS3cn6eDYgdH4AdMSwcwBKmHHFV/BxLQy0Jdy89m -ARoX7vkPYLfbb2jlTkFibtNvYE9LJ97PGAfxE13LP6klRNpSXMgE4VYS9SqQTtHi -rwG1I6HsMdp7Y2nEuPPnzqE9wNtt87LZRsifw7hwWh9/yg== +MIIEqjCCA5KgAwIBAgIJAJpBR82hFGKMMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD +VQQGEwJVUzEQMA4GA1UECAwHTW9udGFuYTEQMA4GA1UEBwwHQm96ZW1hbjERMA8G +A1UECgwIU2F3dG9vdGgxEzARBgNVBAsMCkNvbnN1bHRpbmcxGDAWBgNVBAMMD3d3 +dy53b2xmc3NsLmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTAe +Fw0xNDA3MTEwMzIwMDhaFw0xNzA0MDYwMzIwMDhaMIGUMQswCQYDVQQGEwJVUzEQ +MA4GA1UECAwHTW9udGFuYTEQMA4GA1UEBwwHQm96ZW1hbjERMA8GA1UECgwIU2F3 +dG9vdGgxEzARBgNVBAsMCkNvbnN1bHRpbmcxGDAWBgNVBAMMD3d3dy53b2xmc3Ns +LmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAL8Myi0Ush6EQlvNOB9K8k11EPG2NZ/fyn0D +mNOs3gNm7irx2LB9bgdUCxCYIU2AyxIg58xP3kV9yXJ3MurKkLtpUhADL6jzlcXx +i2JWG+9nb6QQQZWtCpvjpcCw0nB2UDBbqOgILHztp6J6jTgpHKzH7fJ8lbCVgn1J +XDjNdyXvvYB1U5Q8PcpjW58VtdMdEy8Z0TzbdjrMuH3J5cLX2kBv2CHccxtCLVOc +/hr8fat6Nj+Y3oR8BWfOahQ4h6nxjLVoy2h/cSAr9aBj9VYvoybSt2+xWhfXOJkI +/pNYb/7DE0kIFgunTWcAUjFnI06Y7VFFHbkE2Qvs2CizS73tNnkCAwEAAaOB/DCB ++TAdBgNVHQ4EFgQUJ45nEXTDJh0/7TNjs6TYHTDl6NUwgckGA1UdIwSBwTCBvoAU +J45nEXTDJh0/7TNjs6TYHTDl6NWhgZqkgZcwgZQxCzAJBgNVBAYTAlVTMRAwDgYD +VQQIDAdNb250YW5hMRAwDgYDVQQHDAdCb3plbWFuMREwDwYDVQQKDAhTYXd0b290 +aDETMBEGA1UECwwKQ29uc3VsdGluZzEYMBYGA1UEAwwPd3d3LndvbGZzc2wuY29t +MR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdvbGZzc2wuY29tggkAmkFHzaEUYowwDAYD +VR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAeXgMbXmIkfw6FZz5J2IW8CEf ++n0/oqgyHvfyEal0FnRe3BjK8AAq1QMGJjDxR4P9Mm787apPfQxjYDEvfAy/mWaH +7ScIhi3EM+iYIxz+o9uaSU78WkLvccM/rdxKqNKjHQmsMwR7hvNtAFmjyNvRPHP2 +DpDWXkngvzZjCHulsI81O1aMETVJBBzQ57pWxQ0KkY3Wt2IZNBJSTNJtfMU9DxiB +VMv2POWE0tZxFewaNAvwoCF0Q8ijsN/ZZ9rirZNI+KCHvXkU4GIK3/cxLjF70TIq +Cv5dFO/ZZFDkg5G8cA3XiI3ZvIQOxRqzv2QCTlGRpKKFFYOv8FubKElfsrMD2A== -----END CERTIFICATE----- Certificate: Data: Version: 3 (0x2) Serial Number: - e9:d0:a7:5f:79:25:f4:3c - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.yassl.com/emailAddress=info@yassl.com + 9a:41:47:cd:a1:14:62:8c + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.wolfssl.com/emailAddress=info@wolfssl.com Validity - Not Before: Oct 24 18:18:15 2011 GMT - Not After : Jul 20 18:18:15 2014 GMT - Subject: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.yassl.com/emailAddress=info@yassl.com + Not Before: Jul 11 03:20:08 2014 GMT + Not After : Apr 6 03:20:08 2017 GMT + Subject: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.wolfssl.com/emailAddress=info@wolfssl.com Subject Public Key Info: Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): + Public-Key: (2048 bit) + Modulus: 00:bf:0c:ca:2d:14:b2:1e:84:42:5b:cd:38:1f:4a: f2:4d:75:10:f1:b6:35:9f:df:ca:7d:03:98:d3:ac: de:03:66:ee:2a:f1:d8:b0:7d:6e:07:54:0b:10:98: @@ -64,24 +64,24 @@ Certificate: 27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5 X509v3 Authority Key Identifier: keyid:27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5 - DirName:/C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.yassl.com/emailAddress=info@yassl.com - serial:E9:D0:A7:5F:79:25:F4:3C + DirName:/C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.wolfssl.com/emailAddress=info@wolfssl.com + serial:9A:41:47:CD:A1:14:62:8C X509v3 Basic Constraints: CA:TRUE Signature Algorithm: sha1WithRSAEncryption - 5f:86:14:f4:51:8b:bc:a5:4e:30:da:5e:ac:9a:f8:6c:d9:26: - 4b:93:f9:e3:1c:89:6f:9e:ee:b3:9d:77:3e:89:20:76:a3:e6: - e8:86:15:21:db:e2:33:b2:34:d5:d0:9f:f3:c1:a4:87:92:5c: - f9:d1:ff:30:2f:8e:03:bc:b3:3c:0c:32:a3:90:5f:1a:90:1e: - af:9d:f3:9e:d7:07:02:a9:7d:27:66:63:2f:af:18:d7:ac:18: - 98:8c:83:8f:38:f3:0b:ac:36:10:75:fb:ca:76:13:50:5b:02: - 8f:73:bf:e3:a0:ee:83:52:25:54:ce:26:ce:9c:bd:2f:79:ab: - 1b:60:b8:92:f1:03:c0:fc:3b:08:d9:c0:ad:d5:72:08:25:80: - 61:2d:dc:9f:a7:83:62:07:47:e0:07:4c:4b:07:30:04:a9:87: - 1c:55:7f:07:12:d0:cb:42:5d:cb:cf:66:01:1a:17:ee:f9:0f: - 60:b7:db:6f:68:e5:4e:41:62:6e:d3:6f:60:4f:4b:27:de:cf: - 18:07:f1:13:5d:cb:3f:a9:25:44:da:52:5c:c8:04:e1:56:12: - f5:2a:90:4e:d1:e2:af:01:b5:23:a1:ec:31:da:7b:63:69:c4: - b8:f3:e7:ce:a1:3d:c0:db:6d:f3:b2:d9:46:c8:9f:c3:b8:70: - 5a:1f:7f:ca + 79:78:0c:6d:79:88:91:fc:3a:15:9c:f9:27:62:16:f0:21:1f: + fa:7d:3f:a2:a8:32:1e:f7:f2:11:a9:74:16:74:5e:dc:18:ca: + f0:00:2a:d5:03:06:26:30:f1:47:83:fd:32:6e:fc:ed:aa:4f: + 7d:0c:63:60:31:2f:7c:0c:bf:99:66:87:ed:27:08:86:2d:c4: + 33:e8:98:23:1c:fe:a3:db:9a:49:4e:fc:5a:42:ef:71:c3:3f: + ad:dc:4a:a8:d2:a3:1d:09:ac:33:04:7b:86:f3:6d:00:59:a3: + c8:db:d1:3c:73:f6:0e:90:d6:5e:49:e0:bf:36:63:08:7b:a5: + b0:8f:35:3b:56:8c:11:35:49:04:1c:d0:e7:ba:56:c5:0d:0a: + 91:8d:d6:b7:62:19:34:12:52:4c:d2:6d:7c:c5:3d:0f:18:81: + 54:cb:f6:3c:e5:84:d2:d6:71:15:ec:1a:34:0b:f0:a0:21:74: + 43:c8:a3:b0:df:d9:67:da:e2:ad:93:48:f8:a0:87:bd:79:14: + e0:62:0a:df:f7:31:2e:31:7b:d1:32:2a:0a:fe:5d:14:ef:d9: + 64:50:e4:83:91:bc:70:0d:d7:88:8d:d9:bc:84:0e:c5:1a:b3: + bf:64:02:4e:51:91:a4:a2:85:15:83:af:f0:5b:9b:28:49:5f: + b2:b3:03:d8 diff --git a/extra/yassl/certs/client-cert.der b/extra/yassl/certs/client-cert.der index 9c2ef138bf6..293985adb97 100644 Binary files a/extra/yassl/certs/client-cert.der and b/extra/yassl/certs/client-cert.der differ diff --git a/extra/yassl/certs/client-cert.pem b/extra/yassl/certs/client-cert.pem index 278b43fe65c..38330d5380e 100644 --- a/extra/yassl/certs/client-cert.pem +++ b/extra/yassl/certs/client-cert.pem @@ -2,17 +2,17 @@ Certificate: Data: Version: 3 (0x2) Serial Number: - 87:4a:75:be:91:66:d8:3d - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=US, ST=Oregon, L=Portland, O=yaSSL, OU=Programming, CN=www.yassl.com/emailAddress=info@yassl.com + b6:63:af:8f:5d:62:57:a0 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=Montana, L=Bozeman, O=wolfSSL, OU=Programming, CN=www.wolfssl.com/emailAddress=info@wolfssl.com Validity - Not Before: Oct 24 18:21:55 2011 GMT - Not After : Jul 20 18:21:55 2014 GMT - Subject: C=US, ST=Oregon, L=Portland, O=yaSSL, OU=Programming, CN=www.yassl.com/emailAddress=info@yassl.com + Not Before: Jul 11 17:39:44 2014 GMT + Not After : Apr 6 17:39:44 2017 GMT + Subject: C=US, ST=Montana, L=Bozeman, O=wolfSSL, OU=Programming, CN=www.wolfssl.com/emailAddress=info@wolfssl.com Subject Public Key Info: Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): + Public-Key: (2048 bit) + Modulus: 00:c3:03:d1:2b:fe:39:a4:32:45:3b:53:c8:84:2b: 2a:7c:74:9a:bd:aa:2a:52:07:47:d6:a6:36:b2:07: 32:8e:d0:ba:69:7b:c6:c3:44:9e:d4:81:48:fd:2d: @@ -37,51 +37,51 @@ Certificate: 33:D8:45:66:D7:68:87:18:7E:54:0D:70:27:91:C7:26:D7:85:65:C0 X509v3 Authority Key Identifier: keyid:33:D8:45:66:D7:68:87:18:7E:54:0D:70:27:91:C7:26:D7:85:65:C0 - DirName:/C=US/ST=Oregon/L=Portland/O=yaSSL/OU=Programming/CN=www.yassl.com/emailAddress=info@yassl.com - serial:87:4A:75:BE:91:66:D8:3D + DirName:/C=US/ST=Montana/L=Bozeman/O=wolfSSL/OU=Programming/CN=www.wolfssl.com/emailAddress=info@wolfssl.com + serial:B6:63:AF:8F:5D:62:57:A0 X509v3 Basic Constraints: CA:TRUE Signature Algorithm: sha1WithRSAEncryption - 1c:7c:42:81:29:9e:21:cf:d0:d8:c1:54:6f:cc:ae:14:09:38: - ff:68:98:9a:95:53:76:18:7b:e6:30:76:ec:28:0d:75:a7:de: - e0:cd:8e:d5:55:23:6a:47:2b:4e:8d:fc:7d:06:a3:d8:0f:ad: - 5e:d6:04:c9:00:33:fb:77:27:d3:b5:03:b3:7b:21:74:31:0b: - 4a:af:2d:1a:b3:93:8e:cc:f3:5f:3d:90:3f:cc:e3:55:19:91: - 7b:78:24:2e:4a:09:bb:18:4e:61:2d:9c:c6:0a:a0:34:91:88: - 70:6b:3b:48:47:bc:79:94:a2:a0:4d:32:47:54:c2:a3:dc:2e: - d2:51:4c:29:39:11:ff:e2:15:5e:58:97:36:f6:e9:06:06:86: - 0e:8d:9d:95:03:72:b2:8b:19:7c:e9:14:6e:a1:88:73:68:58: - 6d:71:5e:c2:d5:d3:13:d2:5f:de:ea:03:be:e2:00:40:e5:ce: - fd:e6:92:31:57:c3:eb:bb:66:ac:cb:2f:1a:fa:e0:62:a2:47: - f4:93:43:2a:4b:6c:5e:0a:2f:f9:e7:e6:4a:63:86:b0:ac:2a: - a1:eb:b4:5b:67:cd:32:e4:b6:11:4b:9a:72:66:0d:a2:4a:76: - 8f:fe:22:bc:83:fd:db:b7:d5:a9:ee:05:c9:b1:71:7e:1b:2b: - e1:e3:af:c0 + 85:10:90:c5:5d:de:25:8c:f2:57:7b:2d:14:1c:05:f9:71:63: + 40:b0:e3:c1:c1:2e:13:2a:7a:b7:d6:24:58:87:eb:03:fb:0d: + af:e0:f4:d0:c8:bc:51:36:10:4f:79:cc:4f:66:7d:af:99:cb: + 7b:ce:68:94:c6:36:aa:42:6e:8c:78:5b:b2:85:ca:d1:e1:a8: + 31:d1:81:d9:f9:c1:a3:9e:34:43:ef:0a:79:7d:3e:83:61:fc: + 14:5c:d1:dd:bc:0e:d7:51:b7:71:6e:41:7e:8b:2c:5a:9a:cb: + 77:4b:6a:f5:06:ff:02:af:1e:e6:63:4f:bc:44:d9:3f:56:9e: + 09:9c:43:f9:55:21:32:46:82:09:86:a9:7b:74:1c:9e:5a:2a: + bf:03:79:91:cb:f2:29:7f:c9:15:82:89:b9:53:cd:7e:07:90: + a9:5d:76:e1:19:5e:0d:58:b8:59:d5:0d:df:23:ab:6b:63:76: + 19:9e:9c:df:b0:57:49:6c:d0:86:97:c3:6c:3c:fa:e0:56:c2: + 1b:e3:a1:42:1a:58:62:85:9d:74:19:83:08:af:59:90:f8:99: + bd:67:d3:4a:ea:0e:c9:ca:61:8a:0d:8a:42:cc:90:e9:2e:c2: + 54:73:7f:5e:af:8d:e2:32:cb:45:20:d6:19:4d:5b:77:31:cc: + 0f:2d:c0:7e -----BEGIN CERTIFICATE----- -MIIEmDCCA4CgAwIBAgIJAIdKdb6RZtg9MA0GCSqGSIb3DQEBBQUAMIGOMQswCQYD -VQQGEwJVUzEPMA0GA1UECBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFuZDEOMAwG -A1UEChMFeWFTU0wxFDASBgNVBAsTC1Byb2dyYW1taW5nMRYwFAYDVQQDEw13d3cu -eWFzc2wuY29tMR0wGwYJKoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbTAeFw0xMTEw -MjQxODIxNTVaFw0xNDA3MjAxODIxNTVaMIGOMQswCQYDVQQGEwJVUzEPMA0GA1UE -CBMGT3JlZ29uMREwDwYDVQQHEwhQb3J0bGFuZDEOMAwGA1UEChMFeWFTU0wxFDAS -BgNVBAsTC1Byb2dyYW1taW5nMRYwFAYDVQQDEw13d3cueWFzc2wuY29tMR0wGwYJ -KoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEP -ADCCAQoCggEBAMMD0Sv+OaQyRTtTyIQrKnx0mr2qKlIHR9amNrIHMo7Quml7xsNE -ntSBSP0taKKLZ7uhdcg2LErSG/eLus8N+e/s8YEee5sDR5q/Zcx/ZSRppugUiVvk -NPfFsBST9Wd7Onp44QFWVpGmE0KN0jxAnEzv0YbfN1EbDKE79fGjSjXk4c6W3xt+ -v06X0BDoqAgwga8gC0MUxXRntDKCb42GwohAmTaDuh5AciIX11JlJHOwzu8Zza7/ -eGx7wBID1E5yDVBtO6M7o5lencjZDIWz2YrZVCbbbfqsu/8lTMTRefRx04ZAGBOw -Y7VyTjDEl4SGLVYv1xX3f8Cu9fxb5fuhutMCAwEAAaOB9jCB8zAdBgNVHQ4EFgQU -M9hFZtdohxh+VA1wJ5HHJteFZcAwgcMGA1UdIwSBuzCBuIAUM9hFZtdohxh+VA1w -J5HHJteFZcChgZSkgZEwgY4xCzAJBgNVBAYTAlVTMQ8wDQYDVQQIEwZPcmVnb24x -ETAPBgNVBAcTCFBvcnRsYW5kMQ4wDAYDVQQKEwV5YVNTTDEUMBIGA1UECxMLUHJv -Z3JhbW1pbmcxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkqhkiG9w0BCQEW -DmluZm9AeWFzc2wuY29tggkAh0p1vpFm2D0wDAYDVR0TBAUwAwEB/zANBgkqhkiG -9w0BAQUFAAOCAQEAHHxCgSmeIc/Q2MFUb8yuFAk4/2iYmpVTdhh75jB27CgNdafe -4M2O1VUjakcrTo38fQaj2A+tXtYEyQAz+3cn07UDs3shdDELSq8tGrOTjszzXz2Q -P8zjVRmRe3gkLkoJuxhOYS2cxgqgNJGIcGs7SEe8eZSioE0yR1TCo9wu0lFMKTkR -/+IVXliXNvbpBgaGDo2dlQNysosZfOkUbqGIc2hYbXFewtXTE9Jf3uoDvuIAQOXO -/eaSMVfD67tmrMsvGvrgYqJH9JNDKktsXgov+efmSmOGsKwqoeu0W2fNMuS2EUua -cmYNokp2j/4ivIP927fVqe4FybFxfhsr4eOvwA== +MIIEqjCCA5KgAwIBAgIJALZjr49dYlegMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD +VQQGEwJVUzEQMA4GA1UECAwHTW9udGFuYTEQMA4GA1UEBwwHQm96ZW1hbjEQMA4G +A1UECgwHd29sZlNTTDEUMBIGA1UECwwLUHJvZ3JhbW1pbmcxGDAWBgNVBAMMD3d3 +dy53b2xmc3NsLmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTAe +Fw0xNDA3MTExNzM5NDRaFw0xNzA0MDYxNzM5NDRaMIGUMQswCQYDVQQGEwJVUzEQ +MA4GA1UECAwHTW9udGFuYTEQMA4GA1UEBwwHQm96ZW1hbjEQMA4GA1UECgwHd29s +ZlNTTDEUMBIGA1UECwwLUHJvZ3JhbW1pbmcxGDAWBgNVBAMMD3d3dy53b2xmc3Ns +LmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAMMD0Sv+OaQyRTtTyIQrKnx0mr2qKlIHR9am +NrIHMo7Quml7xsNEntSBSP0taKKLZ7uhdcg2LErSG/eLus8N+e/s8YEee5sDR5q/ +Zcx/ZSRppugUiVvkNPfFsBST9Wd7Onp44QFWVpGmE0KN0jxAnEzv0YbfN1EbDKE7 +9fGjSjXk4c6W3xt+v06X0BDoqAgwga8gC0MUxXRntDKCb42GwohAmTaDuh5AciIX +11JlJHOwzu8Zza7/eGx7wBID1E5yDVBtO6M7o5lencjZDIWz2YrZVCbbbfqsu/8l +TMTRefRx04ZAGBOwY7VyTjDEl4SGLVYv1xX3f8Cu9fxb5fuhutMCAwEAAaOB/DCB ++TAdBgNVHQ4EFgQUM9hFZtdohxh+VA1wJ5HHJteFZcAwgckGA1UdIwSBwTCBvoAU +M9hFZtdohxh+VA1wJ5HHJteFZcChgZqkgZcwgZQxCzAJBgNVBAYTAlVTMRAwDgYD +VQQIDAdNb250YW5hMRAwDgYDVQQHDAdCb3plbWFuMRAwDgYDVQQKDAd3b2xmU1NM +MRQwEgYDVQQLDAtQcm9ncmFtbWluZzEYMBYGA1UEAwwPd3d3LndvbGZzc2wuY29t +MR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdvbGZzc2wuY29tggkAtmOvj11iV6AwDAYD +VR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAhRCQxV3eJYzyV3stFBwF+XFj +QLDjwcEuEyp6t9YkWIfrA/sNr+D00Mi8UTYQT3nMT2Z9r5nLe85olMY2qkJujHhb +soXK0eGoMdGB2fnBo540Q+8KeX0+g2H8FFzR3bwO11G3cW5BfossWprLd0tq9Qb/ +Aq8e5mNPvETZP1aeCZxD+VUhMkaCCYape3QcnloqvwN5kcvyKX/JFYKJuVPNfgeQ +qV124RleDVi4WdUN3yOra2N2GZ6c37BXSWzQhpfDbDz64FbCG+OhQhpYYoWddBmD +CK9ZkPiZvWfTSuoOycphig2KQsyQ6S7CVHN/Xq+N4jLLRSDWGU1bdzHMDy3Afg== -----END CERTIFICATE----- diff --git a/extra/yassl/certs/client-key.der b/extra/yassl/certs/client-key.der index 649406c4417..94dc253a2bd 100644 Binary files a/extra/yassl/certs/client-key.der and b/extra/yassl/certs/client-key.der differ diff --git a/extra/yassl/certs/client-keyEnc.pem b/extra/yassl/certs/client-keyEnc.pem index 6f29eac50c1..0097c0760a5 100644 --- a/extra/yassl/certs/client-keyEnc.pem +++ b/extra/yassl/certs/client-keyEnc.pem @@ -1,30 +1,12 @@ -----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED -DEK-Info: DES-CBC,B9D8FB94E38635AB +DEK-Info: DES-EDE3-CBC,BDE979D13CCC0ABD -3OTcffWLy2Ddlu2oUwnMWkvIb3e9wLL1jrKOpC0aeb//uiawgw50+KuU4pewB5fN -lfEJwpX4NjfPL+Nk+B1VAVrv5gwk5/SY9SwIJluutzmGS4TfVOhqi2SVd0mc9kOD -cSWQ9ltAohFu67jdx36j2u+eghDTOjls1lM8EpzL5cu3Bp4G+ST0nXAdnGtSZdV6 -eToLWjIHiC/JqeRSsKAlG0M5verw14sbb5MO4ZQF4Tdu0fCFgFvDSUM2V4ZLtS1N -VysLEkHoF56YKZ5H2FYLxOVDpn5lSiLnOgRbteEzsysyJ1zLxXWFFwJPCpLVNL0e -P7OoEoCR+oAdzGkkPF+EdMoULtQP+n6U7jGx3oFVS17NORIFvyxyP0hD4pGTGLnl -qAEk30lhKGAE5GgvA2itxZIno/sxPKr5T5Sc2yWh9RdQuLWYNrOb8Kz8J1iXV5l6 -/5TLGu5XVWIlBnUtjMFUe5M54tqGQ6SuDUlL2ud5YeLVN0T+RU/bqV2fXGoBUqKb -Oe8PECm62Ls0wjv27BIOXXV32WSXwsywSzBqq2YXZ5zc9Q0+Mf1Zl6jKwcr8rXhv -rA2kcpicONryggsPZnn/us1bVuWKndsCbm7A5om6HowpamNMPuxhISigzzE59L6X -X6Sl2F0N0zhrfUVlAAlfYTrwcQVtyBDj1xp2nzJFocurJt9EylLaT0Sw3nxWtuOg -yQuF05UPCzxqow/7dMVqtQKng0ptpsn/E+Kr/Egk1YaTpUUxref6mD3R1S+qWML8 -uqTa3y1CWd4u+aJZH2oZU3gmEd8GvuWnmhsw8iTyq1bzYIga1rQZqh4W5Ok9V+jR -GioT/x3mTIhtuEZ1Cmhne5qM3gWYgM3rC3D4+RnUFeThOC5lHtOYHtIEpg66cs7g -QYAn75ghEkyfG7ZvdxAU9Ngn6hckux9tFu3GmeEtdqhVOHaOMaYi60uGSk6uBnTv -P1sUqi70kMrIBWU7TgldKlTqVdReM87Nkb2O5v1xqtoswLWIi65hFWTqt/H65c1H -aEBG1cBqnqBMYuFk8b4TzZbuU9o1UKj0/6N5mpm//BmW65B0htEDP7IYpGF0mt0H -LkU+4ISmuLfPfQeviYio6/yASaFkHpxfK7N8CQvmyAG9U8FHRio2QCGSb2EO+BnT -Bti6L9oMiQbAsCLWTbvBhCVxdncFw1ncq8gkPMXjEEVUsqAo5Kg+903pRHUyHLzS -R6R3C6tTJnNtucJ0zqQMF3K1FHS1m8GrOm+hskJLTHgZLdz6tFTYkXfZBSCwIl7s -plg0wq9CrNC2B8MczWn/j3/h7qSI3wBNqADHMdoiOHECffCeyGEYjW3+0iMoj1m1 -wY0DIym4DDRzk6wsEesxVi8iiCVpYwWnjJAvWYECEO+hWuwCez+eGVkhCT/5g3xW -hPSRhivNuJT05tdR5o+yqONHn1eAQH7Ar3cj+neY5WC0iS5FK9axTqbHXotofD1e -pJX17ZVWsmIIpRvAWGD+LOcfTMZsaB9DJbkrPSWlMW3lC2S5JOq8OgfMNWIDDUN1 -guwpK5Z/lWV1qMMnaWeDVgPH/G0FssECXlCU5+/Ol654h8tm2bRXYAYHPM+OoW67 +N7yz2JV13EmQ7MZPL5wamid5+G1V1gp8FKqMemAC5JDxonS/W9oViMLUcxbfPTDx +FznKdYSVTIQ7vv3ofmDG4MEyV/2C568N2kdtAw+jTfrZFN+IU9CI+W+In/nacirF +02sAcvDMofustnooKNOO7/iyb5+3vRvEt5vSSRQn5WuSQ9sUKjuzoLs/lbf7fyAt +4NeqfI3rYBZXxiUOLITOGXzGNRuFoY+o2uDCfelLAJ8uhiVG6ME3LeJEo1dT5lZ8 +CSJOLPasKg0iG4V7olM4j9FvAfZr48RRsSfUen756Jo2HpI4bad8LKhFYIdNs2Au +WwKLmjpo6QB9hBmRshR04rEXPdrgTqLBExCE08PyaGYnWU8ggWritCeBzDQFj/n4 +sI+NO0Mymuvg98e5RpO52lg3Xnqv9RIK3guLFOmI6aEHC0PS4WwOEQ== -----END RSA PRIVATE KEY----- diff --git a/extra/yassl/certs/dsa1024.der b/extra/yassl/certs/dsa1024.der new file mode 100644 index 00000000000..db880d51480 Binary files /dev/null and b/extra/yassl/certs/dsa1024.der differ diff --git a/extra/yassl/certs/dsa1024.pem b/extra/yassl/certs/dsa1024.pem new file mode 100644 index 00000000000..5478ebfc2b2 --- /dev/null +++ b/extra/yassl/certs/dsa1024.pem @@ -0,0 +1,12 @@ +-----BEGIN DSA PRIVATE KEY----- +MIIBvAIBAAKBgQC9Ue5KMuCKx+rG4epwxFFDzyoH4ccSwlglXsRdvqswDRK/oQvT +NNNoWiVxTn3kvQ8qDlhWy9KjGTrqr/ttgmh56FFpe6tz4yTgCNyR9D+eGclD7lNf +dPUc4E3SA6efopG6+ymI55bS+9xUFTG402UCrYSKT59zI2HBfuI6dltsxQIVAJHJ +7WDQ+jBn/nmMyCQzdi+0qJx1AoGBAJJacRK36s5yGY1b6qhxWqvpoAC+SfEKylZn +YWGYf2PM+Iwo6AgPKEw6BSsX+7Nmc4Gjyr4JWhComKi6onPamO/A2CbMM0DCxb47 +BeLBWfqWAgXVj0CODT4MQos5yugnviR/YpEgbzLxvrXr469lKWsAyB19/gFmGmQW +cCgAwGm6AoGBAJ3LY89yHyvQ/TsQ6zlYbovjbk/ogndsMqPdNUvL4RuPTgJP/caa +DDa0XJ7ak6A7TJ+QheLNwOXoZPYJC4EGFSDAXpYniGhbWIrVTCGe6lmZDfnx40WX +S0kk3m/DHaC03ElLAiybxVGxyqoUfbT3Zv1JwftWMuiqHH5uADhdXuXVAhQ01VXa +Rr8IPem35lKghVKnq/kGQw== +-----END DSA PRIVATE KEY----- diff --git a/extra/yassl/certs/dsa512.der b/extra/yassl/certs/dsa512.der deleted file mode 100644 index 027bedeffb1..00000000000 Binary files a/extra/yassl/certs/dsa512.der and /dev/null differ diff --git a/extra/yassl/certs/dsa512.pem b/extra/yassl/certs/dsa512.pem deleted file mode 100644 index 04a3dd94a77..00000000000 --- a/extra/yassl/certs/dsa512.pem +++ /dev/null @@ -1,8 +0,0 @@ ------BEGIN DSA PRIVATE KEY----- -MIH3AgEAAkEAmSlpgMk8mGhFqYL+Z+uViMW0DNYmRZUZLKAgW37faencww/zYQol -m/IhAWrNqow358pm21b0D3160Ri5Qv0bEQIVAK0lKasKnwkcwa0DIHZ/prfdTQMJ -AkASiJna59ALk5vm7jwhf5yztI2ljOI3gD8X0YFPvfBxtjIIVN2/AeKzdwZkdYoE -1nk5sQIDA8YGdOWQBQoQRhkxAkAEhKAmMXIM6E9dUxdisYDKwBZfwx7qxdmYOPm+ -VlNHaM4IIlccuw13kc9bNu3zJIKQis2QfNt3+Rctc3Pvu7mCAhQjg+e+aqykxwwc -E2V27tjDFY02uA== ------END DSA PRIVATE KEY----- diff --git a/extra/yassl/certs/server-cert.pem b/extra/yassl/certs/server-cert.pem index cfe4b7b8228..f56cba9de70 100644 --- a/extra/yassl/certs/server-cert.pem +++ b/extra/yassl/certs/server-cert.pem @@ -1,17 +1,17 @@ Certificate: Data: - Version: 1 (0x0) - Serial Number: 2 (0x2) - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.yassl.com/emailAddress=info@yassl.com + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.wolfssl.com/emailAddress=info@wolfssl.com Validity - Not Before: Oct 24 18:27:13 2011 GMT - Not After : Jul 20 18:27:13 2014 GMT - Subject: C=US, ST=Montana, L=Bozeman, O=yaSSL, OU=Support, CN=www.yassl.com/emailAddress=info@yassl.com + Not Before: Jul 11 17:20:14 2014 GMT + Not After : Apr 6 17:20:14 2017 GMT + Subject: C=US, ST=Montana, L=Bozeman, O=wolfSSL, OU=Support, CN=www.wolfssl.com/emailAddress=info@wolfssl.com Subject Public Key Info: Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): + Public-Key: (2048 bit) + Modulus: 00:c0:95:08:e1:57:41:f2:71:6d:b7:d2:45:41:27: 01:65:c6:45:ae:f2:bc:24:30:b8:95:ce:2f:4e:d6: f6:1c:88:bc:7c:9f:fb:a8:67:7f:fe:5c:9c:51:75: @@ -31,59 +31,74 @@ Certificate: a7:aa:eb:c4:e1:e6:61:83:c5:d2:96:df:d9:d0:4f: ad:d7 Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + B3:11:32:C9:92:98:84:E2:C9:F8:D0:3B:6E:03:42:CA:1F:0E:8E:3C + X509v3 Authority Key Identifier: + keyid:27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5 + DirName:/C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.wolfssl.com/emailAddress=info@wolfssl.com + serial:9A:41:47:CD:A1:14:62:8C + + X509v3 Basic Constraints: + CA:TRUE Signature Algorithm: sha1WithRSAEncryption - 71:4e:d3:62:df:cc:4c:f7:cd:b7:6e:52:0b:6c:6e:e0:bd:c2: - 2d:07:d7:c0:b0:6e:43:1e:35:bc:30:01:50:f0:ff:99:23:6c: - 18:1a:41:b6:11:d6:d4:19:61:fd:e4:77:97:1c:39:e1:57:ab: - c5:15:63:77:11:36:5e:74:e2:24:0b:1f:41:78:ad:b7:81:e7: - b4:40:66:80:f0:4b:91:a0:6d:a8:6e:3d:53:d9:8b:ce:2a:e1: - 0b:45:65:87:a1:96:ae:ee:3e:88:d5:12:1f:78:17:ae:2c:c5: - 73:44:d8:dc:f4:af:d8:cc:ae:4c:e1:0c:be:55:a4:99:f7:6e: - 96:c0:c8:45:87:bf:dc:51:57:ff:9e:73:37:6a:18:9c:c3:f9: - 22:7a:f4:b0:52:bd:fc:21:30:f8:c5:ff:1e:87:7d:ad:a2:5a: - 35:f5:22:a8:b4:0a:76:38:e6:76:b0:98:af:1b:ec:8a:0a:43: - 74:d2:85:34:37:84:07:e1:f6:23:b2:29:de:a6:b6:b7:4c:57: - 7e:96:06:cb:a9:16:25:29:3a:03:2d:55:7d:a6:8c:a4:f7:9e: - 81:c9:95:b6:7c:c1:4a:ce:94:66:0c:ca:88:eb:d2:09:f5:5b: - 19:58:82:df:27:fd:67:95:78:b7:02:06:d5:a7:61:bd:ef:3a: - fc:b2:61:cd + 3d:8c:70:05:5b:62:4b:bf:6c:b6:48:61:01:10:1d:5e:05:ba: + 55:94:2c:ae:59:6f:97:80:5d:6c:86:ec:9a:eb:15:45:44:e4: + 56:f8:75:ca:8a:45:32:f4:c7:e1:fa:f2:98:1c:91:d3:3f:e8: + 0e:c9:1b:fa:e1:79:99:67:0e:0d:6b:8a:ec:1a:2c:59:c4:34: + 04:8d:39:77:cd:b5:e9:60:5b:82:bf:34:ce:ed:c6:4f:3f:b4: + 5c:4d:8a:b4:f4:0a:04:12:a0:56:c1:e1:33:37:a1:54:87:48: + e9:81:c2:0f:8f:6f:d3:52:4c:4c:32:4c:6b:9f:3a:04:8f:77: + 5d:ad:dc:3d:2b:f2:c9:df:3c:60:5d:d8:fc:86:72:7c:3d:d0: + 84:4b:8c:df:26:43:fe:c0:cc:5b:e1:36:b3:3d:32:28:a3:ef: + 0c:20:d6:b1:50:39:d6:67:a9:8b:84:bc:92:34:eb:19:23:e8: + 10:8f:ea:bd:18:8c:93:27:3c:74:75:8e:58:04:fa:2a:74:44: + 7d:fc:4d:39:df:54:17:ba:78:e1:5d:6a:70:d3:7c:a2:80:81: + e6:19:51:91:c3:44:51:ec:bb:88:a9:53:e1:d7:a9:8c:28:f4: + 21:1c:42:51:09:b4:12:6d:a0:d6:25:09:85:c6:2a:0c:af:a7: + 58:e6:52:8b -----BEGIN CERTIFICATE----- -MIIDkDCCAngCAQIwDQYJKoZIhvcNAQEFBQAwgZAxCzAJBgNVBAYTAlVTMRAwDgYD -VQQIEwdNb250YW5hMRAwDgYDVQQHEwdCb3plbWFuMREwDwYDVQQKEwhTYXd0b290 -aDETMBEGA1UECxMKQ29uc3VsdGluZzEWMBQGA1UEAxMNd3d3Lnlhc3NsLmNvbTEd -MBsGCSqGSIb3DQEJARYOaW5mb0B5YXNzbC5jb20wHhcNMTExMDI0MTgyNzEzWhcN -MTQwNzIwMTgyNzEzWjCBijELMAkGA1UEBhMCVVMxEDAOBgNVBAgTB01vbnRhbmEx -EDAOBgNVBAcTB0JvemVtYW4xDjAMBgNVBAoTBXlhU1NMMRAwDgYDVQQLEwdTdXBw -b3J0MRYwFAYDVQQDEw13d3cueWFzc2wuY29tMR0wGwYJKoZIhvcNAQkBFg5pbmZv -QHlhc3NsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMCVCOFX -QfJxbbfSRUEnAWXGRa7yvCQwuJXOL07W9hyIvHyf+6hnf/5cnFF194rKB+c1L4/h -vXvAL3yrZKgX/Mpde7rgIeVyLm8uhtiVc9qsG1O5Xz/XGQ0lT+FjY1GLC2Q/rUO4 -pRxcNLOuAKBjxfZ/C1loeHOmjBipAm2vwxkBLrgQ48bMQLRpo0YzaYduxLsXpvPo -3a1zvHsvIbX9ZlEMvVSz4W1fHLwjc9EJA4kU0hC5ZMMq0KGWSrzh1Bpbx6DAwWN4 -D0Q3MDKWgDIjlaF3uhPSl3PiXSXJag3DOWCktLBpQkIJ6dgIvDMgs1gip6rrxOHm -YYPF0pbf2dBPrdcCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAcU7TYt/MTPfNt25S -C2xu4L3CLQfXwLBuQx41vDABUPD/mSNsGBpBthHW1Blh/eR3lxw54VerxRVjdxE2 -XnTiJAsfQXitt4HntEBmgPBLkaBtqG49U9mLzirhC0Vlh6GWru4+iNUSH3gXrizF -c0TY3PSv2MyuTOEMvlWkmfdulsDIRYe/3FFX/55zN2oYnMP5Inr0sFK9/CEw+MX/ -Hod9raJaNfUiqLQKdjjmdrCYrxvsigpDdNKFNDeEB+H2I7Ip3qa2t0xXfpYGy6kW -JSk6Ay1VfaaMpPeegcmVtnzBSs6UZgzKiOvSCfVbGViC3yf9Z5V4twIG1adhve86 -/LJhzQ== +MIIEnjCCA4agAwIBAgIBATANBgkqhkiG9w0BAQUFADCBlDELMAkGA1UEBhMCVVMx +EDAOBgNVBAgMB01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xETAPBgNVBAoMCFNh +d3Rvb3RoMRMwEQYDVQQLDApDb25zdWx0aW5nMRgwFgYDVQQDDA93d3cud29sZnNz +bC5jb20xHzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20wHhcNMTQwNzEx +MTcyMDE0WhcNMTcwNDA2MTcyMDE0WjCBkDELMAkGA1UEBhMCVVMxEDAOBgNVBAgM +B01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xEDAOBgNVBAoMB3dvbGZTU0wxEDAO +BgNVBAsMB1N1cHBvcnQxGDAWBgNVBAMMD3d3dy53b2xmc3NsLmNvbTEfMB0GCSqG +SIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEP +ADCCAQoCggEBAMCVCOFXQfJxbbfSRUEnAWXGRa7yvCQwuJXOL07W9hyIvHyf+6hn +f/5cnFF194rKB+c1L4/hvXvAL3yrZKgX/Mpde7rgIeVyLm8uhtiVc9qsG1O5Xz/X +GQ0lT+FjY1GLC2Q/rUO4pRxcNLOuAKBjxfZ/C1loeHOmjBipAm2vwxkBLrgQ48bM +QLRpo0YzaYduxLsXpvPo3a1zvHsvIbX9ZlEMvVSz4W1fHLwjc9EJA4kU0hC5ZMMq +0KGWSrzh1Bpbx6DAwWN4D0Q3MDKWgDIjlaF3uhPSl3PiXSXJag3DOWCktLBpQkIJ +6dgIvDMgs1gip6rrxOHmYYPF0pbf2dBPrdcCAwEAAaOB/DCB+TAdBgNVHQ4EFgQU +sxEyyZKYhOLJ+NA7bgNCyh8OjjwwgckGA1UdIwSBwTCBvoAUJ45nEXTDJh0/7TNj +s6TYHTDl6NWhgZqkgZcwgZQxCzAJBgNVBAYTAlVTMRAwDgYDVQQIDAdNb250YW5h +MRAwDgYDVQQHDAdCb3plbWFuMREwDwYDVQQKDAhTYXd0b290aDETMBEGA1UECwwK +Q29uc3VsdGluZzEYMBYGA1UEAwwPd3d3LndvbGZzc2wuY29tMR8wHQYJKoZIhvcN +AQkBFhBpbmZvQHdvbGZzc2wuY29tggkAmkFHzaEUYowwDAYDVR0TBAUwAwEB/zAN +BgkqhkiG9w0BAQUFAAOCAQEAPYxwBVtiS79stkhhARAdXgW6VZQsrllvl4BdbIbs +musVRUTkVvh1yopFMvTH4frymByR0z/oDskb+uF5mWcODWuK7BosWcQ0BI05d821 +6WBbgr80zu3GTz+0XE2KtPQKBBKgVsHhMzehVIdI6YHCD49v01JMTDJMa586BI93 +Xa3cPSvyyd88YF3Y/IZyfD3QhEuM3yZD/sDMW+E2sz0yKKPvDCDWsVA51mepi4S8 +kjTrGSPoEI/qvRiMkyc8dHWOWAT6KnREffxNOd9UF7p44V1qcNN8ooCB5hlRkcNE +Uey7iKlT4depjCj0IRxCUQm0Em2g1iUJhcYqDK+nWOZSiw== -----END CERTIFICATE----- Certificate: Data: Version: 3 (0x2) Serial Number: - e9:d0:a7:5f:79:25:f4:3c - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.yassl.com/emailAddress=info@yassl.com + 9a:41:47:cd:a1:14:62:8c + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.wolfssl.com/emailAddress=info@wolfssl.com Validity - Not Before: Oct 24 18:18:15 2011 GMT - Not After : Jul 20 18:18:15 2014 GMT - Subject: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.yassl.com/emailAddress=info@yassl.com + Not Before: Jul 11 03:20:08 2014 GMT + Not After : Apr 6 03:20:08 2017 GMT + Subject: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.wolfssl.com/emailAddress=info@wolfssl.com Subject Public Key Info: Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): + Public-Key: (2048 bit) + Modulus: 00:bf:0c:ca:2d:14:b2:1e:84:42:5b:cd:38:1f:4a: f2:4d:75:10:f1:b6:35:9f:df:ca:7d:03:98:d3:ac: de:03:66:ee:2a:f1:d8:b0:7d:6e:07:54:0b:10:98: @@ -104,54 +119,55 @@ Certificate: 36:79 Exponent: 65537 (0x10001) X509v3 extensions: - X509v3 Subject Key Identifier: + X509v3 Subject Key Identifier: 27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5 - X509v3 Authority Key Identifier: + X509v3 Authority Key Identifier: keyid:27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5 - DirName:/C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.yassl.com/emailAddress=info@yassl.com - serial:E9:D0:A7:5F:79:25:F4:3C + DirName:/C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.wolfssl.com/emailAddress=info@wolfssl.com + serial:9A:41:47:CD:A1:14:62:8C - X509v3 Basic Constraints: + X509v3 Basic Constraints: CA:TRUE Signature Algorithm: sha1WithRSAEncryption - 5f:86:14:f4:51:8b:bc:a5:4e:30:da:5e:ac:9a:f8:6c:d9:26: - 4b:93:f9:e3:1c:89:6f:9e:ee:b3:9d:77:3e:89:20:76:a3:e6: - e8:86:15:21:db:e2:33:b2:34:d5:d0:9f:f3:c1:a4:87:92:5c: - f9:d1:ff:30:2f:8e:03:bc:b3:3c:0c:32:a3:90:5f:1a:90:1e: - af:9d:f3:9e:d7:07:02:a9:7d:27:66:63:2f:af:18:d7:ac:18: - 98:8c:83:8f:38:f3:0b:ac:36:10:75:fb:ca:76:13:50:5b:02: - 8f:73:bf:e3:a0:ee:83:52:25:54:ce:26:ce:9c:bd:2f:79:ab: - 1b:60:b8:92:f1:03:c0:fc:3b:08:d9:c0:ad:d5:72:08:25:80: - 61:2d:dc:9f:a7:83:62:07:47:e0:07:4c:4b:07:30:04:a9:87: - 1c:55:7f:07:12:d0:cb:42:5d:cb:cf:66:01:1a:17:ee:f9:0f: - 60:b7:db:6f:68:e5:4e:41:62:6e:d3:6f:60:4f:4b:27:de:cf: - 18:07:f1:13:5d:cb:3f:a9:25:44:da:52:5c:c8:04:e1:56:12: - f5:2a:90:4e:d1:e2:af:01:b5:23:a1:ec:31:da:7b:63:69:c4: - b8:f3:e7:ce:a1:3d:c0:db:6d:f3:b2:d9:46:c8:9f:c3:b8:70: - 5a:1f:7f:ca + 79:78:0c:6d:79:88:91:fc:3a:15:9c:f9:27:62:16:f0:21:1f: + fa:7d:3f:a2:a8:32:1e:f7:f2:11:a9:74:16:74:5e:dc:18:ca: + f0:00:2a:d5:03:06:26:30:f1:47:83:fd:32:6e:fc:ed:aa:4f: + 7d:0c:63:60:31:2f:7c:0c:bf:99:66:87:ed:27:08:86:2d:c4: + 33:e8:98:23:1c:fe:a3:db:9a:49:4e:fc:5a:42:ef:71:c3:3f: + ad:dc:4a:a8:d2:a3:1d:09:ac:33:04:7b:86:f3:6d:00:59:a3: + c8:db:d1:3c:73:f6:0e:90:d6:5e:49:e0:bf:36:63:08:7b:a5: + b0:8f:35:3b:56:8c:11:35:49:04:1c:d0:e7:ba:56:c5:0d:0a: + 91:8d:d6:b7:62:19:34:12:52:4c:d2:6d:7c:c5:3d:0f:18:81: + 54:cb:f6:3c:e5:84:d2:d6:71:15:ec:1a:34:0b:f0:a0:21:74: + 43:c8:a3:b0:df:d9:67:da:e2:ad:93:48:f8:a0:87:bd:79:14: + e0:62:0a:df:f7:31:2e:31:7b:d1:32:2a:0a:fe:5d:14:ef:d9: + 64:50:e4:83:91:bc:70:0d:d7:88:8d:d9:bc:84:0e:c5:1a:b3: + bf:64:02:4e:51:91:a4:a2:85:15:83:af:f0:5b:9b:28:49:5f: + b2:b3:03:d8 -----BEGIN CERTIFICATE----- -MIIEnjCCA4agAwIBAgIJAOnQp195JfQ8MA0GCSqGSIb3DQEBBQUAMIGQMQswCQYD -VQQGEwJVUzEQMA4GA1UECBMHTW9udGFuYTEQMA4GA1UEBxMHQm96ZW1hbjERMA8G -A1UEChMIU2F3dG9vdGgxEzARBgNVBAsTCkNvbnN1bHRpbmcxFjAUBgNVBAMTDXd3 -dy55YXNzbC5jb20xHTAbBgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tMB4XDTEx -MTAyNDE4MTgxNVoXDTE0MDcyMDE4MTgxNVowgZAxCzAJBgNVBAYTAlVTMRAwDgYD -VQQIEwdNb250YW5hMRAwDgYDVQQHEwdCb3plbWFuMREwDwYDVQQKEwhTYXd0b290 -aDETMBEGA1UECxMKQ29uc3VsdGluZzEWMBQGA1UEAxMNd3d3Lnlhc3NsLmNvbTEd -MBsGCSqGSIb3DQEJARYOaW5mb0B5YXNzbC5jb20wggEiMA0GCSqGSIb3DQEBAQUA -A4IBDwAwggEKAoIBAQC/DMotFLIehEJbzTgfSvJNdRDxtjWf38p9A5jTrN4DZu4q -8diwfW4HVAsQmCFNgMsSIOfMT95FfclydzLqypC7aVIQAy+o85XF8YtiVhvvZ2+k -EEGVrQqb46XAsNJwdlAwW6joCCx87aeieo04KRysx+3yfJWwlYJ9SVw4zXcl772A -dVOUPD3KY1ufFbXTHRMvGdE823Y6zLh9yeXC19pAb9gh3HMbQi1TnP4a/H2rejY/ -mN6EfAVnzmoUOIep8Yy1aMtof3EgK/WgY/VWL6Mm0rdvsVoX1ziZCP6TWG/+wxNJ -CBYLp01nAFIxZyNOmO1RRR25BNkL7Ngos0u97TZ5AgMBAAGjgfgwgfUwHQYDVR0O -BBYEFCeOZxF0wyYdP+0zY7Ok2B0w5ejVMIHFBgNVHSMEgb0wgbqAFCeOZxF0wyYd -P+0zY7Ok2B0w5ejVoYGWpIGTMIGQMQswCQYDVQQGEwJVUzEQMA4GA1UECBMHTW9u -dGFuYTEQMA4GA1UEBxMHQm96ZW1hbjERMA8GA1UEChMIU2F3dG9vdGgxEzARBgNV -BAsTCkNvbnN1bHRpbmcxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkqhkiG -9w0BCQEWDmluZm9AeWFzc2wuY29tggkA6dCnX3kl9DwwDAYDVR0TBAUwAwEB/zAN -BgkqhkiG9w0BAQUFAAOCAQEAX4YU9FGLvKVOMNperJr4bNkmS5P54xyJb57us513 -PokgdqPm6IYVIdviM7I01dCf88Gkh5Jc+dH/MC+OA7yzPAwyo5BfGpAer53zntcH -Aql9J2ZjL68Y16wYmIyDjzjzC6w2EHX7ynYTUFsCj3O/46Dug1IlVM4mzpy9L3mr -G2C4kvEDwPw7CNnArdVyCCWAYS3cn6eDYgdH4AdMSwcwBKmHHFV/BxLQy0Jdy89m -ARoX7vkPYLfbb2jlTkFibtNvYE9LJ97PGAfxE13LP6klRNpSXMgE4VYS9SqQTtHi -rwG1I6HsMdp7Y2nEuPPnzqE9wNtt87LZRsifw7hwWh9/yg== +MIIEqjCCA5KgAwIBAgIJAJpBR82hFGKMMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD +VQQGEwJVUzEQMA4GA1UECAwHTW9udGFuYTEQMA4GA1UEBwwHQm96ZW1hbjERMA8G +A1UECgwIU2F3dG9vdGgxEzARBgNVBAsMCkNvbnN1bHRpbmcxGDAWBgNVBAMMD3d3 +dy53b2xmc3NsLmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTAe +Fw0xNDA3MTEwMzIwMDhaFw0xNzA0MDYwMzIwMDhaMIGUMQswCQYDVQQGEwJVUzEQ +MA4GA1UECAwHTW9udGFuYTEQMA4GA1UEBwwHQm96ZW1hbjERMA8GA1UECgwIU2F3 +dG9vdGgxEzARBgNVBAsMCkNvbnN1bHRpbmcxGDAWBgNVBAMMD3d3dy53b2xmc3Ns +LmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAL8Myi0Ush6EQlvNOB9K8k11EPG2NZ/fyn0D +mNOs3gNm7irx2LB9bgdUCxCYIU2AyxIg58xP3kV9yXJ3MurKkLtpUhADL6jzlcXx +i2JWG+9nb6QQQZWtCpvjpcCw0nB2UDBbqOgILHztp6J6jTgpHKzH7fJ8lbCVgn1J +XDjNdyXvvYB1U5Q8PcpjW58VtdMdEy8Z0TzbdjrMuH3J5cLX2kBv2CHccxtCLVOc +/hr8fat6Nj+Y3oR8BWfOahQ4h6nxjLVoy2h/cSAr9aBj9VYvoybSt2+xWhfXOJkI +/pNYb/7DE0kIFgunTWcAUjFnI06Y7VFFHbkE2Qvs2CizS73tNnkCAwEAAaOB/DCB ++TAdBgNVHQ4EFgQUJ45nEXTDJh0/7TNjs6TYHTDl6NUwgckGA1UdIwSBwTCBvoAU +J45nEXTDJh0/7TNjs6TYHTDl6NWhgZqkgZcwgZQxCzAJBgNVBAYTAlVTMRAwDgYD +VQQIDAdNb250YW5hMRAwDgYDVQQHDAdCb3plbWFuMREwDwYDVQQKDAhTYXd0b290 +aDETMBEGA1UECwwKQ29uc3VsdGluZzEYMBYGA1UEAwwPd3d3LndvbGZzc2wuY29t +MR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdvbGZzc2wuY29tggkAmkFHzaEUYowwDAYD +VR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAeXgMbXmIkfw6FZz5J2IW8CEf ++n0/oqgyHvfyEal0FnRe3BjK8AAq1QMGJjDxR4P9Mm787apPfQxjYDEvfAy/mWaH +7ScIhi3EM+iYIxz+o9uaSU78WkLvccM/rdxKqNKjHQmsMwR7hvNtAFmjyNvRPHP2 +DpDWXkngvzZjCHulsI81O1aMETVJBBzQ57pWxQ0KkY3Wt2IZNBJSTNJtfMU9DxiB +VMv2POWE0tZxFewaNAvwoCF0Q8ijsN/ZZ9rirZNI+KCHvXkU4GIK3/cxLjF70TIq +Cv5dFO/ZZFDkg5G8cA3XiI3ZvIQOxRqzv2QCTlGRpKKFFYOv8FubKElfsrMD2A== +-----END CERTIFICATE----- diff --git a/extra/yassl/certs/server-keyEnc.pem b/extra/yassl/certs/server-keyEnc.pem index 278a0946c68..e5ab57d4c9e 100644 --- a/extra/yassl/certs/server-keyEnc.pem +++ b/extra/yassl/certs/server-keyEnc.pem @@ -1,30 +1,30 @@ -----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED -DEK-Info: DES-CBC,08132C1FFF5BC8CC +DEK-Info: DES-CBC,136C7D8A69656668 -W+krChiFlNU+koE0Bep+U45OG4V4IFZv67ex6yJHgcsPd+HQ692A/h+5dYc8rdlW -2LDgSODHHIMTt6RVJDxXxXs3qFmJQbnVXeXxV209X8EfaRarh+yiMKeUP6K8hIvj -+IYRma6iKOs+d4KlcZZudGs2f/x8nhxXbmQtrLhGd4h91mnJk2sKmiz7UkUy6Qng -gOHnT2dfF4Qk2ZYsjisRHjpWZiqh40GO1LuTgUjZoH+LGhMwMwOAE6+ss5xa+yE+ -Xd9Yljm0/QW68JILkCJQjLDRvPGxDJyvYq6TT/kSElsRlI/AuRrZH1YVD3hn/xjx -tDoEB+JEbH6iu9ne2srxnGSKLzoUbb4XPaCjLIW9BJf7oANmmFQpZZQiRTyIUVWi -IE5hJciqF7ra7IwfZAW/PeWGXpzNOVN9QAvyAMsmvUCzJdxd1ySUatjhZ+mSFYGk -rDVtyrgt4ZQgV0EdJV0Yn1ZWMOk1qEKXT0JAnI+9S6Y+QEdwXmdz3xlVuq61Jvub -iJUVepnD/1QeFfWy8JwlscWpWFrkr569f3SNG+FGb6fufnUP7K6sX3urj+pj1QET -f9NmmvLBsVsbj1Egg3wnxbVHIUPky64LY04wtNJaAwhuG6mKCvaClKYMTmTCyrzP -aRwghhMQ3yHUbo2A1ZppYsXXg8lX30eW+5O77N9Q3xfP0phODHXsnXhBH09ml1JQ -MmiCaL5n6sIVcjtFmN/kyaEuz/1VrBSaDCPeW88n61UXUidXrGOZN/2c/2xFir8B -2rdE82lQLl07SJxzQQ6aJVvrc5tnbV/ENDySS5dG6Yl/w89/nuu0RFHmAweKqfGC -8m0XOkmonIk6h3YT7XrkE0b/2jkf1mMaMKrGGfRmxqNt1nGxMCJHAO/Sn9v+I9rU -W7HCZ04RTnRp1BXcqDxdwlveDKJRVfiKOSSEOpEXXlexS5R1vikmxrCwK5YVUTkT -3tgahVtHJkFHnBHBzXyHUDwWahxZaU9TO43z0JFxs0zINWUWppldf0oyWjP1FSrI -a9tXBs7aoykUY9Av9K0p4UJJU005qzD/tuegZFX34wRETJO0BJnlZHTTZSqLSVX+ -KZg4nPq8Xii1VHta3tgw7up2z1tpepsBerTsRQ1+IDpxLaIxgt9am0hXVTiMLex/ -DD9UvQC/eBUmpmWraK/Mqeq/UrPl+lmeoXsG6LWIvEp9d19rJ/3OhIJf2pDh9dC8 -NzJoNP9qOrDajAwzeeF5dbQxCaG+X8am9s4wryC0p+NrQ0tzv8efey0zBodDIOgo -F1G7+ADgHy+V565q8sdL52xx0xB9Ty5p9IOfOUbxa3K65TJf/I/QAQjl4LyTbkfr -kzpYAG2uF55EB3Eq3aMrj47pzZy0ELXXN2qYJ9Oelgl+h6MzYbmd+Wm+A2Cofv3u -7ANAyjAYN7/Lo3lTFAt7sXAXGKnqw62JNSSMkIqZVrG5dn7Jxj5AJCVyYxTrm6Y+ -DDcblX47XrWxVoVJN/dLJZ8FzWs4o/8w9Yn8U54Ci7F0g+j2f+OpDy9PGFYT9pKw -xWG8chkYE6QPilEYvdi26ZnZ3u236q9PMtyRP87NmBN2sLkj/rbBTzBxWIaGS+Mt +jvNTyPaztxPIoAzbdmZnD0Zw2+60tMxNc0GMHNmeOyG25aHP/dT+TWiKFpFVkkkY +uoCIhYUyw7gmpw+CnRJwWd+ans4nrvAjwy5oWJvarvsyUpjqvnPoIlAqd+d4TDKN +eESzcI76+gHdisAtCrQD+fGqgTZhli5TgDbnpasL/QnY2qDlutvakkVw7gPXe156 +2Phy8WN+efr65J6wt3K/dj7Datl9u4JeHQK81gYyWBVX+EagEjPGDzkFQCj9Z0q7 +8K3iB5GW1JAqJS0IfZPB40AnSTF/n1TL1SN3qfU3l7hTGNrx9o7580bgDEoAR7pI +F8eZlS15KHtZmh11AnU1KTKZ6kmgnNqeMTGMN6N0ct2wMKW1dV87eTDlF0oiR2ol +XwtFgKmrIjfpmzkdWjbJmWnGMjD56KdiFZga/ZyKMsPrVoYLgfJEpn36iQspfygx +HCGNTf0PjIsjEWU0WyQiF86t+c45W3wNFsv/AxVyfMl+su02yrd6u2ecuQDir3Cs +b2k8IKtQgVe/NIpEWLKuiHG5oedIPPQyDYK5uq+gHxCGeOoKnWlsWFEHZRiza4X5 +tbgTrJB8Sw0ENWrvVGGmQZN4pSImlsMwzQ2qik5CQ00N1b3+56/obn0z75I3bUSb +tC5g8DRjl6oclAenNgh/MYMT287y5W2dD4npxHcekX4O3J2CDXNfg4vV2j5GRxtg +LVJdYE2p7bpYePCDHrYng8b9ubBprx0CrEnkIvvtUjzNPf6VDL0+MBKl+XgR2/nz +iRqTuZnlGGOyM+KYDwXpgwfs/HfvFGksxTAlO/40GkGh+WGPaIoNyCK0SgQKhyb4 +JIkR0vd2/yLg3lWMJrGwh7A0Gm07Z/781oURP3uWd+PaCOgGcd5ipcAjcEyuxNly +AthipWqmQWUcbf6Z2N9j3OA22Hv2Uzk8HSfi9VOZtL9svdEEZ0NnOekJgnc6stQp +bXiknlK/T5WdrWxSyCfgUq68Vf6DFfIRAVuFdJ3WHT2wVXHrDfft6D+Ne/XCxPoE +8zGmkyusaph33UHQ1oNyUbLbwcDCDSmOo8gYoedD3IwxtMA3wJRugomqosItwV8X +vkgmcy8eSE/+gZUxJEN2gnLcfKFhCkC80J6oFhmoDD6vuUnPHcFdKZgVPw2rzPk5 +Vb1kX+gpORplYmKpq1vz/ujscL4T0TmYLz02hkIS4edpW55ncTTv7JWefpRiTB1J +RB3td3me4htqR+YIDWJ+emrOmqsCG2WvpAS+MTw2mj1jYk9LL/ZYobTjSCEWmuwT +yVK6m303irR7HQDauxhslRFgoK21w63viOyj5NKIU1gQtaAANGDxcgORC1XLjjgt +oNutSQA+7P42vfHSHK4cnTBXl6V32H/GyVpdHQOZqSrqIjgLmUZodSmRPROxosZF +a46B1O7m/rJFxkiKW4vod+/WqjoE0Hhfrb8rRrkRjzGeCqqSSnQ3vrunVkvF8hlA +b6FOv4ZBJL4piC1GKH+rscqke9NEiDqXN8C3iYz86jbck/Ha21yUS8T3X7N52sg+ +B3AmOGnLK6BebYeto9vZxQjacChJZSixSxLV+l9/nVQ0+mW42azHdzk0ru59TGAj -----END RSA PRIVATE KEY----- diff --git a/extra/yassl/include/buffer.hpp b/extra/yassl/include/buffer.hpp index 27f71199093..77d2ed8193c 100644 --- a/extra/yassl/include/buffer.hpp +++ b/extra/yassl/include/buffer.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 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 @@ -48,7 +48,11 @@ const uint AUTO = 0xFEEDBEEF; struct NoCheck { - void check(uint, uint); + int check(uint, uint); +}; + +struct Check { + int check(uint, uint); }; /* input_buffer operates like a smart c style array with a checking option, @@ -60,11 +64,13 @@ struct NoCheck { * write to the buffer bulk wise and have the correct size */ -class input_buffer : public NoCheck { +class input_buffer : public Check { uint size_; // number of elements in buffer uint current_; // current offset position in buffer byte* buffer_; // storage for buffer byte* end_; // end of storage marker + int error_; // error number + byte zero_; // for returning const reference to zero byte public: input_buffer(); @@ -93,6 +99,10 @@ public: uint get_remaining() const; + int get_error() const; + + void set_error(); + void set_current(uint i); // read only access through [], advance current @@ -103,7 +113,7 @@ public: bool eof(); // peek ahead - byte peek() const; + byte peek(); // write function, should use at/near construction void assign(const byte* t, uint s); diff --git a/extra/yassl/include/openssl/ssl.h b/extra/yassl/include/openssl/ssl.h index d4226450660..993822d0ab0 100644 --- a/extra/yassl/include/openssl/ssl.h +++ b/extra/yassl/include/openssl/ssl.h @@ -35,7 +35,7 @@ #include "rsa.h" -#define YASSL_VERSION "2.3.0" +#define YASSL_VERSION "2.3.4" #if defined(__cplusplus) diff --git a/extra/yassl/src/buffer.cpp b/extra/yassl/src/buffer.cpp index 6f356e9fd4f..aa7224bf64e 100644 --- a/extra/yassl/src/buffer.cpp +++ b/extra/yassl/src/buffer.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2005, 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 @@ -32,8 +32,19 @@ namespace yaSSL { -void NoCheck::check(uint, uint) +/* return 0 on check success, always true for NoCheck policy */ +int NoCheck::check(uint, uint) { + return 0; +} + +/* return 0 on check success */ +int Check::check(uint i, uint max) +{ + if (i < max) + return 0; + + return -1; } @@ -48,18 +59,20 @@ void NoCheck::check(uint, uint) input_buffer::input_buffer() - : size_(0), current_(0), buffer_(0), end_(0) + : size_(0), current_(0), buffer_(0), end_(0), error_(0), zero_(0) {} input_buffer::input_buffer(uint s) - : size_(0), current_(0), buffer_(NEW_YS byte[s]), end_(buffer_ + s) + : size_(0), current_(0), buffer_(NEW_YS byte[s]), end_(buffer_ + s), + error_(0), zero_(0) {} // with assign input_buffer::input_buffer(uint s, const byte* t, uint len) - : size_(0), current_(0), buffer_(NEW_YS byte[s]), end_(buffer_ + s) + : size_(0), current_(0), buffer_(NEW_YS byte[s]), end_(buffer_ + s), + error_(0), zero_(0) { assign(t, len); } @@ -74,8 +87,10 @@ input_buffer::~input_buffer() // users can pass defualt zero length buffer and then allocate void input_buffer::allocate(uint s) { - buffer_ = NEW_YS byte[s]; - end_ = buffer_ + s; + if (error_ == 0) { + buffer_ = NEW_YS byte[s]; + end_ = buffer_ + s; + } } @@ -90,40 +105,67 @@ byte* input_buffer::get_buffer() const // if you know the size before the write use assign() void input_buffer::add_size(uint i) { - check(size_ + i-1, get_capacity()); - size_ += i; + if (error_ == 0 && check(size_ + i-1, get_capacity()) == 0) + size_ += i; + else + error_ = -1; } uint input_buffer::get_capacity() const { - return (uint) (end_ - buffer_); + if (error_ == 0) + return end_ - buffer_; + + return 0; } uint input_buffer::get_current() const { - return current_; + if (error_ == 0) + return current_; + + return 0; } uint input_buffer::get_size() const { - return size_; + if (error_ == 0) + return size_; + + return 0; } uint input_buffer::get_remaining() const { - return size_ - current_; + if (error_ == 0) + return size_ - current_; + + return 0; +} + + +int input_buffer::get_error() const +{ + return error_; +} + + +void input_buffer::set_error() +{ + error_ = -1; } void input_buffer::set_current(uint i) { - if (i) - check(i - 1, size_); - current_ = i; + if (error_ == 0 && i && check(i - 1, size_) == 0) + current_ = i; + else + error_ = -1; } @@ -131,40 +173,59 @@ void input_buffer::set_current(uint i) // user passes in AUTO index for ease of use const byte& input_buffer::operator[](uint i) { - check(current_, size_); - return buffer_[current_++]; + if (error_ == 0 && check(current_, size_) == 0) + return buffer_[current_++]; + + error_ = -1; + return zero_; } // end of input test bool input_buffer::eof() { + if (error_ != 0) + return true; + return current_ >= size_; } // peek ahead -byte input_buffer::peek() const +byte input_buffer::peek() { - return buffer_[current_]; + if (error_ == 0 && check(current_, size_) == 0) + return buffer_[current_]; + + error_ = -1; + return 0; } // write function, should use at/near construction void input_buffer::assign(const byte* t, uint s) { - check(current_, get_capacity()); - add_size(s); - memcpy(&buffer_[current_], t, s); + if (t && error_ == 0 && check(current_, get_capacity()) == 0) { + add_size(s); + if (error_ == 0) { + memcpy(&buffer_[current_], t, s); + return; // success + } + } + + error_ = -1; } // use read to query input, adjusts current void input_buffer::read(byte* dst, uint length) { - check(current_ + length - 1, size_); - memcpy(dst, &buffer_[current_], length); - current_ += length; + if (dst && error_ == 0 && check(current_ + length - 1, size_) == 0) { + memcpy(dst, &buffer_[current_], length); + current_ += length; + } else { + error_ = -1; + } } diff --git a/extra/yassl/src/handshake.cpp b/extra/yassl/src/handshake.cpp index 058f8596546..33303b1106d 100644 --- a/extra/yassl/src/handshake.cpp +++ b/extra/yassl/src/handshake.cpp @@ -522,7 +522,7 @@ void buildSHA_CertVerify(SSL& ssl, byte* digest) // some clients still send sslv2 client hello void ProcessOldClientHello(input_buffer& input, SSL& ssl) { - if (input.get_remaining() < 2) { + if (input.get_error() || input.get_remaining() < 2) { ssl.SetError(bad_input); return; } @@ -549,20 +549,24 @@ void ProcessOldClientHello(input_buffer& input, SSL& ssl) byte len[2]; - input.read(len, sizeof(len)); + len[0] = input[AUTO]; + len[1] = input[AUTO]; ato16(len, ch.suite_len_); - input.read(len, sizeof(len)); + len[0] = input[AUTO]; + len[1] = input[AUTO]; uint16 sessionLen; ato16(len, sessionLen); ch.id_len_ = sessionLen; - input.read(len, sizeof(len)); + len[0] = input[AUTO]; + len[1] = input[AUTO]; uint16 randomLen; ato16(len, randomLen); - if (ch.suite_len_ > MAX_SUITE_SZ || sessionLen > ID_LEN || - randomLen > RAN_LEN) { + if (input.get_error() || ch.suite_len_ > MAX_SUITE_SZ || + ch.suite_len_ > input.get_remaining() || + sessionLen > ID_LEN || randomLen > RAN_LEN) { ssl.SetError(bad_input); return; } @@ -580,13 +584,12 @@ void ProcessOldClientHello(input_buffer& input, SSL& ssl) ch.suite_len_ = j; if (ch.id_len_) - input.read(ch.session_id_, ch.id_len_); + input.read(ch.session_id_, ch.id_len_); // id_len_ from sessionLen if (randomLen < RAN_LEN) memset(ch.random_, 0, RAN_LEN - randomLen); input.read(&ch.random_[RAN_LEN - randomLen], randomLen); - ch.Process(input, ssl); } @@ -787,6 +790,9 @@ int DoProcessReply(SSL& ssl) ssl.verifyState(hdr); } + if (ssl.GetError()) + return 0; + // make sure we have enough input in buffer to process this record if (needHdr || hdr.length_ > buffer.get_remaining()) { // put header in front for next time processing @@ -799,6 +805,9 @@ int DoProcessReply(SSL& ssl) while (buffer.get_current() < hdr.length_ + RECORD_HEADER + offset) { // each message in record, can be more than 1 if not encrypted + if (ssl.GetError()) + return 0; + if (ssl.getSecurity().get_parms().pending_ == false) { // cipher on // sanity check for malicious/corrupted/illegal input if (buffer.get_remaining() < hdr.length_) { diff --git a/extra/yassl/src/yassl_imp.cpp b/extra/yassl/src/yassl_imp.cpp index db960d307ff..a924cdbd829 100644 --- a/extra/yassl/src/yassl_imp.cpp +++ b/extra/yassl/src/yassl_imp.cpp @@ -220,16 +220,26 @@ void DH_Server::build(SSL& ssl) // read PreMaster secret and decrypt, server side void EncryptedPreMasterSecret::read(SSL& ssl, input_buffer& input) { + if (input.get_error()) { + ssl.SetError(bad_input); + return; + } + const CertManager& cert = ssl.getCrypto().get_certManager(); RSA rsa(cert.get_privateKey(), cert.get_privateKeyLength(), false); uint16 cipherLen = rsa.get_cipherLength(); if (ssl.isTLS()) { byte len[2]; - input.read(len, sizeof(len)); + len[0] = input[AUTO]; + len[1] = input[AUTO]; ato16(len, cipherLen); } alloc(cipherLen); input.read(secret_, length_); + if (input.get_error()) { + ssl.SetError(bad_input); + return; + } opaque preMasterSecret[SECRET_LEN]; rsa.decrypt(preMasterSecret, secret_, length_, @@ -277,6 +287,11 @@ void EncryptedPreMasterSecret::alloc(int sz) // read client's public key, server side void ClientDiffieHellmanPublic::read(SSL& ssl, input_buffer& input) { + if (input.get_error() || input.get_remaining() < (uint)LENGTH_SZ) { + ssl.SetError(bad_input); + return; + } + DiffieHellman& dh = ssl.useCrypto().use_dh(); uint16 keyLength; @@ -287,6 +302,10 @@ void ClientDiffieHellmanPublic::read(SSL& ssl, input_buffer& input) alloc(keyLength); input.read(Yc_, keyLength); + if (input.get_error()) { + ssl.SetError(bad_input); + return; + } dh.makeAgreement(Yc_, keyLength); // because of encoding, first byte might be 0, don't use for preMaster @@ -331,6 +350,10 @@ void ClientDiffieHellmanPublic::alloc(int sz, bool offset) // read server's p, g, public key and sig, client side void DH_Server::read(SSL& ssl, input_buffer& input) { + if (input.get_error() || input.get_remaining() < (uint)LENGTH_SZ) { + ssl.SetError(bad_input); + return; + } uint16 length, messageTotal = 6; // pSz + gSz + pubSz byte tmp[2]; @@ -341,6 +364,10 @@ void DH_Server::read(SSL& ssl, input_buffer& input) messageTotal += length; input.read(parms_.alloc_p(length), length); + if (input.get_error() || input.get_remaining() < (uint)LENGTH_SZ) { + ssl.SetError(bad_input); + return; + } // g tmp[0] = input[AUTO]; @@ -349,6 +376,10 @@ void DH_Server::read(SSL& ssl, input_buffer& input) messageTotal += length; input.read(parms_.alloc_g(length), length); + if (input.get_error() || input.get_remaining() < (uint)LENGTH_SZ) { + ssl.SetError(bad_input); + return; + } // pub tmp[0] = input[AUTO]; @@ -357,12 +388,20 @@ void DH_Server::read(SSL& ssl, input_buffer& input) messageTotal += length; input.read(parms_.alloc_pub(length), length); + if (input.get_error() || input.get_remaining() < (uint)LENGTH_SZ) { + ssl.SetError(bad_input); + return; + } // save message for hash verify input_buffer message(messageTotal); input.set_current(input.get_current() - messageTotal); input.read(message.get_buffer(), messageTotal); message.add_size(messageTotal); + if (input.get_error() || input.get_remaining() < (uint)LENGTH_SZ) { + ssl.SetError(bad_input); + return; + } // signature tmp[0] = input[AUTO]; @@ -371,6 +410,10 @@ void DH_Server::read(SSL& ssl, input_buffer& input) signature_ = NEW_YS byte[length]; input.read(signature_, length); + if (input.get_error()) { + ssl.SetError(bad_input); + return; + } // verify signature byte hash[FINISHED_SZ]; @@ -645,6 +688,10 @@ void HandShakeHeader::Process(input_buffer& input, SSL& ssl) { ssl.verifyState(*this); if (ssl.GetError()) return; + if (input.get_error()) { + ssl.SetError(bad_input); + return; + } const HandShakeFactory& hsf = ssl.getFactory().getHandShake(); mySTL::auto_ptr hs(hsf.CreateObject(type_)); if (!hs.get()) { @@ -810,8 +857,13 @@ uint16 ChangeCipherSpec::get_length() const // CipherSpec processing handler -void ChangeCipherSpec::Process(input_buffer&, SSL& ssl) +void ChangeCipherSpec::Process(input_buffer& input, SSL& ssl) { + if (input.get_error()) { + ssl.SetError(bad_input); + return; + } + ssl.useSecurity().use_parms().pending_ = false; if (ssl.getSecurity().get_resuming()) { if (ssl.getSecurity().get_parms().entity_ == client_end) @@ -873,6 +925,11 @@ output_buffer& operator<<(output_buffer& output, const Alert& a) // Alert processing handler void Alert::Process(input_buffer& input, SSL& ssl) { + if (input.get_error()) { + ssl.SetError(bad_input); + return; + } + if (ssl.getSecurity().get_parms().pending_ == false) { // encrypted alert int aSz = get_length(); // alert size already read on input opaque verify[SHA_LEN]; @@ -890,12 +947,19 @@ void Alert::Process(input_buffer& input, SSL& ssl) if (ssl.getSecurity().get_parms().cipher_type_ == block) { int ivExtra = 0; + opaque fill; if (ssl.isTLSv1_1()) ivExtra = ssl.getCrypto().get_cipher().get_blockSize(); int padSz = ssl.getSecurity().get_parms().encrypt_size_ - ivExtra - aSz - digestSz; - input.set_current(input.get_current() + padSz); + for (int i = 0; i < padSz; i++) + fill = input[AUTO]; + } + + if (input.get_error()) { + ssl.SetError(bad_input); + return; } // verify @@ -1112,6 +1176,11 @@ static int timing_verify(SSL& ssl, const byte* input, int padLen, int t, // Process handler for Data void Data::Process(input_buffer& input, SSL& ssl) { + if (input.get_error()) { + ssl.SetError(bad_input); + return; + } + int msgSz = ssl.getSecurity().get_parms().encrypt_size_; int pad = 0, padSz = 0; int ivExtra = 0; @@ -1154,7 +1223,7 @@ void Data::Process(input_buffer& input, SSL& ssl) int dataSz = msgSz - ivExtra - digestSz - pad - padSz; - if (dataSz < 0) { + if (dataSz < 0 || dataSz > (MAX_RECORD_SIZE + COMPRESS_EXTRA)) { ssl.SetError(bad_input); return; } @@ -1180,6 +1249,10 @@ void Data::Process(input_buffer& input, SSL& ssl) // advance past mac and fill input.set_current(input.get_current() + digestSz + pad + padSz); + if (input.get_error()) { + ssl.SetError(bad_input); + return; + } } @@ -1244,6 +1317,11 @@ output_buffer& operator<<(output_buffer& output, const Certificate& cert) // certificate processing handler void Certificate::Process(input_buffer& input, SSL& ssl) { + if (input.get_error()) { + ssl.SetError(bad_input); + return; + } + CertManager& cm = ssl.useCrypto().use_certManager(); uint32 list_sz; @@ -1412,6 +1490,10 @@ input_buffer& operator>>(input_buffer& input, ServerHello& hello) // Session hello.id_len_ = input[AUTO]; + if (hello.id_len_ > ID_LEN) { + input.set_error(); + return input; + } if (hello.id_len_) input.read(hello.session_id_, hello.id_len_); @@ -1452,8 +1534,13 @@ output_buffer& operator<<(output_buffer& output, const ServerHello& hello) // Server Hello processing handler -void ServerHello::Process(input_buffer&, SSL& ssl) +void ServerHello::Process(input_buffer& input, SSL& ssl) { + if (input.get_error()) { + ssl.SetError(bad_input); + return; + } + if (ssl.GetMultiProtocol()) { // SSLv23 support if (ssl.isTLS() && server_version_.minor_ < 1) // downgrade to SSLv3 @@ -1547,8 +1634,12 @@ const opaque* ServerHello::get_random() const // Server Hello Done processing handler -void ServerHelloDone::Process(input_buffer&, SSL& ssl) +void ServerHelloDone::Process(input_buffer& input, SSL& ssl) { + if (input.get_error()) { + ssl.SetError(bad_input); + return; + } ssl.useStates().useClient() = serverHelloDoneComplete; } @@ -1667,8 +1758,13 @@ output_buffer& operator<<(output_buffer& output, const ClientHello& hello) // Client Hello processing handler -void ClientHello::Process(input_buffer&, SSL& ssl) +void ClientHello::Process(input_buffer& input, SSL& ssl) { + if (input.get_error()) { + ssl.SetError(bad_input); + return; + } + // store version for pre master secret ssl.useSecurity().use_connection().chVersion_ = client_version_; @@ -1800,9 +1896,17 @@ output_buffer& operator<<(output_buffer& output, const ServerKeyExchange& sk) // Server Key Exchange processing handler void ServerKeyExchange::Process(input_buffer& input, SSL& ssl) { + if (input.get_error()) { + ssl.SetError(bad_input); + return; + } createKey(ssl); if (ssl.GetError()) return; server_key_->read(ssl, input); + if (input.get_error()) { + ssl.SetError(bad_input); + return; + } ssl.useStates().useClient() = serverKeyExchangeComplete; } @@ -1924,18 +2028,24 @@ input_buffer& operator>>(input_buffer& input, CertificateRequest& request) { // types request.typeTotal_ = input[AUTO]; + if (request.typeTotal_ > CERT_TYPES) { + input.set_error(); + return input; + } for (int i = 0; i < request.typeTotal_; i++) request.certificate_types_[i] = ClientCertificateType(input[AUTO]); - byte tmp[REQUEST_HEADER]; - input.read(tmp, sizeof(tmp)); + byte tmp[2]; + tmp[0] = input[AUTO]; + tmp[1] = input[AUTO]; uint16 sz; ato16(tmp, sz); // authorities while (sz) { uint16 dnSz; - input.read(tmp, sizeof(tmp)); + tmp[0] = input[AUTO]; + tmp[1] = input[AUTO]; ato16(tmp, dnSz); DistinguishedName dn; @@ -1945,6 +2055,9 @@ input_buffer& operator>>(input_buffer& input, CertificateRequest& request) input.read(&dn[REQUEST_HEADER], dnSz); sz -= dnSz + REQUEST_HEADER; + + if (input.get_error()) + break; } return input; @@ -1983,8 +2096,12 @@ output_buffer& operator<<(output_buffer& output, // CertificateRequest processing handler -void CertificateRequest::Process(input_buffer&, SSL& ssl) +void CertificateRequest::Process(input_buffer& input, SSL& ssl) { + if (input.get_error()) { + ssl.SetError(bad_input); + return; + } CertManager& cm = ssl.useCrypto().use_certManager(); cm.setSendVerify(); @@ -2067,7 +2184,8 @@ output_buffer& CertificateVerify::get(output_buffer& out) const input_buffer& operator>>(input_buffer& input, CertificateVerify& request) { byte tmp[VERIFY_HEADER]; - input.read(tmp, sizeof(tmp)); + tmp[0] = input[AUTO]; + tmp[1] = input[AUTO]; uint16 sz = 0; ato16(tmp, sz); @@ -2091,8 +2209,13 @@ output_buffer& operator<<(output_buffer& output, // CertificateVerify processing handler -void CertificateVerify::Process(input_buffer&, SSL& ssl) +void CertificateVerify::Process(input_buffer& input, SSL& ssl) { + if (input.get_error()) { + ssl.SetError(bad_input); + return; + } + const Hashes& hashVerify = ssl.getHashes().get_certVerify(); const CertManager& cert = ssl.getCrypto().get_certManager(); @@ -2131,9 +2254,17 @@ output_buffer& operator<<(output_buffer& output, const ClientKeyExchange& ck) // Client Key Exchange processing handler void ClientKeyExchange::Process(input_buffer& input, SSL& ssl) { + if (input.get_error()) { + ssl.SetError(bad_input); + return; + } createKey(ssl); if (ssl.GetError()) return; client_key_->read(ssl, input); + if (input.get_error()) { + ssl.SetError(bad_input); + return; + } if (ssl.getCrypto().get_certManager().verifyPeer()) build_certHashes(ssl, ssl.useHashes().use_certVerify()); @@ -2220,11 +2351,19 @@ output_buffer& operator<<(output_buffer& output, const Finished& fin) // Finished processing handler void Finished::Process(input_buffer& input, SSL& ssl) { + if (input.get_error()) { + ssl.SetError(bad_input); + return; + } // verify hashes const Finished& verify = ssl.getHashes().get_verify(); uint finishedSz = ssl.isTLS() ? TLS_FINISHED_SZ : FINISHED_SZ; input.read(hashes_.md5_, finishedSz); + if (input.get_error()) { + ssl.SetError(bad_input); + return; + } if (memcmp(&hashes_, &verify.hashes_, finishedSz)) { ssl.SetError(verify_error); @@ -2246,19 +2385,23 @@ void Finished::Process(input_buffer& input, SSL& ssl) opaque mac[SHA_LEN]; // max size int digestSz = ssl.getCrypto().get_digest().get_digestSize(); input.read(mac, digestSz); + if (input.get_error()) { + ssl.SetError(bad_input); + return; + } uint ivExtra = 0; if (ssl.getSecurity().get_parms().cipher_type_ == block) if (ssl.isTLSv1_1()) ivExtra = ssl.getCrypto().get_cipher().get_blockSize(); + opaque fill; int padSz = ssl.getSecurity().get_parms().encrypt_size_ - ivExtra - HANDSHAKE_HEADER - finishedSz - digestSz; - input.set_current(input.get_current() + padSz); - - // verify mac - if (memcmp(mac, verifyMAC, digestSz)) { - ssl.SetError(verify_error); + for (int i = 0; i < padSz; i++) + fill = input[AUTO]; + if (input.get_error()) { + ssl.SetError(bad_input); return; } diff --git a/extra/yassl/src/yassl_int.cpp b/extra/yassl/src/yassl_int.cpp index 73f8f2330c5..3acc2c123ba 100644 --- a/extra/yassl/src/yassl_int.cpp +++ b/extra/yassl/src/yassl_int.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2005, 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 @@ -2534,8 +2534,9 @@ ASN1_STRING* StringHolder::GetString() int DeCompress(input_buffer& in, int sz, input_buffer& out) { byte tmp[LENGTH_SZ]; - - in.read(tmp, sizeof(tmp)); + + tmp[0] = in[AUTO]; + tmp[1] = in[AUTO]; uint16 len; ato16(tmp, len); diff --git a/extra/yassl/taocrypt/include/asn.hpp b/extra/yassl/taocrypt/include/asn.hpp index daf1000bde9..c7d01d00323 100644 --- a/extra/yassl/taocrypt/include/asn.hpp +++ b/extra/yassl/taocrypt/include/asn.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 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 @@ -111,7 +111,7 @@ enum Constants MAX_LENGTH_SZ = 5, MAX_SEQ_SZ = 5, // enum(seq|con) + length(4) MAX_ALGO_SIZE = 9, - MAX_DIGEST_SZ = 25, // SHA + enum(Bit or Octet) + length(4) + MAX_DIGEST_SZ = 69, // SHA512 + enum(Bit or Octet) + length(4) DSA_SIG_SZ = 40, ASN_NAME_MAX = 512 // max total of all included names }; @@ -257,8 +257,11 @@ typedef STL::list SignerList; enum ContentType { HUH = 651 }; -enum SigType { SHAwDSA = 517, MD2wRSA = 646, MD5wRSA = 648, SHAwRSA =649}; -enum HashType { MD2h = 646, MD5h = 649, SHAh = 88 }; +enum SigType { SHAwDSA = 517, MD2wRSA = 646, MD5wRSA = 648, SHAwRSA = 649, + SHA256wRSA = 655, SHA384wRSA = 656, SHA512wRSA = 657, + SHA256wDSA = 416 }; +enum HashType { MD2h = 646, MD5h = 649, SHAh = 88, SHA256h = 414, SHA384h = 415, + SHA512h = 416 }; enum KeyType { DSAk = 515, RSAk = 645 }; // sums of algo OID diff --git a/extra/yassl/taocrypt/include/block.hpp b/extra/yassl/taocrypt/include/block.hpp index d7a69211e02..4f58c82ffcc 100644 --- a/extra/yassl/taocrypt/include/block.hpp +++ b/extra/yassl/taocrypt/include/block.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 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 @@ -74,7 +74,7 @@ typename A::pointer StdReallocate(A& a, T* p, typename A::size_type oldSize, if (preserve) { A b = A(); typename A::pointer newPointer = b.allocate(newSize, 0); - memcpy(newPointer, p, sizeof(T) * min((word32) oldSize, (word32) newSize)); + memcpy(newPointer, p, sizeof(T) * min(oldSize, newSize)); a.deallocate(p, oldSize); STL::swap(a, b); return newPointer; @@ -186,9 +186,9 @@ public: ~Block() { allocator_.deallocate(buffer_, sz_); } private: + A allocator_; word32 sz_; // size in Ts T* buffer_; - A allocator_; }; diff --git a/extra/yassl/taocrypt/include/integer.hpp b/extra/yassl/taocrypt/include/integer.hpp index 68f3c4bbf39..75a3ee3d3df 100644 --- a/extra/yassl/taocrypt/include/integer.hpp +++ b/extra/yassl/taocrypt/include/integer.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 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 @@ -47,7 +47,7 @@ #ifdef TAOCRYPT_X86ASM_AVAILABLE #if defined(__GNUC__) && (__GNUC__ >= 4) - // GCC 4 or greater optimizes too much inline on recursive for bigint, + // GCC 4 or greater optimizes too much inline on recursive for bigint, // -O3 just as fast without asm here anyway #undef TAOCRYPT_X86ASM_AVAILABLE #endif diff --git a/extra/yassl/taocrypt/include/pwdbased.hpp b/extra/yassl/taocrypt/include/pwdbased.hpp index 9025cc1a50c..cf4dff5cee6 100644 --- a/extra/yassl/taocrypt/include/pwdbased.hpp +++ b/extra/yassl/taocrypt/include/pwdbased.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 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,6 +16,7 @@ MA 02110-1301 USA. */ + /* pwdbased.hpp defines PBKDF2 from PKCS #5 */ @@ -48,10 +49,7 @@ word32 PBKDF2_HMAC::DeriveKey(byte* derived, word32 dLen, const byte* pwd, word32 pLen, const byte* salt, word32 sLen, word32 iterations) const { - if (dLen > MaxDerivedKeyLength()) - return 0; - - if (iterations < 0) + if (dLen > MaxDerivedKeyLength()) return 0; ByteBlock buffer(T::DIGEST_SIZE); diff --git a/extra/yassl/taocrypt/include/runtime.hpp b/extra/yassl/taocrypt/include/runtime.hpp index ef7ce092cde..4c7436251fd 100644 --- a/extra/yassl/taocrypt/include/runtime.hpp +++ b/extra/yassl/taocrypt/include/runtime.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 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 @@ -34,7 +34,10 @@ // Handler for pure virtual functions namespace __Crun { - void pure_error(void); + static void pure_error(void) + { + // "Pure virtual method called, Aborted", GCC 4.2 str cmp fix + } } // namespace __Crun #endif // __sun @@ -48,7 +51,15 @@ extern "C" { #if defined(DO_TAOCRYPT_KERNEL_MODE) #include "kernelc.hpp" #endif - int __cxa_pure_virtual () __attribute__ ((weak)); + +/* Disallow inline __cxa_pure_virtual() */ +static int __cxa_pure_virtual() __attribute__((noinline, used)); +static int __cxa_pure_virtual() +{ + // oops, pure virtual called! + return 0; +} + } // extern "C" #endif // __GNUC__ > 2 diff --git a/extra/yassl/taocrypt/include/sha.hpp b/extra/yassl/taocrypt/include/sha.hpp index d1f9607f8de..cf6d0d09a1d 100644 --- a/extra/yassl/taocrypt/include/sha.hpp +++ b/extra/yassl/taocrypt/include/sha.hpp @@ -1,6 +1,5 @@ /* - Copyright (C) 2000-2007 MySQL AB - Use is subject to license terms + Copyright (c) 2000, 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 @@ -159,6 +158,12 @@ private: void Transform(); }; +enum { MAX_SHA2_DIGEST_SIZE = 64 }; // SHA512 + +#else + +enum { MAX_SHA2_DIGEST_SIZE = 32 }; // SHA256 + #endif // WORD64_AVAILABLE diff --git a/extra/yassl/taocrypt/src/aes.cpp b/extra/yassl/taocrypt/src/aes.cpp index d04ef69c19f..ee4c7a6e8a1 100644 --- a/extra/yassl/taocrypt/src/aes.cpp +++ b/extra/yassl/taocrypt/src/aes.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 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 @@ -66,7 +66,7 @@ void AES::Process(byte* out, const byte* in, word32 sz) in += BLOCK_SIZE; } } - else { + else { while (blocks--) { AsmDecrypt(in, out, (void*)Td0); @@ -79,8 +79,8 @@ void AES::Process(byte* out, const byte* in, word32 sz) out += BLOCK_SIZE; in += BLOCK_SIZE; } - } - } + } + } } #endif // DO_AES_ASM @@ -466,14 +466,13 @@ void AES::decrypt(const byte* inBlock, const byte* xorBlock, "movd mm7, ebp;" \ "movd mm4, eax;" \ "mov ebp, edx;" \ - "sub esp, 4;" - + "sub esp, 4;" #define EPILOG() \ "add esp, 4;" \ "pop ebp;" \ "pop ebx;" \ - "emms;" \ - ".att_syntax;" \ + "emms;" \ + ".att_syntax;" \ : \ : "c" (this), "S" (inBlock), "d" (boxes), "a" (outBlock) \ : "%edi", "memory", "cc" \ @@ -834,9 +833,9 @@ void AES::AsmEncrypt(const byte* inBlock, byte* outBlock, void* boxes) const #ifdef _MSC_VER - __declspec(naked) + __declspec(naked) #else - __attribute__ ((noinline)) + __attribute__ ((noinline)) #endif void AES::AsmDecrypt(const byte* inBlock, byte* outBlock, void* boxes) const { diff --git a/extra/yassl/taocrypt/src/algebra.cpp b/extra/yassl/taocrypt/src/algebra.cpp index b4086522124..ef59bfbbc56 100644 --- a/extra/yassl/taocrypt/src/algebra.cpp +++ b/extra/yassl/taocrypt/src/algebra.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 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 @@ -186,10 +186,10 @@ Integer AbstractGroup::CascadeScalarMultiply(const Element &x, struct WindowSlider { - WindowSlider(const Integer &expIn, bool fastNegateIn, + WindowSlider(const Integer &exp, bool fastNegate, unsigned int windowSizeIn=0) - : exp(expIn), windowModulus(Integer::One()), windowSize(windowSizeIn), - windowBegin(0), fastNegate(fastNegateIn), firstTime(true), + : exp(exp), windowModulus(Integer::One()), windowSize(windowSizeIn), + windowBegin(0), fastNegate(fastNegate), firstTime(true), finished(false) { if (windowSize == 0) diff --git a/extra/yassl/taocrypt/src/arc4.cpp b/extra/yassl/taocrypt/src/arc4.cpp index f5794ec2566..10a3a7d6ffc 100644 --- a/extra/yassl/taocrypt/src/arc4.cpp +++ b/extra/yassl/taocrypt/src/arc4.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 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 @@ -121,12 +121,11 @@ void ARC4::AsmProcess(byte* out, const byte* in, word32 length) "push ebx;" \ "push ebp;" \ "mov ebp, eax;" - #define EPILOG() \ "pop ebp;" \ "pop ebx;" \ - "emms;" \ - ".att_syntax;" \ + "emms;" \ + ".att_syntax;" \ : \ : "c" (this), "D" (out), "S" (in), "a" (length) \ : "%edx", "memory", "cc" \ @@ -180,7 +179,7 @@ void ARC4::AsmProcess(byte* out, const byte* in, word32 length) #ifdef _MSC_VER AS1( loopStart: ) // loopStart #else - AS1( 0: ) // loopStart for some gas (need numeric for jump back + AS1( 0: ) // loopStart for some gas (need numeric for jump back #endif // y = (y+a) & 0xff; @@ -232,7 +231,7 @@ void ARC4::AsmProcess(byte* out, const byte* in, word32 length) AS1( nothing: ) - // inline adjust + // inline adjust AS2( add esp, 4 ) // fix room on stack EPILOG() diff --git a/extra/yassl/taocrypt/src/asn.cpp b/extra/yassl/taocrypt/src/asn.cpp index ad054809879..544e9518da8 100644 --- a/extra/yassl/taocrypt/src/asn.cpp +++ b/extra/yassl/taocrypt/src/asn.cpp @@ -1,6 +1,5 @@ /* - Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. - Use is subject to license terms. + Copyright (c) 2000, 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 @@ -761,7 +760,7 @@ void CertDecoder::GetName(NameType nt) while (source_.get_index() < length) { GetSet(); if (source_.GetError().What() == SET_E) { - source_.SetError(NO_ERROR_E); // extensions may only have sequence + source_.SetError(NO_ERROR_E); // extensions may only have sequence source_.prev(); } GetSequence(); @@ -832,10 +831,8 @@ void CertDecoder::GetName(NameType nt) if (source_.IsLeft(length) == false) return; if (email) { - if (!(ptr = AddTag(ptr, buf_end, "/emailAddress=", 14, length))) { - source_.SetError(CONTENT_E); - return; - } + if (!(ptr = AddTag(ptr, buf_end, "/emailAddress=", 14, length))) + return; } source_.advance(length); @@ -972,12 +969,26 @@ bool CertDecoder::ConfirmSignature(Source& pub) hasher.reset(NEW_TC SHA); ht = SHAh; } + else if (signatureOID_ == SHA256wRSA || signatureOID_ == SHA256wDSA) { + hasher.reset(NEW_TC SHA256); + ht = SHA256h; + } +#ifdef WORD64_AVAILABLE + else if (signatureOID_ == SHA384wRSA) { + hasher.reset(NEW_TC SHA384); + ht = SHA384h; + } + else if (signatureOID_ == SHA512wRSA) { + hasher.reset(NEW_TC SHA512); + ht = SHA512h; + } +#endif else { source_.SetError(UNKOWN_SIG_E); return false; } - byte digest[SHA::DIGEST_SIZE]; // largest size + byte digest[MAX_SHA2_DIGEST_SIZE]; // largest size hasher->Update(source_.get_buffer() + certBegin_, sigIndex_ - certBegin_); hasher->Final(digest); @@ -1050,6 +1061,12 @@ word32 DER_Encoder::SetAlgoID(HashType aOID, byte* output) 0x02, 0x05, 0x05, 0x00 }; static const byte md2AlgoID[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x02, 0x02, 0x05, 0x00}; + static const byte sha256AlgoID[] = { 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, + 0x04, 0x02, 0x01, 0x05, 0x00 }; + static const byte sha384AlgoID[] = { 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, + 0x04, 0x02, 0x02, 0x05, 0x00 }; + static const byte sha512AlgoID[] = { 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, + 0x04, 0x02, 0x03, 0x05, 0x00 }; int algoSz = 0; const byte* algoName = 0; @@ -1060,6 +1077,21 @@ word32 DER_Encoder::SetAlgoID(HashType aOID, byte* output) algoName = shaAlgoID; break; + case SHA256h: + algoSz = sizeof(sha256AlgoID); + algoName = sha256AlgoID; + break; + + case SHA384h: + algoSz = sizeof(sha384AlgoID); + algoName = sha384AlgoID; + break; + + case SHA512h: + algoSz = sizeof(sha512AlgoID); + algoName = sha512AlgoID; + break; + case MD2h: algoSz = sizeof(md2AlgoID); algoName = md2AlgoID; diff --git a/extra/yassl/taocrypt/src/blowfish.cpp b/extra/yassl/taocrypt/src/blowfish.cpp index 5cfd81e369c..9491c93040e 100644 --- a/extra/yassl/taocrypt/src/blowfish.cpp +++ b/extra/yassl/taocrypt/src/blowfish.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 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 @@ -237,8 +237,8 @@ void Blowfish::ProcessAndXorBlock(const byte* in, const byte* xOr, byte* out) #define EPILOG() \ "pop ebp;" \ "pop ebx;" \ - "emms;" \ - ".att_syntax;" \ + "emms;" \ + ".att_syntax;" \ : \ : "c" (this), "S" (inBlock), "a" (outBlock) \ : "%edi", "%edx", "memory", "cc" \ @@ -291,7 +291,7 @@ void Blowfish::ProcessAndXorBlock(const byte* in, const byte* xOr, byte* out) #ifdef _MSC_VER - __declspec(naked) + __declspec(naked) #else __attribute__ ((noinline)) #endif diff --git a/extra/yassl/taocrypt/src/des.cpp b/extra/yassl/taocrypt/src/des.cpp index b52a83a38c6..673c21ed207 100644 --- a/extra/yassl/taocrypt/src/des.cpp +++ b/extra/yassl/taocrypt/src/des.cpp @@ -1,6 +1,5 @@ /* - Copyright (C) 2000-2007 MySQL AB - Use is subject to license terms + Copyright (c) 2000, 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 @@ -642,9 +641,9 @@ void DES_EDE3::ProcessAndXorBlock(const byte* in, const byte* xOr, #ifdef _MSC_VER - __declspec(naked) + __declspec(naked) #else - __attribute__ ((noinline)) + __attribute__ ((noinline)) #endif void DES_EDE3::AsmProcess(const byte* in, byte* out, void* box) const { @@ -664,8 +663,8 @@ void DES_EDE3::AsmProcess(const byte* in, byte* out, void* box) const #define EPILOG() \ "pop ebp;" \ "pop ebx;" \ - "emms;" \ - ".att_syntax;" \ + "emms;" \ + ".att_syntax;" \ : \ : "d" (this), "S" (in), "a" (box), "c" (out) \ : "%edi", "memory", "cc" \ diff --git a/extra/yassl/taocrypt/src/integer.cpp b/extra/yassl/taocrypt/src/integer.cpp index c981b1bf786..2d85ee01a3f 100644 --- a/extra/yassl/taocrypt/src/integer.cpp +++ b/extra/yassl/taocrypt/src/integer.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 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 @@ -56,9 +56,8 @@ #endif #elif defined(_MSC_VER) && defined(_M_IX86) /* #pragma message("You do not seem to have the Visual C++ Processor Pack ") - #pragma message("installed, so use of SSE2 intrinsics will be disabled.") -*/ #pragma message("installed, so use of SSE2 intrinsics will be disabled.") +*/ #elif defined(__GNUC__) && defined(__i386__) /* #warning You do not have GCC 3.3 or later, or did not specify the -msse2 \ compiler option. Use of SSE2 intrinsics will be disabled. @@ -282,7 +281,12 @@ DWord() {} word GetHighHalfAsBorrow() const {return 0-halfs_.high;} private: - struct dword_struct + union + { + #ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE + dword whole_; + #endif + struct { #ifdef LITTLE_ENDIAN_ORDER word low; @@ -291,14 +295,7 @@ private: word high; word low; #endif - }; - - union - { - #ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE - dword whole_; - #endif - struct dword_struct halfs_; + } halfs_; }; }; @@ -1201,24 +1198,20 @@ public: #define AS1(x) #x ";" #define AS2(x, y) #x ", " #y ";" #define AddPrologue \ - word res; \ __asm__ __volatile__ \ ( \ "push %%ebx;" /* save this manually, in case of -fPIC */ \ - "mov %3, %%ebx;" \ + "mov %2, %%ebx;" \ ".intel_syntax noprefix;" \ "push ebp;" #define AddEpilogue \ "pop ebp;" \ ".att_syntax prefix;" \ "pop %%ebx;" \ - "mov %%eax, %0;" \ - : "=g" (res) \ + : \ : "c" (C), "d" (A), "m" (B), "S" (N) \ : "%edi", "memory", "cc" \ - ); \ - return res; - + ); #define MulPrologue \ __asm__ __volatile__ \ ( \ diff --git a/extra/yassl/taocrypt/src/md5.cpp b/extra/yassl/taocrypt/src/md5.cpp index e9a9e8fe517..45cfa8a3322 100644 --- a/extra/yassl/taocrypt/src/md5.cpp +++ b/extra/yassl/taocrypt/src/md5.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 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 @@ -223,7 +223,7 @@ void MD5::Update(const byte* data, word32 len) #ifdef _MSC_VER - __declspec(naked) + __declspec(naked) #else __attribute__ ((noinline)) #endif @@ -242,8 +242,8 @@ void MD5::AsmTransform(const byte* data, word32 times) #define EPILOG() \ "pop ebp;" \ "pop ebx;" \ - "emms;" \ - ".att_syntax;" \ + "emms;" \ + ".att_syntax;" \ : \ : "c" (this), "D" (data), "a" (times) \ : "%esi", "%edx", "memory", "cc" \ @@ -297,7 +297,7 @@ void MD5::AsmTransform(const byte* data, word32 times) #ifdef _MSC_VER AS1( loopStart: ) // loopStart #else - AS1( 0: ) // loopStart for some gas (need numeric for jump back + AS1( 0: ) // loopStart for some gas (need numeric for jump back #endif // set up diff --git a/extra/yassl/taocrypt/src/misc.cpp b/extra/yassl/taocrypt/src/misc.cpp index b576d3d59d2..fd9e8b92c1d 100644 --- a/extra/yassl/taocrypt/src/misc.cpp +++ b/extra/yassl/taocrypt/src/misc.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 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 @@ -84,17 +84,7 @@ namespace STL = STL_NAMESPACE; } -#ifdef __sun - -// Handler for pure virtual functions -namespace __Crun { - void pure_error() { - } -} - -#endif - -#if defined(__ICC) || defined(__INTEL_COMPILER) || (__GNUC__ > 2) +#if defined(__ICC) || defined(__INTEL_COMPILER) extern "C" { @@ -175,6 +165,14 @@ word Crop(word value, unsigned int size) #ifdef TAOCRYPT_X86ASM_AVAILABLE +#ifndef _MSC_VER + static jmp_buf s_env; + static void SigIllHandler(int) + { + longjmp(s_env, 1); + } +#endif + bool HaveCpuId() { diff --git a/extra/yassl/taocrypt/src/rabbit.cpp b/extra/yassl/taocrypt/src/rabbit.cpp index 89e6a207a1b..5e32f383493 100644 --- a/extra/yassl/taocrypt/src/rabbit.cpp +++ b/extra/yassl/taocrypt/src/rabbit.cpp @@ -1,15 +1,15 @@ /* - Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. - + Copyright (c) 2000, 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 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; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, @@ -236,7 +236,7 @@ void Rabbit::Process(byte* output, const byte* input, word32 msglen) NextState(Work); /* Generate 16 bytes of pseudo-random data */ - tmp[0] = LITTLE32(workCtx_.x[0] ^ + tmp[0] = LITTLE32(workCtx_.x[0] ^ (workCtx_.x[5]>>16) ^ U32V(workCtx_.x[3]<<16)); tmp[1] = LITTLE32(workCtx_.x[2] ^ (workCtx_.x[7]>>16) ^ U32V(workCtx_.x[5]<<16)); diff --git a/extra/yassl/taocrypt/src/random.cpp b/extra/yassl/taocrypt/src/random.cpp index 084871c5447..4b89b5b32c5 100644 --- a/extra/yassl/taocrypt/src/random.cpp +++ b/extra/yassl/taocrypt/src/random.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 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 @@ -27,6 +27,7 @@ #include #if defined(_WIN32) + #define _WIN32_WINNT 0x0400 #include #include #else diff --git a/extra/yassl/taocrypt/src/ripemd.cpp b/extra/yassl/taocrypt/src/ripemd.cpp index b670a9eca86..5d03dc61cd6 100644 --- a/extra/yassl/taocrypt/src/ripemd.cpp +++ b/extra/yassl/taocrypt/src/ripemd.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 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 @@ -507,6 +507,8 @@ void RIPEMD160::Transform() #ifdef _MSC_VER __declspec(naked) +#else + __attribute__ ((noinline)) #endif void RIPEMD160::AsmTransform(const byte* data, word32 times) { @@ -520,12 +522,11 @@ void RIPEMD160::AsmTransform(const byte* data, word32 times) ".intel_syntax noprefix;" \ "push ebx;" \ "push ebp;" - #define EPILOG() \ "pop ebp;" \ "pop ebx;" \ - "emms;" \ - ".att_syntax;" \ + "emms;" \ + ".att_syntax;" \ : \ : "c" (this), "D" (data), "d" (times) \ : "%esi", "%eax", "memory", "cc" \ @@ -571,7 +572,7 @@ void RIPEMD160::AsmTransform(const byte* data, word32 times) #ifdef _MSC_VER AS1( loopStart: ) // loopStart #else - AS1( 0: ) // loopStart for some gas (need numeric for jump back + AS1( 0: ) // loopStart for some gas (need numeric for jump back #endif AS2( movd mm2, edx ) // store times_ @@ -830,7 +831,7 @@ void RIPEMD160::AsmTransform(const byte* data, word32 times) AS1( jnz 0b ) // loopStart #endif - // inline adjust + // inline adjust AS2( add esp, 24 ) // fix room on stack EPILOG() diff --git a/extra/yassl/taocrypt/src/sha.cpp b/extra/yassl/taocrypt/src/sha.cpp index 0d3491eb83d..4206f7f64ea 100644 --- a/extra/yassl/taocrypt/src/sha.cpp +++ b/extra/yassl/taocrypt/src/sha.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 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 @@ -776,12 +776,11 @@ void SHA::AsmTransform(const byte* data, word32 times) ".intel_syntax noprefix;" \ "push ebx;" \ "push ebp;" - #define EPILOG() \ "pop ebp;" \ "pop ebx;" \ - "emms;" \ - ".att_syntax;" \ + "emms;" \ + ".att_syntax;" \ : \ : "c" (this), "D" (data), "a" (times) \ : "%esi", "%edx", "memory", "cc" \ @@ -830,7 +829,7 @@ void SHA::AsmTransform(const byte* data, word32 times) #ifdef _MSC_VER AS1( loopStart: ) // loopStart #else - AS1( 0: ) // loopStart for some gas (need numeric for jump back + AS1( 0: ) // loopStart for some gas (need numeric for jump back #endif // byte reverse 16 words of input, 4 at a time, put on stack for W[] @@ -1022,7 +1021,7 @@ void SHA::AsmTransform(const byte* data, word32 times) AS1( jnz 0b ) // loopStart #endif - // inline adjust + // inline adjust AS2( add esp, 68 ) // fix room on stack EPILOG() diff --git a/extra/yassl/taocrypt/src/twofish.cpp b/extra/yassl/taocrypt/src/twofish.cpp index 3a93ac11476..3051af21513 100644 --- a/extra/yassl/taocrypt/src/twofish.cpp +++ b/extra/yassl/taocrypt/src/twofish.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 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 @@ -285,12 +285,11 @@ void Twofish::decrypt(const byte* inBlock, const byte* xorBlock, "push ebp;" \ "movd mm3, eax;" \ "movd mm6, ebp;" - #define EPILOG() \ "pop ebp;" \ "pop ebx;" \ - "emms;" \ - ".att_syntax;" \ + "emms;" \ + ".att_syntax;" \ : \ : "D" (this), "S" (inBlock), "a" (outBlock) \ : "%ecx", "%edx", "memory", "cc" \ @@ -479,7 +478,7 @@ void Twofish::AsmEncrypt(const byte* inBlock, byte* outBlock) const AS2( movd ebp, mm6 ) AS2( movd esi, mm0 ) // k_ #ifdef __GNUC__ - AS2( movd edi, mm3 ) // outBlock + AS2( movd edi, mm3 ) // outBlock #else AS2( mov edi, [ebp + 12] ) // outBlock #endif @@ -500,7 +499,7 @@ void Twofish::AsmEncrypt(const byte* inBlock, byte* outBlock) const #ifdef _MSC_VER - __declspec(naked) + __declspec(naked) #else __attribute__ ((noinline)) #endif @@ -551,7 +550,7 @@ void Twofish::AsmDecrypt(const byte* inBlock, byte* outBlock) const AS2( movd ebp, mm6 ) AS2( movd esi, mm0 ) // k_ #ifdef __GNUC__ - AS2( movd edi, mm3 ) // outBlock + AS2( movd edi, mm3 ) // outBlock #else AS2( mov edi, [ebp + 12] ) // outBlock #endif -- cgit v1.2.1 From b142bfd0874a214507d37099cedee1c9dbc76538 Mon Sep 17 00:00:00 2001 From: Murthy Narkedimilli Date: Tue, 26 Aug 2014 14:01:38 +0200 Subject: Renaming the enterprise packages to commercial --- packaging/rpm-oel/mysql.spec.in | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/packaging/rpm-oel/mysql.spec.in b/packaging/rpm-oel/mysql.spec.in index e6fc6cd634d..d8cf49fe993 100644 --- a/packaging/rpm-oel/mysql.spec.in +++ b/packaging/rpm-oel/mysql.spec.in @@ -156,8 +156,8 @@ Requires: net-tools Provides: MySQL-server-advanced%{?_isa} = %{version}-%{release} Obsoletes: MySQL-server-advanced < %{version}-%{release} Obsoletes: mysql-community-server < %{version}-%{release} -Requires: mysql-enterprise-client%{?_isa} = %{version}-%{release} -Requires: mysql-enterprise-common%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-client%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-common%{?_isa} = %{version}-%{release} %else Provides: MySQL-server%{?_isa} = %{version}-%{release} Requires: mysql-community-client%{?_isa} = %{version}-%{release} @@ -209,7 +209,7 @@ Group: Applications/Databases Provides: MySQL-client-advanced%{?_isa} = %{version}-%{release} Obsoletes: MySQL-client-advanced < %{version}-%{release} Obsoletes: mysql-community-client < %{version}-%{release} -Requires: mysql-enterprise-libs%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-libs%{?_isa} = %{version}-%{release} %else Provides: MySQL-client%{?_isa} = %{version}-%{release} Requires: mysql-community-libs%{?_isa} = %{version}-%{release} @@ -248,7 +248,7 @@ Group: Applications/Databases Provides: MySQL-test-advanced%{?_isa} = %{version}-%{release} Obsoletes: MySQL-test-advanced < %{version}-%{release} Obsoletes: mysql-community-test < %{version}-%{release} -Requires: mysql-enterprise-server%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-server%{?_isa} = %{version}-%{release} %else Provides: MySQL-test%{?_isa} = %{version}-%{release} Requires: mysql-community-server%{?_isa} = %{version}-%{release} @@ -270,7 +270,7 @@ Summary: MySQL benchmark suite Group: Applications/Databases %if 0%{?commercial} Obsoletes: mysql-community-bench < %{version}-%{release} -Requires: mysql-enterprise-server%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-server%{?_isa} = %{version}-%{release} %else Requires: mysql-community-server%{?_isa} = %{version}-%{release} %endif @@ -291,7 +291,7 @@ Group: Applications/Databases Provides: MySQL-devel-advanced%{?_isa} = %{version}-%{release} Obsoletes: MySQL-devel-advanced < %{version}-%{release} Obsoletes: mysql-community-devel < %{version}-%{release} -Requires: mysql-enterprise-libs%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-libs%{?_isa} = %{version}-%{release} %else Provides: MySQL-devel%{?_isa} = %{version}-%{release} Requires: mysql-community-libs%{?_isa} = %{version}-%{release} @@ -313,7 +313,7 @@ Group: Applications/Databases Provides: MySQL-shared-advanced%{?_isa} = %{version}-%{release} Obsoletes: MySQL-shared-advanced < %{version}-%{release} Obsoletes: mysql-community-libs < %{version}-%{release} -Requires: mysql-enterprise-common%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-common%{?_isa} = %{version}-%{release} %else Provides: MySQL-shared%{?_isa} = %{version}-%{release} Requires: mysql-community-common%{?_isa} = %{version}-%{release} @@ -339,7 +339,7 @@ Provides: mysql-libs-compat%{?_isa} = %{version}-%{release} Provides: MySQL-shared-compat-advanced%{?_isa} = %{version}-%{release} Obsoletes: MySQL-shared-compat-advanced < %{version}-%{release} Obsoletes: mysql-community-libs-compat < %{version}-%{release} -Requires: mysql-enterprise-libs%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-libs%{?_isa} = %{version}-%{release} %else Provides: MySQL-shared-compat%{?_isa} = %{version}-%{release} Requires: mysql-community-libs%{?_isa} = %{version}-%{release} @@ -361,7 +361,7 @@ Group: Applications/Databases Provides: MySQL-embedded-advanced%{?_isa} = %{version}-%{release} Obsoletes: MySQL-embedded-advanced < %{version}-%{release} Obsoletes: mysql-community-embedded < %{version}-%{release} -Requires: mysql-enterprise-common%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-common%{?_isa} = %{version}-%{release} %else Provides: MySQL-embedded%{?_isa} = %{version}-%{release} Requires: mysql-community-common%{?_isa} = %{version}-%{release} @@ -389,8 +389,8 @@ Summary: Development header files and libraries for MySQL as an embeddabl Group: Applications/Databases %if 0%{?commercial} Obsoletes: mysql-community-embedded-devel < %{version}-%{release} -Requires: mysql-enterprise-devel%{?_isa} = %{version}-%{release} -Requires: mysql-enterprise-embedded%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-devel%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-embedded%{?_isa} = %{version}-%{release} %else Requires: mysql-community-devel%{?_isa} = %{version}-%{release} Requires: mysql-community-embedded%{?_isa} = %{version}-%{release} @@ -409,9 +409,9 @@ the embedded version of the MySQL server. Summary: Convenience package for easy upgrades of MySQL package set Group: Applications/Databases %if 0%{?commercial} -Requires: mysql-enterprise-client%{?_isa} = %{version}-%{release} -Requires: mysql-enterprise-libs%{?_isa} = %{version}-%{release} -Requires: mysql-enterprise-libs-compat%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-client%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-libs%{?_isa} = %{version}-%{release} +Requires: mysql-commercial-libs-compat%{?_isa} = %{version}-%{release} %else Requires: mysql-community-client%{?_isa} = %{version}-%{release} Requires: mysql-community-libs%{?_isa} = %{version}-%{release} -- cgit v1.2.1 From 7a4a0bf1c9e21a8add3c591fe428e870bd94222b Mon Sep 17 00:00:00 2001 From: Murthy Narkedimilli Date: Fri, 5 Sep 2014 08:37:21 +0200 Subject: Applying the patch to remove WL#7219 which was by mistake included by the dev team. --- sql/sql_audit.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_audit.cc b/sql/sql_audit.cc index 6ccdcefe8eb..bf672b6ea48 100644 --- a/sql/sql_audit.cc +++ b/sql/sql_audit.cc @@ -353,7 +353,7 @@ int initialize_audit_plugin(st_plugin_int *plugin) return 1; } - if (plugin->plugin->init && plugin->plugin->init(plugin)) + if (plugin->plugin->init && plugin->plugin->init(NULL)) { sql_print_error("Plugin '%s' init function returned error.", plugin->name.str); -- cgit v1.2.1 From 3139aa87b4f215418740939cc8d156150c355823 Mon Sep 17 00:00:00 2001 From: Murthy Narkedimilli Date: Mon, 8 Sep 2014 11:33:55 +0200 Subject: Adding patch for security bug 19471516 --- mysql-test/suite/innodb/r/foreign-keys.result | 16 ++++++++++++++++ mysql-test/suite/innodb/t/foreign-keys.test | 26 ++++++++++++++++++++++++++ storage/innobase/dict/dict0dict.c | 10 ++++++++++ 3 files changed, 52 insertions(+) create mode 100644 mysql-test/suite/innodb/r/foreign-keys.result create mode 100644 mysql-test/suite/innodb/t/foreign-keys.test diff --git a/mysql-test/suite/innodb/r/foreign-keys.result b/mysql-test/suite/innodb/r/foreign-keys.result new file mode 100644 index 00000000000..be8d27b152c --- /dev/null +++ b/mysql-test/suite/innodb/r/foreign-keys.result @@ -0,0 +1,16 @@ +# +# Bug #19471516 SERVER CRASHES WHEN EXECUTING ALTER TABLE +# ADD FOREIGN KEY +# +CREATE TABLE `department` (`department_id` INT, `department_people_fk` INT, +PRIMARY KEY (`department_id`)) engine=innodb; +CREATE TABLE `title` (`title_id` INT, `title_manager_fk` INT, +`title_reporter_fk` INT, PRIMARY KEY (`title_id`)); +CREATE TABLE `people` (`people_id` INT, PRIMARY KEY (`people_id`)); +ALTER TABLE `department` ADD FOREIGN KEY (`department_people_fk`) REFERENCES +`people` (`people_id`); +ALTER TABLE `title` ADD FOREIGN KEY (`title_manager_fk`) REFERENCES `people` +(`people_id`); +ALTER TABLE `title` ADD FOREIGN KEY (`title_reporter_fk`) REFERENCES `people` +(`people_id`); +drop table title, department, people; diff --git a/mysql-test/suite/innodb/t/foreign-keys.test b/mysql-test/suite/innodb/t/foreign-keys.test new file mode 100644 index 00000000000..45642cf28a7 --- /dev/null +++ b/mysql-test/suite/innodb/t/foreign-keys.test @@ -0,0 +1,26 @@ +--source include/have_innodb.inc +--source include/have_debug.inc + +--echo # +--echo # Bug #19471516 SERVER CRASHES WHEN EXECUTING ALTER TABLE +--echo # ADD FOREIGN KEY +--echo # + +CREATE TABLE `department` (`department_id` INT, `department_people_fk` INT, +PRIMARY KEY (`department_id`)) engine=innodb; + +CREATE TABLE `title` (`title_id` INT, `title_manager_fk` INT, +`title_reporter_fk` INT, PRIMARY KEY (`title_id`)); + +CREATE TABLE `people` (`people_id` INT, PRIMARY KEY (`people_id`)); + +ALTER TABLE `department` ADD FOREIGN KEY (`department_people_fk`) REFERENCES +`people` (`people_id`); + +ALTER TABLE `title` ADD FOREIGN KEY (`title_manager_fk`) REFERENCES `people` +(`people_id`); + +ALTER TABLE `title` ADD FOREIGN KEY (`title_reporter_fk`) REFERENCES `people` +(`people_id`); + +drop table title, department, people; diff --git a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c index e225966afe6..0e4691658d5 100644 --- a/storage/innobase/dict/dict0dict.c +++ b/storage/innobase/dict/dict0dict.c @@ -1123,6 +1123,11 @@ dict_table_rename_in_cache( /* The id will be changed. So remove old one */ rbt_delete(foreign->foreign_table->foreign_rbt, foreign->id); + if (foreign->referenced_table) { + rbt_delete(foreign->referenced_table->referenced_rbt, + foreign->id); + } + if (ut_strlen(foreign->foreign_table_name) < ut_strlen(table->name)) { /* Allocate a longer name buffer; @@ -1273,6 +1278,11 @@ dict_table_rename_in_cache( rbt_insert(foreign->foreign_table->foreign_rbt, foreign->id, &foreign); + if (foreign->referenced_table) { + rbt_insert(foreign->referenced_table->referenced_rbt, + foreign->id, &foreign); + } + foreign = UT_LIST_GET_NEXT(foreign_list, foreign); } -- cgit v1.2.1 From d1e46a50bc59dd42e5aae55e4e20f2548c5cf3ba Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Thu, 18 Sep 2014 19:45:06 +0400 Subject: MDEV-6749 - Deadlock between GRANT/REVOKE, SELECT FROM I_S.COLUMNS, SET slow_query_log and failed connection attempt A very subtle though valid deadlock. Deadlock chain: wrlock(LOCK_grant) -> lock(acl_cache->lock) GRANT/REVOKE CREATE/DROP USER lock(LOCK_open) -> rdlock(LOCK_grant) SELECT * FROM I_S.COLUMNS wrlock(LOCK_logger) -> lock(LOCK_open) SET @@global.slow_query_log='ON' lock(acl_cache->lock) -> rdlock(LOCK_logger) Failed connection Fixed by removing relationship between acl_cache->lock and LOCK_logger during failed connection attempt. --- sql/sql_acl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 083f23d0820..c4ef699c049 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -9224,9 +9224,9 @@ bool acl_authenticate(THD *thd, uint connect_errors, mpvio.auth_info.authenticated_as, TRUE); if (!acl_proxy_user) { + mysql_mutex_unlock(&acl_cache->lock); if (!thd->is_error()) login_failed_error(thd); - mysql_mutex_unlock(&acl_cache->lock); DBUG_RETURN(1); } acl_user= acl_proxy_user->copy(thd->mem_root); -- cgit v1.2.1 From b737d902a8f4b42e8e515d112aeeb6ebe5ffa91a Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Thu, 25 Sep 2014 10:43:11 +0400 Subject: MDEV-6774 - Deadlock between SELECT, DROP TABLE, SHOW STATUS and SET @@global.log_output Deadlock chain: rdlock(LOCK_logger) -> lock(LOCK_open) SELECT 1 lock(LOCK_open) -> lock(LOCK_status) DROP TABLE t1 lock(LOCK_status) -> lock(LOCK_g_s_v) SHOW STATUS lock(LOCK_g_s_) -> wrlock(LOCK_logger) SET @@global.log_output=DEFAULT Fixed by removing relationship between LOCK_status and LOCK_global_system_variables during SHOW STATUS: we don't really need LOCK_global_system_variables when accessing status vars. --- sql/event_scheduler.cc | 9 +-------- sql/sql_show.cc | 6 +++--- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/sql/event_scheduler.cc b/sql/event_scheduler.cc index f8d177ac0c1..beb3c864662 100644 --- a/sql/event_scheduler.cc +++ b/sql/event_scheduler.cc @@ -355,14 +355,7 @@ Event_scheduler::Event_scheduler(Event_queue *queue_arg) mysql_mutex_init(key_event_scheduler_LOCK_scheduler_state, &LOCK_scheduler_state, MY_MUTEX_INIT_FAST); mysql_cond_init(key_event_scheduler_COND_state, &COND_state, NULL); - -#ifdef SAFE_MUTEX - /* Ensure right mutex order */ - mysql_mutex_lock(&LOCK_scheduler_state); - mysql_mutex_lock(&LOCK_global_system_variables); - mysql_mutex_unlock(&LOCK_global_system_variables); - mysql_mutex_unlock(&LOCK_scheduler_state); -#endif + mysql_mutex_record_order(&LOCK_scheduler_state, &LOCK_global_system_variables); } diff --git a/sql/sql_show.cc b/sql/sql_show.cc index fe1d1f38888..f6ed5702ce5 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -2648,12 +2648,11 @@ static bool show_status_array(THD *thd, const char *wild, char *value=var->value; const char *pos, *end; // We assign a lot of const's - mysql_mutex_lock(&LOCK_global_system_variables); - if (show_type == SHOW_SYS) { sys_var *var= ((sys_var *) value); show_type= var->show_type(); + mysql_mutex_lock(&LOCK_global_system_variables); value= (char*) var->value_ptr(thd, value_type, &null_lex_str); charset= var->charset(thd); } @@ -2754,7 +2753,8 @@ static bool show_status_array(THD *thd, const char *wild, thd->count_cuted_fields= CHECK_FIELD_IGNORE; table->field[1]->set_notnull(); - mysql_mutex_unlock(&LOCK_global_system_variables); + if (var->type == SHOW_SYS) + mysql_mutex_unlock(&LOCK_global_system_variables); if (schema_table_store_record(thd, table)) { -- cgit v1.2.1 From 68354ef272087d589f07ee8892301cd8b9ff6eba Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Fri, 3 Oct 2014 15:07:53 +0400 Subject: MDEV-6592 Assertion `ltime->day == 0' failed with TIMESTAMP, MAKETIME --- mysql-test/r/type_time.result | 11 +++++++++++ mysql-test/t/type_time.test | 11 +++++++++++ sql/item.cc | 12 +++--------- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/mysql-test/r/type_time.result b/mysql-test/r/type_time.result index ad2e857a8d3..07e59099e4b 100644 --- a/mysql-test/r/type_time.result +++ b/mysql-test/r/type_time.result @@ -352,3 +352,14 @@ SELECT '-24:00:00' = (SELECT f1 FROM t1); '-24:00:00' = (SELECT f1 FROM t1) 1 DROP TABLE t1; +# +# MDEV-6592 Assertion `ltime->day == 0' failed with TIMESTAMP, MAKETIME +# +CREATE TABLE t1 (d DATE, c VARCHAR(10), KEY(d)) engine=myisam; +INSERT INTO t1 VALUES ('2008-10-02','2008-10-02'), ('2008-10-02','2008-10-02'); +SELECT * FROM t1 WHERE TIMESTAMP(c,'02:04:42') AND d <=> MAKETIME(97,0,7); +d c +DROP TABLE t1; +# +# End of 5.5 tests +# diff --git a/mysql-test/t/type_time.test b/mysql-test/t/type_time.test index 88840e9b679..259b1819d21 100644 --- a/mysql-test/t/type_time.test +++ b/mysql-test/t/type_time.test @@ -239,3 +239,14 @@ SELECT CAST('-24:00:00' AS TIME) = (SELECT f1 FROM t1); SELECT '-24:00:00' = (SELECT f1 FROM t1); DROP TABLE t1; +--echo # +--echo # MDEV-6592 Assertion `ltime->day == 0' failed with TIMESTAMP, MAKETIME +--echo # +CREATE TABLE t1 (d DATE, c VARCHAR(10), KEY(d)) engine=myisam; +INSERT INTO t1 VALUES ('2008-10-02','2008-10-02'), ('2008-10-02','2008-10-02'); +SELECT * FROM t1 WHERE TIMESTAMP(c,'02:04:42') AND d <=> MAKETIME(97,0,7); +DROP TABLE t1; + +--echo # +--echo # End of 5.5 tests +--echo # diff --git a/sql/item.cc b/sql/item.cc index d58e4d285c5..b191e93808f 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -9015,17 +9015,11 @@ bool Item_cache_temporal::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate) int Item_cache_temporal::save_in_field(Field *field, bool no_conversions) { - int error; - if (!has_value()) + MYSQL_TIME ltime; + if (get_date(<ime, 0)) return set_field_to_null_with_conversions(field, no_conversions); - field->set_notnull(); - - MYSQL_TIME ltime; - unpack_time(value, <ime); - ltime.time_type= mysql_type_to_time_type(field_type()); - error= field->store_time_dec(<ime, decimals); - + int error= field->store_time_dec(<ime, decimals); return error ? error : field->table->in_use->is_error() ? 1 : 0; } -- cgit v1.2.1 From 02125587e12b761a6049c6cc5fc6a6c4b6ea7a10 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 25 Sep 2014 19:00:41 +0200 Subject: update tokudb version in CMakeLists.txt, disable unstable tokudb tests --- storage/tokudb/CMakeLists.txt | 2 +- storage/tokudb/mysql-test/rpl/disabled.def | 12 ++++++++++++ storage/tokudb/mysql-test/tokudb/disabled.def | 2 ++ .../mysql-test/tokudb/t/i_s_tokudb_lock_waits_released.test | 4 ---- .../mysql-test/tokudb/t/i_s_tokudb_locks_released.test | 4 ---- 5 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 storage/tokudb/mysql-test/rpl/disabled.def diff --git a/storage/tokudb/CMakeLists.txt b/storage/tokudb/CMakeLists.txt index 71530d883c2..fa9178a65a5 100644 --- a/storage/tokudb/CMakeLists.txt +++ b/storage/tokudb/CMakeLists.txt @@ -18,7 +18,7 @@ IF(NOT LIBJEMALLOC) ENDIF() ############################################ -SET(TOKUDB_VERSION "7.1.8") +SET(TOKUDB_VERSION "7.5.0") SET(TOKUDB_DEB_FILES "usr/lib/mysql/plugin/ha_tokudb.so\netc/mysql/conf.d/tokudb.cnf\nusr/bin/tokuftdump\nusr/share/doc/mariadb-server-5.5/README-TOKUDB\nusr/share/doc/mariadb-server-5.5/README.md" PARENT_SCOPE) SET(USE_BDB OFF CACHE BOOL "") MARK_AS_ADVANCED(BUILDNAME) diff --git a/storage/tokudb/mysql-test/rpl/disabled.def b/storage/tokudb/mysql-test/rpl/disabled.def new file mode 100644 index 00000000000..efa4be9e16c --- /dev/null +++ b/storage/tokudb/mysql-test/rpl/disabled.def @@ -0,0 +1,12 @@ +rpl_tokudb_delete_pk: unreliable, uses timestamp differences +rpl_tokudb_delete_pk_lookup1: unreliable, uses timestamp differences +rpl_tokudb_update_pk_uc0_lookup0: unreliable, uses timestamp differences +rpl_tokudb_update_pk_uc0_lookup1: unreliable, uses timestamp differences +rpl_tokudb_update_pk_uc1_lookup0: unreliable, uses timestamp differences +rpl_tokudb_update_pk_uc1_lookup1: unreliable, uses timestamp differences +rpl_tokudb_update_unique_uc0_lookup0: unreliable, uses timestamp differences +rpl_tokudb_update_unique_uc0_lookup1: unreliable, uses timestamp differences +rpl_tokudb_write_pk: unreliable, uses timestamp differences +rpl_tokudb_write_pk_uc1: unreliable, uses timestamp differences +rpl_tokudb_write_unique: unreliable, uses timestamp differences +rpl_tokudb_write_unique_uc1: unreliable, uses timestamp differences diff --git a/storage/tokudb/mysql-test/tokudb/disabled.def b/storage/tokudb/mysql-test/tokudb/disabled.def index 21506067895..05f8c05c6c7 100644 --- a/storage/tokudb/mysql-test/tokudb/disabled.def +++ b/storage/tokudb/mysql-test/tokudb/disabled.def @@ -59,3 +59,5 @@ mvcc-19: No online ALTER in MariaDB 5.5 mvcc-20: No online ALTER in MariaDB 5.5 mvcc-27: No online OPTIMIZE in MariaDB 5.5 cluster_key_part: engine options on partitioned tables +i_s_tokudb_lock_waits_released: unstable, race conditions +i_s_tokudb_locks_released: unstable, race conditions diff --git a/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_lock_waits_released.test b/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_lock_waits_released.test index 584a657f01e..c4f9ccefe5c 100644 --- a/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_lock_waits_released.test +++ b/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_lock_waits_released.test @@ -1,8 +1,4 @@ # verify that information_schema.tokudb_locks gets populated with locks, information_schema.tokudb_lock_waits gets -if (`select @@tokudb_version <= "7.1.7"`) -{ - --skip Race condition in the test in TokuDB 7.1.7 or earlier -} # populated with 1 lock_wait and all transactions are present in information_schema.tokudb_trx for 2 clients source include/have_tokudb.inc; diff --git a/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_locks_released.test b/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_locks_released.test index eac0f6da418..56d5f4a3a6c 100644 --- a/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_locks_released.test +++ b/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_locks_released.test @@ -1,7 +1,3 @@ -if (`select @@tokudb_version <= "7.1.7"`) -{ - --skip Race condition in the test in TokuDB 7.1.7 or earlier -} # verify that information_schema.tokudb_locks gets populated with locks for 2 clients source include/have_tokudb.inc; -- cgit v1.2.1 From aa36d9e74225f6db32fa01a8e1a2a3a6e6a5b77f Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 2 Oct 2014 11:57:40 +0200 Subject: MDEV-5120 Test suite test maria-no-logging fails stat structure (from ) is conditionally defined to have different layout and size depending on the defined macros. The correct macro is defined in my_config.h, which means it MUST be included first (or, at least before - so, practically, before including any system headers). --- config.h.cmake | 13 +++++++++++++ plugin/handler_socket/handlersocket/database.cpp | 2 ++ plugin/handler_socket/handlersocket/handlersocket.cpp | 2 ++ plugin/handler_socket/handlersocket/hstcpsvr.cpp | 2 ++ plugin/handler_socket/libhsclient/hstcpcli.cpp | 2 ++ plugin/handler_socket/libhsclient/socket.cpp | 2 ++ plugin/server_audit/server_audit.c | 2 ++ storage/example/ha_example.cc | 1 + storage/federatedx/federatedx_io.cc | 1 + storage/federatedx/federatedx_io_mysql.cc | 1 + storage/federatedx/federatedx_io_null.cc | 1 + storage/federatedx/federatedx_txn.cc | 1 + storage/federatedx/ha_federatedx.cc | 1 + storage/maria/ha_maria.cc | 1 + storage/sphinx/snippets_udf.cc | 1 + storage/tokudb/ft-index/ft/bndata.cc | 2 ++ storage/tokudb/ft-index/ft/cachetable/cachetable.cc | 2 ++ storage/tokudb/ft-index/ft/cachetable/checkpoint.cc | 2 ++ storage/tokudb/ft-index/ft/cursor.cc | 2 ++ storage/tokudb/ft-index/ft/ft-cachetable-wrappers.cc | 2 ++ storage/tokudb/ft-index/ft/ft-flusher.cc | 2 ++ storage/tokudb/ft-index/ft/ft-hot-flusher.cc | 2 ++ storage/tokudb/ft-index/ft/ft-ops.cc | 2 ++ storage/tokudb/ft-index/ft/ft-test-helpers.cc | 2 ++ storage/tokudb/ft-index/ft/ft-verify.cc | 2 ++ storage/tokudb/ft-index/ft/ft.cc | 2 ++ storage/tokudb/ft-index/ft/le-cursor.cc | 2 ++ storage/tokudb/ft-index/ft/loader/dbufio.cc | 2 ++ storage/tokudb/ft-index/ft/loader/loader.cc | 2 ++ storage/tokudb/ft-index/ft/loader/pqueue.cc | 2 ++ storage/tokudb/ft-index/ft/logger/log_upgrade.cc | 2 ++ storage/tokudb/ft-index/ft/logger/logcursor.cc | 2 ++ storage/tokudb/ft-index/ft/logger/logfilemgr.cc | 2 ++ storage/tokudb/ft-index/ft/logger/logformat.cc | 1 + storage/tokudb/ft-index/ft/logger/logger.cc | 2 ++ storage/tokudb/ft-index/ft/logger/recover.cc | 2 ++ storage/tokudb/ft-index/ft/node.cc | 2 ++ storage/tokudb/ft-index/ft/pivotkeys.cc | 2 ++ storage/tokudb/ft-index/ft/serialize/block_table.cc | 2 ++ storage/tokudb/ft-index/ft/serialize/compress.cc | 2 ++ storage/tokudb/ft-index/ft/serialize/ft-node-deserialize.cc | 2 ++ storage/tokudb/ft-index/ft/serialize/ft-serialize.cc | 2 ++ storage/tokudb/ft-index/ft/serialize/ft_node-serialize.cc | 2 ++ storage/tokudb/ft-index/ft/serialize/sub_block.cc | 2 ++ storage/tokudb/ft-index/ft/txn/roll.cc | 2 ++ storage/tokudb/ft-index/ft/txn/rollback-apply.cc | 2 ++ storage/tokudb/ft-index/ft/txn/rollback-ct-callbacks.cc | 2 ++ storage/tokudb/ft-index/ft/txn/rollback.cc | 2 ++ storage/tokudb/ft-index/ft/txn/rollback_log_node_cache.cc | 2 ++ storage/tokudb/ft-index/ft/txn/txn.cc | 2 ++ storage/tokudb/ft-index/ft/txn/txn_child_manager.cc | 2 ++ storage/tokudb/ft-index/ft/txn/txn_manager.cc | 2 ++ storage/tokudb/ft-index/ft/ule.cc | 2 ++ storage/tokudb/ft-index/src/errors.cc | 2 ++ storage/tokudb/ft-index/src/indexer-undo-do.cc | 2 ++ storage/tokudb/ft-index/src/indexer.cc | 2 ++ storage/tokudb/ft-index/src/loader.cc | 2 ++ storage/tokudb/ft-index/src/ydb.cc | 2 ++ storage/tokudb/ft-index/src/ydb_cursor.cc | 2 ++ storage/tokudb/ft-index/src/ydb_db.cc | 2 ++ storage/tokudb/ft-index/src/ydb_env_func.cc | 2 ++ storage/tokudb/ft-index/src/ydb_row_lock.cc | 2 ++ storage/tokudb/ft-index/src/ydb_txn.cc | 1 + storage/tokudb/ft-index/src/ydb_write.cc | 2 ++ storage/tokudb/ft-index/tools/ftverify.cc | 2 ++ storage/tokudb/ft-index/tools/tdb_logprint.cc | 2 ++ storage/tokudb/ft-index/tools/tokuftdump.cc | 2 ++ storage/tokudb/ha_tokudb.cc | 2 ++ tests/async_queries.c | 10 +++++----- 69 files changed, 142 insertions(+), 5 deletions(-) diff --git a/config.h.cmake b/config.h.cmake index 3b5501ffd32..4b0769d5cfa 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -641,4 +641,17 @@ #cmakedefine SIZEOF_TIME_T @SIZEOF_TIME_T@ #cmakedefine TIME_T_UNSIGNED @TIME_T_UNSIGNED@ +/* + stat structure (from ) is conditionally defined + to have different layout and size depending on the defined macros. + The correct macro is defined in my_config.h, which means it MUST be + included first (or at least before - so, practically, + before including any system headers). + + __GLIBC__ is defined in +*/ +#ifdef __GLIBC__ +#error MUST be included first! +#endif + #endif diff --git a/plugin/handler_socket/handlersocket/database.cpp b/plugin/handler_socket/handlersocket/database.cpp index 311eec55fa8..da55113a179 100644 --- a/plugin/handler_socket/handlersocket/database.cpp +++ b/plugin/handler_socket/handlersocket/database.cpp @@ -6,6 +6,8 @@ * See COPYRIGHT.txt for details. */ +#include + #include #include #include diff --git a/plugin/handler_socket/handlersocket/handlersocket.cpp b/plugin/handler_socket/handlersocket/handlersocket.cpp index 2595d24a85c..6e4c03fcc24 100644 --- a/plugin/handler_socket/handlersocket/handlersocket.cpp +++ b/plugin/handler_socket/handlersocket/handlersocket.cpp @@ -6,6 +6,8 @@ * See COPYRIGHT.txt for details. */ +#include + #include #include #include diff --git a/plugin/handler_socket/handlersocket/hstcpsvr.cpp b/plugin/handler_socket/handlersocket/hstcpsvr.cpp index 13df7ba0838..925020023bc 100644 --- a/plugin/handler_socket/handlersocket/hstcpsvr.cpp +++ b/plugin/handler_socket/handlersocket/hstcpsvr.cpp @@ -6,6 +6,8 @@ * See COPYRIGHT.txt for details. */ +#include + #include #include #include diff --git a/plugin/handler_socket/libhsclient/hstcpcli.cpp b/plugin/handler_socket/libhsclient/hstcpcli.cpp index c0cb5fb1e97..21c964cb046 100644 --- a/plugin/handler_socket/libhsclient/hstcpcli.cpp +++ b/plugin/handler_socket/libhsclient/hstcpcli.cpp @@ -6,6 +6,8 @@ * See COPYRIGHT.txt for details. */ +#include + #include #include "hstcpcli.hpp" diff --git a/plugin/handler_socket/libhsclient/socket.cpp b/plugin/handler_socket/libhsclient/socket.cpp index 0c4816589fa..cf19d4bbe14 100644 --- a/plugin/handler_socket/libhsclient/socket.cpp +++ b/plugin/handler_socket/libhsclient/socket.cpp @@ -6,6 +6,8 @@ * See COPYRIGHT.txt for details. */ +#include + #include #include #include diff --git a/plugin/server_audit/server_audit.c b/plugin/server_audit/server_audit.c index 84472c2e7df..5c19b366347 100644 --- a/plugin/server_audit/server_audit.c +++ b/plugin/server_audit/server_audit.c @@ -17,6 +17,8 @@ #define PLUGIN_VERSION 0x101 #define PLUGIN_STR_VERSION "1.1.7" +#include + #include #include #include diff --git a/storage/example/ha_example.cc b/storage/example/ha_example.cc index 83c923dc69f..e865eaae017 100644 --- a/storage/example/ha_example.cc +++ b/storage/example/ha_example.cc @@ -98,6 +98,7 @@ #pragma implementation // gcc: Class implementation #endif +#include #include #include "ha_example.h" #include "sql_class.h" diff --git a/storage/federatedx/federatedx_io.cc b/storage/federatedx/federatedx_io.cc index 34d3dde3ebb..6c968cd7907 100644 --- a/storage/federatedx/federatedx_io.cc +++ b/storage/federatedx/federatedx_io.cc @@ -28,6 +28,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /*#define MYSQL_SERVER 1*/ +#include #include "sql_priv.h" #include diff --git a/storage/federatedx/federatedx_io_mysql.cc b/storage/federatedx/federatedx_io_mysql.cc index c6a5732c564..a2eaa345a18 100644 --- a/storage/federatedx/federatedx_io_mysql.cc +++ b/storage/federatedx/federatedx_io_mysql.cc @@ -28,6 +28,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define MYSQL_SERVER 1 +#include #include "sql_priv.h" #include diff --git a/storage/federatedx/federatedx_io_null.cc b/storage/federatedx/federatedx_io_null.cc index 4322422ef37..2b84d03808e 100644 --- a/storage/federatedx/federatedx_io_null.cc +++ b/storage/federatedx/federatedx_io_null.cc @@ -28,6 +28,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /*#define MYSQL_SERVER 1*/ +#include #include "sql_priv.h" #include diff --git a/storage/federatedx/federatedx_txn.cc b/storage/federatedx/federatedx_txn.cc index 5049b1ff79f..d74ece32c61 100644 --- a/storage/federatedx/federatedx_txn.cc +++ b/storage/federatedx/federatedx_txn.cc @@ -31,6 +31,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #endif #define MYSQL_SERVER 1 +#include #include "sql_priv.h" #include diff --git a/storage/federatedx/ha_federatedx.cc b/storage/federatedx/ha_federatedx.cc index 2231cd82a06..62199515ca9 100644 --- a/storage/federatedx/ha_federatedx.cc +++ b/storage/federatedx/ha_federatedx.cc @@ -312,6 +312,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #endif #define MYSQL_SERVER 1 +#include #include #include "ha_federatedx.h" #include "sql_servers.h" diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index 4f784457740..2cafdecc4b1 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -21,6 +21,7 @@ #endif #define MYSQL_SERVER 1 +#include #include #include #include diff --git a/storage/sphinx/snippets_udf.cc b/storage/sphinx/snippets_udf.cc index 785b0ea6d97..9cd8de05be3 100644 --- a/storage/sphinx/snippets_udf.cc +++ b/storage/sphinx/snippets_udf.cc @@ -13,6 +13,7 @@ // did not, you can find it at http://www.gnu.org/ // +#include #include #include #include diff --git a/storage/tokudb/ft-index/ft/bndata.cc b/storage/tokudb/ft-index/ft/bndata.cc index a277e52aa0b..c4d522849a1 100644 --- a/storage/tokudb/ft-index/ft/bndata.cc +++ b/storage/tokudb/ft-index/ft/bndata.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include #include diff --git a/storage/tokudb/ft-index/ft/cachetable/cachetable.cc b/storage/tokudb/ft-index/ft/cachetable/cachetable.cc index feda4abc76a..95b3f14e1e5 100644 --- a/storage/tokudb/ft-index/ft/cachetable/cachetable.cc +++ b/storage/tokudb/ft-index/ft/cachetable/cachetable.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include #include #include diff --git a/storage/tokudb/ft-index/ft/cachetable/checkpoint.cc b/storage/tokudb/ft-index/ft/cachetable/checkpoint.cc index 492893ddc7b..8a0ba32240e 100644 --- a/storage/tokudb/ft-index/ft/cachetable/checkpoint.cc +++ b/storage/tokudb/ft-index/ft/cachetable/checkpoint.cc @@ -126,6 +126,8 @@ PATENT RIGHTS GRANT: * *****/ +#include + #include #include "portability/toku_portability.h" diff --git a/storage/tokudb/ft-index/ft/cursor.cc b/storage/tokudb/ft-index/ft/cursor.cc index 9814a49416b..b7000869336 100644 --- a/storage/tokudb/ft-index/ft/cursor.cc +++ b/storage/tokudb/ft-index/ft/cursor.cc @@ -86,6 +86,8 @@ PATENT RIGHTS GRANT: under this License. */ +#include + #include "ft/ft-internal.h" #include "ft/cursor.h" diff --git a/storage/tokudb/ft-index/ft/ft-cachetable-wrappers.cc b/storage/tokudb/ft-index/ft/ft-cachetable-wrappers.cc index b8bee800f36..5c6331855a4 100644 --- a/storage/tokudb/ft-index/ft/ft-cachetable-wrappers.cc +++ b/storage/tokudb/ft-index/ft/ft-cachetable-wrappers.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include "ft/serialize/block_table.h" #include "ft/ft-cachetable-wrappers.h" #include "ft/ft-flusher.h" diff --git a/storage/tokudb/ft-index/ft/ft-flusher.cc b/storage/tokudb/ft-index/ft/ft-flusher.cc index 4db92fa9d2b..1b593746d5e 100644 --- a/storage/tokudb/ft-index/ft/ft-flusher.cc +++ b/storage/tokudb/ft-index/ft/ft-flusher.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include "ft/ft.h" #include "ft/ft-cachetable-wrappers.h" #include "ft/ft-internal.h" diff --git a/storage/tokudb/ft-index/ft/ft-hot-flusher.cc b/storage/tokudb/ft-index/ft/ft-hot-flusher.cc index 55230e75da0..74d6109f52e 100644 --- a/storage/tokudb/ft-index/ft/ft-hot-flusher.cc +++ b/storage/tokudb/ft-index/ft/ft-hot-flusher.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include "ft/ft.h" #include "ft/ft-cachetable-wrappers.h" #include "ft/ft-flusher.h" diff --git a/storage/tokudb/ft-index/ft/ft-ops.cc b/storage/tokudb/ft-index/ft/ft-ops.cc index bf845d2c38d..0868276ec2b 100644 --- a/storage/tokudb/ft-index/ft/ft-ops.cc +++ b/storage/tokudb/ft-index/ft/ft-ops.cc @@ -200,6 +200,8 @@ basement nodes, bulk fetch, and partial fetch: */ +#include + #include "ft/cachetable/checkpoint.h" #include "ft/cursor.h" #include "ft/ft.h" diff --git a/storage/tokudb/ft-index/ft/ft-test-helpers.cc b/storage/tokudb/ft-index/ft/ft-test-helpers.cc index dc0b77099fa..38be041a16d 100644 --- a/storage/tokudb/ft-index/ft/ft-test-helpers.cc +++ b/storage/tokudb/ft-index/ft/ft-test-helpers.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include "ft/ft.h" #include "ft/ft-cachetable-wrappers.h" #include "ft/ft-internal.h" diff --git a/storage/tokudb/ft-index/ft/ft-verify.cc b/storage/tokudb/ft-index/ft/ft-verify.cc index cbb5159e276..d9606f37604 100644 --- a/storage/tokudb/ft-index/ft/ft-verify.cc +++ b/storage/tokudb/ft-index/ft/ft-verify.cc @@ -97,6 +97,8 @@ PATENT RIGHTS GRANT: * For each nonleaf node: All the messages have keys that are between the associated pivot keys ( left_pivot_key < message <= right_pivot_key) */ +#include + #include "ft/serialize/block_table.h" #include "ft/ft.h" #include "ft/ft-cachetable-wrappers.h" diff --git a/storage/tokudb/ft-index/ft/ft.cc b/storage/tokudb/ft-index/ft/ft.cc index fd3960b64f6..bf99646351a 100644 --- a/storage/tokudb/ft-index/ft/ft.cc +++ b/storage/tokudb/ft-index/ft/ft.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include "ft/serialize/block_table.h" #include "ft/ft.h" #include "ft/ft-cachetable-wrappers.h" diff --git a/storage/tokudb/ft-index/ft/le-cursor.cc b/storage/tokudb/ft-index/ft/le-cursor.cc index f840c021fd2..ac34b119245 100644 --- a/storage/tokudb/ft-index/ft/le-cursor.cc +++ b/storage/tokudb/ft-index/ft/le-cursor.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2010-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include "ft/ft.h" #include "ft/ft-internal.h" #include "ft/le-cursor.h" diff --git a/storage/tokudb/ft-index/ft/loader/dbufio.cc b/storage/tokudb/ft-index/ft/loader/dbufio.cc index c3f72e14ab1..3cf7d2412cd 100644 --- a/storage/tokudb/ft-index/ft/loader/dbufio.cc +++ b/storage/tokudb/ft-index/ft/loader/dbufio.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2010-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include #include #include diff --git a/storage/tokudb/ft-index/ft/loader/loader.cc b/storage/tokudb/ft-index/ft/loader/loader.cc index a6f41cd6b54..d83340f2e49 100644 --- a/storage/tokudb/ft-index/ft/loader/loader.cc +++ b/storage/tokudb/ft-index/ft/loader/loader.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include #include diff --git a/storage/tokudb/ft-index/ft/loader/pqueue.cc b/storage/tokudb/ft-index/ft/loader/pqueue.cc index c50664f5e45..6c28b048543 100644 --- a/storage/tokudb/ft-index/ft/loader/pqueue.cc +++ b/storage/tokudb/ft-index/ft/loader/pqueue.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2010-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include #include "toku_os.h" #include "ft-internal.h" diff --git a/storage/tokudb/ft-index/ft/logger/log_upgrade.cc b/storage/tokudb/ft-index/ft/logger/log_upgrade.cc index 6631759fae0..0f2b3848e6e 100644 --- a/storage/tokudb/ft-index/ft/logger/log_upgrade.cc +++ b/storage/tokudb/ft-index/ft/logger/log_upgrade.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include #include "log-internal.h" diff --git a/storage/tokudb/ft-index/ft/logger/logcursor.cc b/storage/tokudb/ft-index/ft/logger/logcursor.cc index dec3c923bc3..3402cd28122 100644 --- a/storage/tokudb/ft-index/ft/logger/logcursor.cc +++ b/storage/tokudb/ft-index/ft/logger/logcursor.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include "log-internal.h" #include "logger/logcursor.h" #include diff --git a/storage/tokudb/ft-index/ft/logger/logfilemgr.cc b/storage/tokudb/ft-index/ft/logger/logfilemgr.cc index 04d091ae1bc..86bec09db3a 100644 --- a/storage/tokudb/ft-index/ft/logger/logfilemgr.cc +++ b/storage/tokudb/ft-index/ft/logger/logfilemgr.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include "logger/log-internal.h" #include "logger/logcursor.h" #include "logger/logfilemgr.h" diff --git a/storage/tokudb/ft-index/ft/logger/logformat.cc b/storage/tokudb/ft-index/ft/logger/logformat.cc index 698b612c078..dbae9b09806 100644 --- a/storage/tokudb/ft-index/ft/logger/logformat.cc +++ b/storage/tokudb/ft-index/ft/logger/logformat.cc @@ -852,6 +852,7 @@ int main (int argc, const char *const argv[]) { fprintf(hf, "#pragma once\n"); fprintf2(cf, hf, "/* Do not edit this file. This code generated by logformat.c. Copyright (c) 2007-2013 Tokutek Inc. */\n"); fprintf2(cf, hf, "#ident \"Copyright (c) 2007-2013 Tokutek Inc. All rights reserved.\"\n"); + fprintf2(cf, pf, "#include \n"); fprintf2(cf, pf, "#include \n"); fprintf2(cf, pf, "#include \n"); fprintf2(cf, pf, "#include \n"); diff --git a/storage/tokudb/ft-index/ft/logger/logger.cc b/storage/tokudb/ft-index/ft/logger/logger.cc index 2296a2b43f8..c30c211bbc6 100644 --- a/storage/tokudb/ft-index/ft/logger/logger.cc +++ b/storage/tokudb/ft-index/ft/logger/logger.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include #include #include diff --git a/storage/tokudb/ft-index/ft/logger/recover.cc b/storage/tokudb/ft-index/ft/logger/recover.cc index ca284568f07..8dd7bf87624 100644 --- a/storage/tokudb/ft-index/ft/logger/recover.cc +++ b/storage/tokudb/ft-index/ft/logger/recover.cc @@ -90,6 +90,8 @@ PATENT RIGHTS GRANT: #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include "ft/cachetable/cachetable.h" #include "ft/cachetable/checkpoint.h" #include "ft/ft.h" diff --git a/storage/tokudb/ft-index/ft/node.cc b/storage/tokudb/ft-index/ft/node.cc index f6a8c0bb2b3..fcb4533bb80 100644 --- a/storage/tokudb/ft-index/ft/node.cc +++ b/storage/tokudb/ft-index/ft/node.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include "ft/ft.h" #include "ft/ft-internal.h" #include "ft/serialize/ft_node-serialize.h" diff --git a/storage/tokudb/ft-index/ft/pivotkeys.cc b/storage/tokudb/ft-index/ft/pivotkeys.cc index cf37777d892..93d1abb2049 100644 --- a/storage/tokudb/ft-index/ft/pivotkeys.cc +++ b/storage/tokudb/ft-index/ft/pivotkeys.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include #include "portability/memory.h" diff --git a/storage/tokudb/ft-index/ft/serialize/block_table.cc b/storage/tokudb/ft-index/ft/serialize/block_table.cc index 561f03a8871..60c48251fd3 100644 --- a/storage/tokudb/ft-index/ft/serialize/block_table.cc +++ b/storage/tokudb/ft-index/ft/serialize/block_table.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include "portability/memory.h" #include "portability/toku_assert.h" #include "portability/toku_portability.h" diff --git a/storage/tokudb/ft-index/ft/serialize/compress.cc b/storage/tokudb/ft-index/ft/serialize/compress.cc index e905220026b..6cd168cff23 100644 --- a/storage/tokudb/ft-index/ft/serialize/compress.cc +++ b/storage/tokudb/ft-index/ft/serialize/compress.cc @@ -88,6 +88,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2011-2013 Tokutek Inc. All rights reserved." #ident "$Id$" +#include + #include #include diff --git a/storage/tokudb/ft-index/ft/serialize/ft-node-deserialize.cc b/storage/tokudb/ft-index/ft/serialize/ft-node-deserialize.cc index 4e55c222eb7..211259ae50b 100644 --- a/storage/tokudb/ft-index/ft/serialize/ft-node-deserialize.cc +++ b/storage/tokudb/ft-index/ft/serialize/ft-node-deserialize.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include "ft/node.h" #include "ft/ft-internal.h" #include "ft/serialize/ft_node-serialize.h" diff --git a/storage/tokudb/ft-index/ft/serialize/ft-serialize.cc b/storage/tokudb/ft-index/ft/serialize/ft-serialize.cc index 4e447592255..a31ea4f59a2 100644 --- a/storage/tokudb/ft-index/ft/serialize/ft-serialize.cc +++ b/storage/tokudb/ft-index/ft/serialize/ft-serialize.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include "ft/ft.h" #include "ft/ft-internal.h" #include "ft/msg.h" diff --git a/storage/tokudb/ft-index/ft/serialize/ft_node-serialize.cc b/storage/tokudb/ft-index/ft/serialize/ft_node-serialize.cc index 8e6e27b34b3..44f480bd718 100644 --- a/storage/tokudb/ft-index/ft/serialize/ft_node-serialize.cc +++ b/storage/tokudb/ft-index/ft/serialize/ft_node-serialize.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include "portability/toku_atomic.h" #include "ft/cachetable/cachetable.h" diff --git a/storage/tokudb/ft-index/ft/serialize/sub_block.cc b/storage/tokudb/ft-index/ft/serialize/sub_block.cc index 1346c76b103..0172d58a4ca 100644 --- a/storage/tokudb/ft-index/ft/serialize/sub_block.cc +++ b/storage/tokudb/ft-index/ft/serialize/sub_block.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include #include #include diff --git a/storage/tokudb/ft-index/ft/txn/roll.cc b/storage/tokudb/ft-index/ft/txn/roll.cc index affa9fa802c..69a75112576 100644 --- a/storage/tokudb/ft-index/ft/txn/roll.cc +++ b/storage/tokudb/ft-index/ft/txn/roll.cc @@ -92,6 +92,8 @@ PATENT RIGHTS GRANT: /* rollback and rollforward routines. */ +#include + #include "ft/ft.h" #include "ft/ft-ops.h" #include "ft/log_header.h" diff --git a/storage/tokudb/ft-index/ft/txn/rollback-apply.cc b/storage/tokudb/ft-index/ft/txn/rollback-apply.cc index 258994223cc..e65e5fc0fbf 100644 --- a/storage/tokudb/ft-index/ft/txn/rollback-apply.cc +++ b/storage/tokudb/ft-index/ft/txn/rollback-apply.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include "ft/logger/log-internal.h" #include "ft/txn/rollback-apply.h" diff --git a/storage/tokudb/ft-index/ft/txn/rollback-ct-callbacks.cc b/storage/tokudb/ft-index/ft/txn/rollback-ct-callbacks.cc index bb60e787735..9897b46e7c1 100644 --- a/storage/tokudb/ft-index/ft/txn/rollback-ct-callbacks.cc +++ b/storage/tokudb/ft-index/ft/txn/rollback-ct-callbacks.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include "portability/memory.h" #include "portability/toku_portability.h" diff --git a/storage/tokudb/ft-index/ft/txn/rollback.cc b/storage/tokudb/ft-index/ft/txn/rollback.cc index 54a7d9b58ae..62048039c26 100644 --- a/storage/tokudb/ft-index/ft/txn/rollback.cc +++ b/storage/tokudb/ft-index/ft/txn/rollback.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include #include "ft/serialize/block_table.h" diff --git a/storage/tokudb/ft-index/ft/txn/rollback_log_node_cache.cc b/storage/tokudb/ft-index/ft/txn/rollback_log_node_cache.cc index 95a54d6fd76..b542c00ce4e 100644 --- a/storage/tokudb/ft-index/ft/txn/rollback_log_node_cache.cc +++ b/storage/tokudb/ft-index/ft/txn/rollback_log_node_cache.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include #include diff --git a/storage/tokudb/ft-index/ft/txn/txn.cc b/storage/tokudb/ft-index/ft/txn/txn.cc index 7b475c2c975..216cb0d8dfd 100644 --- a/storage/tokudb/ft-index/ft/txn/txn.cc +++ b/storage/tokudb/ft-index/ft/txn/txn.cc @@ -90,6 +90,8 @@ PATENT RIGHTS GRANT: #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include "ft/cachetable/checkpoint.h" #include "ft/ft.h" #include "ft/logger/log-internal.h" diff --git a/storage/tokudb/ft-index/ft/txn/txn_child_manager.cc b/storage/tokudb/ft-index/ft/txn/txn_child_manager.cc index 3a006285e20..747220b2849 100644 --- a/storage/tokudb/ft-index/ft/txn/txn_child_manager.cc +++ b/storage/tokudb/ft-index/ft/txn/txn_child_manager.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include "ft/logger/log-internal.h" #include "ft/txn/txn_child_manager.h" diff --git a/storage/tokudb/ft-index/ft/txn/txn_manager.cc b/storage/tokudb/ft-index/ft/txn/txn_manager.cc index 570174f9b9f..ba3a5c89e1c 100644 --- a/storage/tokudb/ft-index/ft/txn/txn_manager.cc +++ b/storage/tokudb/ft-index/ft/txn/txn_manager.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." +#include + #include "portability/toku_race_tools.h" #include "ft/cachetable/checkpoint.h" diff --git a/storage/tokudb/ft-index/ft/ule.cc b/storage/tokudb/ft-index/ft/ule.cc index 03ec452cbd2..0f31f4337cf 100644 --- a/storage/tokudb/ft-index/ft/ule.cc +++ b/storage/tokudb/ft-index/ft/ule.cc @@ -102,6 +102,8 @@ PATENT RIGHTS GRANT: // See design documentation for nested transactions at // TokuWiki/Imp/TransactionsOverview. +#include + #include "portability/toku_portability.h" #include "ft/ft-internal.h" diff --git a/storage/tokudb/ft-index/src/errors.cc b/storage/tokudb/ft-index/src/errors.cc index fa1227b25cc..6c330f040dd 100644 --- a/storage/tokudb/ft-index/src/errors.cc +++ b/storage/tokudb/ft-index/src/errors.cc @@ -96,6 +96,8 @@ PATENT RIGHTS GRANT: The error handling routines for ydb */ +#include + #include #include #include diff --git a/storage/tokudb/ft-index/src/indexer-undo-do.cc b/storage/tokudb/ft-index/src/indexer-undo-do.cc index 52489fb7825..03e05751358 100644 --- a/storage/tokudb/ft-index/src/indexer-undo-do.cc +++ b/storage/tokudb/ft-index/src/indexer-undo-do.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." #ident "$Id$" +#include + #include #include diff --git a/storage/tokudb/ft-index/src/indexer.cc b/storage/tokudb/ft-index/src/indexer.cc index aa821f67fba..ebb2607483a 100644 --- a/storage/tokudb/ft-index/src/indexer.cc +++ b/storage/tokudb/ft-index/src/indexer.cc @@ -92,6 +92,8 @@ PATENT RIGHTS GRANT: /* * The indexer */ +#include + #include #include #include diff --git a/storage/tokudb/ft-index/src/loader.cc b/storage/tokudb/ft-index/src/loader.cc index 1a6bf718443..0a742dff6d1 100644 --- a/storage/tokudb/ft-index/src/loader.cc +++ b/storage/tokudb/ft-index/src/loader.cc @@ -93,6 +93,8 @@ PATENT RIGHTS GRANT: * The loader */ +#include + #include #include #include diff --git a/storage/tokudb/ft-index/src/ydb.cc b/storage/tokudb/ft-index/src/ydb.cc index e61bf940175..85445a67eef 100644 --- a/storage/tokudb/ft-index/src/ydb.cc +++ b/storage/tokudb/ft-index/src/ydb.cc @@ -92,6 +92,8 @@ PATENT RIGHTS GRANT: extern const char *toku_patent_string; const char *toku_copyright_string = "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."; +#include + #include #include #include diff --git a/storage/tokudb/ft-index/src/ydb_cursor.cc b/storage/tokudb/ft-index/src/ydb_cursor.cc index c42e2fb673e..57f3b5808b6 100644 --- a/storage/tokudb/ft-index/src/ydb_cursor.cc +++ b/storage/tokudb/ft-index/src/ydb_cursor.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." #ident "$Id$" +#include + #include #include #include diff --git a/storage/tokudb/ft-index/src/ydb_db.cc b/storage/tokudb/ft-index/src/ydb_db.cc index 2c54a3bd4dc..57f28b33d69 100644 --- a/storage/tokudb/ft-index/src/ydb_db.cc +++ b/storage/tokudb/ft-index/src/ydb_db.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." #ident "$Id$" +#include + #include #include diff --git a/storage/tokudb/ft-index/src/ydb_env_func.cc b/storage/tokudb/ft-index/src/ydb_env_func.cc index 714fad74ec5..e7a1a31fcce 100644 --- a/storage/tokudb/ft-index/src/ydb_env_func.cc +++ b/storage/tokudb/ft-index/src/ydb_env_func.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." #ident "$Id$" +#include + #include #include diff --git a/storage/tokudb/ft-index/src/ydb_row_lock.cc b/storage/tokudb/ft-index/src/ydb_row_lock.cc index 40cafd0e331..5ca853d92d9 100644 --- a/storage/tokudb/ft-index/src/ydb_row_lock.cc +++ b/storage/tokudb/ft-index/src/ydb_row_lock.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." #ident "$Id$" +#include + #include #include diff --git a/storage/tokudb/ft-index/src/ydb_txn.cc b/storage/tokudb/ft-index/src/ydb_txn.cc index b6b8e154c6f..dd428c4d502 100644 --- a/storage/tokudb/ft-index/src/ydb_txn.cc +++ b/storage/tokudb/ft-index/src/ydb_txn.cc @@ -89,6 +89,7 @@ PATENT RIGHTS GRANT: #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." #ident "$Id$" +#include #include diff --git a/storage/tokudb/ft-index/src/ydb_write.cc b/storage/tokudb/ft-index/src/ydb_write.cc index 77daf4e6793..b6d9ac6b338 100644 --- a/storage/tokudb/ft-index/src/ydb_write.cc +++ b/storage/tokudb/ft-index/src/ydb_write.cc @@ -89,6 +89,8 @@ PATENT RIGHTS GRANT: #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." #ident "$Id$" +#include + #include #include "ydb-internal.h" #include "indexer.h" diff --git a/storage/tokudb/ft-index/tools/ftverify.cc b/storage/tokudb/ft-index/tools/ftverify.cc index 120658b2cb1..13e171f9f92 100644 --- a/storage/tokudb/ft-index/tools/ftverify.cc +++ b/storage/tokudb/ft-index/tools/ftverify.cc @@ -94,6 +94,8 @@ PATENT RIGHTS GRANT: // fractal tree file, one block at a time. //////////////////////////////////////////////////////////////////// +#include + #include "portability/toku_assert.h" #include "portability/toku_list.h" #include "portability/toku_portability.h" diff --git a/storage/tokudb/ft-index/tools/tdb_logprint.cc b/storage/tokudb/ft-index/tools/tdb_logprint.cc index 1dd7581b9f5..15a28632cfb 100644 --- a/storage/tokudb/ft-index/tools/tdb_logprint.cc +++ b/storage/tokudb/ft-index/tools/tdb_logprint.cc @@ -91,6 +91,8 @@ PATENT RIGHTS GRANT: /* Dump the log from stdin to stdout. */ +#include + #include "ft/log_header.h" #include "ft/logger/logger.h" diff --git a/storage/tokudb/ft-index/tools/tokuftdump.cc b/storage/tokudb/ft-index/tools/tokuftdump.cc index 3aab5401cd3..3f73136fb5c 100644 --- a/storage/tokudb/ft-index/tools/tokuftdump.cc +++ b/storage/tokudb/ft-index/tools/tokuftdump.cc @@ -91,6 +91,8 @@ PATENT RIGHTS GRANT: // Dump a fractal tree file +#include + #include #include #include diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc index d2194a50c5b..95f19117c24 100644 --- a/storage/tokudb/ha_tokudb.cc +++ b/storage/tokudb/ha_tokudb.cc @@ -92,6 +92,8 @@ PATENT RIGHTS GRANT: #pragma implementation // gcc: Class implementation #endif +#include // must be first! + extern "C" { #include "stdint.h" #define __STDC_FORMAT_MACROS diff --git a/tests/async_queries.c b/tests/async_queries.c index b9393ca76ab..75229eec4b4 100644 --- a/tests/async_queries.c +++ b/tests/async_queries.c @@ -21,16 +21,16 @@ API, and compare to running same queries with the normal blocking API. */ -#include -#include -#include -#include - #include #include #include #include +#include +#include +#include +#include + #include -- cgit v1.2.1 From e90851008b9c8a84b642fc487eea09eecfbcec2c Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 2 Oct 2014 11:58:13 +0200 Subject: MDEV-6800 auth_socket plugin fails to build on OpenBSD with MariaDB 10.0.14 typo (thanks, Brad Smith!) --- plugin/auth_socket/auth_socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/auth_socket/auth_socket.c b/plugin/auth_socket/auth_socket.c index 5943ab13596..508cd1ecf5e 100644 --- a/plugin/auth_socket/auth_socket.c +++ b/plugin/auth_socket/auth_socket.c @@ -37,7 +37,7 @@ #elif defined HAVE_SOCKPEERCRED #define level SOL_SOCKET -#define ucred socketpeercred +#define ucred sockpeercred #elif defined HAVE_XUCRED #include -- cgit v1.2.1 From 384999f3e8707bcc249bf9fd56828b8ec3e839bf Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 2 Oct 2014 11:58:24 +0200 Subject: MDEV-6528 review debian patches for mysql and apply whatever was reasonable --- extra/yassl/taocrypt/src/integer.cpp | 2 +- libmysql/errmsg.c | 2 +- mysql-test/extra/rpl_tests/rpl_ddl.test | 4 ++-- mysql-test/extra/rpl_tests/rpl_row_basic.test | 4 ++-- mysql-test/include/wait_until_count_sessions.inc | 2 +- mysql-test/suite/funcs_1/views/func_view.inc | 2 +- mysql-test/suite/funcs_1/views/views_master.inc | 2 +- mysql-test/suite/rpl/t/rpl_ddl.test | 4 ++-- mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test | 2 +- sql/log_event.cc | 2 +- storage/myisam/mi_rnext.c | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/extra/yassl/taocrypt/src/integer.cpp b/extra/yassl/taocrypt/src/integer.cpp index 4e61c19e648..f268c8e4d51 100644 --- a/extra/yassl/taocrypt/src/integer.cpp +++ b/extra/yassl/taocrypt/src/integer.cpp @@ -194,7 +194,7 @@ DWord() {} "a" (a), "rm" (b) : "cc"); #elif defined(__mips64) - __asm__("dmultu %2,%3" : "=h" (r.halfs_.high), "=l" (r.halfs_.low) + __asm__("dmultu %2,%3" : "=d" (r.halfs_.high), "=l" (r.halfs_.low) : "r" (a), "r" (b)); #elif defined(_M_IX86) diff --git a/libmysql/errmsg.c b/libmysql/errmsg.c index 81d2728534a..23c8e99cebc 100644 --- a/libmysql/errmsg.c +++ b/libmysql/errmsg.c @@ -81,7 +81,7 @@ const char *client_errors[]= "Attempt to read a row while there is no result set associated with the statement", "This feature is not implemented yet", "Lost connection to MySQL server at '%s', system error: %d", - "Statement closed indirectly because of a preceeding %s() call", + "Statement closed indirectly because of a preceding %s() call", "The number of columns in the result set differs from the number of bound buffers. You must reset the statement, rebind the result set columns, and execute the statement again", "This handle is already connected. Use a separate handle for each connection.", "Authentication plugin '%s' cannot be loaded: %s", diff --git a/mysql-test/extra/rpl_tests/rpl_ddl.test b/mysql-test/extra/rpl_tests/rpl_ddl.test index 32fc10479b8..8c35ff974d8 100644 --- a/mysql-test/extra/rpl_tests/rpl_ddl.test +++ b/mysql-test/extra/rpl_tests/rpl_ddl.test @@ -98,8 +98,8 @@ # --> less switching of AUTOCOMMIT mode on master side. # # 4. Never use a test object, which was direct or indirect affected by a -# preceeding test sequence again. -# If one preceeding test sequence hits a (sometimes not visible, +# preceding test sequence again. +# If one preceding test sequence hits a (sometimes not visible, # because the sql error code of the statement might be 0) bug # and these rules are ignored, a following test sequence might earn ugly # effects like failing 'sync_slave_with_master', crashes of the slave or diff --git a/mysql-test/extra/rpl_tests/rpl_row_basic.test b/mysql-test/extra/rpl_tests/rpl_row_basic.test index c7570de3aba..9b53349c0d7 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_basic.test +++ b/mysql-test/extra/rpl_tests/rpl_row_basic.test @@ -221,7 +221,7 @@ INSERT INTO t7 VALUES (1,3), (2,6), (3,9); SELECT * FROM t7 ORDER BY C1; # since bug#31552/31609 idempotency is not default any longer. In order -# the preceeding test INSERT INTO t7 to pass the mode is switched +# the preceding test INSERT INTO t7 to pass the mode is switched # temprorarily set @@global.slave_exec_mode= 'IDEMPOTENT'; @@ -260,7 +260,7 @@ INSERT INTO t8 VALUES (1,2,3), (2,4,6), (3,6,9); SELECT * FROM t8 ORDER BY a; # since bug#31552/31609 idempotency is not default any longer. In order -# the preceeding test INSERT INTO t8 to pass the mode is switched +# the preceding test INSERT INTO t8 to pass the mode is switched # temprorarily set @@global.slave_exec_mode= 'IDEMPOTENT'; diff --git a/mysql-test/include/wait_until_count_sessions.inc b/mysql-test/include/wait_until_count_sessions.inc index 26b0d8f2633..245fb68b5c3 100644 --- a/mysql-test/include/wait_until_count_sessions.inc +++ b/mysql-test/include/wait_until_count_sessions.inc @@ -10,7 +10,7 @@ # 1. We wait for $current_sessions <= $count_sessions because in the use case # with count_sessions.inc before and wait_until_count_sessions.inc after # the core of the test it could happen that the disconnects of sessions -# belonging to the preceeding test are not finished. +# belonging to the preceding test are not finished. # sessions at test begin($count_sessions) = m + n # sessions of the previous test which will be soon disconnected = n (n >= 0) # sessions at test end ($current sessions, assuming the test disconnects diff --git a/mysql-test/suite/funcs_1/views/func_view.inc b/mysql-test/suite/funcs_1/views/func_view.inc index 1dba96f6901..67608a435dc 100644 --- a/mysql-test/suite/funcs_1/views/func_view.inc +++ b/mysql-test/suite/funcs_1/views/func_view.inc @@ -282,7 +282,7 @@ INSERT INTO t1_values SET # other interesting value # numbers -> 0 # strings, blobs, binaries -> not full length of used data type, "exotic" -# characters and preceeding and trailing spaces +# characters and preceding and trailing spaces # FIXME enum, set ?? INSERT INTO t1_values SET my_char_30 = ' ---äÖüß@µ*$-- ', diff --git a/mysql-test/suite/funcs_1/views/views_master.inc b/mysql-test/suite/funcs_1/views/views_master.inc index bcb0662e9a4..39c8a8c65f1 100644 --- a/mysql-test/suite/funcs_1/views/views_master.inc +++ b/mysql-test/suite/funcs_1/views/views_master.inc @@ -545,7 +545,7 @@ let $message= Testcase 3.3.1.7 ; # view names are accepted, at creation time, alteration time, # and drop time. ############################################################################### -# Note(mleich): non-qualified view name means a view name without preceeding +# Note(mleich): non-qualified view name means a view name without preceding # database name --disable_warnings DROP VIEW IF EXISTS v1 ; diff --git a/mysql-test/suite/rpl/t/rpl_ddl.test b/mysql-test/suite/rpl/t/rpl_ddl.test index f9a353f87ac..89ae2c03242 100644 --- a/mysql-test/suite/rpl/t/rpl_ddl.test +++ b/mysql-test/suite/rpl/t/rpl_ddl.test @@ -13,10 +13,10 @@ # sequences start. # # 2. Never use a test object, which was direct or indirect affected by a -# preceeding test sequence again. +# preceding test sequence again. # Except table d1.t1 where ONLY DML is allowed. # -# If one preceeding test sequence hits a (sometimes not good visible, +# If one preceding test sequence hits a (sometimes not good visible, # because the sql error code of the statement might be 0) bug # and these rules are ignored, a following test sequence might earn ugly # effects like failing 'sync_slave_with_master', crashes of the slave or diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test b/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test index 23832cd6298..3a64dc96ae8 100644 --- a/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test +++ b/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test @@ -244,7 +244,7 @@ sync_slave_with_master; UPDATE t1 SET a = 5, b = 'slave' WHERE a = 1; SELECT * FROM t1 ORDER BY a; # since bug#31552/31609 idempotency is not default any longer. In -# order for the preceeding test UPDATE t1 to pass, the mode is switched +# order for the preceding test UPDATE t1 to pass, the mode is switched # temprorarily set @@global.slave_exec_mode= 'IDEMPOTENT'; --echo **** On Master **** diff --git a/sql/log_event.cc b/sql/log_event.cc index 74d04234c0c..6b21a303a50 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -3649,7 +3649,7 @@ int Query_log_event::do_apply_event(Relay_log_info const *rli, if ((error= rows_event_stmt_cleanup(const_cast(rli), thd))) { const_cast(rli)->report(ERROR_LEVEL, error, - "Error in cleaning up after an event preceeding the commit; " + "Error in cleaning up after an event preceding the commit; " "the group log file/position: %s %s", const_cast(rli)->group_master_log_name, llstr(const_cast(rli)->group_master_log_pos, diff --git a/storage/myisam/mi_rnext.c b/storage/myisam/mi_rnext.c index ee5c74f8da1..509cd75fbab 100644 --- a/storage/myisam/mi_rnext.c +++ b/storage/myisam/mi_rnext.c @@ -66,7 +66,7 @@ int mi_rnext(MI_INFO *info, uchar *buf, int inx) Normally SQL layer would never request "search next" if "search first" failed. But HANDLER may do anything. - As mi_rnext() without preceeding mi_rkey()/mi_rfirst() + As mi_rnext() without preceding mi_rkey()/mi_rfirst() equals to mi_rfirst(), we must restore original state as if failing mi_rfirst() was not called. */ -- cgit v1.2.1 From c58f561e0d41c7ed9a41bf12f82c3d66d2b08ea5 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 2 Oct 2014 12:57:20 +0200 Subject: MDEV-5707 MTR fails on kfreebsd apply debian's patch to workaround kfreebsd bug --- mysql-test/lib/My/Platform.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mysql-test/lib/My/Platform.pm b/mysql-test/lib/My/Platform.pm index 483bf0bd4f3..1776f1008da 100644 --- a/mysql-test/lib/My/Platform.pm +++ b/mysql-test/lib/My/Platform.pm @@ -110,6 +110,8 @@ sub check_socket_path_length { # This may not be true, but we can't test for it on AIX due to Perl bug # See Bug #45771 return 0 if ($^O eq 'aix'); + # See Debian bug #670722 - failing on kFreeBSD even after setting short path + return 0 if $^O eq 'gnukfreebsd' and length $path < 40; require IO::Socket::UNIX; -- cgit v1.2.1 From 9d4b365d5d747cf26e89c118bfb9fc93af417cab Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 2 Oct 2014 13:47:52 +0200 Subject: MDEV-6550 Missing dependency on Debian 7 (Wheezy) installation package add bsdutils dependency, because mariadb-server-5.5 deb package uses logger --- debian/dist/Debian/control | 5 ++++- debian/dist/Ubuntu/control | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/dist/Debian/control b/debian/dist/Debian/control index d9070e1aa9b..104917d8e2d 100644 --- a/debian/dist/Debian/control +++ b/debian/dist/Debian/control @@ -191,7 +191,10 @@ Architecture: any Suggests: tinyca, mailx, mariadb-test Recommends: libhtml-template-perl Pre-Depends: mariadb-common, adduser (>= 3.40), debconf -Depends: mariadb-client-5.5 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-5.5 (>= ${binary:Version}) +Depends: mariadb-client-5.5 (>= ${source:Version}), libdbi-perl, + perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, + passwd, lsb-base (>= 3.0-10), bsdutils, + mariadb-server-core-5.5 (>= ${binary:Version}) Provides: mariadb-server, mysql-server, virtual-mysql-server Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}), mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5, diff --git a/debian/dist/Ubuntu/control b/debian/dist/Ubuntu/control index 3dd3294c531..0c331638880 100644 --- a/debian/dist/Ubuntu/control +++ b/debian/dist/Ubuntu/control @@ -185,7 +185,10 @@ Architecture: any Suggests: tinyca, mailx, mariadb-test Recommends: libhtml-template-perl Pre-Depends: mariadb-common, adduser (>= 3.40), debconf -Depends: mariadb-client-5.5 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-5.5 (>= ${binary:Version}) +Depends: mariadb-client-5.5 (>= ${source:Version}), libdbi-perl, + perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, + passwd, lsb-base (>= 3.0-10), bsdutils, + mariadb-server-core-5.5 (>= ${binary:Version}) Provides: mariadb-server, mysql-server, virtual-mysql-server Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}), mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5, -- cgit v1.2.1 From 11242006adf0bed6f5042b69816360593c23a13a Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 2 Oct 2014 13:52:51 +0200 Subject: MDEV-6461 mysqld should not trap SIGTSTP if running with --gdb/--debug-gdb --- sql/mysqld.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 0559afa7616..95f439fd489 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -2948,9 +2948,6 @@ static void init_signals(void) sa.sa_flags = 0; sa.sa_handler = print_signal_warning; sigaction(SIGHUP, &sa, (struct sigaction*) 0); -#ifdef SIGTSTP - sigaddset(&set,SIGTSTP); -#endif if (thd_lib_detected != THD_LIB_LT) sigaddset(&set,THR_SERVER_ALARM); if (test_flags & TEST_SIGINT) @@ -2960,7 +2957,12 @@ static void init_signals(void) sigdelset(&set, SIGINT); } else + { sigaddset(&set,SIGINT); +#ifdef SIGTSTP + sigaddset(&set,SIGTSTP); +#endif + } sigprocmask(SIG_SETMASK,&set,NULL); pthread_sigmask(SIG_SETMASK,&set,NULL); -- cgit v1.2.1 From 604b6533940010e66ca1f75f23ad923632f63379 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 2 Oct 2014 16:58:26 +0200 Subject: MDEV-5749 Please add a .pc file to MariaDB for easy use via pkg-config 1. move cflags/libs cleanup from mysql_config.sh (runtime) to for_client.cmake (build time). Include/library paths are still calculated at runtime (they depend on the location of mysql_config) 2. Use cleaned-up cflags/libs to generate mariadb.pc 3. remove obsolete @expansions@ from mysql_config (for variables that are never set in cmake files) --- .bzrignore | 1 + CMakeLists.txt | 10 ++++-- cmake/cpack_rpm.cmake | 6 ++-- cmake/for_clients.cmake | 77 ++++++++++++++++++++++++++++++++++++++++++++ cmake/install_layout.cmake | 16 +-------- scripts/CMakeLists.txt | 51 ----------------------------- scripts/mysql_config.sh | 55 +++---------------------------- support-files/CMakeLists.txt | 3 ++ support-files/mariadb.pc.in | 23 +++++++++++++ 9 files changed, 121 insertions(+), 121 deletions(-) create mode 100644 cmake/for_clients.cmake create mode 100644 support-files/mariadb.pc.in diff --git a/.bzrignore b/.bzrignore index 522630264ec..0b649dc213d 100644 --- a/.bzrignore +++ b/.bzrignore @@ -1169,3 +1169,4 @@ storage/tokudb/ft-index/tools/tokudb_dump storage/tokudb/ft-index/tools/tokuftdump libmysql/libmysql_versions.ld scripts/mysql_config.pl +support-files/mariadb.pc diff --git a/CMakeLists.txt b/CMakeLists.txt index 375f6bb64bc..73db131454f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,6 +85,10 @@ ELSE() ENDIF() PROJECT(${MYSQL_PROJECT_NAME}) +SET(CPACK_PACKAGE_NAME "MariaDB") +SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MariaDB: a very fast and robust SQL database server") +SET(CPACK_PACKAGE_URL "http://mariadb.org") + IF(BUILD_CONFIG) INCLUDE( ${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake) @@ -410,9 +414,7 @@ ADD_SUBDIRECTORY(libmysql) ADD_SUBDIRECTORY(client) ADD_SUBDIRECTORY(extra) ADD_SUBDIRECTORY(libservices) -ADD_SUBDIRECTORY(scripts) ADD_SUBDIRECTORY(sql/share) -ADD_SUBDIRECTORY(support-files) IF(NOT WITHOUT_SERVER) ADD_SUBDIRECTORY(tests) @@ -446,6 +448,10 @@ IF(WIN32) ENDIF() ADD_SUBDIRECTORY(packaging/solaris) +INCLUDE(for_clients) +ADD_SUBDIRECTORY(scripts) +ADD_SUBDIRECTORY(support-files) + CONFIGURE_FILE(config.h.cmake ${CMAKE_BINARY_DIR}/include/my_config.h) CONFIGURE_FILE(config.h.cmake ${CMAKE_BINARY_DIR}/include/config.h) CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql_version.h.in diff --git a/cmake/cpack_rpm.cmake b/cmake/cpack_rpm.cmake index 30924120526..1d0feced561 100644 --- a/cmake/cpack_rpm.cmake +++ b/cmake/cpack_rpm.cmake @@ -27,15 +27,15 @@ SET(CPACK_COMPONENTS_ALL Server ManPagesServer IniFiles Server_Scripts ManPagesTest Readme ManPagesClient Test Common Client SharedLibraries) -SET(CPACK_RPM_PACKAGE_NAME "MariaDB") +SET(CPACK_RPM_PACKAGE_NAME ${CPACK_PACKAGE_NAME}) SET(CPACK_PACKAGE_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${VERSION}-${RPM}-${CMAKE_SYSTEM_PROCESSOR}") 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") -SET(CPACK_RPM_PACKAGE_URL "http://mariadb.org") -SET(CPACK_RPM_PACKAGE_SUMMARY "MariaDB: a very fast and robust SQL database server") +SET(CPACK_RPM_PACKAGE_SUMMARY ${CPACK_PACKAGE_SUMMARY}) +SET(CPACK_RPM_PACKAGE_URL ${CPACK_PACKAGE_URL}) SET(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_RPM_PACKAGE_SUMMARY} It is GPL v2 licensed, which means you can use the it free of charge under the diff --git a/cmake/for_clients.cmake b/cmake/for_clients.cmake new file mode 100644 index 00000000000..7667e59e8f6 --- /dev/null +++ b/cmake/for_clients.cmake @@ -0,0 +1,77 @@ +# +# Generate LIBS and CFLAGS that third-party clients should use +# + +# Use cmake variables to inspect dependencies for +# mysqlclient library (add -l stuff) +SET(CLIENT_LIBS "") +SET(LIBS "") + +# Avoid compatibility warning about lists with empty elements +IF(POLICY CMP0011) + CMAKE_POLICY(SET CMP0011 NEW) +ENDIF() +IF(POLICY CMP0007) + CMAKE_POLICY(SET CMP0007 OLD) +ENDIF() + +# Extract dependencies using CMake's internal ${target}_LIB_DEPENDS variable +# returned string in ${var} is can be passed to linker's command line +MACRO(EXTRACT_LINK_LIBRARIES target var) + IF(${target}_LIB_DEPENDS) + LIST(REMOVE_ITEM ${target}_LIB_DEPENDS "") + LIST(REMOVE_DUPLICATES ${target}_LIB_DEPENDS) + FOREACH(lib ${${target}_LIB_DEPENDS}) + # Filter out "general", it is not a library, just CMake hint + # Also, remove duplicates + IF(NOT lib STREQUAL "general" AND NOT ${var} MATCHES "-l${lib} ") + IF (lib MATCHES "^\\-l") + SET(${var} "${${var}} ${lib} ") + ELSEIF(lib MATCHES "^/") + IF (lib MATCHES "\\.(a|so([0-9.]*)|lib|dll|dylib)$") + # Full path, convert to just filename, strip "lib" prefix and extension + GET_FILENAME_COMPONENT(lib "${lib}" NAME_WE) + STRING(REGEX REPLACE "^lib" "" lib "${lib}") + SET(${var} "${${var}}-l${lib} " ) + ENDIF() + ELSE() + SET(${var} "${${var}}-l${lib} " ) + ENDIF() + ENDIF() + ENDFOREACH() + ENDIF() + IF(MSVC) + STRING(REPLACE "-l" "" ${var} "${${var}}") + ENDIF() +ENDMACRO() + +EXTRACT_LINK_LIBRARIES(mysqlclient LIBS) +EXTRACT_LINK_LIBRARIES(mysqlserver EMB_LIBS) + +SET(LIBS "-lmysqlclient ${ZLIB_DEPS} ${LIBS} ${openssl_libs}") +SET(EMB_LIBS "-lmysqld ${ZLIB_DEPS} ${EMB_LIBS} ${openssl_libs}") + +MACRO(REPLACE_FOR_CLIENTS VAR) + SET(v " ${${VAR}} ") + FOREACH(del ${ARGN}) + STRING(REGEX REPLACE " -(${del}) " " " v ${v}) + ENDFOREACH(del) + STRING(REGEX REPLACE " +" " " v ${v}) + STRING(STRIP "${v}" ${VAR}_FOR_CLIENTS) +ENDMACRO() + +# Remove some options that a client doesn't have to care about +# FIXME until we have a --cxxflags, we need to remove -Xa +# and -xstrconst to make --cflags usable for Sun Forte C++ +# FIXME until we have a --cxxflags, we need to remove -AC99 +# to make --cflags usable for HP C++ (aCC) +REPLACE_FOR_CLIENTS(CFLAGS "[DU]DBUG_OFF" "[DU]SAFE_MUTEX" "[DU]NDEBUG" + "[DU]UNIV_MUST_NOT_INLINE" "[DU]FORCE_INIT_OF_VARS" "[DU]EXTRA_DEBUG" "[DU]HAVE_valgrind" + "O" "O[0-9]" "xO[0-9]" "W[-A-Za-z]*" "mtune=[-A-Za-z0-9]*" "g" "fPIC" + "mcpu=[-A-Za-z0-9]*" "unroll2" "ip" "mp" "march=[-A-Za-z0-9]*" "Xa" + "xstrconst" "xc99=none" "AC99" "restrict") + +# Same for --libs +REPLACE_FOR_CLIENTS(LIBS lmtmalloc static-libcxa i-static static-intel) +REPLACE_FOR_CLIENTS(EMB_LIBS lmtmalloc static-libcxa i-static static-intel) + diff --git a/cmake/install_layout.cmake b/cmake/install_layout.cmake index d5f60832884..ebf3852182c 100644 --- a/cmake/install_layout.cmake +++ b/cmake/install_layout.cmake @@ -102,16 +102,6 @@ IF(UNIX) ENDIF() ENDIF() -# -# plugin_tests's value should not be used by imported plugins, -# just use if(INSTALL_PLUGINTESTDIR). -# The plugin must set its own install path for tests -# -FILE(GLOB plugin_tests - ${CMAKE_SOURCE_DIR}/plugin/*/tests - ${CMAKE_SOURCE_DIR}/internal/plugin/*/tests -) - # # STANDALONE layout # @@ -136,7 +126,6 @@ SET(INSTALL_SQLBENCHDIR_STANDALONE ".") SET(INSTALL_SUPPORTFILESDIR_STANDALONE "support-files") # SET(INSTALL_MYSQLDATADIR_STANDALONE "data") -SET(INSTALL_PLUGINTESTDIR_STANDALONE ${plugin_tests}) SET(INSTALL_UNIX_ADDRDIR_STANDALONE "/tmp/mysql.sock") # @@ -170,7 +159,6 @@ SET(INSTALL_SQLBENCHDIR_RPM "") SET(INSTALL_SUPPORTFILESDIR_RPM "share/mysql") # SET(INSTALL_MYSQLDATADIR_RPM "/var/lib/mysql") -SET(INSTALL_PLUGINTESTDIR_RPM ${plugin_tests}) SET(INSTALL_UNIX_ADDRDIR_RPM "${INSTALL_MYSQLDATADIR_RPM}/mysql.sock") @@ -199,7 +187,6 @@ SET(INSTALL_SQLBENCHDIR_DEB ".") SET(INSTALL_SUPPORTFILESDIR_DEB "share/mysql") # SET(INSTALL_MYSQLDATADIR_DEB "/var/lib/mysql") -SET(INSTALL_PLUGINTESTDIR_DEB ${plugin_tests}) SET(INSTALL_UNIX_ADDRDIR_DEB "/var/run/mysqld/mysqld.sock") # @@ -226,7 +213,6 @@ SET(INSTALL_SQLBENCHDIR_SVR4 ".") SET(INSTALL_SUPPORTFILESDIR_SVR4 "support-files") # SET(INSTALL_MYSQLDATADIR_SVR4 "/var/lib/mysql") -SET(INSTALL_PLUGINTESTDIR_SVR4 ${plugin_tests}) SET(INSTALL_UNIX_ADDRDIR_SVR "/tmp/mysql.sock") @@ -242,7 +228,7 @@ SET(OLD_INSTALL_LAYOUT ${INSTALL_LAYOUT} CACHE INTERNAL "") # will be defined as ${INSTALL_BINDIR_STANDALONE} by default if STANDALONE # layout is chosen) FOREACH(var BIN SBIN LIB MYSQLSHARE SHARE PLUGIN INCLUDE SCRIPT DOC MAN SYSCONF SYSCONF2 - INFO MYSQLTEST SQLBENCH DOCREADME SUPPORTFILES MYSQLDATA PLUGINTEST UNIX_ADDR) + INFO MYSQLTEST SQLBENCH DOCREADME SUPPORTFILES MYSQLDATA UNIX_ADDR) SET(INSTALL_${var}DIR ${INSTALL_${var}DIR_${INSTALL_LAYOUT}} CACHE STRING "${var} installation directory" ${FORCE}) MARK_AS_ADVANCED(INSTALL_${var}DIR) diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 7fb57802685..89a9f40a356 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -245,57 +245,6 @@ ELSE() SET(TARGET_LINUX "false") ENDIF() -# Use cmake variables to inspect dependencies for -# mysqlclient library (add -l stuff) -SET(CLIENT_LIBS "") -SET(LIBS "") - -# Avoid compatibility warning about lists with empty elements -IF(POLICY CMP0011) - CMAKE_POLICY(SET CMP0011 NEW) -ENDIF() -IF(POLICY CMP0007) - CMAKE_POLICY(SET CMP0007 OLD) -ENDIF() - -# Extract dependencies using CMake's internal ${target}_LIB_DEPENDS variable -# returned string in ${var} is can be passed to linker's command line -MACRO(EXTRACT_LINK_LIBRARIES target var) - IF(${target}_LIB_DEPENDS) - LIST(REMOVE_ITEM ${target}_LIB_DEPENDS "") - LIST(REMOVE_DUPLICATES ${target}_LIB_DEPENDS) - FOREACH(lib ${${target}_LIB_DEPENDS}) - # Filter out "general", it is not a library, just CMake hint - # Also, remove duplicates - IF(NOT lib STREQUAL "general" AND NOT ${var} MATCHES "-l${lib} ") - IF (lib MATCHES "^\\-l") - SET(${var} "${${var}} ${lib} ") - ELSEIF(lib MATCHES "^/") - IF (lib MATCHES "\\.(a|so([0-9.]*)|lib|dll|dylib)$") - # Full path, convert to just filename, strip "lib" prefix and extension - GET_FILENAME_COMPONENT(lib "${lib}" NAME_WE) - STRING(REGEX REPLACE "^lib" "" lib "${lib}") - SET(${var} "${${var}}-l${lib} " ) - ENDIF() - ELSE() - SET(${var} "${${var}}-l${lib} " ) - ENDIF() - ENDIF() - ENDFOREACH() - ENDIF() - IF(MSVC) - STRING(REPLACE "-l" "" ${var} "${${var}}") - ENDIF() -ENDMACRO() - -EXTRACT_LINK_LIBRARIES(mysqlclient CLIENT_LIBS) -EXTRACT_LINK_LIBRARIES(mysqlserver LIBS) - -# mysql_config evaluates ${LIBDL}, we want to avoid it -# as our CLIENT_LIBS and LIBS are already correct -SET(LIBDL) - -SET(NON_THREADED_LIBS ${CLIENT_LIBS}) SET(mysql_config_COMPONENT COMPONENT Development) SET(msql2mysql_COMPONENT COMPONENT Client) SET(mysqlaccess_COMPONENT COMPONENT Client) diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh index e4640961b34..b742b28484d 100644 --- a/scripts/mysql_config.sh +++ b/scripts/mysql_config.sh @@ -97,7 +97,6 @@ fix_path pkgincludedir include/mysql version='@VERSION@' socket='@MYSQL_UNIX_ADDR@' -ldflags='@LDFLAGS@' if [ @MYSQL_TCP_PORT_DEFAULT@ -eq 0 ]; then port=0 @@ -106,58 +105,14 @@ else fi # Create options -# We intentionally add a space to the beginning and end of lib strings, simplifies replace later -libs=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@" -libs="$libs @openssl_libs@ @STATIC_NSS_FLAGS@ " -libs_r=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqlclient_r @ZLIB_DEPS@ @CLIENT_LIBS@ @openssl_libs@ " -embedded_libs=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqld @LIBDL@ @ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @openssl_libs@ " - -if [ -r "$pkglibdir/libmygcc.a" ]; then - # When linking against the static library with a different version of GCC - # from what was used to compile the library, some symbols may not be defined - # automatically. We package the libmygcc.a from the build host, to provide - # definitions for those. Bugs 4921, 19561, 19817, 21158, etc. - libs="$libs -lmygcc " - libs_r="$libs_r -lmygcc " - embedded_libs="$embedded_libs -lmygcc " -fi +libs="-L$pkglibdir @RPATH_OPTION@ @LIBS_FOR_CLIENTS@" +embedded_libs="-L$pkglibdir @RPATH_OPTION@ @EMB_LIBS_FOR_CLIENTS@" include="-I$pkgincludedir" if [ "$basedir" != "/usr" ]; then include="$include -I$pkgincludedir/.." fi -cflags="$include @CFLAGS@ " #note: end space! - -# Remove some options that a client doesn't have to care about -# FIXME until we have a --cxxflags, we need to remove -Xa -# and -xstrconst to make --cflags usable for Sun Forte C++ -# FIXME until we have a --cxxflags, we need to remove -AC99 -# to make --cflags usable for HP C++ (aCC) -for remove in DDBUG_OFF DSAFE_MUTEX DUNIV_MUST_NOT_INLINE DFORCE_INIT_OF_VARS \ - DEXTRA_DEBUG DHAVE_valgrind O 'O[0-9]' 'xO[0-9]' 'W[-A-Za-z]*' \ - 'mtune=[-A-Za-z0-9]*' 'mcpu=[-A-Za-z0-9]*' 'march=[-A-Za-z0-9]*' \ - Xa xstrconst "xc99=none" AC99 \ - unroll2 ip mp restrict -do - # The first option we might strip will always have a space before it because - # we set -I$pkgincludedir as the first option - cflags=`echo "$cflags"|sed -e "s/ -$remove */ /g"` -done -cflags=`echo "$cflags"|sed -e 's/ *\$//'` - -# Same for --libs(_r) -for remove in lmtmalloc static-libcxa i-static static-intel -do - # We know the strings starts with a space - libs=`echo "$libs"|sed -e "s/ -$remove */ /g"` - libs_r=`echo "$libs_r"|sed -e "s/ -$remove */ /g"` - embedded_libs=`echo "$embedded_libs"|sed -e "s/ -$remove */ /g"` -done - -# Strip trailing and ending space if any, and '+' (FIXME why?) -libs=`echo "$libs" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'` -libs_r=`echo "$libs_r" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'` -embedded_libs=`echo "$embedded_libs" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'` +cflags="$include @CFLAGS_FOR_CLIENTS@" usage () { cat < Date: Fri, 3 Oct 2014 23:04:25 +0200 Subject: MDEV-6743 crash in GROUP_CONCAT(IF () ORDER BY 1) backport the new fix from 10.0 --- sql/item_sum.cc | 12 ------------ sql/sql_select.cc | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/sql/item_sum.cc b/sql/item_sum.cc index d6ecba4a754..27456a94543 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -3295,18 +3295,6 @@ void Item_func_group_concat::cleanup() DBUG_ASSERT(tree == 0); } - /* - For prepared statements we have to restore pointers for ORDER BY as - they may point to areas that are freed at cleanup(). - */ - if (!current_thd->stmt_arena->is_conventional() && arg_count_order) - { - memcpy(args + arg_count_field, orig_args + arg_count_field, - sizeof(Item*) * arg_count_order); - - for (uint i= 0 ; i < arg_count_order ; i++) - order[i]->item = args + arg_count_field + i; - } DBUG_VOID_RETURN; } diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 1b57cb24308..af2b489c8b6 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -20425,7 +20425,7 @@ find_order_in_list(THD *thd, Item **ref_pointer_array, TABLE_LIST *tables, order_item->full_name(), thd->where); return TRUE; } - order->item= ref_pointer_array + count - 1; + thd->change_item_tree((Item**)&order->item, (Item*)(ref_pointer_array + count - 1)); order->in_field_list= 1; order->counter= count; order->counter_used= 1; -- cgit v1.2.1 From 41b45a81637be64c5039d4f600ce7eb9dbf03844 Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Fri, 10 Oct 2014 17:08:12 +0400 Subject: MDEV-6738: use_stat_table + histograms crashing optimizer - When EITS code calls store_key_image_to_rec(), it should follow its calling convention (which is counter-intuitive) --- mysql-test/r/selectivity_innodb.result | 10 ++++++++++ mysql-test/t/selectivity_innodb.test | 14 ++++++++++++++ sql/opt_range.cc | 5 +++++ sql/sql_statistics.cc | 6 +++--- 4 files changed, 32 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/selectivity_innodb.result b/mysql-test/r/selectivity_innodb.result index 0dc678f0c0d..013fb1d876c 100644 --- a/mysql-test/r/selectivity_innodb.result +++ b/mysql-test/r/selectivity_innodb.result @@ -1408,6 +1408,16 @@ SELECT t1_2.b, t1_1.a FROM t1 AS t1_1 STRAIGHT_JOIN t1 AS t1_2 ON ( t1_2.a = t1_ ); a b i DROP TABLE t1,t2; +# +# MDEV-6738: use_stat_table + histograms crashing optimizer +# +set use_stat_tables='preferably'; +set optimizer_use_condition_selectivity=4; +# Need innodb because there is a special kind of field_bit for non-myisam tables +create table t1(col1 int, col2 bit(1) DEFAULT NULL) engine=innodb; +select * from t1 where col2 != true; +col1 col2 +drop table t1; # # End of 10.0 tests # diff --git a/mysql-test/t/selectivity_innodb.test b/mysql-test/t/selectivity_innodb.test index 60b0da0d5d1..5674cb5c006 100644 --- a/mysql-test/t/selectivity_innodb.test +++ b/mysql-test/t/selectivity_innodb.test @@ -65,6 +65,20 @@ SELECT * FROM t1, t2 WHERE ( 't', 'o' ) IN ( ); DROP TABLE t1,t2; +--echo # +--echo # MDEV-6738: use_stat_table + histograms crashing optimizer +--echo # + +set use_stat_tables='preferably'; +set optimizer_use_condition_selectivity=4; + +--echo # Need innodb because there is a special kind of field_bit for non-myisam tables +create table t1(col1 int, col2 bit(1) DEFAULT NULL) engine=innodb; + +select * from t1 where col2 != true; + +drop table t1; + --echo # --echo # End of 10.0 tests --echo # diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 07a563d8090..ee26f3745b2 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -3737,6 +3737,11 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item *cond) field Field which key image should be stored ptr Field value in key format len Length of the value, in bytes + + ATTENTION + len is the length of the value not counting the NULL-byte (at the same + time, ptr points to the key image, which starts with NULL-byte for + nullable columns) DESCRIPTION Copy the field value from its key image to the table record. The source diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc index e1b197f4a63..a38df24cfb7 100644 --- a/sql/sql_statistics.cc +++ b/sql/sql_statistics.cc @@ -3531,7 +3531,7 @@ double get_column_range_cardinality(Field *field, if (hist->is_available()) { store_key_image_to_rec(field, (uchar *) min_endp->key, - min_endp->length); + field->key_length()); double pos= field->pos_in_interval(col_stats->min_value, col_stats->max_value); res= col_non_nulls * @@ -3555,7 +3555,7 @@ double get_column_range_cardinality(Field *field, if (min_endp && !(field->null_ptr && min_endp->key[0])) { store_key_image_to_rec(field, (uchar *) min_endp->key, - min_endp->length); + field->key_length()); min_mp_pos= field->pos_in_interval(col_stats->min_value, col_stats->max_value); } @@ -3564,7 +3564,7 @@ double get_column_range_cardinality(Field *field, if (max_endp) { store_key_image_to_rec(field, (uchar *) max_endp->key, - max_endp->length); + field->key_length()); max_mp_pos= field->pos_in_interval(col_stats->min_value, col_stats->max_value); } -- cgit v1.2.1 -- cgit v1.2.1 From 014214d0348cd58a693c44e836915accfe48c275 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 6 Oct 2014 19:56:00 +0200 Subject: percona-server-5.5.39-36.0 --- dict/dict0crea.c | 42 +++++++++++++++++++-- dict/dict0dict.c | 103 ++++++++++++++++++++++++++++++++++++++------------- dict/dict0load.c | 93 +++++++++++++++++++++++++++++++++++++++++----- dict/dict0mem.c | 15 +++++++- handler/ha_innodb.cc | 10 ----- handler/ha_innodb.h | 1 - handler/i_s.cc | 25 +++++++++++++ include/dict0dict.h | 39 ++++++++++++++++++- include/dict0dict.ic | 61 +++++++++++++++++++++++++++++- include/dict0load.h | 12 ++++++ include/dict0mem.h | 12 +++++- include/log0log.h | 12 ++++++ include/log0log.ic | 21 +++++++++++ include/univ.i | 2 +- log/log0log.c | 19 ---------- log/log0online.c | 35 +++++++++++++---- 16 files changed, 420 insertions(+), 82 deletions(-) diff --git a/dict/dict0crea.c b/dict/dict0crea.c index 0f53fe11c0b..7f148aa1f75 100644 --- a/dict/dict0crea.c +++ b/dict/dict0crea.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 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 the Free Software @@ -1648,6 +1648,8 @@ dict_create_add_foreign_to_dictionary( ulint i; pars_info_t* info; + ut_ad(mutex_own(&(dict_sys->mutex))); + if (foreign->id == NULL) { /* Generate a new constraint id */ ulint namelen = strlen(table->name); @@ -1726,6 +1728,37 @@ dict_create_add_foreign_to_dictionary( "END;\n" , table, foreign, trx); + if (error == DB_SUCCESS) { + + + if (foreign->foreign_table != NULL) { + ib_rbt_t* rbt + = foreign->foreign_table->foreign_rbt; + + if (rbt == NULL) { + rbt = dict_table_init_foreign_rbt( + foreign->foreign_table); + } else { + rbt_delete(rbt, foreign->id); + } + + rbt_insert(rbt, foreign->id, &foreign); + } + + if (foreign->referenced_table != NULL) { + ib_rbt_t* rbt + = foreign->referenced_table->referenced_rbt; + + if (rbt == NULL) { + rbt = dict_table_init_referenced_rbt( + foreign->referenced_table); + } else { + rbt_delete(rbt, foreign->id); + } + rbt_insert(rbt, foreign->id, &foreign); + } + } + return(error); } @@ -1750,6 +1783,7 @@ dict_create_add_foreigns_to_dictionary( dict_foreign_t* foreign; ulint number = start_id + 1; ulint error; + DBUG_ENTER("dict_create_add_foreigns_to_dictionary"); ut_ad(mutex_own(&(dict_sys->mutex))); @@ -1758,7 +1792,7 @@ dict_create_add_foreigns_to_dictionary( "InnoDB: table SYS_FOREIGN not found" " in internal data dictionary\n"); - return(DB_ERROR); + DBUG_RETURN(DB_ERROR); } for (foreign = UT_LIST_GET_FIRST(table->foreign_list); @@ -1770,9 +1804,9 @@ dict_create_add_foreigns_to_dictionary( if (error != DB_SUCCESS) { - return(error); + DBUG_RETURN(error); } } - return(DB_SUCCESS); + DBUG_RETURN(DB_SUCCESS); } diff --git a/dict/dict0dict.c b/dict/dict0dict.c index fbca9d2c809..5a49dbb9e92 100644 --- a/dict/dict0dict.c +++ b/dict/dict0dict.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 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 the Free Software @@ -26,6 +26,7 @@ Created 1/8/1996 Heikki Tuuri #include #include "dict0dict.h" +#include "ut0rbt.h" #ifdef UNIV_NONINL #include "dict0dict.ic" @@ -193,6 +194,7 @@ UNIV_INTERN FILE* dict_foreign_err_file = NULL; /* mutex protecting the foreign and unique error buffers */ UNIV_INTERN mutex_t dict_foreign_err_mutex; #endif /* !UNIV_HOTBACKUP */ + /******************************************************************//** Makes all characters in a NUL-terminated UTF-8 string lower case. */ UNIV_INTERN @@ -1110,6 +1112,10 @@ dict_table_rename_in_cache( UT_LIST_INIT(table->referenced_list); + if (table->referenced_rbt != NULL) { + rbt_clear(table->referenced_rbt); + } + return(TRUE); } @@ -1120,6 +1126,10 @@ dict_table_rename_in_cache( foreign = UT_LIST_GET_FIRST(table->foreign_list); while (foreign != NULL) { + + /* The id will be changed. So remove old one */ + rbt_delete(foreign->foreign_table->foreign_rbt, foreign->id); + if (ut_strlen(foreign->foreign_table_name) < ut_strlen(table->name)) { /* Allocate a longer name buffer; @@ -1267,6 +1277,9 @@ dict_table_rename_in_cache( mem_free(old_id); } + rbt_insert(foreign->foreign_table->foreign_rbt, + foreign->id, &foreign); + foreign = UT_LIST_GET_NEXT(foreign_list, foreign); } @@ -2614,22 +2627,40 @@ dict_foreign_remove_from_cache( /*===========================*/ dict_foreign_t* foreign) /*!< in, own: foreign constraint */ { + DBUG_ENTER("dict_foreign_remove_from_cache"); + ut_ad(mutex_own(&(dict_sys->mutex))); ut_a(foreign); if (foreign->referenced_table) { + ib_rbt_t* rbt; + UT_LIST_REMOVE(referenced_list, foreign->referenced_table->referenced_list, foreign); + + rbt = foreign->referenced_table->referenced_rbt; + if (rbt != NULL) { + rbt_delete(rbt, foreign->id); + } } if (foreign->foreign_table) { + ib_rbt_t* rbt; + UT_LIST_REMOVE(foreign_list, foreign->foreign_table->foreign_list, foreign); + rbt = foreign->foreign_table->foreign_rbt; + + if (rbt != NULL) { + rbt_delete(rbt, foreign->id); + } } dict_foreign_free(foreign); + + DBUG_VOID_RETURN; } /**********************************************************************//** @@ -2643,33 +2674,36 @@ dict_foreign_find( dict_table_t* table, /*!< in: table object */ const char* id) /*!< in: foreign constraint id */ { - dict_foreign_t* foreign; - - ut_ad(mutex_own(&(dict_sys->mutex))); - - foreign = UT_LIST_GET_FIRST(table->foreign_list); + const ib_rbt_node_t* node; - while (foreign) { - if (ut_strcmp(id, foreign->id) == 0) { + DBUG_ENTER("dict_foreign_find"); - return(foreign); + ut_ad(mutex_own(&(dict_sys->mutex))); + ut_ad(dict_table_check_foreign_keys(table)); + + if (table->foreign_rbt != NULL) { + ut_a(UT_LIST_GET_LEN(table->foreign_list) + == rbt_size(table->foreign_rbt)); + node = rbt_lookup(table->foreign_rbt, id); + if (node != NULL) { + DBUG_RETURN(*(dict_foreign_t**) node->value); } - - foreign = UT_LIST_GET_NEXT(foreign_list, foreign); + } else { + ut_a(UT_LIST_GET_LEN(table->foreign_list) == 0); } - foreign = UT_LIST_GET_FIRST(table->referenced_list); - - while (foreign) { - if (ut_strcmp(id, foreign->id) == 0) { - - return(foreign); + if (table->referenced_rbt != NULL) { + ut_a(UT_LIST_GET_LEN(table->referenced_list) + == rbt_size(table->referenced_rbt)); + node = rbt_lookup(table->referenced_rbt, id); + if (node != NULL) { + DBUG_RETURN(*(dict_foreign_t**) node->value); } - - foreign = UT_LIST_GET_NEXT(referenced_list, foreign); + } else { + ut_a(UT_LIST_GET_LEN(table->referenced_list) == 0); } - return(NULL); + DBUG_RETURN(NULL); } /*********************************************************************//** @@ -2907,6 +2941,8 @@ dict_foreign_add_to_cache( ibool added_to_referenced_list= FALSE; FILE* ef = dict_foreign_err_file; + DBUG_ENTER("dict_foreign_add_to_cache"); + ut_ad(mutex_own(&(dict_sys->mutex))); for_table = dict_table_check_if_in_cache_low( @@ -2916,7 +2952,14 @@ dict_foreign_add_to_cache( foreign->referenced_table_name_lookup); ut_a(for_table || ref_table); + if (ref_table != NULL && ref_table->referenced_rbt == NULL) { + dict_table_init_referenced_rbt(ref_table); + } + if (for_table) { + if (for_table->foreign_rbt == NULL) { + dict_table_init_foreign_rbt(for_table); + } for_in_cache = dict_foreign_find(for_table, foreign->id); } @@ -2953,18 +2996,22 @@ dict_foreign_add_to_cache( mem_heap_free(foreign->heap); } - return(DB_CANNOT_ADD_CONSTRAINT); + DBUG_RETURN(DB_CANNOT_ADD_CONSTRAINT); } for_in_cache->referenced_table = ref_table; for_in_cache->referenced_index = index; + UT_LIST_ADD_LAST(referenced_list, - ref_table->referenced_list, - for_in_cache); + ref_table->referenced_list, for_in_cache); added_to_referenced_list = TRUE; + + rbt_insert(ref_table->referenced_rbt, + for_in_cache->id, &for_in_cache); } if (for_in_cache->foreign_table == NULL && for_table) { + index = dict_foreign_find_index( for_table, for_in_cache->foreign_col_names, @@ -2993,22 +3040,28 @@ dict_foreign_add_to_cache( referenced_list, ref_table->referenced_list, for_in_cache); + rbt_delete(ref_table->referenced_rbt, + for_in_cache->id); } mem_heap_free(foreign->heap); } - return(DB_CANNOT_ADD_CONSTRAINT); + DBUG_RETURN(DB_CANNOT_ADD_CONSTRAINT); } for_in_cache->foreign_table = for_table; for_in_cache->foreign_index = index; + UT_LIST_ADD_LAST(foreign_list, for_table->foreign_list, for_in_cache); + + rbt_insert(for_table->foreign_rbt, for_in_cache->id, + &for_in_cache); } - return(DB_SUCCESS); + DBUG_RETURN(DB_SUCCESS); } #endif /* !UNIV_HOTBACKUP */ diff --git a/dict/dict0load.c b/dict/dict0load.c index 896640c1647..067c9d2b8f9 100644 --- a/dict/dict0load.c +++ b/dict/dict0load.c @@ -1834,6 +1834,8 @@ dict_load_table( const char* err_msg; mtr_t mtr; + DBUG_ENTER("dict_load_table"); + ut_ad(mutex_own(&(dict_sys->mutex))); heap = mem_heap_create(32000); @@ -1867,7 +1869,7 @@ err_exit: mtr_commit(&mtr); mem_heap_free(heap); - return(NULL); + DBUG_RETURN(NULL); } field = rec_get_nth_field_old(rec, 0, &len); @@ -2029,8 +2031,8 @@ err_exit: #endif /* 0 */ func_exit: mem_heap_free(heap); - - return(table); + ut_ad(table == NULL || dict_table_check_foreign_keys(table)); + DBUG_RETURN(table); } /***********************************************************************//** @@ -2255,6 +2257,8 @@ dict_load_foreign( dict_table_t* for_table; dict_table_t* ref_table; + DBUG_ENTER("dict_load_foreign"); + ut_ad(mutex_own(&(dict_sys->mutex))); heap2 = mem_heap_create(1000); @@ -2287,7 +2291,7 @@ dict_load_foreign( mtr_commit(&mtr); mem_heap_free(heap2); - return(DB_ERROR); + DBUG_RETURN(DB_ERROR); } field = rec_get_nth_field_old(rec, 0, &len); @@ -2303,7 +2307,7 @@ dict_load_foreign( mtr_commit(&mtr); mem_heap_free(heap2); - return(DB_ERROR); + DBUG_RETURN(DB_ERROR); } /* Read the table names and the number of columns associated @@ -2400,7 +2404,7 @@ dict_load_foreign( a new foreign key constraint but loading one from the data dictionary. */ - return(dict_foreign_add_to_cache(foreign, check_charsets, ignore_err)); + DBUG_RETURN(dict_foreign_add_to_cache(foreign, check_charsets, ignore_err)); } /***********************************************************************//** @@ -2435,6 +2439,8 @@ dict_load_foreigns( ulint err; mtr_t mtr; + DBUG_ENTER("dict_load_foreigns"); + ut_ad(mutex_own(&(dict_sys->mutex))); sys_foreign = dict_table_get_low("SYS_FOREIGN", DICT_ERR_IGNORE_NONE); @@ -2446,7 +2452,7 @@ dict_load_foreigns( "InnoDB: Error: no foreign key system tables" " in the database\n"); - return(DB_ERROR); + DBUG_RETURN(DB_ERROR); } ut_a(!dict_table_is_comp(sys_foreign)); @@ -2526,7 +2532,7 @@ loop: if (err != DB_SUCCESS) { btr_pcur_close(&pcur); - return(err); + DBUG_RETURN(err); } mtr_start(&mtr); @@ -2555,5 +2561,74 @@ load_next_index: goto start_load; } - return(DB_SUCCESS); + DBUG_RETURN(DB_SUCCESS); +} + +/********************************************************************//** +Check if dict_table_t::foreign_rbt and dict_table::foreign_list +contain the same set of foreign key objects; and check if +dict_table_t::referenced_rbt and dict_table::referenced_list contain +the same set of foreign key objects. +@return TRUE if correct, FALSE otherwise. */ +ibool +dict_table_check_foreign_keys( +/*==========================*/ + const dict_table_t* table) /* in: table object to check */ +{ + dict_foreign_t* foreign; + const ib_rbt_node_t* node; + + ut_ad(mutex_own(&(dict_sys->mutex))); + + if (table->foreign_rbt == NULL) { + + if (UT_LIST_GET_LEN(table->foreign_list) > 0) { + return(FALSE); + } + + } else { + + if (UT_LIST_GET_LEN(table->foreign_list) + != rbt_size(table->foreign_rbt)) { + return(FALSE); + } + + foreign = UT_LIST_GET_FIRST(table->foreign_list); + + while (foreign != NULL) { + + node = rbt_lookup(table->foreign_rbt, foreign->id); + if (node == NULL) { + return(FALSE); + } + foreign = UT_LIST_GET_NEXT(foreign_list, foreign); + } + } + + if (table->referenced_rbt == NULL ) { + + if (UT_LIST_GET_LEN(table->referenced_list) > 0) { + return(FALSE); + } + + } else { + + if (UT_LIST_GET_LEN(table->referenced_list) + != rbt_size(table->referenced_rbt)) { + return(FALSE); + } + + foreign = UT_LIST_GET_FIRST(table->referenced_list); + + while (foreign != NULL) { + + node = rbt_lookup(table->referenced_rbt, foreign->id); + if (node == NULL) { + return(FALSE); + } + foreign = UT_LIST_GET_NEXT(referenced_list, foreign); + } + } + + return(TRUE); } diff --git a/dict/dict0mem.c b/dict/dict0mem.c index 48ac4d28e24..40099c06823 100644 --- a/dict/dict0mem.c +++ b/dict/dict0mem.c @@ -66,6 +66,7 @@ dict_mem_table_create( { dict_table_t* table; mem_heap_t* heap; + DBUG_ENTER("dict_mem_table_create"); ut_ad(name); ut_a(!(flags & (~0 << DICT_TF2_BITS))); @@ -100,8 +101,11 @@ dict_mem_table_create( table->is_corrupt = FALSE; #endif /* !UNIV_HOTBACKUP */ + table->foreign_rbt = NULL; + table->referenced_rbt = NULL; + ut_d(table->magic_n = DICT_TABLE_MAGIC_N); - return(table); + DBUG_RETURN(table); } /****************************************************************//** @@ -120,6 +124,15 @@ dict_mem_table_free( #ifndef UNIV_HOTBACKUP mutex_free(&(table->autoinc_mutex)); #endif /* UNIV_HOTBACKUP */ + + if (table->foreign_rbt != NULL) { + rbt_free(table->foreign_rbt); + } + + if (table->referenced_rbt != NULL) { + rbt_free(table->referenced_rbt); + } + ut_free(table->name); mem_heap_free(table->heap); } diff --git a/handler/ha_innodb.cc b/handler/ha_innodb.cc index 396a33cdf13..ce3f12ff01c 100644 --- a/handler/ha_innodb.cc +++ b/handler/ha_innodb.cc @@ -8995,16 +8995,6 @@ ha_innobase::read_time( return(ranges + (double) rows / (double) total_rows * time_for_scan); } -UNIV_INTERN -bool -ha_innobase::is_corrupt() const -{ - if (share->ib_table) - return ((bool)share->ib_table->is_corrupt); - else - return (FALSE); -} - /*********************************************************************//** Calculates the key number used inside MySQL for an Innobase index. We will first check the "index translation table" for a match of the index to get diff --git a/handler/ha_innodb.h b/handler/ha_innodb.h index 773a0bbc035..2324793767e 100644 --- a/handler/ha_innodb.h +++ b/handler/ha_innodb.h @@ -141,7 +141,6 @@ class ha_innobase: public handler double scan_time(); double read_time(uint index, uint ranges, ha_rows rows); my_bool is_fake_change_enabled(THD *thd); - bool is_corrupt() const; int write_row(uchar * buf); int update_row(const uchar * old_data, uchar * new_data); diff --git a/handler/i_s.cc b/handler/i_s.cc index 751efc4dd3f..cb4a8f2357a 100644 --- a/handler/i_s.cc +++ b/handler/i_s.cc @@ -42,6 +42,7 @@ Created July 18, 2007 Vasil Dimov #include "i_s.h" #include #include +#include extern "C" { #include "btr0pcur.h" /* for file sys_tables related info. */ @@ -2708,6 +2709,19 @@ i_s_innodb_buffer_page_fill( table_name = mem_heap_strdup(heap, index->table_name); + DBUG_EXECUTE_IF("mysql_test_print_index_type", + { + char idx_type[3]; + + ut_snprintf(idx_type, + sizeof(idx_type), + "%d", + index->type); + + index_name=mem_heap_strcat(heap, + index_name, + idx_type); + };); } mutex_exit(&dict_sys->mutex); @@ -7511,12 +7525,23 @@ i_s_innodb_changed_pages_fill( limit_lsn_range_from_condition(table, cond, &min_lsn, &max_lsn); } + + /* If the log tracker is running and our max_lsn > current tracked LSN, + cap the max lsn so that we don't try to read any partial runs as the + tracked LSN advances. */ + if (srv_track_changed_pages) { + ib_uint64_t tracked_lsn = log_get_tracked_lsn(); + if (max_lsn > tracked_lsn) + max_lsn = tracked_lsn; + } if (!log_online_bitmap_iterator_init(&i, min_lsn, max_lsn)) { my_error(ER_CANT_FIND_SYSTEM_REC, MYF(0)); DBUG_RETURN(1); } + DEBUG_SYNC(thd, "i_s_innodb_changed_pages_range_ready"); + while(log_online_bitmap_iterator_next(&i) && (!srv_max_changed_pages || output_rows_num < srv_max_changed_pages) && diff --git a/include/dict0dict.h b/include/dict0dict.h index 8c6620b94b3..8908d7608ad 100644 --- a/include/dict0dict.h +++ b/include/dict0dict.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 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 the Free Software @@ -39,6 +39,7 @@ Created 1/8/1996 Heikki Tuuri #include "ut0rnd.h" #include "ut0byte.h" #include "trx0types.h" +#include "ut0rbt.h" #ifndef UNIV_HOTBACKUP # include "sync0sync.h" @@ -1355,6 +1356,42 @@ dict_table_set_corrupt_by_space( ulint space_id, ibool need_mutex); +/**********************************************************************//** +Compares the given foreign key identifier (the key in rb-tree) and the +foreign key identifier in the given fk object (value in rb-tree). +@return negative, 0, or positive if foreign_id is smaller, equal, +or greater than foreign_obj->id, respectively. */ +UNIV_INLINE +int +dict_foreign_rbt_cmp( +/*=================*/ + const void* foreign_id, /*!< in: the foreign key identifier + which is used as a key in rb-tree. */ + const void* foreign_obj); /*!< in: the foreign object itself + which is used as value in rb-tree. */ + +/**********************************************************************//** +Allocate the table->foreign_rbt, which stores all the foreign objects +that is available in table->foreign_list. +@return the allocated rbt object */ +UNIV_INLINE +ib_rbt_t* +dict_table_init_foreign_rbt( +/*========================*/ + dict_table_t* table); /*!< in: the table object whose + table->foreign_rbt will be initialized */ + +/**********************************************************************//** +Allocate the table->referened_rbt, which stores all the foreign objects +that is available in table->referenced_list. +@return the allocated rbt object */ +UNIV_INLINE +ib_rbt_t* +dict_table_init_referenced_rbt( +/*===========================*/ + dict_table_t* table); /*!< in: the table object whose + table->referenced_rbt will be initialized */ + #ifndef UNIV_NONINL #include "dict0dict.ic" #endif diff --git a/include/dict0dict.ic b/include/dict0dict.ic index 1d2eb34042d..00ae3d0a718 100644 --- a/include/dict0dict.ic +++ b/include/dict0dict.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 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 the Free Software @@ -958,3 +958,62 @@ dict_index_is_corrupted( } #endif /* !UNIV_HOTBACKUP */ +/**********************************************************************//** +Compares the given foreign key identifier (the key in rb-tree) and the +foreign key identifier in the given fk object (value in rb-tree). +@return negative, 0, or positive if foreign_id is smaller, equal, +or greater than foreign_obj->id, respectively. */ +UNIV_INLINE +int +dict_foreign_rbt_cmp( +/*=================*/ + const void* foreign_id, /*!< in: the foreign key identifier + which is used as a key in rb-tree. */ + const void* foreign_obj) /*!< in: the foreign object itself + which is used as value in rb-tree. */ +{ + return(ut_strcmp((const char*) foreign_id, + (*(dict_foreign_t**) foreign_obj)->id)); +} + +/**********************************************************************//** +Allocate the table->foreign_rbt, which stores all the foreign objects +that is available in table->foreign_list. The caller must hold the +dict_sys->mutex. +@return the allocated rbt object */ +UNIV_INLINE +ib_rbt_t* +dict_table_init_foreign_rbt( +/*========================*/ + dict_table_t* table) /*!< in: the table object whose + table->foreign_rbt will be initialized */ +{ + ut_a(table->foreign_rbt == NULL); + ut_ad(mutex_own(&(dict_sys->mutex))); + + table->foreign_rbt = rbt_create(sizeof(dict_foreign_t*), + dict_foreign_rbt_cmp); + ut_a(table->foreign_rbt != NULL); + return(table->foreign_rbt); +} + +/**********************************************************************//** +Allocate the table->referened_rbt, which stores all the foreign objects +that is available in table->referenced_list. The caller must hold the +dict_sys->mutex. +@return the allocated rbt object */ +UNIV_INLINE +ib_rbt_t* +dict_table_init_referenced_rbt( +/*===========================*/ + dict_table_t* table) /*!< in: the table object whose + table->referenced_rbt will be initialized */ +{ + ut_a(table->referenced_rbt == NULL); + ut_ad(mutex_own(&(dict_sys->mutex))); + + table->referenced_rbt = rbt_create(sizeof(dict_foreign_t*), + dict_foreign_rbt_cmp); + ut_a(table->referenced_rbt != NULL); + return(table->referenced_rbt); +} diff --git a/include/dict0load.h b/include/dict0load.h index 5bb015346ac..dcfa7847a8b 100644 --- a/include/dict0load.h +++ b/include/dict0load.h @@ -32,6 +32,7 @@ Created 4/24/1996 Heikki Tuuri #include "ut0byte.h" #include "mem0mem.h" #include "btr0types.h" +#include "ut0rbt.h" /** enum that defines all 6 system table IDs */ enum dict_system_table_id { @@ -344,6 +345,17 @@ dict_process_sys_stats_rec( ulint* key_cols, /*!< out: KEY_COLS */ ib_uint64_t* diff_vals, /*!< out: DIFF_VALS */ ib_uint64_t* non_null_vals); /*!< out: NON_NULL_VALS */ +/********************************************************************//** +Check if dict_table_t::foreign_rbt and dict_table::foreign_list +contains the same set of foreign key objects; and check if +dict_table_t::referenced_rbt and dict_table::referenced_list contains +the same set of foreign key objects. +@return TRUE if correct, FALSE otherwise. */ +ibool +dict_table_check_foreign_keys( +/*==========================*/ + const dict_table_t* table); /* in: table object to check */ + #ifndef UNIV_NONINL #include "dict0load.ic" #endif diff --git a/include/dict0mem.h b/include/dict0mem.h index 717c7532dc9..ba98eed7701 100644 --- a/include/dict0mem.h +++ b/include/dict0mem.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 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 the Free Software @@ -43,6 +43,7 @@ Created 1/8/1996 Heikki Tuuri #include "ut0byte.h" #include "hash0hash.h" #include "trx0types.h" +#include "ut0rbt.h" /** Type flags of an index: OR'ing of the flags is allowed to define a combination of types */ @@ -510,7 +511,6 @@ a foreign key constraint is enforced, therefore RESTRICT just means no flag */ #define DICT_FOREIGN_ON_UPDATE_NO_ACTION 32 /*!< ON UPDATE NO ACTION */ /* @} */ - /** Data structure for a database table. Most fields will be initialized to 0, NULL or FALSE in dict_mem_table_create(). */ struct dict_table_struct{ @@ -562,6 +562,14 @@ struct dict_table_struct{ UT_LIST_BASE_NODE_T(dict_foreign_t) referenced_list;/*!< list of foreign key constraints which refer to this table */ + + ib_rbt_t* foreign_rbt; /*!< a rb-tree of all foreign keys + listed in foreign_list, sorted by + foreign->id */ + ib_rbt_t* referenced_rbt; /*!< a rb-tree of all foreign keys + listed in referenced_list, sorted by + foreign->id */ + UT_LIST_NODE_T(dict_table_t) table_LRU; /*!< node of the LRU list of tables */ ulint n_mysql_handles_opened; diff --git a/include/log0log.h b/include/log0log.h index 9e5d0143e18..345b4327569 100644 --- a/include/log0log.h +++ b/include/log0log.h @@ -581,6 +581,18 @@ void log_mem_free(void); /*==============*/ +/****************************************************************//** +Safely reads the log_sys->tracked_lsn value. Uses atomic operations +if available, otherwise this field is protected with the log system +mutex. The writer counterpart function is log_set_tracked_lsn() in +log0online.c. + +@return log_sys->tracked_lsn value. */ +UNIV_INLINE +ib_uint64_t +log_get_tracked_lsn(void); +/*=====================*/ + extern log_t* log_sys; /* Values used as flags */ diff --git a/include/log0log.ic b/include/log0log.ic index 4a881b1a032..4331548da56 100644 --- a/include/log0log.ic +++ b/include/log0log.ic @@ -459,3 +459,24 @@ log_free_check(void) } } #endif /* !UNIV_HOTBACKUP */ + +/****************************************************************//** +Safely reads the log_sys->tracked_lsn value. Uses atomic operations +if available, otherwise this field is protected with the log system +mutex. The writer counterpart function is log_set_tracked_lsn() in +log0online.c. + +@return log_sys->tracked_lsn value. */ +UNIV_INLINE +ib_uint64_t +log_get_tracked_lsn(void) +/*=====================*/ +{ +#ifdef HAVE_ATOMIC_BUILTINS_64 + return os_atomic_increment_uint64(&log_sys->tracked_lsn, 0); +#else + ut_ad(mutex_own(&(log_sys->mutex))); + return log_sys->tracked_lsn; +#endif +} + diff --git a/include/univ.i b/include/univ.i index 5e017ee513a..4cf32af0474 100644 --- a/include/univ.i +++ b/include/univ.i @@ -64,7 +64,7 @@ component, i.e. we show M.N.P as M.N */ (INNODB_VERSION_MAJOR << 8 | INNODB_VERSION_MINOR) #ifndef PERCONA_INNODB_VERSION -#define PERCONA_INNODB_VERSION 35.2 +#define PERCONA_INNODB_VERSION 36.0 #endif #define INNODB_VERSION_STR MYSQL_SERVER_VERSION diff --git a/log/log0log.c b/log/log0log.c index 74bafa6d27a..ab0def5739c 100644 --- a/log/log0log.c +++ b/log/log0log.c @@ -214,25 +214,6 @@ log_buf_pool_get_oldest_modification(void) return(lsn); } -/****************************************************************//** -Safely reads the log_sys->tracked_lsn value. Uses atomic operations -if available, otherwise this field is protected with the log system -mutex. The writer counterpart function is log_set_tracked_lsn() in -log0online.c. - -@return log_sys->tracked_lsn value. */ -UNIV_INLINE -ib_uint64_t -log_get_tracked_lsn() -{ -#ifdef HAVE_ATOMIC_BUILTINS_64 - return os_atomic_increment_uint64(&log_sys->tracked_lsn, 0); -#else - ut_ad(mutex_own(&(log_sys->mutex))); - return log_sys->tracked_lsn; -#endif -} - /****************************************************************//** Checks if the log groups have a big enough margin of free space in so that a new log entry can be written without overwriting log data diff --git a/log/log0online.c b/log/log0online.c index d195a881348..58f86d1581a 100644 --- a/log/log0online.c +++ b/log/log0online.c @@ -1202,6 +1202,9 @@ log_online_write_bitmap(void) bmp_tree_node = (ib_rbt_node_t*) rbt_next(log_bmp_sys->modified_pages, bmp_tree_node); + + DBUG_EXECUTE_IF("bitmap_page_2_write_error", + DBUG_SET("+d,bitmap_page_write_error");); } rbt_reset(log_bmp_sys->modified_pages); @@ -1265,6 +1268,7 @@ log_online_follow_redo_log(void) /*********************************************************************//** Diagnose a bitmap file range setup failure and free the partially-initialized bitmap file range. */ +UNIV_COLD static void log_online_diagnose_inconsistent_dir( @@ -1444,26 +1448,30 @@ log_online_setup_bitmap_file_range( return FALSE; } -#ifdef UNIV_DEBUG - if (!bitmap_files->files[0].seq_num) { + if (!bitmap_files->files[0].seq_num + || bitmap_files->files[0].seq_num != first_file_seq_num) { log_online_diagnose_inconsistent_dir(bitmap_files); return FALSE; } - ut_ad(bitmap_files->files[0].seq_num == first_file_seq_num); + { size_t i; for (i = 1; i < bitmap_files->count; i++) { if (!bitmap_files->files[i].seq_num) { break; } - ut_ad(bitmap_files->files[i].seq_num - > bitmap_files->files[i - 1].seq_num); - ut_ad(bitmap_files->files[i].start_lsn - >= bitmap_files->files[i - 1].start_lsn); + if ((bitmap_files->files[i].seq_num + <= bitmap_files->files[i - 1].seq_num) + || (bitmap_files->files[i].start_lsn + < bitmap_files->files[i - 1].start_lsn)) { + + log_online_diagnose_inconsistent_dir( + bitmap_files); + return FALSE; + } } } -#endif return TRUE; } @@ -1590,6 +1598,17 @@ log_online_bitmap_iterator_init( { ut_a(i); + if (UNIV_UNLIKELY(min_lsn > max_lsn)) { + + /* Empty range */ + i->in_files.count = 0; + i->in_files.files = NULL; + i->in.file = os_file_invalid; + i->page = NULL; + i->failed = FALSE; + return TRUE; + } + if (!log_online_setup_bitmap_file_range(&i->in_files, min_lsn, max_lsn)) { -- cgit v1.2.1 From 7989c62bc0c4b74f866367cc9337444913178a0d Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 7 Oct 2014 10:53:06 +0200 Subject: post-merge fixes --- mysql-test/suite/innodb/r/foreign-keys.result | 4 ++-- mysql-test/suite/innodb/t/foreign-keys.test | 9 +++++++-- mysql-test/t/log_errchk.test | 1 - 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/mysql-test/suite/innodb/r/foreign-keys.result b/mysql-test/suite/innodb/r/foreign-keys.result index be8d27b152c..53ddf618244 100644 --- a/mysql-test/suite/innodb/r/foreign-keys.result +++ b/mysql-test/suite/innodb/r/foreign-keys.result @@ -5,8 +5,8 @@ CREATE TABLE `department` (`department_id` INT, `department_people_fk` INT, PRIMARY KEY (`department_id`)) engine=innodb; CREATE TABLE `title` (`title_id` INT, `title_manager_fk` INT, -`title_reporter_fk` INT, PRIMARY KEY (`title_id`)); -CREATE TABLE `people` (`people_id` INT, PRIMARY KEY (`people_id`)); +`title_reporter_fk` INT, PRIMARY KEY (`title_id`)) engine=innodb; +CREATE TABLE `people` (`people_id` INT, PRIMARY KEY (`people_id`)) engine=innodb; ALTER TABLE `department` ADD FOREIGN KEY (`department_people_fk`) REFERENCES `people` (`people_id`); ALTER TABLE `title` ADD FOREIGN KEY (`title_manager_fk`) REFERENCES `people` diff --git a/mysql-test/suite/innodb/t/foreign-keys.test b/mysql-test/suite/innodb/t/foreign-keys.test index 45642cf28a7..8ee96347208 100644 --- a/mysql-test/suite/innodb/t/foreign-keys.test +++ b/mysql-test/suite/innodb/t/foreign-keys.test @@ -1,6 +1,11 @@ --source include/have_innodb.inc --source include/have_debug.inc +if (`select plugin_auth_version <= "5.5.39-MariaDB-36.0" from information_schema.plugins where plugin_name='innodb'`) +{ + --skip Not fixed in XtraDB as of 5.5.39-MariaDB-36.0 or earlier +} + --echo # --echo # Bug #19471516 SERVER CRASHES WHEN EXECUTING ALTER TABLE --echo # ADD FOREIGN KEY @@ -10,9 +15,9 @@ CREATE TABLE `department` (`department_id` INT, `department_people_fk` INT, PRIMARY KEY (`department_id`)) engine=innodb; CREATE TABLE `title` (`title_id` INT, `title_manager_fk` INT, -`title_reporter_fk` INT, PRIMARY KEY (`title_id`)); +`title_reporter_fk` INT, PRIMARY KEY (`title_id`)) engine=innodb; -CREATE TABLE `people` (`people_id` INT, PRIMARY KEY (`people_id`)); +CREATE TABLE `people` (`people_id` INT, PRIMARY KEY (`people_id`)) engine=innodb; ALTER TABLE `department` ADD FOREIGN KEY (`department_people_fk`) REFERENCES `people` (`people_id`); diff --git a/mysql-test/t/log_errchk.test b/mysql-test/t/log_errchk.test index 6a213fa3cee..e4bc6a841dd 100644 --- a/mysql-test/t/log_errchk.test +++ b/mysql-test/t/log_errchk.test @@ -1,6 +1,5 @@ # --source include/not_windows.inc ---source include/force_restart.inc --source include/not_embedded.inc # -- cgit v1.2.1 From d2e808025aec75fbb0ee37935a862d137a03a9c3 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 7 Oct 2014 10:53:43 +0200 Subject: fixes for decimal type --- mysql-test/r/type_newdecimal.result | 6 ++++++ mysql-test/t/type_newdecimal.test | 9 +++++++++ strings/decimal.c | 6 +++++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result index 7e030591fcd..1730ef152e3 100644 --- a/mysql-test/r/type_newdecimal.result +++ b/mysql-test/r/type_newdecimal.result @@ -1988,3 +1988,9 @@ SELECT d1 * d2 FROM t1; d1 * d2 0 DROP TABLE t1; +select 0.000000000000000000000000000000000000000000000000001 mod 1; +0.000000000000000000000000000000000000000000000000001 mod 1 +0.000000000000000000000000000000 +select 0.0000000001 mod 1; +0.0000000001 mod 1 +0.0000000001 diff --git a/mysql-test/t/type_newdecimal.test b/mysql-test/t/type_newdecimal.test index bf7e3794a19..5dcbfa15c2f 100644 --- a/mysql-test/t/type_newdecimal.test +++ b/mysql-test/t/type_newdecimal.test @@ -1570,3 +1570,12 @@ SELECT d1 * d2 FROM t1; DROP TABLE t1; +# +# Test for Bug#18469276: MOD FOR SMALL DECIMALS FAILS +# +select 0.000000000000000000000000000000000000000000000000001 mod 1; + +# +# incorrect result +# +select 0.0000000001 mod 1; diff --git a/strings/decimal.c b/strings/decimal.c index 49b12f14dbf..8d6877a24ec 100644 --- a/strings/decimal.c +++ b/strings/decimal.c @@ -127,7 +127,6 @@ typedef longlong dec2; #define DIG_BASE 1000000000 #define DIG_MAX (DIG_BASE-1) #define DIG_BASE2 ((dec2)DIG_BASE * (dec2)DIG_BASE) -#define ROUND_UP(X) (((X)+DIG_PER_DEC1-1)/DIG_PER_DEC1) static const dec1 powers10[DIG_PER_DEC1+1]={ 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000}; static const int dig2bytes[DIG_PER_DEC1+1]={0, 1, 1, 2, 2, 3, 3, 4, 4, 4}; @@ -136,6 +135,11 @@ static const dec1 frac_max[DIG_PER_DEC1-1]={ 999900000, 999990000, 999999000, 999999900, 999999990 }; +static inline int ROUND_UP(int x) +{ + return (x + (x > 0 ? 1 : -1) * (DIG_PER_DEC1 - 1)) / DIG_PER_DEC1; +} + #ifdef HAVE_valgrind #define sanity(d) DBUG_ASSERT((d)->len > 0) #else -- cgit v1.2.1 From e5bc21af37c7dc6f388fb89f27f812713d088aa5 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 7 Oct 2014 10:54:14 +0200 Subject: MDEV-4813 Replication fails on updating a MEMORY table with an index using btree skip NULL VARCHAR key parts like it's done elsewhere --- mysql-test/suite/heap/btree_varchar_null.result | 6 ++++++ mysql-test/suite/heap/btree_varchar_null.test | 7 +++++++ storage/heap/hp_hash.c | 5 +++++ 3 files changed, 18 insertions(+) create mode 100644 mysql-test/suite/heap/btree_varchar_null.result create mode 100644 mysql-test/suite/heap/btree_varchar_null.test diff --git a/mysql-test/suite/heap/btree_varchar_null.result b/mysql-test/suite/heap/btree_varchar_null.result new file mode 100644 index 00000000000..9199cf6ef7d --- /dev/null +++ b/mysql-test/suite/heap/btree_varchar_null.result @@ -0,0 +1,6 @@ +create table t1 (f1 varchar(128), f2 varchar(128), key (f2,f1) using btree) engine=memory; +insert into t1 values (null,'not'),('one',null),('two',null),('three',''); +select * from t1 where f1 = 'one' and f2 is null; +f1 f2 +one NULL +drop table t1; diff --git a/mysql-test/suite/heap/btree_varchar_null.test b/mysql-test/suite/heap/btree_varchar_null.test new file mode 100644 index 00000000000..8e6625a2bfa --- /dev/null +++ b/mysql-test/suite/heap/btree_varchar_null.test @@ -0,0 +1,7 @@ +# +# MDEV-4813 Replication fails on updating a MEMORY table with an index using btree +# +create table t1 (f1 varchar(128), f2 varchar(128), key (f2,f1) using btree) engine=memory; +insert into t1 values (null,'not'),('one',null),('two',null),('three',''); +select * from t1 where f1 = 'one' and f2 is null; +drop table t1; diff --git a/storage/heap/hp_hash.c b/storage/heap/hp_hash.c index 2abed55459c..2d4c0e9a031 100644 --- a/storage/heap/hp_hash.c +++ b/storage/heap/hp_hash.c @@ -876,8 +876,13 @@ uint hp_rb_pack_key(HP_KEYDEF *keydef, uchar *key, const uchar *old, if (seg->null_bit) { if (!(*key++= (char) 1 - *old++)) + { + /* Add key pack length (2) to key for VARCHAR segments */ + if (seg->type == HA_KEYTYPE_VARTEXT1) + old+= 2; continue; } + } if (seg->flag & HA_SWAP_KEY) { uint length= seg->length; -- cgit v1.2.1 From fc58ba6c76ef752e859146fefc9e6fbc564ab900 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 7 Oct 2014 11:55:39 +0200 Subject: MDEV-5553 A view or procedure with a non existing definer can block "SHOW TABLE STATUS" with an unclear error message Don't double-check privileges for a column in the GROUP BY that refers to the same column in SELECT clause. Privileges were already checked for SELECT clause. --- mysql-test/r/show_bad_definer-5553.result | 13 +++++++++++++ mysql-test/t/show_bad_definer-5553.test | 11 +++++++++++ sql/sql_select.cc | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 mysql-test/r/show_bad_definer-5553.result create mode 100644 mysql-test/t/show_bad_definer-5553.test diff --git a/mysql-test/r/show_bad_definer-5553.result b/mysql-test/r/show_bad_definer-5553.result new file mode 100644 index 00000000000..a1b8c6a7410 --- /dev/null +++ b/mysql-test/r/show_bad_definer-5553.result @@ -0,0 +1,13 @@ +create database mysqltest1; +use mysqltest1; +create table t1(id int primary key); +create definer=unknownuser@'%' sql security definer view v1 as select t1.id from t1 group by t1.id; +Warnings: +Note 1449 The user specified as a definer ('unknownuser'@'%') does not exist +show table status; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +t1 MyISAM 10 Fixed 0 0 0 # 1024 0 NULL # # NULL latin1_swedish_ci NULL +v1 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # NULL NULL NULL NULL VIEW +Warnings: +Note 1449 The user specified as a definer ('unknownuser'@'%') does not exist +drop database mysqltest1; diff --git a/mysql-test/t/show_bad_definer-5553.test b/mysql-test/t/show_bad_definer-5553.test new file mode 100644 index 00000000000..865408eadd7 --- /dev/null +++ b/mysql-test/t/show_bad_definer-5553.test @@ -0,0 +1,11 @@ +# +# MDEV-5553 A view or procedure with a non existing definer can block "SHOW TABLE STATUS" with an unclear error message +# + +create database mysqltest1; # all-open privileges on test db desroy the test +use mysqltest1; +create table t1(id int primary key); +create definer=unknownuser@'%' sql security definer view v1 as select t1.id from t1 group by t1.id; +--replace_column 8 # 12 # 13 # +show table status; +drop database mysqltest1; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index af2b489c8b6..3b960d457a7 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -20458,7 +20458,7 @@ find_order_in_list(THD *thd, Item **ref_pointer_array, TABLE_LIST *tables, order_item_type == Item::REF_ITEM) { from_field= find_field_in_tables(thd, (Item_ident*) order_item, tables, - NULL, &view_ref, IGNORE_ERRORS, TRUE, + NULL, &view_ref, IGNORE_ERRORS, FALSE, FALSE); if (!from_field) from_field= (Field*) not_found_field; -- cgit v1.2.1 From e73e1e7c7ac04295571a2f54872cacb2d580f4ae Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 7 Oct 2014 16:21:53 +0200 Subject: packaging issues: * skip debian 44_scripts__mysql_config__libs.dpatch it does not apply anymore (and anyway it would not work for a static library) * fix the path for install(mariadb.pc) --- debian/patches/00list | 2 +- support-files/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/patches/00list b/debian/patches/00list index 77c159a17ed..943980cdcea 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -5,7 +5,7 @@ 33_scripts__mysql_create_system_tables__no_test.dpatch 38_scripts__mysqld_safe.sh__signals.dpatch 41_scripts__mysql_install_db.sh__no_test.dpatch -44_scripts__mysql_config__libs.dpatch +# 44_scripts__mysql_config__libs.dpatch 50_mysql-test__db_test.dpatch # 60_zlib_innodb_workaround.dpatch 61_replace_dash_with_bash_mbug675185.dpatch diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt index 0f1855c66ca..c974b7cb7dd 100644 --- a/support-files/CMakeLists.txt +++ b/support-files/CMakeLists.txt @@ -71,7 +71,7 @@ IF(UNIX) ENDIF() CONFIGURE_FILE(mariadb.pc.in ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc @ONLY) - INSTALL(FILES mariadb.pc DESTINATION ${INSTALL_SHAREDIR}/pkgconfig COMPONENT Development) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_SHAREDIR}/pkgconfig COMPONENT Development) INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development) CONFIGURE_FILE(MySQL-shared-compat.spec.sh ${CMAKE_CURRENT_BINARY_DIR}/MySQL-shared-compat.spec @ONLY) -- cgit v1.2.1 From 63ca157c92e18e559db7032bc867362f5ec64a7b Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 7 Oct 2014 19:38:45 +0200 Subject: MDEV-6781: bug with query cache when using views The data base lenth passed to invalidator fixed --- sql/sql_cache.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index e6a795ba56e..ad0472cfc2c 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -3280,7 +3280,7 @@ Query_cache::register_tables_from_list(THD *thd, TABLE_LIST *tables_used, There are not callback function for for VIEWs */ if (!insert_table(key_length, key, (*block_table), - tables_used->view_db.length + 1, + tables_used->view_db.length, HA_CACHE_TBL_NONTRANSACT, 0, 0, TRUE)) DBUG_RETURN(0); /* -- cgit v1.2.1 From ef7d950e04db599b0880727080bebb3cb48b963a Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 7 Oct 2014 21:41:48 +0200 Subject: percona-server-5.5.40-36.1 --- buf/buf0buf.c | 1 + dict/dict0dict.c | 15 +++++++++++++++ include/univ.i | 2 +- row/row0ins.c | 12 +----------- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/buf/buf0buf.c b/buf/buf0buf.c index 0ae49b180e5..f86e4ad4a19 100644 --- a/buf/buf0buf.c +++ b/buf/buf0buf.c @@ -4005,6 +4005,7 @@ corrupt: " because of" " a corrupt database page.\n", stderr); + ut_error; } } diff --git a/dict/dict0dict.c b/dict/dict0dict.c index 5a49dbb9e92..67fb427ecf8 100644 --- a/dict/dict0dict.c +++ b/dict/dict0dict.c @@ -1130,6 +1130,11 @@ dict_table_rename_in_cache( /* The id will be changed. So remove old one */ rbt_delete(foreign->foreign_table->foreign_rbt, foreign->id); + if (foreign->referenced_table) { + rbt_delete(foreign->referenced_table->referenced_rbt, + foreign->id); + } + if (ut_strlen(foreign->foreign_table_name) < ut_strlen(table->name)) { /* Allocate a longer name buffer; @@ -1280,6 +1285,11 @@ dict_table_rename_in_cache( rbt_insert(foreign->foreign_table->foreign_rbt, foreign->id, &foreign); + if (foreign->referenced_table) { + rbt_insert(foreign->referenced_table->referenced_rbt, + foreign->id, &foreign); + } + foreign = UT_LIST_GET_NEXT(foreign_list, foreign); } @@ -5910,6 +5920,11 @@ dict_find_table_by_space( ut_ad(space_id > 0); + if (dict_sys == NULL) { + /* This could happen when it's in redo processing. */ + return(NULL); + } + table = UT_LIST_GET_FIRST(dict_sys->table_LRU); num_item = UT_LIST_GET_LEN(dict_sys->table_LRU); diff --git a/include/univ.i b/include/univ.i index 4cf32af0474..d38773d5b59 100644 --- a/include/univ.i +++ b/include/univ.i @@ -64,7 +64,7 @@ component, i.e. we show M.N.P as M.N */ (INNODB_VERSION_MAJOR << 8 | INNODB_VERSION_MINOR) #ifndef PERCONA_INNODB_VERSION -#define PERCONA_INNODB_VERSION 36.0 +#define PERCONA_INNODB_VERSION 36.1 #endif #define INNODB_VERSION_STR MYSQL_SERVER_VERSION diff --git a/row/row0ins.c b/row/row0ins.c index 6548e6abba9..97a4fb0767f 100644 --- a/row/row0ins.c +++ b/row/row0ins.c @@ -1714,7 +1714,7 @@ row_ins_scan_sec_index_for_duplicate( do { const rec_t* rec = btr_pcur_get_rec(&pcur); const buf_block_t* block = btr_pcur_get_block(&pcur); - ulint lock_type; + const ulint lock_type = LOCK_ORDINARY; if (page_rec_is_infimum(rec)) { @@ -1724,16 +1724,6 @@ row_ins_scan_sec_index_for_duplicate( offsets = rec_get_offsets(rec, index, offsets, ULINT_UNDEFINED, &heap); - /* If the transaction isolation level is no stronger than - READ COMMITTED, then avoid gap locks. */ - if (!page_rec_is_supremum(rec) - && thr_get_trx(thr)->isolation_level - <= TRX_ISO_READ_COMMITTED) { - lock_type = LOCK_REC_NOT_GAP; - } else { - lock_type = LOCK_ORDINARY; - } - if (allow_duplicates) { /* If the SQL-query will update or replace -- cgit v1.2.1 From d3677c872f2d7d807dffbf8cd4aaa8fb6d7723a4 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 8 Oct 2014 00:45:41 +0200 Subject: jemalloc compatibility --- include/my_bitmap.h | 1 + sql/mysqld.cc | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/my_bitmap.h b/include/my_bitmap.h index 06f43f79df8..7bed045bd86 100644 --- a/include/my_bitmap.h +++ b/include/my_bitmap.h @@ -42,6 +42,7 @@ typedef struct st_bitmap extern "C" { #endif extern void create_last_word_mask(MY_BITMAP *map); +#define bitmap_init(A,B,C,D) my_bitmap_init(A,B,C,D) extern my_bool 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); diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 09b0b0baf28..52b56f121c5 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -363,7 +363,8 @@ static DYNAMIC_ARRAY all_options; /* Global variables */ bool opt_bin_log, opt_bin_log_used=0, opt_ignore_builtin_innodb= 0; -my_bool opt_log, opt_slow_log, debug_assert_if_crashed_table= 0, opt_help= 0, opt_abort; +my_bool opt_log, opt_slow_log, debug_assert_if_crashed_table= 0, opt_help= 0; +static my_bool opt_abort; ulonglong log_output_options; my_bool opt_userstat_running; my_bool opt_log_queries_not_using_indexes= 0; -- cgit v1.2.1 From c1a4f0c5ab4ceef28900c1bd0a899ccad5725d8b Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 8 Oct 2014 00:45:56 +0200 Subject: include mariadb.pc in debian builds --- debian/libmariadbclient-dev.files | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/libmariadbclient-dev.files b/debian/libmariadbclient-dev.files index 8f56a3065d5..a7595dceffd 100644 --- a/debian/libmariadbclient-dev.files +++ b/debian/libmariadbclient-dev.files @@ -4,4 +4,5 @@ usr/lib/libmysqlclient.a usr/lib/libmysqlclient_r.a usr/lib/libmysqlservices.a usr/share/aclocal/mysql.m4 +usr/share/pkgconfig/mariadb.pc usr/share/man/man1/mysql_config.1 -- cgit v1.2.1 From 104771de9a6fe9ef1b02224d0c1a81178a326121 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 8 Oct 2014 00:46:10 +0200 Subject: decimal: *correct* implementation of ROUND_UP at last --- mysql-test/r/type_newdecimal.result | 3 +++ mysql-test/t/type_newdecimal.test | 2 ++ strings/decimal.c | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result index 1730ef152e3..3cd5028f858 100644 --- a/mysql-test/r/type_newdecimal.result +++ b/mysql-test/r/type_newdecimal.result @@ -1994,3 +1994,6 @@ select 0.000000000000000000000000000000000000000000000000001 mod 1; select 0.0000000001 mod 1; 0.0000000001 mod 1 0.0000000001 +select 0.01 mod 1; +0.01 mod 1 +0.01 diff --git a/mysql-test/t/type_newdecimal.test b/mysql-test/t/type_newdecimal.test index 5dcbfa15c2f..bb5a61d84ec 100644 --- a/mysql-test/t/type_newdecimal.test +++ b/mysql-test/t/type_newdecimal.test @@ -1579,3 +1579,5 @@ select 0.000000000000000000000000000000000000000000000000001 mod 1; # incorrect result # select 0.0000000001 mod 1; +select 0.01 mod 1; + diff --git a/strings/decimal.c b/strings/decimal.c index 8d6877a24ec..07ccc537e47 100644 --- a/strings/decimal.c +++ b/strings/decimal.c @@ -137,7 +137,7 @@ static const dec1 frac_max[DIG_PER_DEC1-1]={ static inline int ROUND_UP(int x) { - return (x + (x > 0 ? 1 : -1) * (DIG_PER_DEC1 - 1)) / DIG_PER_DEC1; + return (x + (x > 0 ? DIG_PER_DEC1 - 1 : 0)) / DIG_PER_DEC1; } #ifdef HAVE_valgrind -- cgit v1.2.1 From 9329467e7941c6cc4b3a266ac2fc6ec4254eaf46 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 8 Oct 2014 09:24:41 +0200 Subject: don't run privilege checking tests in embedded --- mysql-test/t/show_bad_definer-5553.test | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/t/show_bad_definer-5553.test b/mysql-test/t/show_bad_definer-5553.test index 865408eadd7..c5b6f1b3d10 100644 --- a/mysql-test/t/show_bad_definer-5553.test +++ b/mysql-test/t/show_bad_definer-5553.test @@ -1,3 +1,4 @@ +--source include/not_embedded.inc # # MDEV-5553 A view or procedure with a non existing definer can block "SHOW TABLE STATUS" with an unclear error message # -- cgit v1.2.1 From dbda20caffbb22115b6f30069b716bc505c49d11 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 8 Oct 2014 09:35:00 +0200 Subject: remove mariadb.pc file again, it cannot be added in a GA version --- .bzrignore | 1 - CMakeLists.txt | 10 +---- cmake/cpack_rpm.cmake | 6 +-- cmake/for_clients.cmake | 77 --------------------------------------- debian/libmariadbclient-dev.files | 1 - debian/patches/00list | 2 +- scripts/CMakeLists.txt | 51 ++++++++++++++++++++++++++ scripts/mysql_config.sh | 55 +++++++++++++++++++++++++--- support-files/CMakeLists.txt | 3 -- support-files/mariadb.pc.in | 23 ------------ 10 files changed, 107 insertions(+), 122 deletions(-) delete mode 100644 cmake/for_clients.cmake delete mode 100644 support-files/mariadb.pc.in diff --git a/.bzrignore b/.bzrignore index 0b649dc213d..522630264ec 100644 --- a/.bzrignore +++ b/.bzrignore @@ -1169,4 +1169,3 @@ storage/tokudb/ft-index/tools/tokudb_dump storage/tokudb/ft-index/tools/tokuftdump libmysql/libmysql_versions.ld scripts/mysql_config.pl -support-files/mariadb.pc diff --git a/CMakeLists.txt b/CMakeLists.txt index 73db131454f..375f6bb64bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,10 +85,6 @@ ELSE() ENDIF() PROJECT(${MYSQL_PROJECT_NAME}) -SET(CPACK_PACKAGE_NAME "MariaDB") -SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MariaDB: a very fast and robust SQL database server") -SET(CPACK_PACKAGE_URL "http://mariadb.org") - IF(BUILD_CONFIG) INCLUDE( ${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake) @@ -414,7 +410,9 @@ ADD_SUBDIRECTORY(libmysql) ADD_SUBDIRECTORY(client) ADD_SUBDIRECTORY(extra) ADD_SUBDIRECTORY(libservices) +ADD_SUBDIRECTORY(scripts) ADD_SUBDIRECTORY(sql/share) +ADD_SUBDIRECTORY(support-files) IF(NOT WITHOUT_SERVER) ADD_SUBDIRECTORY(tests) @@ -448,10 +446,6 @@ IF(WIN32) ENDIF() ADD_SUBDIRECTORY(packaging/solaris) -INCLUDE(for_clients) -ADD_SUBDIRECTORY(scripts) -ADD_SUBDIRECTORY(support-files) - CONFIGURE_FILE(config.h.cmake ${CMAKE_BINARY_DIR}/include/my_config.h) CONFIGURE_FILE(config.h.cmake ${CMAKE_BINARY_DIR}/include/config.h) CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql_version.h.in diff --git a/cmake/cpack_rpm.cmake b/cmake/cpack_rpm.cmake index 1d0feced561..30924120526 100644 --- a/cmake/cpack_rpm.cmake +++ b/cmake/cpack_rpm.cmake @@ -27,15 +27,15 @@ SET(CPACK_COMPONENTS_ALL Server ManPagesServer IniFiles Server_Scripts ManPagesTest Readme ManPagesClient Test Common Client SharedLibraries) -SET(CPACK_RPM_PACKAGE_NAME ${CPACK_PACKAGE_NAME}) +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%{?dist}") SET(CPACK_RPM_PACKAGE_LICENSE "GPL") SET(CPACK_RPM_PACKAGE_RELOCATABLE FALSE) SET(CPACK_RPM_PACKAGE_GROUP "Applications/Databases") -SET(CPACK_RPM_PACKAGE_SUMMARY ${CPACK_PACKAGE_SUMMARY}) -SET(CPACK_RPM_PACKAGE_URL ${CPACK_PACKAGE_URL}) +SET(CPACK_RPM_PACKAGE_URL "http://mariadb.org") +SET(CPACK_RPM_PACKAGE_SUMMARY "MariaDB: a very fast and robust SQL database server") SET(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_RPM_PACKAGE_SUMMARY} It is GPL v2 licensed, which means you can use the it free of charge under the diff --git a/cmake/for_clients.cmake b/cmake/for_clients.cmake deleted file mode 100644 index 7667e59e8f6..00000000000 --- a/cmake/for_clients.cmake +++ /dev/null @@ -1,77 +0,0 @@ -# -# Generate LIBS and CFLAGS that third-party clients should use -# - -# Use cmake variables to inspect dependencies for -# mysqlclient library (add -l stuff) -SET(CLIENT_LIBS "") -SET(LIBS "") - -# Avoid compatibility warning about lists with empty elements -IF(POLICY CMP0011) - CMAKE_POLICY(SET CMP0011 NEW) -ENDIF() -IF(POLICY CMP0007) - CMAKE_POLICY(SET CMP0007 OLD) -ENDIF() - -# Extract dependencies using CMake's internal ${target}_LIB_DEPENDS variable -# returned string in ${var} is can be passed to linker's command line -MACRO(EXTRACT_LINK_LIBRARIES target var) - IF(${target}_LIB_DEPENDS) - LIST(REMOVE_ITEM ${target}_LIB_DEPENDS "") - LIST(REMOVE_DUPLICATES ${target}_LIB_DEPENDS) - FOREACH(lib ${${target}_LIB_DEPENDS}) - # Filter out "general", it is not a library, just CMake hint - # Also, remove duplicates - IF(NOT lib STREQUAL "general" AND NOT ${var} MATCHES "-l${lib} ") - IF (lib MATCHES "^\\-l") - SET(${var} "${${var}} ${lib} ") - ELSEIF(lib MATCHES "^/") - IF (lib MATCHES "\\.(a|so([0-9.]*)|lib|dll|dylib)$") - # Full path, convert to just filename, strip "lib" prefix and extension - GET_FILENAME_COMPONENT(lib "${lib}" NAME_WE) - STRING(REGEX REPLACE "^lib" "" lib "${lib}") - SET(${var} "${${var}}-l${lib} " ) - ENDIF() - ELSE() - SET(${var} "${${var}}-l${lib} " ) - ENDIF() - ENDIF() - ENDFOREACH() - ENDIF() - IF(MSVC) - STRING(REPLACE "-l" "" ${var} "${${var}}") - ENDIF() -ENDMACRO() - -EXTRACT_LINK_LIBRARIES(mysqlclient LIBS) -EXTRACT_LINK_LIBRARIES(mysqlserver EMB_LIBS) - -SET(LIBS "-lmysqlclient ${ZLIB_DEPS} ${LIBS} ${openssl_libs}") -SET(EMB_LIBS "-lmysqld ${ZLIB_DEPS} ${EMB_LIBS} ${openssl_libs}") - -MACRO(REPLACE_FOR_CLIENTS VAR) - SET(v " ${${VAR}} ") - FOREACH(del ${ARGN}) - STRING(REGEX REPLACE " -(${del}) " " " v ${v}) - ENDFOREACH(del) - STRING(REGEX REPLACE " +" " " v ${v}) - STRING(STRIP "${v}" ${VAR}_FOR_CLIENTS) -ENDMACRO() - -# Remove some options that a client doesn't have to care about -# FIXME until we have a --cxxflags, we need to remove -Xa -# and -xstrconst to make --cflags usable for Sun Forte C++ -# FIXME until we have a --cxxflags, we need to remove -AC99 -# to make --cflags usable for HP C++ (aCC) -REPLACE_FOR_CLIENTS(CFLAGS "[DU]DBUG_OFF" "[DU]SAFE_MUTEX" "[DU]NDEBUG" - "[DU]UNIV_MUST_NOT_INLINE" "[DU]FORCE_INIT_OF_VARS" "[DU]EXTRA_DEBUG" "[DU]HAVE_valgrind" - "O" "O[0-9]" "xO[0-9]" "W[-A-Za-z]*" "mtune=[-A-Za-z0-9]*" "g" "fPIC" - "mcpu=[-A-Za-z0-9]*" "unroll2" "ip" "mp" "march=[-A-Za-z0-9]*" "Xa" - "xstrconst" "xc99=none" "AC99" "restrict") - -# Same for --libs -REPLACE_FOR_CLIENTS(LIBS lmtmalloc static-libcxa i-static static-intel) -REPLACE_FOR_CLIENTS(EMB_LIBS lmtmalloc static-libcxa i-static static-intel) - diff --git a/debian/libmariadbclient-dev.files b/debian/libmariadbclient-dev.files index a7595dceffd..8f56a3065d5 100644 --- a/debian/libmariadbclient-dev.files +++ b/debian/libmariadbclient-dev.files @@ -4,5 +4,4 @@ usr/lib/libmysqlclient.a usr/lib/libmysqlclient_r.a usr/lib/libmysqlservices.a usr/share/aclocal/mysql.m4 -usr/share/pkgconfig/mariadb.pc usr/share/man/man1/mysql_config.1 diff --git a/debian/patches/00list b/debian/patches/00list index 943980cdcea..77c159a17ed 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -5,7 +5,7 @@ 33_scripts__mysql_create_system_tables__no_test.dpatch 38_scripts__mysqld_safe.sh__signals.dpatch 41_scripts__mysql_install_db.sh__no_test.dpatch -# 44_scripts__mysql_config__libs.dpatch +44_scripts__mysql_config__libs.dpatch 50_mysql-test__db_test.dpatch # 60_zlib_innodb_workaround.dpatch 61_replace_dash_with_bash_mbug675185.dpatch diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 89a9f40a356..7fb57802685 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -245,6 +245,57 @@ ELSE() SET(TARGET_LINUX "false") ENDIF() +# Use cmake variables to inspect dependencies for +# mysqlclient library (add -l stuff) +SET(CLIENT_LIBS "") +SET(LIBS "") + +# Avoid compatibility warning about lists with empty elements +IF(POLICY CMP0011) + CMAKE_POLICY(SET CMP0011 NEW) +ENDIF() +IF(POLICY CMP0007) + CMAKE_POLICY(SET CMP0007 OLD) +ENDIF() + +# Extract dependencies using CMake's internal ${target}_LIB_DEPENDS variable +# returned string in ${var} is can be passed to linker's command line +MACRO(EXTRACT_LINK_LIBRARIES target var) + IF(${target}_LIB_DEPENDS) + LIST(REMOVE_ITEM ${target}_LIB_DEPENDS "") + LIST(REMOVE_DUPLICATES ${target}_LIB_DEPENDS) + FOREACH(lib ${${target}_LIB_DEPENDS}) + # Filter out "general", it is not a library, just CMake hint + # Also, remove duplicates + IF(NOT lib STREQUAL "general" AND NOT ${var} MATCHES "-l${lib} ") + IF (lib MATCHES "^\\-l") + SET(${var} "${${var}} ${lib} ") + ELSEIF(lib MATCHES "^/") + IF (lib MATCHES "\\.(a|so([0-9.]*)|lib|dll|dylib)$") + # Full path, convert to just filename, strip "lib" prefix and extension + GET_FILENAME_COMPONENT(lib "${lib}" NAME_WE) + STRING(REGEX REPLACE "^lib" "" lib "${lib}") + SET(${var} "${${var}}-l${lib} " ) + ENDIF() + ELSE() + SET(${var} "${${var}}-l${lib} " ) + ENDIF() + ENDIF() + ENDFOREACH() + ENDIF() + IF(MSVC) + STRING(REPLACE "-l" "" ${var} "${${var}}") + ENDIF() +ENDMACRO() + +EXTRACT_LINK_LIBRARIES(mysqlclient CLIENT_LIBS) +EXTRACT_LINK_LIBRARIES(mysqlserver LIBS) + +# mysql_config evaluates ${LIBDL}, we want to avoid it +# as our CLIENT_LIBS and LIBS are already correct +SET(LIBDL) + +SET(NON_THREADED_LIBS ${CLIENT_LIBS}) SET(mysql_config_COMPONENT COMPONENT Development) SET(msql2mysql_COMPONENT COMPONENT Client) SET(mysqlaccess_COMPONENT COMPONENT Client) diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh index b742b28484d..e4640961b34 100644 --- a/scripts/mysql_config.sh +++ b/scripts/mysql_config.sh @@ -97,6 +97,7 @@ fix_path pkgincludedir include/mysql version='@VERSION@' socket='@MYSQL_UNIX_ADDR@' +ldflags='@LDFLAGS@' if [ @MYSQL_TCP_PORT_DEFAULT@ -eq 0 ]; then port=0 @@ -105,14 +106,58 @@ else fi # Create options -libs="-L$pkglibdir @RPATH_OPTION@ @LIBS_FOR_CLIENTS@" -embedded_libs="-L$pkglibdir @RPATH_OPTION@ @EMB_LIBS_FOR_CLIENTS@" +# We intentionally add a space to the beginning and end of lib strings, simplifies replace later +libs=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@" +libs="$libs @openssl_libs@ @STATIC_NSS_FLAGS@ " +libs_r=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqlclient_r @ZLIB_DEPS@ @CLIENT_LIBS@ @openssl_libs@ " +embedded_libs=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqld @LIBDL@ @ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @openssl_libs@ " + +if [ -r "$pkglibdir/libmygcc.a" ]; then + # When linking against the static library with a different version of GCC + # from what was used to compile the library, some symbols may not be defined + # automatically. We package the libmygcc.a from the build host, to provide + # definitions for those. Bugs 4921, 19561, 19817, 21158, etc. + libs="$libs -lmygcc " + libs_r="$libs_r -lmygcc " + embedded_libs="$embedded_libs -lmygcc " +fi include="-I$pkgincludedir" if [ "$basedir" != "/usr" ]; then include="$include -I$pkgincludedir/.." fi -cflags="$include @CFLAGS_FOR_CLIENTS@" +cflags="$include @CFLAGS@ " #note: end space! + +# Remove some options that a client doesn't have to care about +# FIXME until we have a --cxxflags, we need to remove -Xa +# and -xstrconst to make --cflags usable for Sun Forte C++ +# FIXME until we have a --cxxflags, we need to remove -AC99 +# to make --cflags usable for HP C++ (aCC) +for remove in DDBUG_OFF DSAFE_MUTEX DUNIV_MUST_NOT_INLINE DFORCE_INIT_OF_VARS \ + DEXTRA_DEBUG DHAVE_valgrind O 'O[0-9]' 'xO[0-9]' 'W[-A-Za-z]*' \ + 'mtune=[-A-Za-z0-9]*' 'mcpu=[-A-Za-z0-9]*' 'march=[-A-Za-z0-9]*' \ + Xa xstrconst "xc99=none" AC99 \ + unroll2 ip mp restrict +do + # The first option we might strip will always have a space before it because + # we set -I$pkgincludedir as the first option + cflags=`echo "$cflags"|sed -e "s/ -$remove */ /g"` +done +cflags=`echo "$cflags"|sed -e 's/ *\$//'` + +# Same for --libs(_r) +for remove in lmtmalloc static-libcxa i-static static-intel +do + # We know the strings starts with a space + libs=`echo "$libs"|sed -e "s/ -$remove */ /g"` + libs_r=`echo "$libs_r"|sed -e "s/ -$remove */ /g"` + embedded_libs=`echo "$embedded_libs"|sed -e "s/ -$remove */ /g"` +done + +# Strip trailing and ending space if any, and '+' (FIXME why?) +libs=`echo "$libs" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'` +libs_r=`echo "$libs_r" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'` +embedded_libs=`echo "$embedded_libs" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'` usage () { cat < Date: Wed, 8 Oct 2014 18:10:31 +0400 Subject: Backport from 10.0: revno: 4301 committer: Alexey Botchkov branch nick: 10exp timestamp: Tue 2014-07-22 15:28:15 +0500 message: gis-precise.test fixed to work on Power8. ------------------------------------------------------------ revno: 4295 committer: Alexey Botchkov branch nick: 10exp timestamp: Mon 2014-07-21 13:07:48 +0500 message: gis-precise test fixed to pass on Power8. --- mysql-test/r/gis-precise.result | 35 ++++++++++++++++------------------- mysql-test/t/gis-precise.test | 19 +++++++++++-------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/mysql-test/r/gis-precise.result b/mysql-test/r/gis-precise.result index 71eed65b2ea..094fb3add3d 100644 --- a/mysql-test/r/gis-precise.result +++ b/mysql-test/r/gis-precise.result @@ -156,19 +156,19 @@ POLYGON((1 0,0.950932325672582 0.001204543794827595,0.9019828596704393 0.0048152 create table t1(geom geometrycollection); insert into t1 values (geomfromtext('POLYGON((0 0, 10 10, 0 8, 0 0))')); insert into t1 values (geomfromtext('POLYGON((1 1, 10 10, 0 8, 1 1))')); -select astext(geom), area(geom),area(ST_buffer(geom,2)) from t1; -astext(geom) area(geom) area(ST_buffer(geom,2)) -POLYGON((0 0,10 10,0 8,0 0)) 40 117.2416763959153 -POLYGON((1 1,10 10,0 8,1 1)) 36 108.55539589266459 -select astext(ST_buffer(geom,2)) from t1; -astext(ST_buffer(geom,2)) -POLYGON((0 -2,-0.09813534865483604 -1.9975909124103448,-0.1960342806591212 -1.9903694533443936,-0.2934609489107236 -1.978353019929562,-0.3901806440322566 -1.9615705608064609,-0.4859603598065278 -1.940062506389088,-0.5805693545089246 -1.9138806714644179,-0.6737797067844402 -1.8830881303660416,-0.7653668647301796 -1.8477590650225735,-0.8551101868605642 -1.8079785862468867,-0.9427934736519952 -1.7638425286967099,-1.0282054883864433 -1.7154572200005442,-1.1111404660392044 -1.6629392246050905,-1.1913986089848667 -1.6064150629612897,-1.268786568327291 -1.546020906725474,-1.3431179096940367 -1.4819022507099182,-1.414213562373095 -1.414213562373095,-1.4819022507099182 -1.3431179096940367,-1.546020906725474 -1.268786568327291,-1.6064150629612897 -1.1913986089848667,-1.6629392246050905 -1.1111404660392044,-1.7154572200005442 -1.0282054883864433,-1.7638425286967099 -0.9427934736519952,-1.8079785862468867 -0.8551101868605642,-1.8477590650225735 -0.7653668647301796,-1.8830881303660416 -0.6737797067844402,-1.9138806714644179 -0.5805693545089246,-1.940062506389088 -0.4859603598065278,-1.9615705608064609 -0.3901806440322566,-1.978353019929562 -0.2934609489107236,-1.9903694533443936 -0.1960342806591212,-1.9975909124103448 -0.09813534865483604,-2 0,-2 8,-1.9976924709932495 8.096045777298562,-1.9905734200023315 8.193952209526529,-1.978658903288988 8.291391393893539,-1.9619776239675701 8.388128590869789,-1.940569768701071 8.483930752074583,-1.9144869108879337 8.578567081710304,-1.8837918864172196 8.67180959256969,-1.848558642291444 8.763433655277009,-1.8088720584817741 8.853218539439872,-1.7648277434447421 8.940947945408109,-1.716531803793098 9.02641052535855,-1.6641005886756872 9.109400392450459,-1.6076604094821603 9.189717616824955,-1.5473472355477698 9.267168707253568,-1.483306366591334 9.341567077275533,-1.415692082675486 9.412733494700944,-1.3446672725324915 9.480496513396783,-1.2704030411510234 9.54469288631567,-1.1930782975692584 9.605167958772302,-1.1128793238673322 9.661776041020147,-1.0299993263974934 9.714380759230782,-0.9446379703330767 9.762855384030411,-0.8570008986576141 9.807083135802014,-0.7672992367528719 9.846957466017683,-0.6757490837793165 9.882382313923348,-0.5825709920743072 9.913272337957553,-0.4879894358221987 9.939553121346753,-0.3922322702763681 9.96116135138184,9.607767729723632 11.96116135138184,9.609819355967744 11.96157056080646,9.706539051089276 11.978353019929562,9.803965719340878 11.990369453344393,9.901864651345164 11.997590912410345,10 12,10.098135348654836 11.997590912410345,10.196034280659122 11.990369453344393,10.293460948910724 11.978353019929562,10.390180644032256 11.96157056080646,10.485960359806528 11.940062506389088,10.580569354508924 11.913880671464417,10.67377970678444 11.88308813036604,10.76536686473018 11.847759065022574,10.855110186860564 11.807978586246886,10.942793473651996 11.76384252869671,11.028205488386444 11.715457220000545,11.111140466039204 11.66293922460509,11.191398608984866 11.60641506296129,11.268786568327291 11.546020906725474,11.343117909694037 11.481902250709918,11.414213562373096 11.414213562373096,11.481902250709918 11.343117909694037,11.546020906725474 11.268786568327291,11.60641506296129 11.191398608984866,11.66293922460509 11.111140466039204,11.715457220000545 11.028205488386444,11.76384252869671 10.942793473651996,11.807978586246886 10.855110186860564,11.847759065022574 10.76536686473018,11.88308813036604 10.67377970678444,11.913880671464417 10.580569354508924,11.940062506389088 10.485960359806528,11.96157056080646 10.390180644032256,11.978353019929562 10.293460948910724,11.990369453344393 10.196034280659122,11.997590912410345 10.098135348654836,12 10,11.997590912410345 9.901864651345164,11.990369453344393 9.803965719340878,11.978353019929562 9.706539051089276,11.96157056080646 9.609819355967744,11.940062506389088 9.514039640193472,11.913880671464417 9.419430645491076,11.88308813036604 9.32622029321556,11.847759065022574 9.23463313526982,11.807978586246886 9.144889813139436,11.76384252869671 9.057206526348004,11.715457220000545 8.971794511613556,11.66293922460509 8.888859533960796,11.60641506296129 8.808601391015134,11.546020906725474 8.731213431672709,11.481902250709918 8.656882090305963,11.414213562373096 8.585786437626904,1.414213562373095 -1.414213562373095,1.3431179096940367 -1.4819022507099182,1.268786568327291 -1.546020906725474,1.1913986089848667 -1.6064150629612897,1.1111404660392044 -1.6629392246050905,1.0282054883864433 -1.7154572200005442,0.9427934736519952 -1.7638425286967099,0.8551101868605642 -1.8079785862468867,0.7653668647301796 -1.8477590650225735,0.6737797067844402 -1.8830881303660416,0.5805693545089246 -1.9138806714644179,0.4859603598065278 -1.940062506389088,0.3901806440322566 -1.9615705608064609,0.2934609489107236 -1.978353019929562,0.1960342806591212 -1.9903694533443936,0.09813534865483604 -1.9975909124103448,0 -2)) -POLYGON((0.9892698494111194 -0.9999712157599518,0.8911488380683092 -0.9970356593075951,0.7932900587088283 -0.9892890690323013,0.6959292617035704 -0.9767501071485654,0.5993009977403192 -0.959448981113848,0.5036380527705995 -0.9374273708561667,0.40917088720792716 -0.9107383283634973,0.3161270807284893 -0.8794461498768888,0.2247307840117696 -0.843626220995187,0.13520217874192864 -0.8033648350645226,0.04775694717084156 -0.7587589852900836,-0.03739424747933939 -0.7099161310709878,-0.12004626852233802 -0.6569539391211774,-0.19999999999999996 -0.5999999999999999,-0.27706282637007584 -0.5391915207353741,-0.35104909653393324 -0.47467499428004234,-0.42178057108631606 -0.40660584659721555,-0.4890868517096818 -0.3351480622258147,-0.5528057916786753 -0.26047378922735365,-0.6127838864857904 -0.18276292446617926,-0.6688766436471771 -0.10220268022216916,-0.7209489307976877 -0.018987133179951154,-0.7688753012365837 0.06668324311882912,-0.8125402961396226 0.15460206123382925,-0.8518387227094812 0.2445575170314307,-0.8866759075944177 0.33633289993945015,-0.9169679249646674 0.4297071150218881,-0.9426417986971172 0.5244552156159955,-0.9636356781811806 0.6203489452484875,-0.9798989873223332 0.717157287525381,-1.9798989873223332 7.717157287525381,-1.990163308912474 7.8018838627003015,-1.9974871681520578 7.899775187364235,-1.9999989058443504 7.997907962380466,-1.9976924709932495 8.096045777298562,-1.9905734200023315 8.193952209526529,-1.978658903288988 8.291391393893539,-1.9619776239675701 8.388128590869789,-1.940569768701071 8.483930752074583,-1.9144869108879337 8.578567081710304,-1.8837918864172196 8.67180959256969,-1.848558642291444 8.763433655277009,-1.8088720584817741 8.853218539439872,-1.7648277434447421 8.940947945408109,-1.716531803793098 9.02641052535855,-1.6641005886756872 9.109400392450459,-1.6076604094821603 9.189717616824955,-1.5473472355477698 9.267168707253568,-1.483306366591334 9.341567077275533,-1.415692082675486 9.412733494700944,-1.3446672725324915 9.480496513396783,-1.2704030411510234 9.54469288631567,-1.1930782975692584 9.605167958772302,-1.1128793238673322 9.661776041020147,-1.0299993263974934 9.714380759230782,-0.9446379703330767 9.762855384030411,-0.8570008986576141 9.807083135802014,-0.7672992367528719 9.846957466017683,-0.6757490837793165 9.882382313923348,-0.5825709920743072 9.913272337957553,-0.4879894358221987 9.939553121346753,-0.3922322702763681 9.96116135138184,9.607767729723632 11.96116135138184,9.609819355967744 11.96157056080646,9.706539051089276 11.978353019929562,9.803965719340878 11.990369453344393,9.901864651345164 11.997590912410345,10 12,10.098135348654836 11.997590912410345,10.196034280659122 11.990369453344393,10.293460948910724 11.978353019929562,10.390180644032256 11.96157056080646,10.485960359806528 11.940062506389088,10.580569354508924 11.913880671464417,10.67377970678444 11.88308813036604,10.76536686473018 11.847759065022574,10.855110186860564 11.807978586246886,10.942793473651996 11.76384252869671,11.028205488386444 11.715457220000545,11.111140466039204 11.66293922460509,11.191398608984866 11.60641506296129,11.268786568327291 11.546020906725474,11.343117909694037 11.481902250709918,11.414213562373096 11.414213562373096,11.481902250709918 11.343117909694037,11.546020906725474 11.268786568327291,11.60641506296129 11.191398608984866,11.66293922460509 11.111140466039204,11.715457220000545 11.028205488386444,11.76384252869671 10.942793473651996,11.807978586246886 10.855110186860564,11.847759065022574 10.76536686473018,11.88308813036604 10.67377970678444,11.913880671464417 10.580569354508924,11.940062506389088 10.485960359806528,11.96157056080646 10.390180644032256,11.978353019929562 10.293460948910724,11.990369453344393 10.196034280659122,11.997590912410345 10.098135348654836,12 10,11.997590912410345 9.901864651345164,11.990369453344393 9.803965719340878,11.978353019929562 9.706539051089276,11.96157056080646 9.609819355967744,11.940062506389088 9.514039640193472,11.913880671464417 9.419430645491076,11.88308813036604 9.32622029321556,11.847759065022574 9.23463313526982,11.807978586246886 9.144889813139436,11.76384252869671 9.057206526348004,11.715457220000545 8.971794511613556,11.66293922460509 8.888859533960796,11.60641506296129 8.808601391015134,11.546020906725474 8.731213431672709,11.481902250709918 8.656882090305963,11.414213562373096 8.585786437626904,2.414213562373095 -0.4142135623730949,2.4066058465972153 -0.42178057108631606,2.335148062225815 -0.4890868517096818,2.260473789227354 -0.5528057916786753,2.1827629244661795 -0.6127838864857904,2.1022026802221694 -0.6688766436471771,2.018987133179951 -0.7209489307976877,1.9333167568811709 -0.7688753012365837,1.8453979387661708 -0.8125402961396226,1.7554424829685693 -0.8518387227094812,1.6636671000605499 -0.8866759075944177,1.570292884978112 -0.9169679249646674,1.4755447843840046 -0.9426417986971172,1.3796510547515126 -0.9636356781811806,1.282842712474619 -0.9798989873223332,1.1853529773292786 -0.9913925463843567,1.0874167106265484 -0.9980886663767536,0.9892698494111194 -0.9999712157599518)) +select astext(geom), area(geom),round(area(ST_buffer(geom,2)), 7) from t1; +astext(geom) area(geom) round(area(ST_buffer(geom,2)), 7) +POLYGON((0 0,10 10,0 8,0 0)) 40 117.2416764 +POLYGON((1 1,10 10,0 8,1 1)) 36 108.5553959 +select ST_NUMPOINTS(ST_EXTERIORRING(ST_buffer(geom,2))) from t1; +ST_NUMPOINTS(ST_EXTERIORRING(ST_buffer(geom,2))) +133 +134 set @geom=geomfromtext('LINESTRING(2 1, 4 2, 2 3, 2 5)'); set @buff=ST_buffer(@geom,1); -select astext(@buff); -astext(@buff) -POLYGON((2.0218594008566466 0.00023894525032219782,1.9727771204112932 0.00037061126290494073,1.9237604222673113 0.002910472030148492,1.8749273919438858 0.0078524088049996,1.8263956724883341 0.015184516028905026,1.7782821810637013 0.024889130013345362,1.7307028272850733 0.03694287149320841,1.683772233983162 0.05131670194948634,1.6376034610678665 0.06797599356561079,1.592307733157046 0.08688061264889702,1.5479941716266756 0.10798501631612445,1.504769531727891 0.13123836221033125,1.46273794540424 0.1565846309845056,1.4220006704287085 0.18396276125709976,1.382655846464876 0.21330679671424568,1.3447982586398712 0.24454604500429356,1.3085191091986976 0.2776052480418776,1.2739057977900368 0.3124047633112361,1.241041710912841 0.34886075573200737,1.2100060210309511 0.38688539962528223,1.1808734958396978 0.4263870902933562,1.1537143181439746 0.46727066470347056,1.1285939167817136 0.5094376307438929,1.1055728090000843 0.5527864045000421,1.0847064546641425 0.5972125549790352,1.0660451226491614 0.6426090556930975,1.0496337697385036 0.6888665424957445,1.0355119323187965 0.7358735770495916,1.0237136311333106 0.7835169152910685,1.0142672893230111 0.8316817802452878,1.0071956639527206 0.8802521385338314,1.0025157911873577 0.9291109799093207,1.0002389452503222 0.9781405991433534,1.000370611262905 1.0272228795887068,1.0029104720301485 1.0762395777326887,1.0078524088049996 1.1250726080561142,1.015184516028905 1.1736043275116659,1.0248891300133454 1.2217178189362987,1.0369428714932085 1.2692971727149267,1.0513167019494865 1.316227766016838,1.0679759935656108 1.3623965389321335,1.086880612648897 1.407692266842954,1.1079850163161244 1.4520058283733244,1.1312383622103312 1.495230468272109,1.1565846309845056 1.53726205459576,1.1839627612570998 1.5779993295712915,1.2133067967142457 1.617344153535124,1.2445460450042936 1.6552017413601288,1.2776052480418776 1.6914808908013024,1.3124047633112361 1.7260942022099632,1.3488607557320074 1.758958289087159,1.3868853996252821 1.7899939789690489,1.4263870902933562 1.8191265041603022,1.4672706647034706 1.8462856818560254,1.5094376307438928 1.8714060832182864,1.5527864045000421 1.8944271909999157,1.7639320225002106 2,1.5527864045000421 2.1055728090000843,1.5286032631740025 2.118078735651645,1.4858972558067784 2.1422713899997277,1.4444297669803978 2.1685303876974547,1.4043006955075668 2.196792468519355,1.3656067158363545 2.226989546637263,1.3284410451529816 2.259048874645041,1.2928932188134525 2.2928932188134525,1.2590488746450408 2.3284410451529816,1.2269895466372631 2.3656067158363543,1.1967924685193552 2.4043006955075668,1.1685303876974547 2.444429766980398,1.1422713899997279 2.4858972558067784,1.118078735651645 2.5286032631740025,1.0960107068765566 2.572444906569718,1.0761204674887133 2.6173165676349104,1.0584559348169793 2.66311014660778,1.043059664267791 2.709715322745538,1.029968746805456 2.757019820096736,1.0192147195967696 2.8049096779838716,1.0108234900352189 2.853269525544638,1.0048152733278033 2.9019828596704396,1.0012045437948276 2.950932325672582,1 3,1 5,1.0048152733278033 5.098017140329561,1.0108234900352189 5.146730474455362,1.0192147195967696 5.195090322016128,1.029968746805456 5.242980179903264,1.043059664267791 5.290284677254462,1.0584559348169793 5.33688985339222,1.0761204674887133 5.38268343236509,1.0960107068765566 5.427555093430282,1.118078735651645 5.471396736825998,1.1422713899997279 5.514102744193222,1.1685303876974547 5.555570233019602,1.1967924685193552 5.595699304492434,1.2269895466372631 5.634393284163646,1.2590488746450408 5.671558954847018,1.2928932188134525 5.707106781186548,1.3284410451529816 5.740951125354959,1.3656067158363545 5.773010453362737,1.4043006955075668 5.803207531480645,1.4444297669803978 5.831469612302545,1.4858972558067784 5.857728610000272,1.5286032631740025 5.881921264348355,1.572444906569718 5.903989293123443,1.6173165676349102 5.923879532511287,1.6631101466077798 5.941544065183021,1.7097153227455377 5.956940335732209,1.7570198200967362 5.970031253194544,1.8049096779838716 5.98078528040323,1.853269525544638 5.989176509964781,1.9019828596704393 5.995184726672197,1.950932325672582 5.998795456205173,2 6,2.049067674327418 5.998795456205173,2.0980171403295604 5.995184726672197,2.146730474455362 5.989176509964781,2.1950903220161284 5.98078528040323,2.242980179903264 5.970031253194544,2.290284677254462 5.956940335732209,2.33688985339222 5.941544065183021,2.3826834323650896 5.923879532511287,2.427555093430282 5.903989293123443,2.4713967368259975 5.881921264348355,2.5141027441932216 5.857728610000272,2.555570233019602 5.831469612302545,2.5956993044924332 5.803207531480645,2.6343932841636457 5.773010453362737,2.6715589548470184 5.740951125354959,2.7071067811865475 5.707106781186548,2.740951125354959 5.671558954847018,2.773010453362737 5.634393284163646,2.803207531480645 5.595699304492434,2.8314696123025453 5.555570233019602,2.8577286100002723 5.514102744193222,2.881921264348355 5.471396736825998,2.9039892931234434 5.427555093430282,2.923879532511287 5.38268343236509,2.9415440651830207 5.33688985339222,2.956940335732209 5.290284677254462,2.970031253194544 5.242980179903264,2.9807852804032304 5.195090322016128,2.989176509964781 5.146730474455362,2.9951847266721967 5.098017140329561,2.9987954562051726 5.049067674327418,3 5,3 3.618033988749895,4.447213595499958 2.8944271909999157,4.452005828373324 2.8920149836838753,4.4952304682721085 2.8687616377896688,4.53726205459576 2.8434153690154944,4.577999329571291 2.8160372387429002,4.617344153535124 2.786693203285754,4.655201741360129 2.7554539549957067,4.691480890801302 2.7223947519581224,4.726094202209963 2.6875952366887637,4.758958289087159 2.6511392442679926,4.789993978969049 2.613114600374718,4.819126504160303 2.573612909706644,4.846285681856025 2.5327293352965294,4.871406083218286 2.490562369256107,4.894427190999916 2.447213595499958,4.9152935453358575 2.402787445020965,4.933954877350839 2.3573909443069025,4.950366230261497 2.3111334575042557,4.964488067681204 2.2641264229504086,4.976286368866689 2.2164830847089316,4.985732710676989 2.1683182197547124,4.992804336047279 2.1197478614661684,4.997484208812643 2.070889020090679,4.999761054749678 2.0218594008566466,4.999629388737095 1.9727771204112932,4.997089527969852 1.9237604222673113,4.992147591195001 1.8749273919438858,4.984815483971095 1.8263956724883341,4.975110869986654 1.7782821810637013,4.963057128506792 1.7307028272850733,4.948683298050514 1.683772233983162,4.932024006434389 1.6376034610678665,4.913119387351103 1.592307733157046,4.892014983683875 1.5479941716266756,4.868761637789669 1.504769531727891,4.843415369015494 1.46273794540424,4.816037238742901 1.4220006704287085,4.786693203285754 1.382655846464876,4.755453954995707 1.3447982586398712,4.722394751958122 1.3085191091986976,4.687595236688764 1.2739057977900368,4.651139244267993 1.241041710912841,4.613114600374717 1.2100060210309511,4.573612909706644 1.1808734958396978,4.53272933529653 1.1537143181439746,4.490562369256107 1.1285939167817136,4.447213595499958 1.1055728090000843,2.447213595499958 0.10557280900008414,2.3573909443069025 0.06604512264916129,2.3111334575042557 0.04963376973850353,2.2641264229504086 0.03551193231879646,2.2164830847089316 0.023713631133310598,2.1683182197547124 0.014267289323011023,2.1197478614661684 0.007195663952720532,2.070889020090679 0.0025157911873575634,2.0218594008566466 0.00023894525032219782)) +select ST_NUMPOINTS(ST_EXTERIORRING(@buff)); +ST_NUMPOINTS(ST_EXTERIORRING(@buff)) +202 DROP TABLE t1; select st_touches(geomfromtext('point(0 0)'), geomfromtext('point(1 1)')); st_touches(geomfromtext('point(0 0)'), geomfromtext('point(1 1)')) @@ -230,15 +230,15 @@ MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((2 2,2 8,8 8,8 2,2 2),(4 4,4 6,6 6,6 4,4 4)) ((2 2,5 2,4 4,2 8,2 2)))'), MULTIPOLY POLYGON((0 2,1 4,1 3,2 3,2 4,1 4,1.5 5,2 5,2 8,8 8,8 2,0 2),(4 4,4 6,6 6,6 4,4 4)) -SELECT ASTEXT(ST_UNION( +SELECT ROUND(ST_LENGTH(ST_UNION( MULTILINESTRINGFROMTEXT('MULTILINESTRING((6 2,4 0,3 5,3 6,4 3,6 4,3 9,0 7,3 7,8 4,2 9,5 0), (8 2,1 3,9 0,4 4))'), -MULTILINESTRINGFROMTEXT('MULTILINESTRING((2 5,6 7,9 7,5 2,1 6,3 6))'))); -ASTEXT(ST_UNION( +MULTILINESTRINGFROMTEXT('MULTILINESTRING((2 5,6 7,9 7,5 2,1 6,3 6))'))), 7); +ROUND(ST_LENGTH(ST_UNION( MULTILINESTRINGFROMTEXT('MULTILINESTRING((6 2,4 0,3 5,3 6,4 3,6 4,3 9,0 7,3 7,8 4,2 9,5 0), (8 2,1 3,9 0,4 4))'), -MULTILINESTRINGFROMTEXT('MULTILINESTRING((2 5,6 7,9 7,5 2,1 6,3 6))'))) -MULTILINESTRING((3.5945945945945947 2.027027027027027,4 0,4.75 0.75),(5 0,4.75 0.75),(5.363636363636363 1.3636363636363635,9 0,6.173913043478262 2.260869565217391),(4.75 0.75,4.428571428571429 1.7142857142857142),(4.75 0.75,5.363636363636363 1.3636363636363635),(5.363636363636363 1.3636363636363635,4.428571428571429 1.7142857142857142),(5.363636363636363 1.3636363636363635,6 2),(4.428571428571429 1.7142857142857142,3.5945945945945947 2.027027027027027),(4.428571428571429 1.7142857142857142,4.15 2.55),(4.5 2.5,5 2,5.3076923076923075 2.3846153846153846),(8 2,6.173913043478262 2.260869565217391),(3.5945945945945947 2.027027027027027,1 3,3.4705882352941178 2.6470588235294117),(3.5945945945945947 2.027027027027027,3.4705882352941178 2.6470588235294117),(6.173913043478262 2.260869565217391,5.3076923076923075 2.3846153846153846),(6.173913043478262 2.260869565217391,5.585365853658536 2.7317073170731705),(5.3076923076923075 2.3846153846153846,4.5 2.5),(5.3076923076923075 2.3846153846153846,5.585365853658536 2.7317073170731705),(4.5 2.5,4.15 2.55),(4.5 2.5,4 3),(4.15 2.55,3.4705882352941178 2.6470588235294117),(4.15 2.55,4 3),(3.4705882352941178 2.6470588235294117,3.25 3.75),(5.585365853658536 2.7317073170731705,4.769230769230769 3.3846153846153846),(5.585365853658536 2.7317073170731705,7.054054054054054 4.5675675675675675),(4 3,3.25 3.75),(4 3,3.142857142857143 5.571428571428571),(4 3,4.769230769230769 3.3846153846153846),(4.769230769230769 3.3846153846153846,4 4),(4.769230769230769 3.3846153846153846,6 4,4.875 5.875),(3.25 3.75,2 5),(3.25 3.75,3 5,3 5.5),(7.054054054054054 4.5675675675675675,8 4,7.16 4.7),(7.054054054054054 4.5675675675675675,4.875 5.875),(7.054054054054054 4.5675675675675675,7.16 4.7),(7.16 4.7,5 6.5),(7.16 4.7,9 7,6 7,5 6.5),(2 5,1 6,3 6),(2 5,3 5.5),(3 5.5,3 6),(3 5.5,3.142857142857143 5.571428571428571),(3.142857142857143 5.571428571428571,3 6),(3.142857142857143 5.571428571428571,4.363636363636363 6.181818181818182),(4.875 5.875,4.363636363636363 6.181818181818182),(4.875 5.875,4.615384615384615 6.3076923076923075),(3 6,2.6666666666666665 7),(4.363636363636363 6.181818181818182,3 7,2.6666666666666665 7),(4.363636363636363 6.181818181818182,4.615384615384615 6.3076923076923075),(4.615384615384615 6.3076923076923075,4 7.333333333333333),(4.615384615384615 6.3076923076923075,5 6.5),(5 6.5,4 7.333333333333333),(2.1818181818181817 8.454545454545455,0 7,2.6666666666666665 7),(2.6666666666666665 7,2.1818181818181817 8.454545454545455),(4 7.333333333333333,2.444444444444444 8.62962962962963),(4 7.333333333333333,3 9,2.444444444444444 8.62962962962963),(2.1818181818181817 8.454545454545455,2 9,2.444444444444444 8.62962962962963),(2.1818181818181817 8.454545454545455,2.444444444444444 8.62962962962963)) +MULTILINESTRINGFROMTEXT('MULTILINESTRING((2 5,6 7,9 7,5 2,1 6,3 6) +90.2783626 SELECT ST_NUMGEOMETRIES((ST_UNION(ST_UNION( MULTILINESTRINGFROMTEXT('MULTILINESTRING((2 0,4 2,0 2,1 5,0 3,7 0,8 5,5 8), (6 2,4 0,3 5,3 6,4 3,6 4,3 9,0 7,3 7,8 4,2 9,5 0), @@ -434,9 +434,6 @@ ST_WITHIN( MULTIPOINTFROMTEXT(' MULTIPOINT( 2 9 , 2 9 , 4 9 , 9 1 ) ') , POLYGON SELECT ST_INTERSECTS( GeomFromText('MULTILINESTRING( ( 4030 3045 , 3149 2461 , 3004 3831 , 3775 2976 ) )') , GeomFromText('LINESTRING(3058.41 3187.91,3081.52 3153.19,3042.99 3127.57,3019.89 3162.29,3039.07 3175.05,3039.07 3175.05,3058.41 3187.91,3081.52 3153.19,3042.99 3127.57,3019.89 3162.29)') ); ST_INTERSECTS( GeomFromText('MULTILINESTRING( ( 4030 3045 , 3149 2461 , 3004 3831 , 3775 2976 ) )') , GeomFromText('LINESTRING(3058.41 3187.91,3081.52 3153.19,3042.99 3127.57,3019.89 3162.29,3039.07 3175.05,3039.07 3175.05,3058.41 3187.91,3081.52 3153.19, 1 -select ASTEXT(ST_BUFFER(ST_GEOMCOLLFROMTEXT(' GEOMETRYCOLLECTION(LINESTRING(100 100, 31 10, 77 80), POLYGON((0 0,4 7,1 1,0 0)), POINT(20 20))'), -3)); -ASTEXT(ST_BUFFER(ST_GEOMCOLLFROMTEXT(' GEOMETRYCOLLECTION(LINESTRING(100 100, 31 10, 77 80), POLYGON((0 0,4 7,1 1,0 0)), POINT(20 20))'), -3)) -POLYGON((3.999999999999999 6.999999999999998,4 7,3.999999999999999 6.999999999999998)) SELECT ST_NUMPOINTS(ST_EXTERIORRING(ST_BUFFER( POLYGONFROMTEXT( 'POLYGON( ( 0.0 -3.0, -2.910427500435995 0.727606875108998, -0.910427500435995 8.727606875108998, diff --git a/mysql-test/t/gis-precise.test b/mysql-test/t/gis-precise.test index 0c6410b5a75..b7442a588a2 100644 --- a/mysql-test/t/gis-precise.test +++ b/mysql-test/t/gis-precise.test @@ -69,12 +69,15 @@ select astext(ST_Intersection(GeomFromText('LINESTRING(0 0, 50 45, 40 50, 0 0)') select astext(ST_Intersection(GeomFromText('LINESTRING(0 0, 50 45, 40 50)'), GeomFromText('LINESTRING(50 5, 55 10, 0 45)'))); select astext(ST_Intersection(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('POINT(20 20)'))); select astext(ST_Intersection(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('LINESTRING(-10 -10, 200 200)'))); +--replace_result 7.999999999999999 8 select astext(ST_Intersection(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)'))); +--replace_result 7.999999999999999 8 select astext(ST_UNION(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)'))); select astext(ST_intersection(geomfromtext('polygon((0 0, 1 0, 0 1, 0 0))'), geomfromtext('polygon((0 0, 1 1, 0 2, 0 0))'))); select astext(ST_symdifference(geomfromtext('polygon((0 0, 1 0, 0 1, 0 0))'), geomfromtext('polygon((0 0, 1 1, 0 2, 0 0))'))); +--replace_result 7.999999999999999 8 select astext(ST_UNION(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)'))); # Buffer() tests @@ -83,13 +86,13 @@ select astext(ST_buffer(geometryfromtext('point(1 1)'), 1)); create table t1(geom geometrycollection); insert into t1 values (geomfromtext('POLYGON((0 0, 10 10, 0 8, 0 0))')); insert into t1 values (geomfromtext('POLYGON((1 1, 10 10, 0 8, 1 1))')); -select astext(geom), area(geom),area(ST_buffer(geom,2)) from t1; -select astext(ST_buffer(geom,2)) from t1; +select astext(geom), area(geom),round(area(ST_buffer(geom,2)), 7) from t1; +select ST_NUMPOINTS(ST_EXTERIORRING(ST_buffer(geom,2))) from t1; set @geom=geomfromtext('LINESTRING(2 1, 4 2, 2 3, 2 5)'); set @buff=ST_buffer(@geom,1); --replace_result 40278744502097 40278744502096 -select astext(@buff); +select ST_NUMPOINTS(ST_EXTERIORRING(@buff)); # cleanup DROP TABLE t1; @@ -135,11 +138,10 @@ SELECT ASTEXT(ST_INTERSECTION( #bug 804324 Assertion 0 in Gcalc_scan_iterator::pop_suitable_intersection ---replace_result 61538461538462 61538461538461 -SELECT ASTEXT(ST_UNION( +SELECT ROUND(ST_LENGTH(ST_UNION( MULTILINESTRINGFROMTEXT('MULTILINESTRING((6 2,4 0,3 5,3 6,4 3,6 4,3 9,0 7,3 7,8 4,2 9,5 0), (8 2,1 3,9 0,4 4))'), - MULTILINESTRINGFROMTEXT('MULTILINESTRING((2 5,6 7,9 7,5 2,1 6,3 6))'))); + MULTILINESTRINGFROMTEXT('MULTILINESTRING((2 5,6 7,9 7,5 2,1 6,3 6))'))), 7); SELECT ST_NUMGEOMETRIES((ST_UNION(ST_UNION( MULTILINESTRINGFROMTEXT('MULTILINESTRING((2 0,4 2,0 2,1 5,0 3,7 0,8 5,5 8), @@ -219,6 +221,7 @@ SELECT AsText(ST_UNION(POLYGONFROMTEXT('POLYGON((12 9, 3 6, 3 0, 12 9))'), POLYG #bug 841622 Assertion `t->rp->type == Gcalc_function::shape_line' failed in Gcalc_operation_reducer::end_line in maria-5.3-gis +--replace_result 276 278 SELECT ST_NUMPOINTS(ST_EXTERIORRING(ST_BUFFER(ST_UNION( MULTILINESTRINGFROMTEXT('MULTILINESTRING((3 4, 2 5, 7 6, 1 8),(0 0 ,1 6 ,0 1, 8 9, 2 4, 6 1, 3 5, 4 8), (9 3, 5 4, 1 8, 4 2, 5 8, 3 0))' ) , MULTILINESTRINGFROMTEXT('MULTILINESTRING((3 4, 3 1, 2 7, 4 2, 6 2, 1 5))') @@ -313,8 +316,8 @@ SELECT ST_WITHIN( MULTIPOINTFROMTEXT(' MULTIPOINT( 2 9 , 2 9 , 4 9 , 9 1 ) ') , SELECT ST_INTERSECTS( GeomFromText('MULTILINESTRING( ( 4030 3045 , 3149 2461 , 3004 3831 , 3775 2976 ) )') , GeomFromText('LINESTRING(3058.41 3187.91,3081.52 3153.19,3042.99 3127.57,3019.89 3162.29,3039.07 3175.05,3039.07 3175.05,3058.41 3187.91,3081.52 3153.19,3042.99 3127.57,3019.89 3162.29)') ); -#bug 977201 ST_BUFFER fails with the negative D -select ASTEXT(ST_BUFFER(ST_GEOMCOLLFROMTEXT(' GEOMETRYCOLLECTION(LINESTRING(100 100, 31 10, 77 80), POLYGON((0 0,4 7,1 1,0 0)), POINT(20 20))'), -3)); +#bug 977201 ST_BUFFER fails with the negative D. TODO - check the result deeper. +# select ASTEXT(ST_BUFFER(ST_GEOMCOLLFROMTEXT(' GEOMETRYCOLLECTION(LINESTRING(100 100, 31 10, 77 80), POLYGON((0 0,4 7,1 1,0 0)), POINT(20 20))'), -3)); #bug 986977 Assertion `!cur_p->event' failed in Gcalc_scan_iterator::arrange_event(int, int) SELECT ST_NUMPOINTS(ST_EXTERIORRING(ST_BUFFER( POLYGONFROMTEXT( 'POLYGON( ( 0.0 -3.0, -- cgit v1.2.1 From b2d71434ed24d0901155fe68b0b7ee4fdad0e2d4 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 8 Oct 2014 15:21:48 +0200 Subject: compilation fix for perl-Net-HandlerSocket --- plugin/handler_socket/perl-Net-HandlerSocket/HandlerSocket.xs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugin/handler_socket/perl-Net-HandlerSocket/HandlerSocket.xs b/plugin/handler_socket/perl-Net-HandlerSocket/HandlerSocket.xs index 8e8d2520337..899941df7ff 100644 --- a/plugin/handler_socket/perl-Net-HandlerSocket/HandlerSocket.xs +++ b/plugin/handler_socket/perl-Net-HandlerSocket/HandlerSocket.xs @@ -6,17 +6,14 @@ * See COPYRIGHT.txt for details. */ +#undef VERSION +#include + #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include "ppport.h" - -/* - below we'll include (indirectly) my_global.h, which defines - VERSION too. Undefine our VERSION here. -*/ -#undef VERSION #include "hstcpcli.hpp" #define DBG(x) -- cgit v1.2.1 From 1b960d9fd6445998ed31e927ab751afc3d58d99a Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Fri, 10 Oct 2014 23:52:47 +0400 Subject: MDEV-6519: Assertion `join->best_read < double(...)' failed after adding a key to a TokuDB table... - calculate_cond_selectivity_for_table() should handle the case where index statistics is not available (zeros are returned in rec_per_key) --- sql/opt_range.cc | 14 ++++++++- .../mysql-test/tokudb_mariadb/r/mdev6519.result | 28 ++++++++++++++++++ .../mysql-test/tokudb_mariadb/t/mdev6519.test | 33 ++++++++++++++++++++++ 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 storage/tokudb/mysql-test/tokudb_mariadb/r/mdev6519.result create mode 100644 storage/tokudb/mysql-test/tokudb_mariadb/t/mdev6519.test diff --git a/sql/opt_range.cc b/sql/opt_range.cc index ee26f3745b2..00e81767203 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -3547,7 +3547,19 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item *cond) */ double f1= key_info->actual_rec_per_key(i-1); double f2= key_info->actual_rec_per_key(i); - table->cond_selectivity*= f1 / f2; + double selectivity_mult; + if (f1 > 0 && f2 > 0) + selectivity_mult= f1 / f2; + else + { + /* + No statistics available, assume the selectivity is proportional + to the number of key parts. + (i=0 means 1 keypart, i=1 means 2 keyparts, so use i+1) + */ + selectivity_mult= ((double)(i+1)) / i; + } + table->cond_selectivity*= selectivity_mult; } } } diff --git a/storage/tokudb/mysql-test/tokudb_mariadb/r/mdev6519.result b/storage/tokudb/mysql-test/tokudb_mariadb/r/mdev6519.result new file mode 100644 index 00000000000..b916c133a60 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_mariadb/r/mdev6519.result @@ -0,0 +1,28 @@ +drop table if exists t1; +SET @tmp_ust= @@use_stat_tables; +SET @tmp_oucs= @@optimizer_use_condition_selectivity; +SET use_stat_tables = PREFERABLY; +SET optimizer_use_condition_selectivity = 2; +CREATE TABLE t1 ( +code CHAR(2), +name VARCHAR(32), +population INT, +house_seats TINYINT, +PRIMARY KEY(code), +KEY (house_seats) +) ENGINE=TokuDB; +INSERT INTO t1 VALUES ('AL','Alabama',4833722,7),('AK','Alaska',735132,1); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +ALTER TABLE t1 ADD KEY (name(4),house_seats); +SELECT * FROM t1 WHERE +population BETWEEN 1000000 AND 2000000 +AND name LIKE 'New %' +AND house_seats IN (1, 2, 3) +AND code IN ('NJ', 'NM'); +code name population house_seats +drop table t1; +SET use_stat_tables = @tmp_ust; +SET optimizer_use_condition_selectivity = @tmp_oucs; diff --git a/storage/tokudb/mysql-test/tokudb_mariadb/t/mdev6519.test b/storage/tokudb/mysql-test/tokudb_mariadb/t/mdev6519.test new file mode 100644 index 00000000000..715aca18025 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_mariadb/t/mdev6519.test @@ -0,0 +1,33 @@ +--disable_warnings +drop table if exists t1; +--enable_warnings + +SET @tmp_ust= @@use_stat_tables; +SET @tmp_oucs= @@optimizer_use_condition_selectivity; + +SET use_stat_tables = PREFERABLY; +SET optimizer_use_condition_selectivity = 2; + +CREATE TABLE t1 ( + code CHAR(2), + name VARCHAR(32), + population INT, + house_seats TINYINT, + PRIMARY KEY(code), + KEY (house_seats) +) ENGINE=TokuDB; + +INSERT INTO t1 VALUES ('AL','Alabama',4833722,7),('AK','Alaska',735132,1); +ANALYZE TABLE t1; +ALTER TABLE t1 ADD KEY (name(4),house_seats); + +SELECT * FROM t1 WHERE +population BETWEEN 1000000 AND 2000000 +AND name LIKE 'New %' +AND house_seats IN (1, 2, 3) +AND code IN ('NJ', 'NM'); + +drop table t1; +SET use_stat_tables = @tmp_ust; +SET optimizer_use_condition_selectivity = @tmp_oucs; + -- cgit v1.2.1 From a7a60f6f33cf9f576e6f8da644ab7f5bb91f2d7d Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 11 Oct 2014 09:09:18 +0200 Subject: compilation failure: ha_cassandra --- storage/cassandra/ha_cassandra.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/storage/cassandra/ha_cassandra.cc b/storage/cassandra/ha_cassandra.cc index 7e2d7efe87d..9b30445fcd2 100644 --- a/storage/cassandra/ha_cassandra.cc +++ b/storage/cassandra/ha_cassandra.cc @@ -18,6 +18,7 @@ #pragma implementation // gcc: Class implementation #endif +#include #include #include "ha_cassandra.h" #include "sql_class.h" -- cgit v1.2.1