Skip to content
Permalink
Browse files
Merge mariadb-10.3.8 into 10.3
  • Loading branch information
dr-m committed Jul 3, 2018
2 parents 358ae4b + eaab98f commit c3289d2
Show file tree
Hide file tree
Showing 285 changed files with 5,372 additions and 1,845 deletions.
@@ -127,6 +127,7 @@ scripts/mytop
scripts/wsrep_sst_common
scripts/wsrep_sst_mysqldump
scripts/wsrep_sst_rsync
scripts/wsrep_sst_rsync_wan
scripts/wsrep_sst_mariabackup
scripts/wsrep_sst_xtrabackup
scripts/wsrep_sst_xtrabackup-v2
@@ -498,6 +499,12 @@ UpgradeLog*.htm
# Microsoft Fakes
FakesAssemblies/

# macOS garbage
.DS_Store

# QtCreator && CodeBlocks
*.cbp

compile_commands.json
.clang-format
.kscope/
@@ -297,7 +297,7 @@ ELSE()
ENDIF()
SET(DEFAULT_CHARSET_HOME "${DEFAULT_MYSQL_HOME}")
SET(PLUGINDIR "${DEFAULT_MYSQL_HOME}/${INSTALL_PLUGINDIR}")
IF(INSTALL_SYSCONFDIR AND NOT DEFAULT_SYSCONFDIR)
IF(INSTALL_SYSCONFDIR AND NOT DEFAULT_SYSCONFDIR AND NOT DEB)
SET(DEFAULT_SYSCONFDIR "${INSTALL_SYSCONFDIR}")
ENDIF()

@@ -5090,6 +5090,14 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
if (opt_xml)
print_xml_tag(md_result_file, "", "\n", "database", "name=", db, NullS);


/* obtain dump of routines (procs/functions) */
if (opt_routines && mysql_get_server_version(mysql) >= 50009)
{
DBUG_PRINT("info", ("Dumping routines for database %s", db));
dump_routines_for_db(db);
}

if (opt_single_transaction && mysql_get_server_version(mysql) >= 50500)
{
verbose_msg("-- Setting savepoint...\n");
@@ -5099,7 +5107,6 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
DBUG_RETURN(1);
}
}

/* Dump each selected table */
for (pos= dump_tables; pos < end; pos++)
{
@@ -5161,12 +5168,6 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
DBUG_PRINT("info", ("Dumping events for database %s", db));
dump_events_for_db(db);
}
/* obtain dump of routines (procs/functions) */
if (opt_routines && mysql_get_server_version(mysql) >= 50009)
{
DBUG_PRINT("info", ("Dumping routines for database %s", db));
dump_routines_for_db(db);
}
free_root(&glob_root, MYF(0));
if (opt_xml)
{
@@ -850,7 +850,7 @@ build_table_string(void)

if (auto_generate_sql_guid_primary)
{
dynstr_append(&table_string, "id varchar(32) primary key");
dynstr_append(&table_string, "id varchar(36) primary key");

if (num_int_cols || num_char_cols || auto_generate_sql_guid_primary)
dynstr_append(&table_string, ",");
@@ -865,7 +865,7 @@ build_table_string(void)
if (count) /* Except for the first pass we add a comma */
dynstr_append(&table_string, ",");

if (snprintf(buf, HUGE_STRING_LENGTH, "id%d varchar(32) unique key", count)
if (snprintf(buf, HUGE_STRING_LENGTH, "id%d varchar(36) unique key", count)
> HUGE_STRING_LENGTH)
{
fprintf(stderr, "Memory Allocation error in create table\n");
@@ -125,7 +125,8 @@ static my_bool view_protocol= 0, view_protocol_enabled= 0;
static my_bool cursor_protocol= 0, cursor_protocol_enabled= 0;
static my_bool parsing_disabled= 0;
static my_bool display_result_vertically= FALSE, display_result_lower= FALSE,
display_metadata= FALSE, display_result_sorted= FALSE;
display_metadata= FALSE, display_result_sorted= FALSE,
display_session_track_info= FALSE;
static my_bool disable_query_log= 0, disable_result_log= 0;
static my_bool disable_connect_log= 0;
static my_bool disable_warnings= 0, disable_column_names= 0;
@@ -153,6 +154,7 @@ static struct property prop_list[] = {
{ &abort_on_error, 0, 1, 0, "$ENABLED_ABORT_ON_ERROR" },
{ &disable_connect_log, 0, 1, 1, "$ENABLED_CONNECT_LOG" },
{ &disable_info, 0, 1, 1, "$ENABLED_INFO" },
{ &display_session_track_info, 0, 1, 1, "$ENABLED_STATE_CHANGE_INFO" },
{ &display_metadata, 0, 0, 0, "$ENABLED_METADATA" },
{ &ps_protocol_enabled, 0, 0, 0, "$ENABLED_PS_PROTOCOL" },
{ &disable_query_log, 0, 0, 1, "$ENABLED_QUERY_LOG" },
@@ -166,6 +168,7 @@ enum enum_prop {
P_ABORT= 0,
P_CONNECT,
P_INFO,
P_SESSION_TRACK,
P_META,
P_PS,
P_QUERY,
@@ -362,6 +365,7 @@ enum enum_commands {
Q_WAIT_FOR_SLAVE_TO_STOP,
Q_ENABLE_WARNINGS, Q_DISABLE_WARNINGS,
Q_ENABLE_INFO, Q_DISABLE_INFO,
Q_ENABLE_SESSION_TRACK_INFO, Q_DISABLE_SESSION_TRACK_INFO,
Q_ENABLE_METADATA, Q_DISABLE_METADATA,
Q_ENABLE_COLUMN_NAMES, Q_DISABLE_COLUMN_NAMES,
Q_EXEC, Q_DELIMITER,
@@ -384,6 +388,7 @@ enum enum_commands {
Q_RESULT_FORMAT_VERSION,
Q_MOVE_FILE, Q_REMOVE_FILES_WILDCARD, Q_SEND_EVAL,
Q_ENABLE_PREPARE_WARNINGS, Q_DISABLE_PREPARE_WARNINGS,
Q_RESET_CONNECTION,
Q_UNKNOWN, /* Unknown command. */
Q_COMMENT, /* Comments, ignored. */
Q_COMMENT_WITH_COMMAND,
@@ -435,6 +440,8 @@ const char *command_names[]=
"disable_warnings",
"enable_info",
"disable_info",
"enable_session_track_info",
"disable_session_track_info",
"enable_metadata",
"disable_metadata",
"enable_column_names",
@@ -491,6 +498,7 @@ const char *command_names[]=
"send_eval",
"enable_prepare_warnings",
"disable_prepare_warnings",
"reset_connection",

0
};
@@ -6531,6 +6539,34 @@ void do_delimiter(struct st_command* command)
}


/*
do_reset_connection
DESCRIPTION
Reset the current session.
*/

static void do_reset_connection()
{
#ifndef EMBEDDED_LIBRARY
MYSQL *mysql = cur_con->mysql;

DBUG_ENTER("do_reset_connection");
if (mysql_reset_connection(mysql))
die("reset connection failed: %s", mysql_error(mysql));
if (cur_con->stmt)
{
mysql_stmt_close(cur_con->stmt);
cur_con->stmt= NULL;
}
DBUG_VOID_RETURN;
#else
die("reset connection failed: unsupported by embedded server client library");
return;
#endif
}


my_bool match_delimiter(int c, const char *delim, size_t length)
{
uint i;
@@ -7786,6 +7822,70 @@ void append_info(DYNAMIC_STRING *ds, ulonglong affected_rows,
}


/**
@brief Append state change information (received through Ok packet) to the output.
@param [in,out] ds Dynamic string to hold the content to be printed.
@param [in] mysql Connection handle.
*/

static void append_session_track_info(DYNAMIC_STRING *ds, MYSQL *mysql)
{
#ifndef EMBEDDED_LIBRARY
for (unsigned int type= SESSION_TRACK_BEGIN; type <= SESSION_TRACK_END; type++)
{
const char *data;
size_t data_length;

if (!mysql_session_track_get_first(mysql,
(enum_session_state_type) type,
&data, &data_length))
{
dynstr_append(ds, "-- ");
switch (type)
{
case SESSION_TRACK_SYSTEM_VARIABLES:
dynstr_append(ds, "Tracker : SESSION_TRACK_SYSTEM_VARIABLES\n");
break;
case SESSION_TRACK_SCHEMA:
dynstr_append(ds, "Tracker : SESSION_TRACK_SCHEMA\n");
break;
case SESSION_TRACK_STATE_CHANGE:
dynstr_append(ds, "Tracker : SESSION_TRACK_STATE_CHANGE\n");
break;
case SESSION_TRACK_GTIDS:
dynstr_append(ds, "Tracker : SESSION_TRACK_GTIDS\n");
break;
case SESSION_TRACK_TRANSACTION_CHARACTERISTICS:
dynstr_append(ds, "Tracker : SESSION_TRACK_TRANSACTION_CHARACTERISTICS\n");
break;
case SESSION_TRACK_TRANSACTION_TYPE:
dynstr_append(ds, "Tracker : SESSION_TRACK_TRANSACTION_TYPE\n");
break;
default:
DBUG_ASSERT(0);
dynstr_append(ds, "\n");
}


dynstr_append(ds, "-- ");
dynstr_append_mem(ds, data, data_length);
}
else
continue;
while (!mysql_session_track_get_next(mysql,
(enum_session_state_type) type,
&data, &data_length))
{
dynstr_append(ds, "\n-- ");
dynstr_append_mem(ds, data, data_length);
}
dynstr_append(ds, "\n\n");
}
#endif /* EMBEDDED_LIBRARY */
}


/*
Display the table headings with the names tab separated
*/
@@ -7966,6 +8066,9 @@ void run_query_normal(struct st_connection *cn, struct st_command *command,
if (!disable_info)
append_info(ds, mysql_affected_rows(mysql), mysql_info(mysql));

if (display_session_track_info)
append_session_track_info(ds, mysql);

/*
Add all warnings to the result. We can't do this if we are in
the middle of processing results from multi-statement, because
@@ -8381,6 +8484,10 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
if (!disable_info)
append_info(ds, mysql_stmt_affected_rows(stmt), mysql_info(mysql));

if (display_session_track_info)
append_session_track_info(ds, mysql);


if (!disable_warnings)
{
/* Get the warnings from execute */
@@ -8776,6 +8883,7 @@ void init_re(void)
"[[:space:]]*SELECT[[:space:]]|"
"[[:space:]]*CREATE[[:space:]]+TABLE[[:space:]]|"
"[[:space:]]*DO[[:space:]]|"
"[[:space:]]*HANDLER[[:space:]]+.*[[:space:]]+READ[[:space:]]|"
"[[:space:]]*SET[[:space:]]+OPTION[[:space:]]|"
"[[:space:]]*DELETE[[:space:]]+MULTI[[:space:]]|"
"[[:space:]]*UPDATE[[:space:]]+MULTI[[:space:]]|"
@@ -9361,6 +9469,12 @@ int main(int argc, char **argv)
case Q_DISABLE_INFO:
set_property(command, P_INFO, 1);
break;
case Q_ENABLE_SESSION_TRACK_INFO:
set_property(command, P_SESSION_TRACK, 1);
break;
case Q_DISABLE_SESSION_TRACK_INFO:
set_property(command, P_SESSION_TRACK, 0);
break;
case Q_ENABLE_METADATA:
set_property(command, P_META, 1);
break;
@@ -9571,6 +9685,9 @@ int main(int argc, char **argv)
case Q_PING:
handle_command_error(command, mysql_ping(cur_con->mysql), -1);
break;
case Q_RESET_CONNECTION:
do_reset_connection();
break;
case Q_SEND_SHUTDOWN:
handle_command_error(command,
mysql_shutdown(cur_con->mysql,
@@ -171,6 +171,7 @@ SET(INSTALL_SYSTEMD_TMPFILESDIR_RPM "/usr/lib/tmpfiles.d")
SET(INSTALL_BINDIR_DEB "bin")
SET(INSTALL_SBINDIR_DEB "sbin")
SET(INSTALL_SCRIPTDIR_DEB "bin")
SET(INSTALL_SYSCONFDIR_DEB "/etc")
SET(INSTALL_SYSCONF2DIR_DEB "/etc/mysql/conf.d")
#
SET(INSTALL_LIBDIR_DEB "lib")
@@ -29,26 +29,25 @@ then
sed 's|-DDEB|-DPLUGIN_TOKUDB=NO -DPLUGIN_MROONGA=NO -DPLUGIN_ROCKSDB=NO -DPLUGIN_SPIDER=NO -DPLUGIN_OQGRAPH=NO -DPLUGIN_PERFSCHEMA=NO -DPLUGIN_SPHINX=NO -WITH_EMBEDDED_SERVER=OFF -DDEB|' -i debian/rules
fi

# Convert gcc version to numberical value. Format is Mmmpp where M is Major
# version, mm is minor version and p is patch.
# -dumpfullversion & -dumpversion to make it uniform across old and new (>=7)
GCCVERSION=$(gcc -dumpfullversion -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' \
-e 's/\.\([0-9]\)/0\1/g' \
-e 's/^[0-9]\{3,4\}$/&00/')

# Look up distro-version specific stuff
#
# Always keep the actual packaging as up-to-date as possible following the latest
# Debian policy and targeting Debian Sid. Then case-by-case run in autobake-deb.sh
# tests for backwards compatibility and strip away parts on older builders.

# If iproute2 is not available (before Debian Jessie and Ubuntu Trusty)
# fall back to the old iproute package.
if ! apt-cache madison iproute2 | grep 'iproute2 *|' >/dev/null 2>&1
then
sed 's/iproute2/iproute/' -i debian/control
fi

# If libcrack2 (>= 2.9.0) is not available (before Debian Jessie and Ubuntu Trusty)
# clean away the cracklib stanzas so the package can build without them.
if ! apt-cache madison libcrack2-dev | grep 'libcrack2-dev *| *2\.9' >/dev/null 2>&1
then
sed '/libcrack2-dev/d' -i debian/control
sed '/Package: mariadb-plugin-cracklib/,+11d' -i debian/control
sed '/Package: mariadb-plugin-cracklib/,+9d' -i debian/control
fi

# If libpcre3-dev (>= 2:8.35-3.2~) is not available (before Debian Jessie or Ubuntu Wily)
@@ -85,19 +84,12 @@ fi
# Debian Jessie and older and on Ubuntu Xenial and older with the following error message:
# /usr/bin/ld.bfd.real: /tmp/ccOIwjFo.ltrans0.ltrans.o: relocation R_X86_64_PC32 against symbol
# `toku_product_name_strings' can not be used when making a shared object; recompile with -fPIC
# Therefore we need to disable PIE on those releases using debhelper as proxy for detection.
if ! apt-cache madison debhelper | grep 'debhelper *| *1[0-9]\.' >/dev/null 2>&1
# Therefore we need to disable PIE on those releases using gcc as proxy for detection.
if [[ $GCCVERSION -lt 60000 ]]
then
sed 's/hardening=+all$/hardening=+all,-pie/' -i debian/rules
fi


# Convert gcc version to numberical value. Format is Mmmpp where M is Major
# version, mm is minor version and p is patch.
# -dumpfullversion & -dumpversion to make it uniform across old and new (>=7)
GCCVERSION=$(gcc -dumpfullversion -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' \
-e 's/\.\([0-9]\)/0\1/g' \
-e 's/^[0-9]\{3,4\}$/&00/')
# Don't build rocksdb package if gcc version is less than 4.8 or we are running on
# x86 32 bit.
if [[ $GCCVERSION -lt 40800 ]] || [[ $(arch) =~ i[346]86 ]] || [[ $TRAVIS ]]
@@ -120,8 +112,7 @@ Breaks: mariadb-aws-key-management-10.1,
mariadb-aws-key-management-10.2
Replaces: mariadb-aws-key-management-10.1,
mariadb-aws-key-management-10.2
Depends: libcurl3,
mariadb-server-10.3,
Depends: mariadb-server-10.3,
\${misc:Depends},
\${shlibs:Depends}
Description: Amazon Web Service Key Management Service Plugin for MariaDB
@@ -136,8 +127,8 @@ fi
# Mroonga, TokuDB never built on Travis CI anyway, see build flags above
if [[ $TRAVIS ]]
then
sed -i -e "/Package: mariadb-plugin-tokudb/,+17d" debian/control
sed -i -e "/Package: mariadb-plugin-mroonga/,+16d" debian/control
sed -i -e "/Package: mariadb-plugin-tokudb/,+19d" debian/control
sed -i -e "/Package: mariadb-plugin-mroonga/,+17d" debian/control
sed -i -e "/Package: mariadb-plugin-spider/,+18d" debian/control
sed -i -e "/Package: mariadb-plugin-oqgraph/,+16d" debian/control
sed -i -e "/usr\/lib\/mysql\/plugin\/ha_sphinx.so/d" debian/mariadb-server-10.3.install

0 comments on commit c3289d2

Please sign in to comment.