summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-06-13 18:29:40 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2017-06-13 18:30:37 +0300
commit9ed325efc17e78f4c98d923c2af92c8b18cec0c5 (patch)
treea681ea7ee7ea10f87a3d62cf2959c7bbe8471f5d /storage
parent9f0ed6c67e96e9b7fa4222c2c36640c0f691f43d (diff)
parent1d5a306e3884ff0b159402f1f83dee2fb87d93f4 (diff)
downloadmariadb-git-9ed325efc17e78f4c98d923c2af92c8b18cec0c5.tar.gz
Merge 10.0 into 10.1, plus fixup for MDEV-12873
Cover innodb.table_flags with the new innodb_page_size.combinations 32k and 64k. dict_sys_tables_type_validate(): Remove an assertion that made a check in the function redundant. Remove the excessive output to the error log, as the invalid SYS_TABLES.TYPE value is already being output.
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/include/dict0dict.ic20
-rw-r--r--storage/xtradb/include/dict0dict.ic20
-rw-r--r--storage/xtradb/os/os0file.cc2
3 files changed, 3 insertions, 39 deletions
diff --git a/storage/innobase/include/dict0dict.ic b/storage/innobase/include/dict0dict.ic
index efdd814e3d6..6044f992d82 100644
--- a/storage/innobase/include/dict0dict.ic
+++ b/storage/innobase/include/dict0dict.ic
@@ -705,8 +705,6 @@ dict_sys_tables_type_validate(
ulint page_compression_level = DICT_TF_GET_PAGE_COMPRESSION_LEVEL(type);
ulint atomic_writes = DICT_TF_GET_ATOMIC_WRITES(type);
- ut_a(atomic_writes <= ATOMIC_WRITES_OFF);
-
/* The low order bit of SYS_TABLES.TYPE is always set to 1.
If the format is UNIV_FORMAT_B or higher, this field is the same
as dict_table_t::flags. Zero is not allowed here. */
@@ -716,16 +714,12 @@ dict_sys_tables_type_validate(
if (redundant) {
if (zip_ssize || atomic_blobs) {
- fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=Redundant, zip_ssize " ULINTPF " atomic_blobs " ULINTPF "\n",
- zip_ssize, atomic_blobs);
return(ULINT_UNDEFINED);
}
}
/* Make sure there are no bits that we do not know about. */
if (unused) {
- fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=" ULINTPF ", unused " ULINTPF "\n",
- type, unused);
return(ULINT_UNDEFINED);
}
@@ -737,11 +731,8 @@ dict_sys_tables_type_validate(
The DICT_N_COLS_COMPACT flag should be in N_COLS,
but we already know that. */
-
} else if (zip_ssize) {
/* Antelope does not support COMPRESSED format. */
- fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=" ULINTPF ", zip_ssize " ULINTPF "\n",
- type, zip_ssize);
return(ULINT_UNDEFINED);
}
@@ -751,15 +742,11 @@ dict_sys_tables_type_validate(
should be in N_COLS, but we already know about the
low_order_bit and DICT_N_COLS_COMPACT flags. */
if (!atomic_blobs) {
- fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=" ULINTPF ", zip_ssize " ULINTPF " atomic_blobs " ULINTPF "\n",
- type, zip_ssize, atomic_blobs);
return(ULINT_UNDEFINED);
}
/* Validate that the number is within allowed range. */
if (zip_ssize > PAGE_ZIP_SSIZE_MAX) {
- fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=" ULINTPF ", zip_ssize " ULINTPF " max %d\n",
- type, zip_ssize, PAGE_ZIP_SSIZE_MAX);
return(ULINT_UNDEFINED);
}
}
@@ -776,18 +763,13 @@ dict_sys_tables_type_validate(
low_order_bit and DICT_N_COLS_COMPACT flags. */
if (!atomic_blobs || !page_compression) {
- fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=" ULINTPF ", page_compression " ULINTPF " page_compression_level " ULINTPF "\n"
- "InnoDB: Error: atomic_blobs " ULINTPF "\n",
- type, page_compression, page_compression_level, atomic_blobs);
return(ULINT_UNDEFINED);
}
}
/* Validate that the atomic writes number is within allowed range. */
if (atomic_writes > ATOMIC_WRITES_OFF) {
- fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=" ULINTPF ", atomic_writes " ULINTPF "\n",
- type, atomic_writes);
- return(ULINT_UNDEFINED);
+ return(ULINT_UNDEFINED);
}
/* Return the validated SYS_TABLES.TYPE. */
diff --git a/storage/xtradb/include/dict0dict.ic b/storage/xtradb/include/dict0dict.ic
index 4ed1afc8094..f68d4e176da 100644
--- a/storage/xtradb/include/dict0dict.ic
+++ b/storage/xtradb/include/dict0dict.ic
@@ -705,8 +705,6 @@ dict_sys_tables_type_validate(
ulint page_compression_level = DICT_TF_GET_PAGE_COMPRESSION_LEVEL(type);
ulint atomic_writes = DICT_TF_GET_ATOMIC_WRITES(type);
- ut_a(atomic_writes <= ATOMIC_WRITES_OFF);
-
/* The low order bit of SYS_TABLES.TYPE is always set to 1.
If the format is UNIV_FORMAT_B or higher, this field is the same
as dict_table_t::flags. Zero is not allowed here. */
@@ -716,16 +714,12 @@ dict_sys_tables_type_validate(
if (redundant) {
if (zip_ssize || atomic_blobs) {
- fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=Redundant, zip_ssize " ULINTPF " atomic_blobs " ULINTPF "\n",
- zip_ssize, atomic_blobs);
return(ULINT_UNDEFINED);
}
}
/* Make sure there are no bits that we do not know about. */
if (unused) {
- fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=" ULINTPF ", unused " ULINTPF "\n",
- type, unused);
return(ULINT_UNDEFINED);
}
@@ -737,11 +731,8 @@ dict_sys_tables_type_validate(
The DICT_N_COLS_COMPACT flag should be in N_COLS,
but we already know that. */
-
} else if (zip_ssize) {
/* Antelope does not support COMPRESSED format. */
- fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=" ULINTPF ", zip_ssize " ULINTPF "\n",
- type, zip_ssize);
return(ULINT_UNDEFINED);
}
@@ -751,15 +742,11 @@ dict_sys_tables_type_validate(
should be in N_COLS, but we already know about the
low_order_bit and DICT_N_COLS_COMPACT flags. */
if (!atomic_blobs) {
- fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=" ULINTPF ", zip_ssize " ULINTPF " atomic_blobs " ULINTPF "\n",
- type, zip_ssize, atomic_blobs);
return(ULINT_UNDEFINED);
}
/* Validate that the number is within allowed range. */
if (zip_ssize > PAGE_ZIP_SSIZE_MAX) {
- fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=" ULINTPF ", zip_ssize " ULINTPF " max %d\n",
- type, zip_ssize, PAGE_ZIP_SSIZE_MAX);
return(ULINT_UNDEFINED);
}
}
@@ -776,18 +763,13 @@ dict_sys_tables_type_validate(
low_order_bit and DICT_N_COLS_COMPACT flags. */
if (!atomic_blobs || !page_compression) {
- fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=" ULINTPF ", page_compression " ULINTPF " page_compression_level " ULINTPF "\n"
- "InnoDB: Error: atomic_blobs " ULINTPF "\n",
- type, page_compression, page_compression_level, atomic_blobs);
return(ULINT_UNDEFINED);
}
}
/* Validate that the atomic writes number is within allowed range. */
if (atomic_writes > ATOMIC_WRITES_OFF) {
- fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=" ULINTPF ", atomic_writes " ULINTPF "\n",
- type, atomic_writes);
- return(ULINT_UNDEFINED);
+ return(ULINT_UNDEFINED);
}
/* Return the validated SYS_TABLES.TYPE. */
diff --git a/storage/xtradb/os/os0file.cc b/storage/xtradb/os/os0file.cc
index 20b202506f5..7fbee0312ee 100644
--- a/storage/xtradb/os/os0file.cc
+++ b/storage/xtradb/os/os0file.cc
@@ -4401,7 +4401,7 @@ os_aio_init(
#ifdef _WIN32
ut_a(completion_port == 0 && read_completion_port == 0);
completion_port = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 0);
- read_completion_port = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 0);
+ read_completion_port = srv_read_only_mode? completion_port : CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 0);
ut_a(completion_port && read_completion_port);
#endif