Commit 7b06bc9a authored by Daniel Black's avatar Daniel Black

Merge branch 10.7 into 10.8

Closes #2083
parents 5c69e936 b249abde
...@@ -26,6 +26,7 @@ ENDMACRO() ...@@ -26,6 +26,7 @@ ENDMACRO()
MACRO (CHECK_LIBFMT) MACRO (CHECK_LIBFMT)
IF(WITH_LIBFMT STREQUAL "system" OR WITH_LIBFMT STREQUAL "auto") IF(WITH_LIBFMT STREQUAL "system" OR WITH_LIBFMT STREQUAL "auto")
SET(CMAKE_REQUIRED_INCLUDES ${LIBFMT_INCLUDE_DIR})
CHECK_CXX_SOURCE_COMPILES( CHECK_CXX_SOURCE_COMPILES(
"#define FMT_STATIC_THOUSANDS_SEPARATOR ',' "#define FMT_STATIC_THOUSANDS_SEPARATOR ','
#define FMT_HEADER_ONLY 1 #define FMT_HEADER_ONLY 1
...@@ -37,6 +38,7 @@ MACRO (CHECK_LIBFMT) ...@@ -37,6 +38,7 @@ MACRO (CHECK_LIBFMT)
std::cout << fmt::vformat(\"The answer is {}.\", std::cout << fmt::vformat(\"The answer is {}.\",
fmt::format_args(&arg, 1)); fmt::format_args(&arg, 1));
}" HAVE_SYSTEM_LIBFMT) }" HAVE_SYSTEM_LIBFMT)
SET(CMAKE_REQUIRED_INCLUDES)
ENDIF() ENDIF()
IF(NOT HAVE_SYSTEM_LIBFMT OR WITH_LIBFMT STREQUAL "bundled") IF(NOT HAVE_SYSTEM_LIBFMT OR WITH_LIBFMT STREQUAL "bundled")
IF (WITH_LIBFMT STREQUAL "system") IF (WITH_LIBFMT STREQUAL "system")
......
This diff is collapsed.
...@@ -23,10 +23,10 @@ version-substvar-for-external-package libmariadbd-dev -> libmariadbclient-dev ...@@ -23,10 +23,10 @@ version-substvar-for-external-package libmariadbd-dev -> libmariadbclient-dev
# ColumnStore not used in Debian, safe to ignore. Reported upstream in https://jira.mariadb.org/browse/MDEV-24124 # ColumnStore not used in Debian, safe to ignore. Reported upstream in https://jira.mariadb.org/browse/MDEV-24124
source-is-missing storage/columnstore/columnstore/utils/jemalloc/libjemalloc.so.2 source-is-missing storage/columnstore/columnstore/utils/jemalloc/libjemalloc.so.2
# Must be fixed upstream # Must be fixed upstream
source-is-missing storage/mroonga/vendor/groonga/examples/dictionary/html/js/jquery-ui-1.8.18.custom.js * source-is-missing storage/mroonga/vendor/groonga/examples/dictionary/html/js/jquery-ui-1.8.18.custom.js*
# Intentional control relationships # Intentional control relationships
version-substvar-for-external-package Replaces (line 216) ${source:Version} libmariadbd-dev -> libmariadbclient-dev version-substvar-for-external-package Replaces * ${source:Version} libmariadbd-dev -> libmariadbclient-dev
version-substvar-for-external-package Replaces (line 66) ${source:Version} libmariadb-dev -> libmysqlclient-dev version-substvar-for-external-package Replaces * ${source:Version} libmariadb-dev -> libmysqlclient-dev
version-substvar-for-external-package Replaces (line 66) ${source:Version} libmariadb-dev -> libmysqld-dev version-substvar-for-external-package Replaces * ${source:Version} libmariadb-dev -> libmysqld-dev
# We can't change build dependencies on a stable branch (10.5..10.8) so just override this # We can't change build dependencies on a stable branch (10.5..10.8) so just override this
missing-build-dependency-for-dh-addon systemd * missing-build-dependency-for-dh-addon systemd *
...@@ -3,8 +3,12 @@ Tests: smoke ...@@ -3,8 +3,12 @@ Tests: smoke
# for its existence (see the list in debian/control), install it if available # for its existence (see the list in debian/control), install it if available
# and check in the test if it's functional when it should be. # and check in the test if it's functional when it should be.
# The plugin package also already depends on the other one. # The plugin package also already depends on the other one.
Depends: mariadb-plugin-rocksdb | mariadb-server-10.8 Depends: mariadb-plugin-rocksdb | mariadb-server-10.8,
Restrictions: allow-stderr needs-root isolation-container mariadb-plugin-provider-bzip2,
mariadb-plugin-provider-lz4,
mariadb-plugin-provider-lzma,
mariadb-plugin-provider-lzo,
mariadb-plugin-provider-snappy
Tests: upstream Tests: upstream
Depends: mariadb-test, eatmydata Depends: mariadb-test, eatmydata
......
...@@ -38,6 +38,11 @@ else ...@@ -38,6 +38,11 @@ else
# If systemd (and systemctl) is available, but the service did not start, then # If systemd (and systemctl) is available, but the service did not start, then
# this smoke test is supposed to fail if next commands don't work. # this smoke test is supposed to fail if next commands don't work.
echo "Found systemctl, continuing smoke test.." echo "Found systemctl, continuing smoke test.."
# Compression plugins are separated from main server package
# to own packages (for example LZ4 package mariadb-plugin-provider-lz4)
# and they are installed after mariadb-server.
# which means that they don't exist if MariaDB is not restarted
systemctl restart mariadb
fi fi
mysql <<EOT mysql <<EOT
...@@ -71,10 +76,10 @@ EOT ...@@ -71,10 +76,10 @@ EOT
# but disabled with '#' the options that are not available in this binary build # but disabled with '#' the options that are not available in this binary build
mariadb <<EOT mariadb <<EOT
SET GLOBAL innodb_compression_algorithm=lz4; SET GLOBAL innodb_compression_algorithm=lz4;
#SET GLOBAL innodb_compression_algorithm=lzo; SET GLOBAL innodb_compression_algorithm=lzo;
#SET GLOBAL innodb_compression_algorithm=lzma; SET GLOBAL innodb_compression_algorithm=lzma;
#SET GLOBAL innodb_compression_algorithm=bzip2; SET GLOBAL innodb_compression_algorithm=bzip2;
#SET GLOBAL innodb_compression_algorithm=snappy; SET GLOBAL innodb_compression_algorithm=snappy;
SET GLOBAL innodb_compression_algorithm=zlib; SET GLOBAL innodb_compression_algorithm=zlib;
SET GLOBAL innodb_compression_algorithm=none; SET GLOBAL innodb_compression_algorithm=none;
EOT EOT
......
...@@ -8913,3 +8913,15 @@ ERROR 42000: Incorrect usage/placement of 'HIGH_PRIORITY' ...@@ -8913,3 +8913,15 @@ ERROR 42000: Incorrect usage/placement of 'HIGH_PRIORITY'
# #
# End of 10.4 tests # End of 10.4 tests
# #
#
# MDEV-28129: MariaDB UAF issue at lex_end_nops(LEX*)
#
CREATE PROCEDURE sp() SELECT 1 INTO @;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
CREATE PROCEDURE sp() SET @=1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '=1' at line 1
CREATE PROCEDURE sp() SELECT @;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
#
# End of 10.7 tests
#
...@@ -10484,3 +10484,20 @@ DELIMITER ;$$ ...@@ -10484,3 +10484,20 @@ DELIMITER ;$$
--echo # --echo #
--echo # End of 10.4 tests --echo # End of 10.4 tests
--echo # --echo #
--echo #
--echo # MDEV-28129: MariaDB UAF issue at lex_end_nops(LEX*)
--echo #
--error ER_PARSE_ERROR
CREATE PROCEDURE sp() SELECT 1 INTO @;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp() SET @=1;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp() SELECT @;
--echo #
--echo # End of 10.7 tests
--echo #
...@@ -250,3 +250,21 @@ LOCK TABLES t1 WRITE,t2 WRITE; ...@@ -250,3 +250,21 @@ LOCK TABLES t1 WRITE,t2 WRITE;
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1); INSERT INTO t2 VALUES (1);
DROP TABLE t2, t1; DROP TABLE t2, t1;
#
# MDEV-28138 MariaDB Assertion Failed in mtr_buf_t::has_space
#
CREATE TABLE t1(
f1 SERIAL,
f2 LINESTRING NOT NULL DEFAULT LineFromText('LINESTRING(1 1,2 2,3 3)'),
SPATIAL INDEX(f2))ENGINE=InnoDB;
INSERT INTO t1(f1) VALUES(0), (1), (2);
ERROR 23000: Duplicate entry '1' for key 'f1'
DROP TABLE t1;
#
# MDEV-28237 Assertion `0' failed in row_upd_sec_index_entry on DELETE
#
CREATE TABLE t1 (c0 YEAR UNIQUE) ENGINE=InnoDB;
INSERT INTO t1 VALUES (0),(0),(0),(0),(0),(0),(0);
ERROR HY000: Got error 1 "Operation not permitted" during COMMIT
DELETE FROM t1;
DROP TABLE t1;
...@@ -261,3 +261,23 @@ LOCK TABLES t1 WRITE,t2 WRITE; ...@@ -261,3 +261,23 @@ LOCK TABLES t1 WRITE,t2 WRITE;
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1); INSERT INTO t2 VALUES (1);
DROP TABLE t2, t1; DROP TABLE t2, t1;
--echo #
--echo # MDEV-28138 MariaDB Assertion Failed in mtr_buf_t::has_space
--echo #
CREATE TABLE t1(
f1 SERIAL,
f2 LINESTRING NOT NULL DEFAULT LineFromText('LINESTRING(1 1,2 2,3 3)'),
SPATIAL INDEX(f2))ENGINE=InnoDB;
--error ER_DUP_ENTRY
INSERT INTO t1(f1) VALUES(0), (1), (2);
DROP TABLE t1;
--echo #
--echo # MDEV-28237 Assertion `0' failed in row_upd_sec_index_entry on DELETE
--echo #
CREATE TABLE t1 (c0 YEAR UNIQUE) ENGINE=InnoDB;
--error ER_ERROR_DURING_COMMIT
INSERT INTO t1 VALUES (0),(0),(0),(0),(0),(0),(0);
DELETE FROM t1;
DROP TABLE t1;
...@@ -3,6 +3,6 @@ INSERT INTO t VALUES(1); ...@@ -3,6 +3,6 @@ INSERT INTO t VALUES(1);
SHOW VARIABLES like 'log_bin'; SHOW VARIABLES like 'log_bin';
Variable_name Value Variable_name Value
log_bin ON log_bin ON
FOUND 1 /Last binlog file .*, position .*/ in current_test FOUND 1 /Last binlog file .+, position \d+/ in current_test
# expect FOUND # expect FOUND
DROP TABLE t; DROP TABLE t;
...@@ -15,7 +15,7 @@ exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir ...@@ -15,7 +15,7 @@ exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir
exec $XTRABACKUP --prepare --binlog-info=1 --target-dir=$basedir ; exec $XTRABACKUP --prepare --binlog-info=1 --target-dir=$basedir ;
let SEARCH_FILE=$MYSQLTEST_VARDIR/log/current_test; let SEARCH_FILE=$MYSQLTEST_VARDIR/log/current_test;
--let SEARCH_PATTERN= Last binlog file .*, position .* --let SEARCH_PATTERN= Last binlog file .+, position \d+
--source include/search_pattern_in_file.inc --source include/search_pattern_in_file.inc
--echo # expect FOUND --echo # expect FOUND
......
...@@ -236,6 +236,6 @@ maria_declare_plugin(password_reuse_check) ...@@ -236,6 +236,6 @@ maria_declare_plugin(password_reuse_check)
NULL, NULL,
sysvars, sysvars,
"1.0", "1.0",
MariaDB_PLUGIN_MATURITY_BETA MariaDB_PLUGIN_MATURITY_GAMMA
} }
maria_declare_plugin_end; maria_declare_plugin_end;
...@@ -28,7 +28,7 @@ PLUGIN_TYPE FUNCTION ...@@ -28,7 +28,7 @@ PLUGIN_TYPE FUNCTION
PLUGIN_AUTHOR MariaDB Corporation PLUGIN_AUTHOR MariaDB Corporation
PLUGIN_DESCRIPTION Function UUID() PLUGIN_DESCRIPTION Function UUID()
PLUGIN_LICENSE GPL PLUGIN_LICENSE GPL
PLUGIN_MATURITY Gamma PLUGIN_MATURITY Stable
PLUGIN_AUTH_VERSION 1.0 PLUGIN_AUTH_VERSION 1.0
# #
# End of 10.5 tests # End of 10.5 tests
......
...@@ -24,7 +24,7 @@ PLUGIN_TYPE DATA TYPE ...@@ -24,7 +24,7 @@ PLUGIN_TYPE DATA TYPE
PLUGIN_AUTHOR MariaDB Corporation PLUGIN_AUTHOR MariaDB Corporation
PLUGIN_DESCRIPTION Data type UUID PLUGIN_DESCRIPTION Data type UUID
PLUGIN_LICENSE GPL PLUGIN_LICENSE GPL
PLUGIN_MATURITY Gamma PLUGIN_MATURITY Stable
PLUGIN_AUTH_VERSION 1.0 PLUGIN_AUTH_VERSION 1.0
# #
# End of 10.5 tests # End of 10.5 tests
......
...@@ -87,7 +87,7 @@ maria_declare_plugin(type_uuid) ...@@ -87,7 +87,7 @@ maria_declare_plugin(type_uuid)
NULL, // Status variables NULL, // Status variables
NULL, // System variables NULL, // System variables
"1.0", // String version representation "1.0", // String version representation
MariaDB_PLUGIN_MATURITY_GAMMA // Maturity(see include/mysql/plugin.h)*/ MariaDB_PLUGIN_MATURITY_STABLE// Maturity(see include/mysql/plugin.h)*/
}, },
{ {
MariaDB_FUNCTION_PLUGIN, // the plugin type (see include/mysql/plugin.h) MariaDB_FUNCTION_PLUGIN, // the plugin type (see include/mysql/plugin.h)
...@@ -102,7 +102,7 @@ maria_declare_plugin(type_uuid) ...@@ -102,7 +102,7 @@ maria_declare_plugin(type_uuid)
NULL, // Status variables NULL, // Status variables
NULL, // System variables NULL, // System variables
"1.0", // String version representation "1.0", // String version representation
MariaDB_PLUGIN_MATURITY_GAMMA // Maturity(see include/mysql/plugin.h)*/ MariaDB_PLUGIN_MATURITY_STABLE// Maturity(see include/mysql/plugin.h)*/
}, },
{ {
MariaDB_FUNCTION_PLUGIN, // the plugin type (see include/mysql/plugin.h) MariaDB_FUNCTION_PLUGIN, // the plugin type (see include/mysql/plugin.h)
...@@ -117,6 +117,6 @@ maria_declare_plugin(type_uuid) ...@@ -117,6 +117,6 @@ maria_declare_plugin(type_uuid)
NULL, // Status variables NULL, // Status variables
NULL, // System variables NULL, // System variables
"1.0", // String version representation "1.0", // String version representation
MariaDB_PLUGIN_MATURITY_GAMMA // Maturity(see include/mysql/plugin.h)*/ MariaDB_PLUGIN_MATURITY_STABLE// Maturity(see include/mysql/plugin.h)*/
} }
maria_declare_plugin_end; maria_declare_plugin_end;
...@@ -7017,7 +7017,8 @@ static int alter_close_table(ALTER_PARTITION_PARAM_TYPE *lpt) ...@@ -7017,7 +7017,8 @@ static int alter_close_table(ALTER_PARTITION_PARAM_TYPE *lpt)
static void handle_alter_part_error(ALTER_PARTITION_PARAM_TYPE *lpt, static void handle_alter_part_error(ALTER_PARTITION_PARAM_TYPE *lpt,
bool action_completed, bool action_completed,
bool drop_partition, bool drop_partition,
bool frm_install) bool frm_install,
bool reopen)
{ {
THD *thd= lpt->thd; THD *thd= lpt->thd;
partition_info *part_info= lpt->part_info->get_clone(thd); partition_info *part_info= lpt->part_info->get_clone(thd);
...@@ -7061,6 +7062,9 @@ static void handle_alter_part_error(ALTER_PARTITION_PARAM_TYPE *lpt, ...@@ -7061,6 +7062,9 @@ static void handle_alter_part_error(ALTER_PARTITION_PARAM_TYPE *lpt,
close_all_tables_for_name(thd, table->s, HA_EXTRA_NOT_USED, NULL); close_all_tables_for_name(thd, table->s, HA_EXTRA_NOT_USED, NULL);
} }
if (!reopen)
DBUG_VOID_RETURN;
if (part_info->list && if (part_info->list &&
ddl_log_execute_entry(thd, part_info->list->entry_pos)) ddl_log_execute_entry(thd, part_info->list->entry_pos))
{ {
...@@ -7491,7 +7495,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table, ...@@ -7491,7 +7495,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
thd->query(), thd->query_length()), FALSE)) || thd->query(), thd->query_length()), FALSE)) ||
ERROR_INJECT("drop_partition_9")) ERROR_INJECT("drop_partition_9"))
{ {
handle_alter_part_error(lpt, action_completed, TRUE, frm_install); handle_alter_part_error(lpt, action_completed, TRUE, frm_install, true);
goto err; goto err;
} }
if (alter_partition_lock_handling(lpt)) if (alter_partition_lock_handling(lpt))
...@@ -7527,9 +7531,12 @@ uint fast_alter_partition_table(THD *thd, TABLE *table, ...@@ -7527,9 +7531,12 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
(thd->binlog_xid= 0))) || (thd->binlog_xid= 0))) ||
ERROR_INJECT("convert_partition_9")) ERROR_INJECT("convert_partition_9"))
{ {
DDL_LOG_STATE main_state= *lpt->part_info;
handle_alter_part_error(lpt, true, true, false, false);
ddl_log_complete(&chain_drop_backup); ddl_log_complete(&chain_drop_backup);
(void) ddl_log_revert(thd, lpt->part_info); (void) ddl_log_revert(thd, &main_state);
handle_alter_part_error(lpt, true, true, false); if (thd->locked_tables_mode)
thd->locked_tables_list.reopen_tables(thd, false);
goto err; goto err;
} }
ddl_log_complete(lpt->part_info); ddl_log_complete(lpt->part_info);
...@@ -7576,9 +7583,12 @@ uint fast_alter_partition_table(THD *thd, TABLE *table, ...@@ -7576,9 +7583,12 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
(thd->binlog_xid= 0))) || (thd->binlog_xid= 0))) ||
ERROR_INJECT("convert_partition_9")) ERROR_INJECT("convert_partition_9"))
{ {
DDL_LOG_STATE main_state= *lpt->part_info;
handle_alter_part_error(lpt, true, true, false, false);
ddl_log_complete(&chain_drop_backup); ddl_log_complete(&chain_drop_backup);
(void) ddl_log_revert(thd, lpt->part_info); (void) ddl_log_revert(thd, &main_state);
handle_alter_part_error(lpt, true, true, false); if (thd->locked_tables_mode)
thd->locked_tables_list.reopen_tables(thd, false);
goto err; goto err;
} }
ddl_log_complete(lpt->part_info); ddl_log_complete(lpt->part_info);
...@@ -7650,7 +7660,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table, ...@@ -7650,7 +7660,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
thd->query(), thd->query_length()), FALSE)) || thd->query(), thd->query_length()), FALSE)) ||
ERROR_INJECT("add_partition_10")) ERROR_INJECT("add_partition_10"))
{ {
handle_alter_part_error(lpt, action_completed, FALSE, frm_install); handle_alter_part_error(lpt, action_completed, FALSE, frm_install, true);
goto err; goto err;
} }
if (alter_partition_lock_handling(lpt)) if (alter_partition_lock_handling(lpt))
...@@ -7743,7 +7753,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table, ...@@ -7743,7 +7753,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
thd->query(), thd->query_length()), FALSE)) || thd->query(), thd->query_length()), FALSE)) ||
ERROR_INJECT("change_partition_12")) ERROR_INJECT("change_partition_12"))
{ {
handle_alter_part_error(lpt, action_completed, FALSE, frm_install); handle_alter_part_error(lpt, action_completed, FALSE, frm_install, true);
goto err; goto err;
} }
if (alter_partition_lock_handling(lpt)) if (alter_partition_lock_handling(lpt))
......
...@@ -3558,7 +3558,7 @@ simple_target_specification: ...@@ -3558,7 +3558,7 @@ simple_target_specification:
if (!$2.length) if (!$2.length)
{ {
thd->parse_error(); thd->parse_error();
YYABORT; MYSQL_YYABORT;
} }
$$= new (thd->mem_root) Item_func_get_user_var(thd, &$2); $$= new (thd->mem_root) Item_func_get_user_var(thd, &$2);
if (unlikely($$ == NULL)) if (unlikely($$ == NULL))
...@@ -10961,7 +10961,7 @@ variable_aux: ...@@ -10961,7 +10961,7 @@ variable_aux:
if (!$1.length) if (!$1.length)
{ {
thd->parse_error(); thd->parse_error();
YYABORT; MYSQL_YYABORT;
} }
$$= item= new (thd->mem_root) Item_func_set_user_var(thd, &$1, $3); $$= item= new (thd->mem_root) Item_func_set_user_var(thd, &$1, $3);
if (unlikely($$ == NULL)) if (unlikely($$ == NULL))
...@@ -10975,7 +10975,7 @@ variable_aux: ...@@ -10975,7 +10975,7 @@ variable_aux:
if (!$1.length) if (!$1.length)
{ {
thd->parse_error(); thd->parse_error();
YYABORT; MYSQL_YYABORT;
} }
$$= new (thd->mem_root) Item_func_get_user_var(thd, &$1); $$= new (thd->mem_root) Item_func_get_user_var(thd, &$1);
if (unlikely($$ == NULL)) if (unlikely($$ == NULL))
...@@ -12613,7 +12613,7 @@ select_outvar: ...@@ -12613,7 +12613,7 @@ select_outvar:
if (!$2.length) if (!$2.length)
{ {
thd->parse_error(); thd->parse_error();
YYABORT; MYSQL_YYABORT;
} }
$$ = Lex->result ? new (thd->mem_root) my_var_user(&$2) : NULL; $$ = Lex->result ? new (thd->mem_root) my_var_user(&$2) : NULL;
...@@ -14604,7 +14604,7 @@ field_or_var: ...@@ -14604,7 +14604,7 @@ field_or_var:
if (!$2.length) if (!$2.length)
{ {
thd->parse_error(); thd->parse_error();
YYABORT; MYSQL_YYABORT;
} }
$$= new (thd->mem_root) Item_user_var_as_out_param(thd, &$2); $$= new (thd->mem_root) Item_user_var_as_out_param(thd, &$2);
...@@ -16425,7 +16425,7 @@ option_value_no_option_type: ...@@ -16425,7 +16425,7 @@ option_value_no_option_type:
if (!$2.length) if (!$2.length)
{ {
thd->parse_error(); thd->parse_error();
YYABORT; MYSQL_YYABORT;
} }
if (sp_create_assignment_lex(thd, $1.str)) if (sp_create_assignment_lex(thd, $1.str))
......
...@@ -387,7 +387,8 @@ ENDIF() ...@@ -387,7 +387,8 @@ ENDIF()
# s390x because of the way it defines the high level intrinsics # s390x because of the way it defines the high level intrinsics
# as not-inline in the header file can only be included by one # as not-inline in the header file can only be included by one
# source file that has -mhtm enabled. # source file that has -mhtm enabled.
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64|powerpc64|s390x") IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64|powerpc64|s390x"
OR CMAKE_SYSTEM_NAME MATCHES "AIX")
ADD_COMPILE_FLAGS( ADD_COMPILE_FLAGS(
sync/srw_lock.cc sync/srw_lock.cc
COMPILE_FLAGS "-mhtm" COMPILE_FLAGS "-mhtm"
......
...@@ -16953,6 +16953,10 @@ innobase_xa_prepare( ...@@ -16953,6 +16953,10 @@ innobase_xa_prepare(
SQL statement */ SQL statement */
trx_mark_sql_stat_end(trx); trx_mark_sql_stat_end(trx);
if (UNIV_UNLIKELY(trx->error_state != DB_SUCCESS)) {
trx_rollback_for_mysql(trx);
return 1;
}
} }
if (thd_sql_command(thd) != SQLCOM_XA_PREPARE if (thd_sql_command(thd) != SQLCOM_XA_PREPARE
......
...@@ -2388,6 +2388,16 @@ struct dict_table_t { ...@@ -2388,6 +2388,16 @@ struct dict_table_t {
static dict_table_t *create(const span<const char> &name, fil_space_t *space, static dict_table_t *create(const span<const char> &name, fil_space_t *space,
ulint n_cols, ulint n_v_cols, ulint flags, ulint n_cols, ulint n_v_cols, ulint flags,
ulint flags2); ulint flags2);
/** Check whether the table has any spatial indexes */
bool has_spatial_index() const
{
for (auto i= UT_LIST_GET_FIRST(indexes);
(i= UT_LIST_GET_NEXT(indexes, i)) != nullptr; )
if (i->is_spatial())
return true;
return false;
}
}; };
inline void dict_index_t::set_modified(mtr_t& mtr) const inline void dict_index_t::set_modified(mtr_t& mtr) const
......
...@@ -333,22 +333,19 @@ typedef ssize_t lint; ...@@ -333,22 +333,19 @@ typedef ssize_t lint;
#ifdef _WIN32 #ifdef _WIN32
/* Use the integer types and formatting strings defined in Visual Studio. */ /* Use the integer types and formatting strings defined in Visual Studio. */
# define UINT32PF "%u" # define UINT32PF "%u"
# define INT64PF "%lld"
# define UINT64scan "llu" # define UINT64scan "llu"
# define UINT64PFx "%016llx" # define UINT64PFx "%016llx"
#elif defined __APPLE__ #elif defined __APPLE__
/* Apple prefers to call the 64-bit types 'long long' /* Apple prefers to call the 64-bit types 'long long'
in both 32-bit and 64-bit environments. */ in both 32-bit and 64-bit environments. */
# define UINT32PF "%" PRIu32 # define UINT32PF "%" PRIu32
# define INT64PF "%lld"
# define UINT64scan "llu" # define UINT64scan "llu"
# define UINT64PFx "%016llx" # define UINT64PFx "%016llx"
#elif defined _AIX #elif defined _AIX
/* Workaround for macros expension trouble */ /* Workaround for macros expension trouble */
# define UINT32PF "%u" # define UINT32PF "%u"
# define INT64PF "%lld"
# define UINT64scan "lu" # define UINT64scan "lu"
# define UINT64PFx "%016llx" # define UINT64PFx "%016lx"
#else #else
/* Use the integer types and formatting strings defined in the C99 standard. */ /* Use the integer types and formatting strings defined in the C99 standard. */
# define UINT32PF "%" PRIu32 # define UINT32PF "%" PRIu32
......
...@@ -2641,6 +2641,7 @@ row_ins_clust_index_entry_low( ...@@ -2641,6 +2641,7 @@ row_ins_clust_index_entry_low(
&& block->page.id().page_no() == index->page && block->page.id().page_no() == index->page
&& !index->table->skip_alter_undo && !index->table->skip_alter_undo
&& !index->table->n_rec_locks && !index->table->n_rec_locks
&& !index->table->has_spatial_index()
&& !trx->is_wsrep() /* FIXME: MDEV-24623 */ && !trx->is_wsrep() /* FIXME: MDEV-24623 */
&& !thd_is_slave(trx->mysql_thd) /* FIXME: MDEV-24622 */) { && !thd_is_slave(trx->mysql_thd) /* FIXME: MDEV-24622 */) {
DEBUG_SYNC_C("empty_root_page_insert"); DEBUG_SYNC_C("empty_root_page_insert");
......
...@@ -1210,10 +1210,9 @@ dberr_t srv_start(bool create_new_db) ...@@ -1210,10 +1210,9 @@ dberr_t srv_start(bool create_new_db)
if (err != DB_SUCCESS) { if (err != DB_SUCCESS) {
return srv_init_abort(err); return srv_init_abort(err);
} }
if (srv_operation == SRV_OPERATION_RESTORE) { if (srv_operation != SRV_OPERATION_RESTORE) {
break; dict_sys.load_sys_tables();
} }
dict_sys.load_sys_tables();
err = trx_lists_init_at_db_start(); err = trx_lists_init_at_db_start();
if (err != DB_SUCCESS) { if (err != DB_SUCCESS) {
return srv_init_abort(err); return srv_init_abort(err);
......
...@@ -14,7 +14,7 @@ connection master_1; ...@@ -14,7 +14,7 @@ connection master_1;
CREATE DATABASE auto_test_local; CREATE DATABASE auto_test_local;
USE auto_test_local; USE auto_test_local;
# MDEV-27923 Deprecate spider_use_handler # MDEV-27923 Deprecate spider_use_handler
SET spider_use_handler= 3; SET spider_use_handler = 3;
Warnings: Warnings:
Warning 1287 '@@spider_use_handler' is deprecated and will be removed in a future release Warning 1287 '@@spider_use_handler' is deprecated and will be removed in a future release
SHOW VARIABLES LIKE "spider_use_handler"; SHOW VARIABLES LIKE "spider_use_handler";
...@@ -26,6 +26,37 @@ Warning 1287 The table parameter 'uhd' is deprecated and will be removed in a fu ...@@ -26,6 +26,37 @@ Warning 1287 The table parameter 'uhd' is deprecated and will be removed in a fu
CREATE TABLE tbl_b (a INT) ENGINE=Spider COMMENT='use_handler "3"'; CREATE TABLE tbl_b (a INT) ENGINE=Spider COMMENT='use_handler "3"';
Warnings: Warnings:
Warning 1287 The table parameter 'use_handler' is deprecated and will be removed in a future release Warning 1287 The table parameter 'use_handler' is deprecated and will be removed in a future release
# MDEV-28005 Deprecate Spider plugin variables regarding UDFs
SET GLOBAL spider_udf_ds_bulk_insert_rows = 1;
Warnings:
Warning 1287 '@@spider_udf_ds_bulk_insert_rows' is deprecated and will be removed in a future release
SHOW VARIABLES LIKE "spider_udf_ds_bulk_insert_rows";
Variable_name Value
spider_udf_ds_bulk_insert_rows -1
SET spider_udf_ds_table_loop_mode = 1;
Warnings:
Warning 1287 '@@spider_udf_ds_table_loop_mode' is deprecated and will be removed in a future release
SHOW VARIABLES LIKE "spider_udf_ds_table_loop_mode";
Variable_name Value
spider_udf_ds_table_loop_mode 1
SET spider_udf_ds_use_real_table = 1;
Warnings:
Warning 1287 '@@spider_udf_ds_use_real_table' is deprecated and will be removed in a future release
SHOW VARIABLES LIKE "spider_udf_ds_use_real_table";
Variable_name Value
spider_udf_ds_use_real_table 1
SET GLOBAL spider_udf_ct_bulk_insert_interval = 1;
Warnings:
Warning 1287 '@@spider_udf_ct_bulk_insert_interval' is deprecated and will be removed in a future release
SHOW VARIABLES LIKE "spider_udf_ct_bulk_insert_interval";
Variable_name Value
spider_udf_ct_bulk_insert_interval 1
SET GLOBAL spider_udf_ct_bulk_insert_rows = 1;
Warnings:
Warning 1287 '@@spider_udf_ct_bulk_insert_rows' is deprecated and will be removed in a future release
SHOW VARIABLES LIKE "spider_udf_ct_bulk_insert_rows";
Variable_name Value
spider_udf_ct_bulk_insert_rows 1
DROP DATABASE auto_test_local; DROP DATABASE auto_test_local;
for master_1 for master_1
for child2 for child2
......
...@@ -13,11 +13,27 @@ CREATE DATABASE auto_test_local; ...@@ -13,11 +13,27 @@ CREATE DATABASE auto_test_local;
USE auto_test_local; USE auto_test_local;
--echo # MDEV-27923 Deprecate spider_use_handler --echo # MDEV-27923 Deprecate spider_use_handler
SET spider_use_handler= 3; SET spider_use_handler = 3;
SHOW VARIABLES LIKE "spider_use_handler"; SHOW VARIABLES LIKE "spider_use_handler";
eval CREATE TABLE tbl_a (a INT) $MASTER_1_ENGINE COMMENT='uhd "3"'; eval CREATE TABLE tbl_a (a INT) $MASTER_1_ENGINE COMMENT='uhd "3"';
eval CREATE TABLE tbl_b (a INT) $MASTER_1_ENGINE COMMENT='use_handler "3"'; eval CREATE TABLE tbl_b (a INT) $MASTER_1_ENGINE COMMENT='use_handler "3"';
--echo # MDEV-28005 Deprecate Spider plugin variables regarding UDFs
SET GLOBAL spider_udf_ds_bulk_insert_rows = 1;
SHOW VARIABLES LIKE "spider_udf_ds_bulk_insert_rows";
SET spider_udf_ds_table_loop_mode = 1;
SHOW VARIABLES LIKE "spider_udf_ds_table_loop_mode";
SET spider_udf_ds_use_real_table = 1;
SHOW VARIABLES LIKE "spider_udf_ds_use_real_table";
SET GLOBAL spider_udf_ct_bulk_insert_interval = 1;
SHOW VARIABLES LIKE "spider_udf_ct_bulk_insert_interval";
SET GLOBAL spider_udf_ct_bulk_insert_rows = 1;
SHOW VARIABLES LIKE "spider_udf_ct_bulk_insert_rows";
DROP DATABASE auto_test_local; DROP DATABASE auto_test_local;
--disable_query_log --disable_query_log
......
...@@ -2039,7 +2039,7 @@ uint spider_param_udf_table_mon_mutex_count() ...@@ -2039,7 +2039,7 @@ uint spider_param_udf_table_mon_mutex_count()
*/ */
static MYSQL_THDVAR_LONGLONG( static MYSQL_THDVAR_LONGLONG(
udf_ds_bulk_insert_rows, /* name */ udf_ds_bulk_insert_rows, /* name */
PLUGIN_VAR_RQCMDARG, /* opt */ PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, /* opt */
"Number of rows for bulk inserting", /* comment */ "Number of rows for bulk inserting", /* comment */
NULL, /* check */ NULL, /* check */
NULL, /* update */ NULL, /* update */
...@@ -2066,7 +2066,7 @@ longlong spider_param_udf_ds_bulk_insert_rows( ...@@ -2066,7 +2066,7 @@ longlong spider_param_udf_ds_bulk_insert_rows(
*/ */
static MYSQL_THDVAR_INT( static MYSQL_THDVAR_INT(
udf_ds_table_loop_mode, /* name */ udf_ds_table_loop_mode, /* name */
PLUGIN_VAR_RQCMDARG, /* opt */ PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, /* opt */
"Table loop mode if the number of tables in table list are less than the number of result sets", /* comment */ "Table loop mode if the number of tables in table list are less than the number of result sets", /* comment */
NULL, /* check */ NULL, /* check */
NULL, /* update */ NULL, /* update */
...@@ -2423,7 +2423,7 @@ static int spider_udf_ct_bulk_insert_interval; ...@@ -2423,7 +2423,7 @@ static int spider_udf_ct_bulk_insert_interval;
static MYSQL_SYSVAR_INT( static MYSQL_SYSVAR_INT(
udf_ct_bulk_insert_interval, udf_ct_bulk_insert_interval,
spider_udf_ct_bulk_insert_interval, spider_udf_ct_bulk_insert_interval,
PLUGIN_VAR_RQCMDARG, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED,
"The interval time between bulk insert and next bulk insert at coping", "The interval time between bulk insert and next bulk insert at coping",
NULL, NULL,
NULL, NULL,
...@@ -2449,7 +2449,7 @@ static longlong spider_udf_ct_bulk_insert_rows; ...@@ -2449,7 +2449,7 @@ static longlong spider_udf_ct_bulk_insert_rows;
static MYSQL_SYSVAR_LONGLONG( static MYSQL_SYSVAR_LONGLONG(
udf_ct_bulk_insert_rows, udf_ct_bulk_insert_rows,
spider_udf_ct_bulk_insert_rows, spider_udf_ct_bulk_insert_rows,
PLUGIN_VAR_RQCMDARG, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED,
"The number of rows inserted with bulk insert of one time at coping", "The number of rows inserted with bulk insert of one time at coping",
NULL, NULL,
NULL, NULL,
...@@ -2689,7 +2689,7 @@ int spider_param_bulk_access_free( ...@@ -2689,7 +2689,7 @@ int spider_param_bulk_access_free(
*/ */
static MYSQL_THDVAR_INT( static MYSQL_THDVAR_INT(
udf_ds_use_real_table, /* name */ udf_ds_use_real_table, /* name */
PLUGIN_VAR_RQCMDARG, /* opt */ PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, /* opt */
"Use real table for temporary table list", /* comment */ "Use real table for temporary table list", /* comment */
NULL, /* check */ NULL, /* check */
NULL, /* update */ NULL, /* update */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment