mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge 10.4 into 10.5
This commit is contained in:
@@ -2445,8 +2445,10 @@ sub environment_setup {
|
||||
#
|
||||
$ENV{'LC_ALL'}= "C";
|
||||
$ENV{'LC_CTYPE'}= "C";
|
||||
|
||||
$ENV{'LC_COLLATE'}= "C";
|
||||
|
||||
$ENV{'OPENSSL_CONF'}= "/dev/null";
|
||||
|
||||
$ENV{'USE_RUNNING_SERVER'}= using_extern();
|
||||
$ENV{'MYSQL_TEST_DIR'}= $glob_mysql_test_dir;
|
||||
$ENV{'DEFAULT_MASTER_PORT'}= $mysqld_variables{'port'};
|
||||
|
@@ -89,16 +89,6 @@ sub skip_combinations {
|
||||
$skip{'main/ssl_verify_ip.test'} = 'x509v3 support required'
|
||||
unless $openssl_ver ge "1.0.2";
|
||||
|
||||
my $openssl_cnf='/etc/ssl/openssl.cnf';
|
||||
if ($openssl_ver and open my $f, '<', $openssl_cnf) {
|
||||
local $/;
|
||||
my $cnf=<$f>;
|
||||
$skip{'main/tls_version.test'} = "TLSv1.1 disabled in $openssl_cnf"
|
||||
if $cnf =~ /^\s*MinProtocol\s*=\s*TLSv1.[2-9]/m;
|
||||
$skip{'main/tls_version1.test'} = "TLSv1.0 disabled in $openssl_cnf"
|
||||
if $cnf =~ /^\s*MinProtocol\s*=\s*TLSv1.[1-9]/m;
|
||||
}
|
||||
|
||||
%skip;
|
||||
}
|
||||
|
||||
|
@@ -469,3 +469,25 @@ SET @@SYSTEM_VERSIONING_ALTER_HISTORY=ERROR;
|
||||
SELECT count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp;
|
||||
count(*)
|
||||
0
|
||||
# MDEV-18875 Assertion `thd->transaction.stmt.ha_list == __null ||
|
||||
# trans == &thd->transaction.stmt' failed or bogus ER_DUP_ENTRY upon
|
||||
# ALTER TABLE with versioning
|
||||
create or replace table t (x int) engine=innodb;
|
||||
set autocommit= 0;
|
||||
alter table t
|
||||
algorithm=copy,
|
||||
add column row_start bigint unsigned as row start,
|
||||
add column row_end bigint unsigned as row end,
|
||||
add period for system_time(row_start,row_end),
|
||||
with system versioning;
|
||||
set autocommit= 1;
|
||||
# MDEV-18865 Assertion `t->first->versioned_by_id()'
|
||||
# failed in innodb_prepare_commit_versioned
|
||||
create or replace table t (x int) engine=innodb;
|
||||
insert into t values (0);
|
||||
alter table t add `row_start` bigint unsigned as row start,
|
||||
add `row_end` bigint unsigned as row end,
|
||||
add period for system_time(`row_start`,`row_end`),
|
||||
modify x int after row_start,
|
||||
with system versioning;
|
||||
create or replace database test;
|
||||
|
@@ -465,3 +465,30 @@ DROP TABLE t;
|
||||
SET @@SYSTEM_VERSIONING_ALTER_HISTORY=ERROR;
|
||||
|
||||
SELECT count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp;
|
||||
|
||||
--echo # MDEV-18875 Assertion `thd->transaction.stmt.ha_list == __null ||
|
||||
--echo # trans == &thd->transaction.stmt' failed or bogus ER_DUP_ENTRY upon
|
||||
--echo # ALTER TABLE with versioning
|
||||
create or replace table t (x int) engine=innodb;
|
||||
set autocommit= 0;
|
||||
alter table t
|
||||
algorithm=copy,
|
||||
add column row_start bigint unsigned as row start,
|
||||
add column row_end bigint unsigned as row end,
|
||||
add period for system_time(row_start,row_end),
|
||||
with system versioning;
|
||||
set autocommit= 1;
|
||||
|
||||
--echo # MDEV-18865 Assertion `t->first->versioned_by_id()'
|
||||
--echo # failed in innodb_prepare_commit_versioned
|
||||
|
||||
create or replace table t (x int) engine=innodb;
|
||||
insert into t values (0);
|
||||
alter table t add `row_start` bigint unsigned as row start,
|
||||
add `row_end` bigint unsigned as row end,
|
||||
add period for system_time(`row_start`,`row_end`),
|
||||
modify x int after row_start,
|
||||
with system versioning;
|
||||
|
||||
|
||||
create or replace database test;
|
||||
|
@@ -1515,7 +1515,8 @@ int ha_commit_trans(THD *thd, bool all)
|
||||
|
||||
#if 1 // FIXME: This should be done in ha_prepare().
|
||||
if (rw_trans || (thd->lex->sql_command == SQLCOM_ALTER_TABLE &&
|
||||
thd->lex->alter_info.flags & ALTER_ADD_SYSTEM_VERSIONING))
|
||||
thd->lex->alter_info.flags & ALTER_ADD_SYSTEM_VERSIONING &&
|
||||
is_real_trans))
|
||||
{
|
||||
ulonglong trx_start_id= 0, trx_end_id= 0;
|
||||
for (Ha_trx_info *ha_info= trans->ha_list; ha_info; ha_info= ha_info->next())
|
||||
|
@@ -10669,6 +10669,9 @@ create_table_info_t::create_table_def()
|
||||
|
||||
heap = mem_heap_create(1000);
|
||||
|
||||
ut_d(bool have_vers_start = false);
|
||||
ut_d(bool have_vers_end = false);
|
||||
|
||||
for (ulint i = 0, j = 0; j < n_cols; i++) {
|
||||
Field* field = m_form->field[i];
|
||||
ulint vers_row = 0;
|
||||
@@ -10676,8 +10679,10 @@ create_table_info_t::create_table_def()
|
||||
if (m_form->versioned()) {
|
||||
if (i == m_form->s->vers.start_fieldno) {
|
||||
vers_row = DATA_VERS_START;
|
||||
ut_d(have_vers_start = true);
|
||||
} else if (i == m_form->s->vers.end_fieldno) {
|
||||
vers_row = DATA_VERS_END;
|
||||
ut_d(have_vers_end = true);
|
||||
} else if (!(field->flags
|
||||
& VERS_UPDATE_UNVERSIONED_FLAG)) {
|
||||
vers_row = DATA_VERSIONED;
|
||||
@@ -10798,6 +10803,10 @@ err_col:
|
||||
j++;
|
||||
}
|
||||
|
||||
ut_ad(have_vers_start == have_vers_end);
|
||||
ut_ad(table->versioned() == have_vers_start);
|
||||
ut_ad(!table->versioned() || table->vers_start != table->vers_end);
|
||||
|
||||
if (num_v) {
|
||||
for (ulint i = 0, j = 0; i < n_cols; i++) {
|
||||
dict_v_col_t* v_col;
|
||||
|
@@ -1852,10 +1852,14 @@ struct dict_table_t {
|
||||
/** Add the table definition to the data dictionary cache */
|
||||
void add_to_cache();
|
||||
|
||||
/** @return whether the table is versioned.
|
||||
It is assumed that both vers_start and vers_end set to 0
|
||||
iff table is not versioned. In any other case,
|
||||
these fields correspond to actual positions in cols[]. */
|
||||
bool versioned() const { return vers_start || vers_end; }
|
||||
bool versioned_by_id() const
|
||||
{
|
||||
return vers_start && cols[vers_start].mtype == DATA_INT;
|
||||
return versioned() && cols[vers_start].mtype == DATA_INT;
|
||||
}
|
||||
|
||||
void inc_fk_checks()
|
||||
|
Reference in New Issue
Block a user