Commit 1fa19bf7 authored by Jan Lindström's avatar Jan Lindström

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

tables.
parent f6ad3258
...@@ -681,12 +681,16 @@ dict_sys_tables_type_validate( ...@@ -681,12 +681,16 @@ dict_sys_tables_type_validate(
if (redundant) { if (redundant) {
if (zip_ssize || atomic_blobs) { 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); return(ULINT_UNDEFINED);
} }
} }
/* Make sure there are no bits that we do not know about. */ /* Make sure there are no bits that we do not know about. */
if (unused) { if (unused) {
fprintf(stderr, "InnoDB Error: SYS_TABLES::TYPE=%lu, unused %lu\n",
type, unused);
return(ULINT_UNDEFINED); return(ULINT_UNDEFINED);
} }
...@@ -701,6 +705,8 @@ dict_sys_tables_type_validate( ...@@ -701,6 +705,8 @@ dict_sys_tables_type_validate(
} else if (zip_ssize) { } else if (zip_ssize) {
/* Antelope does not support COMPRESSED format. */ /* Antelope does not support COMPRESSED format. */
fprintf(stderr, "InnoDB Error: SYS_TABLES::TYPE=%lu, zip_ssize %lu\n",
type, zip_ssize);
return(ULINT_UNDEFINED); return(ULINT_UNDEFINED);
} }
...@@ -710,11 +716,15 @@ dict_sys_tables_type_validate( ...@@ -710,11 +716,15 @@ dict_sys_tables_type_validate(
should be in N_COLS, but we already know about the should be in N_COLS, but we already know about the
low_order_bit and DICT_N_COLS_COMPACT flags. */ low_order_bit and DICT_N_COLS_COMPACT flags. */
if (!atomic_blobs) { 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); return(ULINT_UNDEFINED);
} }
/* Validate that the number is within allowed range. */ /* Validate that the number is within allowed range. */
if (zip_ssize > PAGE_ZIP_SSIZE_MAX) { 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); return(ULINT_UNDEFINED);
} }
} }
...@@ -731,6 +741,9 @@ dict_sys_tables_type_validate( ...@@ -731,6 +741,9 @@ dict_sys_tables_type_validate(
low_order_bit and DICT_N_COLS_COMPACT flags. */ low_order_bit and DICT_N_COLS_COMPACT flags. */
if (!atomic_blobs || !page_compression) { 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); return(ULINT_UNDEFINED);
} }
} }
...@@ -738,6 +751,9 @@ dict_sys_tables_type_validate( ...@@ -738,6 +751,9 @@ dict_sys_tables_type_validate(
if (awrites == ATOMIC_WRITES_ON || if (awrites == ATOMIC_WRITES_ON ||
(awrites == ATOMIC_WRITES_DEFAULT && srv_use_atomic_writes)) { (awrites == ATOMIC_WRITES_DEFAULT && srv_use_atomic_writes)) {
if (!atomic_blobs) { 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); return(ULINT_UNDEFINED);
} }
} }
...@@ -846,8 +862,7 @@ dict_tf_set( ...@@ -846,8 +862,7 @@ dict_tf_set(
} }
if (page_compressed) { if (page_compressed) {
*flags = DICT_TF_COMPACT *flags |= (1 << DICT_TF_POS_ATOMIC_BLOBS)
| (1 << DICT_TF_POS_ATOMIC_BLOBS)
| (1 << DICT_TF_POS_PAGE_COMPRESSION) | (1 << DICT_TF_POS_PAGE_COMPRESSION)
| (page_compression_level << DICT_TF_POS_PAGE_COMPRESSION_LEVEL); | (page_compression_level << DICT_TF_POS_PAGE_COMPRESSION_LEVEL);
...@@ -863,7 +878,8 @@ dict_tf_set( ...@@ -863,7 +878,8 @@ dict_tf_set(
if (awrites == ATOMIC_WRITES_ON || if (awrites == ATOMIC_WRITES_ON ||
(awrites == ATOMIC_WRITES_DEFAULT && srv_use_atomic_writes )) { (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) { if (use_data_dir) {
...@@ -996,6 +1012,8 @@ dict_tf_to_sys_tables_type( ...@@ -996,6 +1012,8 @@ dict_tf_to_sys_tables_type(
| DICT_TF_MASK_PAGE_COMPRESSION_LEVEL | DICT_TF_MASK_PAGE_COMPRESSION_LEVEL
| DICT_TF_MASK_ATOMIC_WRITES); | DICT_TF_MASK_ATOMIC_WRITES);
ut_a(dict_sys_tables_type_validate(type, 0));
return(type); return(type);
} }
......
...@@ -685,12 +685,16 @@ dict_sys_tables_type_validate( ...@@ -685,12 +685,16 @@ dict_sys_tables_type_validate(
if (redundant) { if (redundant) {
if (zip_ssize || atomic_blobs) { 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); return(ULINT_UNDEFINED);
} }
} }
/* Make sure there are no bits that we do not know about. */ /* Make sure there are no bits that we do not know about. */
if (unused) { if (unused) {
fprintf(stderr, "InnoDB Error: SYS_TABLES::TYPE=%lu, unused %lu\n",
type, unused);
return(ULINT_UNDEFINED); return(ULINT_UNDEFINED);
} }
...@@ -705,6 +709,8 @@ dict_sys_tables_type_validate( ...@@ -705,6 +709,8 @@ dict_sys_tables_type_validate(
} else if (zip_ssize) { } else if (zip_ssize) {
/* Antelope does not support COMPRESSED format. */ /* Antelope does not support COMPRESSED format. */
fprintf(stderr, "InnoDB Error: SYS_TABLES::TYPE=%lu, zip_ssize %lu\n",
type, zip_ssize);
return(ULINT_UNDEFINED); return(ULINT_UNDEFINED);
} }
...@@ -714,11 +720,15 @@ dict_sys_tables_type_validate( ...@@ -714,11 +720,15 @@ dict_sys_tables_type_validate(
should be in N_COLS, but we already know about the should be in N_COLS, but we already know about the
low_order_bit and DICT_N_COLS_COMPACT flags. */ low_order_bit and DICT_N_COLS_COMPACT flags. */
if (!atomic_blobs) { 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); return(ULINT_UNDEFINED);
} }
/* Validate that the number is within allowed range. */ /* Validate that the number is within allowed range. */
if (zip_ssize > PAGE_ZIP_SSIZE_MAX) { 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); return(ULINT_UNDEFINED);
} }
} }
...@@ -735,6 +745,9 @@ dict_sys_tables_type_validate( ...@@ -735,6 +745,9 @@ dict_sys_tables_type_validate(
low_order_bit and DICT_N_COLS_COMPACT flags. */ low_order_bit and DICT_N_COLS_COMPACT flags. */
if (!atomic_blobs || !page_compression) { 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); return(ULINT_UNDEFINED);
} }
} }
...@@ -742,6 +755,9 @@ dict_sys_tables_type_validate( ...@@ -742,6 +755,9 @@ dict_sys_tables_type_validate(
if (awrites == ATOMIC_WRITES_ON || if (awrites == ATOMIC_WRITES_ON ||
(awrites == ATOMIC_WRITES_DEFAULT && srv_use_atomic_writes)) { (awrites == ATOMIC_WRITES_DEFAULT && srv_use_atomic_writes)) {
if (!atomic_blobs) { 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); return(ULINT_UNDEFINED);
} }
} }
...@@ -854,8 +870,7 @@ dict_tf_set( ...@@ -854,8 +870,7 @@ dict_tf_set(
} }
if (page_compressed) { if (page_compressed) {
*flags = DICT_TF_COMPACT *flags |= (1 << DICT_TF_POS_ATOMIC_BLOBS)
| (1 << DICT_TF_POS_ATOMIC_BLOBS)
| (1 << DICT_TF_POS_PAGE_COMPRESSION) | (1 << DICT_TF_POS_PAGE_COMPRESSION)
| (page_compression_level << DICT_TF_POS_PAGE_COMPRESSION_LEVEL); | (page_compression_level << DICT_TF_POS_PAGE_COMPRESSION_LEVEL);
...@@ -871,7 +886,8 @@ dict_tf_set( ...@@ -871,7 +886,8 @@ dict_tf_set(
if (awrites == ATOMIC_WRITES_ON || if (awrites == ATOMIC_WRITES_ON ||
(awrites == ATOMIC_WRITES_DEFAULT && srv_use_atomic_writes )) { (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( ...@@ -1000,6 +1016,8 @@ dict_tf_to_sys_tables_type(
| DICT_TF_MASK_PAGE_COMPRESSION_LEVEL | DICT_TF_MASK_PAGE_COMPRESSION_LEVEL
| DICT_TF_MASK_ATOMIC_WRITES); | DICT_TF_MASK_ATOMIC_WRITES);
ut_a(dict_sys_tables_type_validate(type, 0));
return(type); return(type);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment