summaryrefslogtreecommitdiff
path: root/storage/innobase
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-03-11 20:09:34 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2021-03-11 20:09:34 +0200
commita4b7232b2cfd504057c26f9b40a2dacf064dca73 (patch)
tree9a33e1d13f7b7b716da89fe41f3ffdd3bf6221ba /storage/innobase
parenta8650b64ede7330e83e84226cccd77ba8e05fa29 (diff)
parent1ea6ac3c953f847da033254d5df67f57987a1884 (diff)
downloadmariadb-git-a4b7232b2cfd504057c26f9b40a2dacf064dca73.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'storage/innobase')
-rw-r--r--storage/innobase/btr/btr0btr.cc4
-rw-r--r--storage/innobase/data/data0data.cc2
-rw-r--r--storage/innobase/fts/fts0fts.cc2
-rw-r--r--storage/innobase/handler/ha_innodb.cc35
4 files changed, 38 insertions, 5 deletions
diff --git a/storage/innobase/btr/btr0btr.cc b/storage/innobase/btr/btr0btr.cc
index 77377dcedc3..a6a8d62ade6 100644
--- a/storage/innobase/btr/btr0btr.cc
+++ b/storage/innobase/btr/btr0btr.cc
@@ -4435,7 +4435,7 @@ n_field_mismatch:
ulint extern_len = mach_read_from_4(
data + len + BTR_EXTERN_LEN + 4);
if (fixed_size == extern_len) {
- continue;
+ goto next_field;
}
}
}
@@ -4470,7 +4470,7 @@ len_mismatch:
}
return(FALSE);
}
-
+next_field:
field++;
}
diff --git a/storage/innobase/data/data0data.cc b/storage/innobase/data/data0data.cc
index d1fcdb53baa..2aa45ea1895 100644
--- a/storage/innobase/data/data0data.cc
+++ b/storage/innobase/data/data0data.cc
@@ -688,7 +688,7 @@ dtuple_convert_big_rec(
goto skip_field;
}
- longest_i = i;
+ longest_i = i + mblob;
longest = savings;
skip_field:
diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc
index 9a7d33ca34c..d35da0fe843 100644
--- a/storage/innobase/fts/fts0fts.cc
+++ b/storage/innobase/fts/fts0fts.cc
@@ -1717,7 +1717,7 @@ fts_create_in_mem_aux_table(
dict_table_t* new_table = dict_mem_table_create(
aux_table_name, NULL, n_cols, 0, table->flags,
table->space_id == TRX_SYS_SPACE
- ? 0 : table->space->purpose == FIL_TYPE_TEMPORARY
+ ? 0 : table->space_id == SRV_TMP_SPACE_ID
? DICT_TF2_TEMPORARY : DICT_TF2_USE_FILE_PER_TABLE);
if (DICT_TF_HAS_DATA_DIR(table->flags)) {
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index f2913efaf91..4f1e4c243ba 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -3112,6 +3112,29 @@ static int innodb_init_abort()
DBUG_RETURN(1);
}
+static const char* deprecated_innodb_checksum_algorithm
+ = "Setting innodb_checksum_algorithm to values other than"
+ " crc32, full_crc32, strict_crc32 or strict_full_crc32"
+ " is UNSAFE and DEPRECATED."
+ " These deprecated values will be disallowed in MariaDB 10.6.";
+
+static void innodb_checksum_algorithm_update(THD *thd, st_mysql_sys_var*,
+ void *, const void *save)
+{
+ srv_checksum_algorithm= *static_cast<const ulong*>(save);
+ switch (srv_checksum_algorithm) {
+ case SRV_CHECKSUM_ALGORITHM_CRC32:
+ case SRV_CHECKSUM_ALGORITHM_STRICT_CRC32:
+ case SRV_CHECKSUM_ALGORITHM_FULL_CRC32:
+ case SRV_CHECKSUM_ALGORITHM_STRICT_FULL_CRC32:
+ break;
+ default:
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+ HA_ERR_UNSUPPORTED,
+ deprecated_innodb_checksum_algorithm);
+ }
+}
+
/****************************************************************//**
Gives the file extension of an InnoDB single-table tablespace. */
static const char* ha_innobase_exts[] = {
@@ -3680,6 +3703,16 @@ static int innodb_init_params()
srv_buf_pool_size = ulint(innobase_buffer_pool_size);
+ switch (srv_checksum_algorithm) {
+ case SRV_CHECKSUM_ALGORITHM_CRC32:
+ case SRV_CHECKSUM_ALGORITHM_STRICT_CRC32:
+ case SRV_CHECKSUM_ALGORITHM_FULL_CRC32:
+ case SRV_CHECKSUM_ALGORITHM_STRICT_FULL_CRC32:
+ break;
+ default:
+ ib::warn() << deprecated_innodb_checksum_algorithm;
+ }
+
row_rollback_on_timeout = (ibool) innobase_rollback_on_timeout;
if (innobase_open_files < 10) {
@@ -18926,7 +18959,7 @@ static MYSQL_SYSVAR_ENUM(checksum_algorithm, srv_checksum_algorithm,
" Files updated when this option is set to crc32 or strict_crc32 will"
" not be readable by MariaDB versions older than 10.0.4;"
" new files created with full_crc32 are readable by MariaDB 10.4.3+",
- NULL, NULL, SRV_CHECKSUM_ALGORITHM_FULL_CRC32,
+ NULL, innodb_checksum_algorithm_update, SRV_CHECKSUM_ALGORITHM_FULL_CRC32,
&innodb_checksum_algorithm_typelib);
/** Description of deprecated and ignored parameters */