summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-11-10 09:49:18 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2022-11-10 09:49:18 +0200
commit038cd5195612084542704f181695358e3b8959a8 (patch)
treebaf64530b9ca66b4b9d356403b550aa58d6588d9
parentfe9412dbc9ce4cb1764a3669ee89dcf687d68fb5 (diff)
parent08e2c98ec81d6fb23b0a8079107d4c74d3a8ec02 (diff)
downloadmariadb-git-038cd5195612084542704f181695358e3b8959a8.tar.gz
Merge 10.7 into 10.8
-rw-r--r--mysql-test/main/order_by_innodb.result2
-rw-r--r--mysql-test/main/order_by_innodb.test2
-rw-r--r--mysql-test/suite/innodb/t/alter_dml_apply.test1
-rw-r--r--mysql-test/suite/innodb/t/import_corrupted.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_scrub.test1
-rw-r--r--mysql-test/suite/mariabackup/big_innodb_log.test1
-rw-r--r--mysql-test/suite/mariabackup/defer_space.test1
-rw-r--r--mysql-test/suite/mariabackup/innodb_redo_log_overwrite.test1
-rw-r--r--mysql-test/suite/mariabackup/innodb_redo_overwrite.test1
-rw-r--r--mysql-test/suite/plugins/r/test_sql_service.result1
-rw-r--r--mysql-test/suite/plugins/t/test_sql_service.test2
-rw-r--r--mysql-test/suite/versioning/r/partition.result4
-rw-r--r--sql/partition_info.h5
-rw-r--r--sql/share/errmsg-utf8.txt6
-rw-r--r--sql/sql_lex.cc4
-rw-r--r--sql/sql_partition.cc108
-rw-r--r--storage/innobase/btr/btr0cur.cc3
17 files changed, 50 insertions, 94 deletions
diff --git a/mysql-test/main/order_by_innodb.result b/mysql-test/main/order_by_innodb.result
index 49f05f5e6ae..741084c8a6c 100644
--- a/mysql-test/main/order_by_innodb.result
+++ b/mysql-test/main/order_by_innodb.result
@@ -154,7 +154,7 @@ id2 int NOT NULL,
d1 datetime,
d2 timestamp NOT NULL,
KEY id2 (id2)
-) engine=innodb;
+) engine=innodb stats_persistent=0;
insert into t2 values
(1,2,'2019-03-05 00:00:00','2019-03-06 00:00:00'),
(2,3,'2019-03-05 00:00:00','2019-03-06 00:00:00'),
diff --git a/mysql-test/main/order_by_innodb.test b/mysql-test/main/order_by_innodb.test
index 3ea68edfa3f..bdaef56672f 100644
--- a/mysql-test/main/order_by_innodb.test
+++ b/mysql-test/main/order_by_innodb.test
@@ -141,7 +141,7 @@ CREATE TABLE t2 (
d1 datetime,
d2 timestamp NOT NULL,
KEY id2 (id2)
-) engine=innodb;
+) engine=innodb stats_persistent=0;
insert into t2 values
(1,2,'2019-03-05 00:00:00','2019-03-06 00:00:00'),
diff --git a/mysql-test/suite/innodb/t/alter_dml_apply.test b/mysql-test/suite/innodb/t/alter_dml_apply.test
index 01bfe458f1a..ac0455902fd 100644
--- a/mysql-test/suite/innodb/t/alter_dml_apply.test
+++ b/mysql-test/suite/innodb/t/alter_dml_apply.test
@@ -2,6 +2,7 @@
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/have_sequence.inc
+--source include/no_valgrind_without_big.inc
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL,
f3 CHAR(200), f4 CHAR(200),
diff --git a/mysql-test/suite/innodb/t/import_corrupted.test b/mysql-test/suite/innodb/t/import_corrupted.test
index 57c8c6dd9be..bc2ee341fe2 100644
--- a/mysql-test/suite/innodb/t/import_corrupted.test
+++ b/mysql-test/suite/innodb/t/import_corrupted.test
@@ -1,4 +1,5 @@
--source include/have_innodb.inc
+--source include/no_valgrind_without_big.inc
call mtr.add_suppression("Table `test`.`t2` should have 2 indexes but the tablespace has 1 indexes");
call mtr.add_suppression("Index for table 't2' is corrupt; try to repair it");
diff --git a/mysql-test/suite/innodb/t/innodb_scrub.test b/mysql-test/suite/innodb/t/innodb_scrub.test
index 88b4e9cfd76..c7d06187e9f 100644
--- a/mysql-test/suite/innodb/t/innodb_scrub.test
+++ b/mysql-test/suite/innodb/t/innodb_scrub.test
@@ -1,4 +1,5 @@
-- source include/have_innodb.inc
+-- source include/no_valgrind_without_big.inc
let $MYSQLD_DATADIR=`select @@datadir`;
CREATE TABLE t1(f1 int auto_increment primary key,
diff --git a/mysql-test/suite/mariabackup/big_innodb_log.test b/mysql-test/suite/mariabackup/big_innodb_log.test
index 23ac59c13eb..85d22a8227b 100644
--- a/mysql-test/suite/mariabackup/big_innodb_log.test
+++ b/mysql-test/suite/mariabackup/big_innodb_log.test
@@ -5,6 +5,7 @@
# recovery process with such numbers.
--source include/have_innodb.inc
--source include/have_debug.inc
+--source include/no_valgrind_without_big.inc
--let MYSQLD_DATADIR= `select @@datadir`
let $MYSQLD_BOOTSTRAP_CMD= $MYSQLD_BOOTSTRAP_CMD --datadir=$MYSQLD_DATADIR --tmpdir=$MYSQL_TMP_DIR --debug-dbug=+d,innodb_small_log_block_no_limit;
diff --git a/mysql-test/suite/mariabackup/defer_space.test b/mysql-test/suite/mariabackup/defer_space.test
index 65f2262fd1d..a475b010531 100644
--- a/mysql-test/suite/mariabackup/defer_space.test
+++ b/mysql-test/suite/mariabackup/defer_space.test
@@ -1,6 +1,7 @@
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/not_embedded.inc
+--source include/no_valgrind_without_big.inc
call mtr.add_suppression("InnoDB: Expected tablespace id .*");
--echo # Mariabackup --backup with page0 INIT_PAGE redo record
diff --git a/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.test b/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.test
index 22165ff29be..8bbd4e761a6 100644
--- a/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.test
+++ b/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.test
@@ -1,6 +1,7 @@
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/have_sequence.inc
+--source include/no_valgrind_without_big.inc
CREATE TABLE t(i INT) ENGINE=INNODB;
diff --git a/mysql-test/suite/mariabackup/innodb_redo_overwrite.test b/mysql-test/suite/mariabackup/innodb_redo_overwrite.test
index 34198222cea..ab5993d232c 100644
--- a/mysql-test/suite/mariabackup/innodb_redo_overwrite.test
+++ b/mysql-test/suite/mariabackup/innodb_redo_overwrite.test
@@ -2,6 +2,7 @@
--source include/have_debug_sync.inc
--source include/have_debug.inc
--source include/have_sequence.inc
+--source include/no_valgrind_without_big.inc
CREATE TABLE t ENGINE=INNODB SELECT seq%10 i FROM seq_0_to_204796;
diff --git a/mysql-test/suite/plugins/r/test_sql_service.result b/mysql-test/suite/plugins/r/test_sql_service.result
index ca7326de51c..e5f09b67b6b 100644
--- a/mysql-test/suite/plugins/r/test_sql_service.result
+++ b/mysql-test/suite/plugins/r/test_sql_service.result
@@ -1,3 +1,4 @@
+reset master;
install plugin test_sql_service soname 'test_sql_service';
show status like 'test_sql_service_passed';
Variable_name Value
diff --git a/mysql-test/suite/plugins/t/test_sql_service.test b/mysql-test/suite/plugins/t/test_sql_service.test
index 3f2aaa81c4c..0a45cb663f4 100644
--- a/mysql-test/suite/plugins/t/test_sql_service.test
+++ b/mysql-test/suite/plugins/t/test_sql_service.test
@@ -1,6 +1,8 @@
--source include/not_embedded.inc
--source include/have_log_bin.inc
+reset master; # clear binlogs
+
if (!$TEST_SQL_SERVICE_SO) {
skip No TEST_SQL_SERVICE plugin;
}
diff --git a/mysql-test/suite/versioning/r/partition.result b/mysql-test/suite/versioning/r/partition.result
index 8cc855d92f8..8cd6e97f2d4 100644
--- a/mysql-test/suite/versioning/r/partition.result
+++ b/mysql-test/suite/versioning/r/partition.result
@@ -150,7 +150,7 @@ partition by system_time limit 1;
alter table t1 change x big int;
create or replace table t1 (i int) engine myisam partition by hash(i) partitions 2;
alter table t1 add partition (partition px history);
-ERROR HY000: Wrong partition type `SYSTEM_TIME` for partitioning by `HASH`
+ERROR HY000: Wrong partitioning type, expected type: `SYSTEM_TIME`
## INSERT, UPDATE, DELETE
create or replace table t1 (x int)
with system versioning
@@ -1105,7 +1105,7 @@ drop table t1;
create table t1 (a int) with system versioning partition by system_time
(partition p1 history, partition pn current);
alter table t1 add partition (partition p2);
-ERROR HY000: Wrong partition type `HASH` for partitioning by `SYSTEM_TIME`
+ERROR HY000: Wrong partitioning type, expected type: `SYSTEM_TIME`
# MDEV-17891 Assertion failures in select_insert::abort_result_set and
# mysql_load upon attempt to replace into a full table
set @@max_heap_table_size= 1024*1024;
diff --git a/sql/partition_info.h b/sql/partition_info.h
index 287aa6d2200..e95daec7d31 100644
--- a/sql/partition_info.h
+++ b/sql/partition_info.h
@@ -429,13 +429,8 @@ public:
return NULL;
}
uint next_part_no(uint new_parts) const;
-
- int gen_part_type(THD *thd, String *str) const;
};
-void part_type_error(THD *thd, partition_info *work_part_info,
- const char *part_type, partition_info *tab_part_info);
-
uint32 get_next_partition_id_range(struct st_partition_iter* part_iter);
bool check_partition_dirs(partition_info *part_info);
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt
index de5117e0246..4c7f71f4718 100644
--- a/sql/share/errmsg-utf8.txt
+++ b/sql/share/errmsg-utf8.txt
@@ -9773,9 +9773,9 @@ ER_UNUSED_23
spa "Nunca debería vd de ver esto"
ER_PARTITION_WRONG_TYPE
- chi "错误的分区类型,预期类型:%`s for partitioning by %`s"
- eng "Wrong partition type %`s for partitioning by %`s"
- spa "Tipo de partición equivocada, tipo esperado: %`s for partitioning by %`s"
+ chi "错误的分区类型,预期类型:%`s"
+ eng "Wrong partitioning type, expected type: %`s"
+ spa "Tipo de partición equivocada, tipo esperado: %`s"
WARN_VERS_PART_FULL
chi "版本化表%`s.%`s:partition%`s已满,添加更多历史分区(out of %s)"
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index b81ace9a2cc..57f7cfac595 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -9761,7 +9761,7 @@ bool LEX::part_values_current(THD *thd)
{
if (unlikely(part_info->part_type != VERSIONING_PARTITION))
{
- part_type_error(thd, NULL, "CURRENT", part_info);
+ my_error(ER_PARTITION_WRONG_TYPE, MYF(0), "SYSTEM_TIME");
return true;
}
}
@@ -9788,7 +9788,7 @@ bool LEX::part_values_history(THD *thd)
{
if (unlikely(part_info->part_type != VERSIONING_PARTITION))
{
- part_type_error(thd, NULL, "HISTORY", part_info);
+ my_error(ER_PARTITION_WRONG_TYPE, MYF(0), "SYSTEM_TIME");
return true;
}
}
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index 9c7f25e8808..66af56d2337 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -2470,7 +2470,7 @@ end:
@retval != 0 Failure
*/
-static int add_key_with_algorithm(String *str, const partition_info *part_info)
+static int add_key_with_algorithm(String *str, partition_info *part_info)
{
int err= 0;
err+= str->append(STRING_WITH_LEN("KEY "));
@@ -2499,78 +2499,6 @@ char *generate_partition_syntax_for_frm(THD *thd, partition_info *part_info,
return res;
}
-
-/*
- Generate the partition type syntax from the partition data structure.
-
- @return Operation status.
- @retval 0 Success
- @retval > 0 Failure
- @retval -1 Fatal error
-*/
-
-int partition_info::gen_part_type(THD *thd, String *str) const
-{
- int err= 0;
- switch (part_type)
- {
- case RANGE_PARTITION:
- err+= str->append(STRING_WITH_LEN("RANGE "));
- break;
- case LIST_PARTITION:
- err+= str->append(STRING_WITH_LEN("LIST "));
- break;
- case HASH_PARTITION:
- if (linear_hash_ind)
- err+= str->append(STRING_WITH_LEN("LINEAR "));
- if (list_of_part_fields)
- {
- err+= add_key_with_algorithm(str, this);
- err+= add_part_field_list(thd, str, part_field_list);
- }
- else
- err+= str->append(STRING_WITH_LEN("HASH "));
- break;
- case VERSIONING_PARTITION:
- err+= str->append(STRING_WITH_LEN("SYSTEM_TIME "));
- break;
- default:
- DBUG_ASSERT(0);
- /* We really shouldn't get here, no use in continuing from here */
- my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATAL));
- return -1;
- }
- return err;
-}
-
-
-void part_type_error(THD *thd, partition_info *work_part_info,
- const char *part_type,
- partition_info *tab_part_info)
-{
- StringBuffer<256> tab_part_type;
- if (tab_part_info->gen_part_type(thd, &tab_part_type) < 0)
- return;
- tab_part_type.length(tab_part_type.length() - 1);
- if (work_part_info)
- {
- DBUG_ASSERT(!part_type);
- StringBuffer<256> work_part_type;
- if (work_part_info->gen_part_type(thd, &work_part_type) < 0)
- return;
- work_part_type.length(work_part_type.length() - 1);
- my_error(ER_PARTITION_WRONG_TYPE, MYF(0), work_part_type.c_ptr(),
- tab_part_type.c_ptr());
- }
- else
- {
- DBUG_ASSERT(part_type);
- my_error(ER_PARTITION_WRONG_TYPE, MYF(0), part_type,
- tab_part_type.c_ptr());
- }
-}
-
-
/*
Generate the partition syntax from the partition data structure.
Useful for support of generating defaults, SHOW CREATE TABLES
@@ -2614,10 +2542,34 @@ char *generate_partition_syntax(THD *thd, partition_info *part_info,
DBUG_ENTER("generate_partition_syntax");
err+= str.append(STRING_WITH_LEN(" PARTITION BY "));
- int err2= part_info->gen_part_type(thd, &str);
- if (err2 < 0)
- DBUG_RETURN(NULL);
- err+= err2;
+ switch (part_info->part_type)
+ {
+ case RANGE_PARTITION:
+ err+= str.append(STRING_WITH_LEN("RANGE "));
+ break;
+ case LIST_PARTITION:
+ err+= str.append(STRING_WITH_LEN("LIST "));
+ break;
+ case HASH_PARTITION:
+ if (part_info->linear_hash_ind)
+ err+= str.append(STRING_WITH_LEN("LINEAR "));
+ if (part_info->list_of_part_fields)
+ {
+ err+= add_key_with_algorithm(&str, part_info);
+ err+= add_part_field_list(thd, &str, part_info->part_field_list);
+ }
+ else
+ err+= str.append(STRING_WITH_LEN("HASH "));
+ break;
+ case VERSIONING_PARTITION:
+ err+= str.append(STRING_WITH_LEN("SYSTEM_TIME "));
+ break;
+ default:
+ DBUG_ASSERT(0);
+ /* We really shouldn't get here, no use in continuing from here */
+ my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATAL));
+ DBUG_RETURN(NULL);
+ }
if (part_info->part_type == VERSIONING_PARTITION)
{
Vers_part_info *vers_info= part_info->vers_info;
@@ -5117,7 +5069,7 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info,
else if (thd->work_part_info->part_type == VERSIONING_PARTITION ||
tab_part_info->part_type == VERSIONING_PARTITION)
{
- part_type_error(thd, thd->work_part_info, NULL, tab_part_info);
+ my_error(ER_PARTITION_WRONG_TYPE, MYF(0), "SYSTEM_TIME");
}
else
{
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc
index 5d796cb9348..edeaab0fff6 100644
--- a/storage/innobase/btr/btr0cur.cc
+++ b/storage/innobase/btr/btr0cur.cc
@@ -2391,9 +2391,8 @@ need_opposite_intention:
page hash index, while holding search latch. */
if (!btr_search_enabled) {
} else if (tuple->info_bits & REC_INFO_MIN_REC_FLAG) {
- ut_ad(index->is_instant());
/* This may be a search tuple for
- btr_pcur_restore_position(). */
+ btr_pcur_t::restore_position(). */
ut_ad(tuple->is_metadata()
|| (tuple->is_metadata(tuple->info_bits
^ REC_STATUS_INSTANT)));