1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00

Fixed issue on atomic writes setup and atomic blobs setup on system

tables.
This commit is contained in:
Jan Lindström
2014-02-12 12:52:34 +02:00
parent f6ad325883
commit 1fa19bf777
2 changed files with 46 additions and 10 deletions

View File

@@ -681,12 +681,16 @@ dict_sys_tables_type_validate(
if (redundant) {
if (zip_ssize || atomic_blobs) {
fprintf(stderr, "InnoDB Error: SYS_TABLES::TYPE=Redundant, zip_ssize %lu atomic_blobs %lu\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=%lu, unused %lu\n",
type, unused);
return(ULINT_UNDEFINED);
}
@@ -701,6 +705,8 @@ dict_sys_tables_type_validate(
} else if (zip_ssize) {
/* Antelope does not support COMPRESSED format. */
fprintf(stderr, "InnoDB Error: SYS_TABLES::TYPE=%lu, zip_ssize %lu\n",
type, zip_ssize);
return(ULINT_UNDEFINED);
}
@@ -710,11 +716,15 @@ 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=%lu, zip_ssize %lu atomic_blobs %lu\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=%lu, zip_ssize %lu max %d\n",
type, zip_ssize, PAGE_ZIP_SSIZE_MAX);
return(ULINT_UNDEFINED);
}
}
@@ -731,6 +741,9 @@ 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=%lu, page_compression %lu page_compression_level %lu\n"
"InnoDB: Error: atomic_blobs %lu\n",
type, page_compression, page_compression_level, atomic_blobs);
return(ULINT_UNDEFINED);
}
}
@@ -738,6 +751,9 @@ dict_sys_tables_type_validate(
if (awrites == ATOMIC_WRITES_ON ||
(awrites == ATOMIC_WRITES_DEFAULT && srv_use_atomic_writes)) {
if (!atomic_blobs) {
fprintf(stderr, "InnoDB Error: SYS_TABLES::TYPE=%lu, atomic_writes %lu atomic_blobs %lu\n",
type, atomic_writes, atomic_blobs);
return(ULINT_UNDEFINED);
}
}
@@ -846,10 +862,9 @@ dict_tf_set(
}
if (page_compressed) {
*flags = DICT_TF_COMPACT
| (1 << DICT_TF_POS_ATOMIC_BLOBS)
| (1 << DICT_TF_POS_PAGE_COMPRESSION)
| (page_compression_level << DICT_TF_POS_PAGE_COMPRESSION_LEVEL);
*flags |= (1 << DICT_TF_POS_ATOMIC_BLOBS)
| (1 << DICT_TF_POS_PAGE_COMPRESSION)
| (page_compression_level << DICT_TF_POS_PAGE_COMPRESSION_LEVEL);
ut_ad(zip_ssize == 0);
ut_ad(dict_tf_get_page_compression(*flags) == TRUE);
@@ -863,7 +878,8 @@ dict_tf_set(
if (awrites == ATOMIC_WRITES_ON ||
(awrites == ATOMIC_WRITES_DEFAULT && srv_use_atomic_writes )) {
*flags |= (1 << DICT_TF_POS_ATOMIC_BLOBS);
*flags |= (atomic_writes << DICT_TF_POS_ATOMIC_WRITES)
| (1 << DICT_TF_POS_ATOMIC_BLOBS);
}
if (use_data_dir) {
@@ -996,6 +1012,8 @@ dict_tf_to_sys_tables_type(
| DICT_TF_MASK_PAGE_COMPRESSION_LEVEL
| DICT_TF_MASK_ATOMIC_WRITES);
ut_a(dict_sys_tables_type_validate(type, 0));
return(type);
}

View File

@@ -685,12 +685,16 @@ dict_sys_tables_type_validate(
if (redundant) {
if (zip_ssize || atomic_blobs) {
fprintf(stderr, "InnoDB Error: SYS_TABLES::TYPE=Redundant, zip_ssize %lu atomic_blobs %lu\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=%lu, unused %lu\n",
type, unused);
return(ULINT_UNDEFINED);
}
@@ -705,6 +709,8 @@ dict_sys_tables_type_validate(
} else if (zip_ssize) {
/* Antelope does not support COMPRESSED format. */
fprintf(stderr, "InnoDB Error: SYS_TABLES::TYPE=%lu, zip_ssize %lu\n",
type, zip_ssize);
return(ULINT_UNDEFINED);
}
@@ -714,11 +720,15 @@ 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=%lu, zip_ssize %lu atomic_blobs %lu\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=%lu, zip_ssize %lu max %d\n",
type, zip_ssize, PAGE_ZIP_SSIZE_MAX);
return(ULINT_UNDEFINED);
}
}
@@ -735,6 +745,9 @@ 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=%lu, page_compression %lu page_compression_level %lu\n"
"InnoDB: Error: atomic_blobs %lu\n",
type, page_compression, page_compression_level, atomic_blobs);
return(ULINT_UNDEFINED);
}
}
@@ -742,6 +755,9 @@ dict_sys_tables_type_validate(
if (awrites == ATOMIC_WRITES_ON ||
(awrites == ATOMIC_WRITES_DEFAULT && srv_use_atomic_writes)) {
if (!atomic_blobs) {
fprintf(stderr, "InnoDB Error: SYS_TABLES::TYPE=%lu, atomic_writes %lu atomic_blobs %lu\n",
type, atomic_writes, atomic_blobs);
return(ULINT_UNDEFINED);
}
}
@@ -854,10 +870,9 @@ dict_tf_set(
}
if (page_compressed) {
*flags = DICT_TF_COMPACT
| (1 << DICT_TF_POS_ATOMIC_BLOBS)
| (1 << DICT_TF_POS_PAGE_COMPRESSION)
| (page_compression_level << DICT_TF_POS_PAGE_COMPRESSION_LEVEL);
*flags |= (1 << DICT_TF_POS_ATOMIC_BLOBS)
| (1 << DICT_TF_POS_PAGE_COMPRESSION)
| (page_compression_level << DICT_TF_POS_PAGE_COMPRESSION_LEVEL);
ut_ad(zip_ssize == 0);
ut_ad(dict_tf_get_page_compression(*flags) == TRUE);
@@ -871,7 +886,8 @@ dict_tf_set(
if (awrites == ATOMIC_WRITES_ON ||
(awrites == ATOMIC_WRITES_DEFAULT && srv_use_atomic_writes )) {
*flags |= (1 << DICT_TF_POS_ATOMIC_BLOBS);
*flags |= (atomic_writes << DICT_TF_POS_ATOMIC_WRITES)
| (1 << DICT_TF_POS_ATOMIC_BLOBS);
}
}
@@ -1000,6 +1016,8 @@ dict_tf_to_sys_tables_type(
| DICT_TF_MASK_PAGE_COMPRESSION_LEVEL
| DICT_TF_MASK_ATOMIC_WRITES);
ut_a(dict_sys_tables_type_validate(type, 0));
return(type);
}