Skip to content
Permalink
Browse files
Merge tag 'mariadb-10.0.30' into bb-sachin-10.0-galera-merge
Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
  • Loading branch information
mariadb-SachinSetiya committed Mar 16, 2017
2 parents c401773 + c4f3e64 commit f66395f
Show file tree
Hide file tree
Showing 487 changed files with 14,212 additions and 7,437 deletions.
@@ -214,7 +214,7 @@ support-files/mysql.spec
support-files/mysqld_multi.server
support-files/wsrep.cnf
support-files/wsrep_notify
support-files/SELinux/centos6-mariadb.pp
support-files/SELinux/mariadb.pp
tags
tests/async_queries
tests/bug25714
@@ -356,6 +356,9 @@ SET(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)

# Common defines and includes
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
IF(_FILE_OFFSET_BITS)
ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=${_FILE_OFFSET_BITS})
ENDIF()
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/include)

# Add bundled or system zlib.
22 CREDITS
@@ -3,16 +3,18 @@ organization registered in the USA.

The current main sponsors of the MariaDB Foundation are:

Booking.com http://www.booking.com (2013 - 2016)
Development Bank of Singapore http://dbs.com (2016)
MariaDB Corporation https://www.mariadb.com (2013 - 2016)
Visma http://visma.com (2015 - 2016)
Acronis http://acronis.com (2016)
Nexedi https://www.nexedi.com (2016)
Automattic https://automattic.com (2014 - 2016)
Tencent Game DBA http://tencentdba.com/about (2016)
Verkkokauppa.com https://www.verkkokauppa.com (2015 - 2016)
Virtuozzo https://virtuozzo.com (2016)
Alibaba Cloud https://intl.aliyun.com (2017)
Booking.com https://www.booking.com (2013 - 2017)
Development Bank of Singapore https://dbs.com (2016 - 2017)
MariaDB Corporation https://www.mariadb.com (2013 - 2017)
Visma https://visma.com (2015 - 2017)
Acronis http://acronis.com (2016 - 2017)
Nexedi https://www.nexedi.com (2016 - 2017)
Automattic https://automattic.com (2014 - 2017)
Tencent Game DBA http://tencentdba.com/about (2016 - 2017)
Tencent TDSQL http://tdsql.org/ (2016 - 2017)
Verkkokauppa.com https://www.verkkokauppa.com (2015 - 2017)
Virtuozzo https://virtuozzo.com (2016 - 2017)

For a full list of sponsors, see
https://mariadb.org/about/supporters/
@@ -1,3 +1,3 @@
MYSQL_VERSION_MAJOR=10
MYSQL_VERSION_MINOR=0
MYSQL_VERSION_PATCH=29
MYSQL_VERSION_PATCH=30
@@ -38,8 +38,8 @@ char ex_var_names[MAX_MYSQL_VAR][FN_REFLEN];
ulonglong last_values[MAX_MYSQL_VAR];
static int interval=0;
static my_bool option_force=0,interrupted=0,new_line=0,
opt_compress=0, opt_relative=0, opt_verbose=0, opt_vertical=0,
tty_password= 0, opt_nobeep;
opt_compress= 0, opt_local= 0, opt_relative= 0, opt_verbose= 0,
opt_vertical= 0, tty_password= 0, opt_nobeep;
static my_bool debug_info_flag= 0, debug_check_flag= 0;
static uint tcp_port = 0, option_wait = 0, option_silent=0, nr_iterations;
static uint opt_count_iterations= 0, my_end_arg;
@@ -102,9 +102,12 @@ enum commands {
ADMIN_PING, ADMIN_EXTENDED_STATUS, ADMIN_FLUSH_STATUS,
ADMIN_FLUSH_PRIVILEGES, ADMIN_START_SLAVE, ADMIN_STOP_SLAVE,
ADMIN_START_ALL_SLAVES, ADMIN_STOP_ALL_SLAVES,
ADMIN_FLUSH_THREADS, ADMIN_OLD_PASSWORD, ADMIN_FLUSH_SLOW_LOG,
ADMIN_FLUSH_THREADS, ADMIN_OLD_PASSWORD, ADMIN_FLUSH_BINARY_LOG,
ADMIN_FLUSH_ENGINE_LOG, ADMIN_FLUSH_ERROR_LOG, ADMIN_FLUSH_GENERAL_LOG,
ADMIN_FLUSH_RELAY_LOG, ADMIN_FLUSH_SLOW_LOG,
ADMIN_FLUSH_TABLE_STATISTICS, ADMIN_FLUSH_INDEX_STATISTICS,
ADMIN_FLUSH_USER_STATISTICS, ADMIN_FLUSH_CLIENT_STATISTICS,
ADMIN_FLUSH_USER_RESOURCES,
ADMIN_FLUSH_ALL_STATUS, ADMIN_FLUSH_ALL_STATISTICS
};
static const char *command_names[]= {
@@ -116,9 +119,10 @@ static const char *command_names[]= {
"ping", "extended-status", "flush-status",
"flush-privileges", "start-slave", "stop-slave",
"start-all-slaves", "stop-all-slaves",
"flush-threads", "old-password", "flush-slow-log",
"flush-threads", "old-password", "flush-binary-log", "flush-engine-log",
"flush-error-log", "flush-general-log", "flush-relay-log", "flush-slow-log",
"flush-table-statistics", "flush-index-statistics",
"flush-user-statistics", "flush-client-statistics",
"flush-user-statistics", "flush-client-statistics", "flush-user-resources",
"flush-all-status", "flush-all-statistics",
NullS
};
@@ -160,6 +164,9 @@ static struct my_option my_long_options[] =
NO_ARG, 0, 0, 0, 0, 0, 0},
{"host", 'h', "Connect to host.", &host, &host, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"local", 'l', "Local command, don't write to binlog.",
&opt_local, &opt_local, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0},
{"no-beep", 'b', "Turn off beep on error.", &opt_nobeep,
&opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"password", 'p',
@@ -617,14 +624,25 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
*/

struct my_rnd_struct rand_st;
char buff[FN_REFLEN + 20];

if (opt_local)
{
sprintf(buff, "set local sql_log_bin=0");
if (mysql_query(mysql, buff))
{
my_printf_error(0, "SET LOCAL SQL_LOG_BIN=0 failed; error: '%-.200s'",
error_flags, mysql_error(mysql));
return -1;
}
}

for (; argc > 0 ; argv++,argc--)
{
int command;
switch ((command= find_type(argv[0],&command_typelib,FIND_TYPE_BASIC))) {
case ADMIN_CREATE:
{
char buff[FN_REFLEN+20];
if (argc < 2)
{
my_printf_error(0, "Too few arguments to create", error_flags);
@@ -902,6 +920,56 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
}
break;
}
case ADMIN_FLUSH_BINARY_LOG:
{
if (mysql_query(mysql, "flush binary logs"))
{
my_printf_error(0, "flush failed; error: '%s'", error_flags,
mysql_error(mysql));
return -1;
}
break;
}
case ADMIN_FLUSH_ENGINE_LOG:
{
if (mysql_query(mysql,"flush engine logs"))
{
my_printf_error(0, "flush failed; error: '%s'", error_flags,
mysql_error(mysql));
return -1;
}
break;
}
case ADMIN_FLUSH_ERROR_LOG:
{
if (mysql_query(mysql, "flush error logs"))
{
my_printf_error(0, "flush failed; error: '%s'", error_flags,
mysql_error(mysql));
return -1;
}
break;
}
case ADMIN_FLUSH_GENERAL_LOG:
{
if (mysql_query(mysql, "flush general logs"))
{
my_printf_error(0, "flush failed; error: '%s'", error_flags,
mysql_error(mysql));
return -1;
}
break;
}
case ADMIN_FLUSH_RELAY_LOG:
{
if (mysql_query(mysql, "flush relay logs"))
{
my_printf_error(0, "flush failed; error: '%s'", error_flags,
mysql_error(mysql));
return -1;
}
break;
}
case ADMIN_FLUSH_SLOW_LOG:
{
if (mysql_query(mysql,"flush slow logs"))
@@ -972,6 +1040,16 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
}
break;
}
case ADMIN_FLUSH_USER_RESOURCES:
{
if (mysql_query(mysql, "flush user_resources"))
{
my_printf_error(0, "flush failed; error: '%s'", error_flags,
mysql_error(mysql));
return -1;
}
break;
}
case ADMIN_FLUSH_CLIENT_STATISTICS:
{
if (mysql_query(mysql,"flush client_statistics"))
@@ -1295,12 +1373,18 @@ static void usage(void)
flush-index-statistics Flush index statistics\n\
flush-logs Flush all logs\n\
flush-privileges Reload grant tables (same as reload)\n\
flush-binary-log Flush binary log\n\
flush-engine-log Flush engine log(s)\n\
flush-error-log Flush error log\n\
flush-general-log Flush general log\n\
flush-relay-log Flush relay log\n\
flush-slow-log Flush slow query log\n\
flush-status Clear status variables\n\
flush-status Clear status variables\n\
flush-table-statistics Clear table statistics\n\
flush-tables Flush all tables\n\
flush-threads Flush the thread cache\n\
flush-user-statistics Flush user statistics\n\
flush-user-resources Flush user resources\n\
kill id,id,... Kill mysql threads");
#if MYSQL_VERSION_ID >= 32200
puts("\
@@ -106,7 +106,7 @@ static const char* sock= 0;
static char *opt_plugindir= 0, *opt_default_auth= 0;

#ifdef HAVE_SMEM
static char *shared_memory_base_name= 0;
static const char *shared_memory_base_name= 0;
#endif
static char* user = 0;
static char* pass = 0;
@@ -698,8 +698,9 @@ static void write_header(FILE *sql_file, char *db_name)
"-- MySQL dump %s Distrib %s, for %s (%s)\n--\n",
DUMP_VERSION, MYSQL_SERVER_VERSION, SYSTEM_TYPE,
MACHINE_TYPE);
print_comment(sql_file, 0, "-- Host: %s Database: %s\n",
fix_for_comment(current_host ? current_host : "localhost"),
print_comment(sql_file, 0, "-- Host: %s ",
fix_for_comment(current_host ? current_host : "localhost"));
print_comment(sql_file, 0, "Database: %s\n",
fix_for_comment(db_name ? db_name : ""));
print_comment(sql_file, 0,
"-- ------------------------------------------------------\n"
@@ -3341,6 +3341,8 @@ void do_exec(struct st_command *command)
DBUG_ENTER("do_exec");
DBUG_PRINT("enter", ("cmd: '%s'", cmd));

var_set_int("$sys_errno",0);

/* Skip leading space */
while (*cmd && my_isspace(charset_info, *cmd))
cmd++;
@@ -3457,6 +3459,7 @@ void do_exec(struct st_command *command)
report_or_die("command \"%s\" failed with wrong error: %d",
command->first_argument, status);
}
var_set_int("$sys_errno",status);
}
else if (command->expected_errors.err[0].type == ERR_ERRNO &&
command->expected_errors.err[0].code.errnum != 0)
@@ -485,7 +485,6 @@
#cmakedefine _LARGE_FILES 1
#cmakedefine _LARGEFILE_SOURCE 1
#cmakedefine _LARGEFILE64_SOURCE 1
#cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@

#cmakedefine TIME_WITH_SYS_TIME 1

@@ -14,7 +14,8 @@

if [ -f `my_print_defaults --mysqld | grep -oP "pid-file=\K[^$]+"` ]; then
# If this fails, check debian.conf!
mysqladmin --defaults-file=/etc/mysql/debian.cnf flush-logs
mysqladmin --defaults-file=/etc/mysql/debian.cnf --local flush-error-log \
flush-engine-log flush-general-log flush-slow-log
fi
endscript
}
@@ -774,7 +774,6 @@ int SSL_CTX_load_verify_locations(SSL_CTX* ctx, const char* file,
const char* path)
{
int ret = SSL_FAILURE;
const int HALF_PATH = 128;

if (file) ret = read_file(ctx, file, SSL_FILETYPE_PEM, CA);

@@ -1084,10 +1084,9 @@ typedef ulong myf; /* Type of MyFlags in my_funcs */
static inline char *dlerror(void)
{
static char win_errormsg[2048];
if(FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
0, GetLastError(), 0, win_errormsg, 2048, NULL))
return win_errormsg;
return "";
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
0, GetLastError(), 0, win_errormsg, 2048, NULL);
return win_errormsg;
}
#define HAVE_DLOPEN 1
#define HAVE_DLERROR 1
@@ -64,9 +64,9 @@ typedef struct my_aio_result {
#define MY_FAE 8 /* Fatal if any error */
#define MY_WME 16 /* Write message on error */
#define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */
#define MY_IGNORE_BADFD 32 /* my_sync: ignore 'bad descriptor' errors */
#define MY_UNUSED 64 /* Unused (was support for RAID) */
#define MY_FULL_IO 512 /* For my_read - loop intil I/O is complete */
#define MY_IGNORE_BADFD 32 /* my_sync(): ignore 'bad descriptor' errors */
#define MY_NOSYMLINKS 512 /* my_open(): don't follow symlinks */
#define MY_FULL_IO 512 /* my_read(): loop intil I/O is complete */
#define MY_DONT_CHECK_FILESIZE 128 /* Option to init_io_cache() */
#define MY_LINK_WARNING 32 /* my_redel() gives warning if links */
#define MY_COPYTIME 64 /* my_redel() copys time */
@@ -253,7 +253,7 @@ extern ulong my_file_opened,my_stream_opened, my_tmp_file_created;
extern ulong my_file_total_opened;
extern ulong my_sync_count;
extern uint mysys_usage_id;
extern my_bool my_init_done;
extern my_bool my_init_done, my_thr_key_mysys_exists;
extern my_bool my_assert_on_error;
extern myf my_global_flags; /* Set to MY_WME for more error messages */
/* Point to current my_message() */
@@ -567,6 +567,7 @@ my_off_t my_b_safe_tell(IO_CACHE* info); /* picks the correct tell() */
typedef uint32 ha_checksum;
extern ulong my_crc_dbug_check;

extern int (*mysys_test_invalid_symlink)(const char *filename);
#include <my_alloc.h>

/* Prototypes for mysys and my_func functions */
@@ -594,9 +595,11 @@ extern int my_realpath(char *to, const char *filename, myf MyFlags);
extern File my_create_with_symlink(const char *linkname, const char *filename,
int createflags, int access_flags,
myf MyFlags);
extern int my_delete_with_symlink(const char *name, myf MyFlags);
extern int my_rename_with_symlink(const char *from,const char *to,myf MyFlags);
extern int my_symlink(const char *content, const char *linkname, myf MyFlags);
extern int my_handler_delete_with_symlink(PSI_file_key key, const char *name,
const char *ext, myf sync_dir);

extern size_t my_read(File Filedes,uchar *Buffer,size_t Count,myf MyFlags);
extern size_t my_pread(File Filedes,uchar *Buffer,size_t Count,my_off_t offset,
myf MyFlags);
@@ -441,20 +441,6 @@
inline_mysql_file_create_with_symlink(P1, P2, P3, P4, P5)
#endif

/**
@def mysql_file_delete_with_symlink(K, P1, P2)
Instrumented delete with symbolic link.
@c mysql_file_delete_with_symlink is a replacement
for @c my_delete_with_symlink.
*/
#ifdef HAVE_PSI_FILE_INTERFACE
#define mysql_file_delete_with_symlink(K, P1, P2) \
inline_mysql_file_delete_with_symlink(K, __FILE__, __LINE__, P1, P2)
#else
#define mysql_file_delete_with_symlink(K, P1, P2) \
inline_mysql_file_delete_with_symlink(P1, P2)
#endif

/**
@def mysql_file_rename_with_symlink(K, P1, P2, P3)
Instrumented rename with symbolic link.
@@ -1337,31 +1323,6 @@ inline_mysql_file_create_with_symlink(
return file;
}

static inline int
inline_mysql_file_delete_with_symlink(
#ifdef HAVE_PSI_FILE_INTERFACE
PSI_file_key key, const char *src_file, uint src_line,
#endif
const char *name, myf flags)
{
int result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_name_locker)
(&state, key, PSI_FILE_DELETE, name, &locker);
if (likely(locker != NULL))
{
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
result= my_delete_with_symlink(name, flags);
PSI_FILE_CALL(end_file_close_wait)(locker, result);
return result;
}
#endif

result= my_delete_with_symlink(name, flags);
return result;
}

static inline int
inline_mysql_file_rename_with_symlink(

0 comments on commit f66395f

Please sign in to comment.