Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d23eb8e6
Commit
d23eb8e6
authored
Apr 21, 2017
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Follow-up to MDEV-12488: Fix some type mismatch in header files
This reduces the number of compilation warnings on Windows.
parent
aafaf05a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
151 additions
and
136 deletions
+151
-136
storage/innobase/include/dict0dict.ic
storage/innobase/include/dict0dict.ic
+60
-39
storage/innobase/include/fil0crypt.h
storage/innobase/include/fil0crypt.h
+3
-3
storage/innobase/include/fil0fil.ic
storage/innobase/include/fil0fil.ic
+13
-24
storage/xtradb/include/dict0dict.ic
storage/xtradb/include/dict0dict.ic
+59
-42
storage/xtradb/include/fil0crypt.h
storage/xtradb/include/fil0crypt.h
+3
-3
storage/xtradb/include/fil0fil.ic
storage/xtradb/include/fil0fil.ic
+13
-25
No files found.
storage/innobase/include/dict0dict.ic
View file @
d23eb8e6
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates
Copyright (c) 1996, 2016, Oracle and/or its affiliates
. All Rights Reserved.
Copyright (c) 2013, 2017, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
...
...
@@ -541,13 +541,15 @@ dict_tf_is_valid(
/* Make sure there are no bits that we do not know about. */
if (unused != 0) {
fprintf(stderr,
"InnoDB: Error: table unused flags are
%ld"
"InnoDB: Error: table unused flags are
" ULINTPF
" in the data dictionary and are corrupted\n"
"InnoDB: Error: data dictionary flags are\n"
"InnoDB: compact %ld atomic_blobs %ld\n"
"InnoDB: unused %ld data_dir %ld zip_ssize %ld\n"
"InnoDB: page_compression %ld page_compression_level %ld\n"
"InnoDB: atomic_writes %ld\n",
"InnoDB: compact " ULINTPF " atomic_blobs " ULINTPF
"\nInnoDB: unused " ULINTPF " data_dir " ULINTPF
" zip_ssize " ULINTPF
"\nInnoDB: page_compression " ULINTPF
" page_compression_level " ULINTPF
"\nInnoDB: atomic_writes " ULINTPF "\n",
unused,
compact, atomic_blobs, unused, data_dir, zip_ssize,
page_compression, page_compression_level, atomic_writes
...
...
@@ -563,13 +565,17 @@ dict_tf_is_valid(
if (!compact) {
fprintf(stderr,
"InnoDB: Error: table compact flags are %ld"
"InnoDB: Error: table compact flags are "
ULINTPF
" in the data dictionary and are corrupted\n"
"InnoDB: Error: data dictionary flags are\n"
"InnoDB: compact %ld atomic_blobs %ld\n"
"InnoDB: unused %ld data_dir %ld zip_ssize %ld\n"
"InnoDB: page_compression %ld page_compression_level %ld\n"
"InnoDB: atomic_writes %ld\n",
"InnoDB: compact " ULINTPF
" atomic_blobs " ULINTPF "\n"
"InnoDB: unused " ULINTPF
" data_dir " ULINTPF " zip_ssize " ULINTPF
"\nInnoDB: page_compression " ULINTPF
" page_compression_level " ULINTPF
"\nInnoDB: atomic_writes " ULINTPF "\n",
compact, compact, atomic_blobs, unused, data_dir, zip_ssize,
page_compression, page_compression_level, atomic_writes
);
...
...
@@ -580,13 +586,15 @@ dict_tf_is_valid(
/* Antelope does not support COMPRESSED row format. */
fprintf(stderr,
"InnoDB: Error: table flags are
%ld"
"InnoDB: Error: table flags are
" ULINTPF
" in the data dictionary and are corrupted\n"
"InnoDB: Error: data dictionary flags are\n"
"InnoDB: compact %ld atomic_blobs %ld\n"
"InnoDB: unused %ld data_dir %ld zip_ssize %ld\n"
"InnoDB: page_compression %ld page_compression_level %ld\n"
"InnoDB: atomic_writes %ld\n",
"InnoDB: compact " ULINTPF " atomic_blobs " ULINTPF
"\nInnoDB: unused " ULINTPF " data_dir " ULINTPF
" zip_ssize " ULINTPF
"\nInnoDB: page_compression " ULINTPF
" page_compression_level " ULINTPF
"\nInnoDB: atomic_writes " ULINTPF "\n",
flags, compact, atomic_blobs, unused, data_dir, zip_ssize,
page_compression, page_compression_level, atomic_writes
);
...
...
@@ -603,12 +611,17 @@ dict_tf_is_valid(
|| zip_ssize > PAGE_ZIP_SSIZE_MAX) {
fprintf(stderr,
"InnoDB: Error: table compact flags are %ld in the data dictionary and are corrupted\n"
"InnoDB: Error: table compact flags are "
ULINTPF
" in the data dictionary and are corrupted\n"
"InnoDB: Error: data dictionary flags are\n"
"InnoDB: compact %ld atomic_blobs %ld\n"
"InnoDB: unused %ld data_dir %ld zip_ssize %ld\n"
"InnoDB: page_compression %ld page_compression_level %ld\n"
"InnoDB: atomic_writes %ld\n",
"InnoDB: compact " ULINTPF
" atomic_blobs " ULINTPF "\n"
"InnoDB: unused " ULINTPF
" data_dir " ULINTPF " zip_ssize " ULINTPF
"\nInnoDB: page_compression " ULINTPF
" page_compression_level " ULINTPF
"\nInnoDB: atomic_writes " ULINTPF "\n",
flags,
compact, atomic_blobs, unused, data_dir, zip_ssize,
page_compression, page_compression_level, atomic_writes
...
...
@@ -627,12 +640,16 @@ dict_tf_is_valid(
|| !atomic_blobs) {
fprintf(stderr,
"InnoDB: Error: table flags are %ld in the data dictionary and are corrupted\n"
"InnoDB: Error: table flags are " ULINTPF
" in the data dictionary and are corrupted\n"
"InnoDB: Error: data dictionary flags are\n"
"InnoDB: compact %ld atomic_blobs %ld\n"
"InnoDB: unused %ld data_dir %ld zip_ssize %ld\n"
"InnoDB: page_compression %ld page_compression_level %ld\n"
"InnoDB: atomic_writes %ld\n",
"InnoDB: compact " ULINTPF
" atomic_blobs " ULINTPF "\n"
"InnoDB: unused " ULINTPF
" data_dir " ULINTPF " zip_ssize " ULINTPF
"\nInnoDB: page_compression " ULINTPF
" page_compression_level " ULINTPF
"\nInnoDB: atomic_writes " ULINTPF "\n",
flags, compact, atomic_blobs, unused, data_dir, zip_ssize,
page_compression, page_compression_level, atomic_writes
);
...
...
@@ -645,12 +662,16 @@ dict_tf_is_valid(
if(atomic_writes > ATOMIC_WRITES_OFF) {
fprintf(stderr,
"InnoDB: Error: table flags are %ld in the data dictionary and are corrupted\n"
"InnoDB: Error: table flags are " ULINTPF
" in the data dictionary and are corrupted\n"
"InnoDB: Error: data dictionary flags are\n"
"InnoDB: compact %ld atomic_blobs %ld\n"
"InnoDB: unused %ld data_dir %ld zip_ssize %ld\n"
"InnoDB: page_compression %ld page_compression_level %ld\n"
"InnoDB: atomic_writes %ld\n",
"InnoDB: compact " ULINTPF
" atomic_blobs " ULINTPF "\n"
"InnoDB: unused " ULINTPF
" data_dir " ULINTPF " zip_ssize " ULINTPF
"\nInnoDB: page_compression " ULINTPF
" page_compression_level " ULINTPF
"\nInnoDB: atomic_writes " ULINTPF "\n",
flags, compact, atomic_blobs, unused, data_dir, zip_ssize,
page_compression, page_compression_level, atomic_writes
);
...
...
@@ -695,7 +716,7 @@ 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",
fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=Redundant, zip_ssize
" ULINTPF " atomic_blobs " ULINTPF "
\n",
zip_ssize, atomic_blobs);
return(ULINT_UNDEFINED);
}
...
...
@@ -703,7 +724,7 @@ dict_sys_tables_type_validate(
/* 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",
fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=
" ULINTPF ", unused " ULINTPF "
\n",
type, unused);
return(ULINT_UNDEFINED);
}
...
...
@@ -719,7 +740,7 @@ 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",
fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=
" ULINTPF ", zip_ssize " ULINTPF "
\n",
type, zip_ssize);
return(ULINT_UNDEFINED);
}
...
...
@@ -730,14 +751,14 @@ 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",
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=
%lu, zip_ssize %lu
max %d\n",
fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=
" ULINTPF ", zip_ssize " ULINTPF "
max %d\n",
type, zip_ssize, PAGE_ZIP_SSIZE_MAX);
return(ULINT_UNDEFINED);
}
...
...
@@ -755,8 +776,8 @@ 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",
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);
}
...
...
@@ -764,7 +785,7 @@ dict_sys_tables_type_validate(
/* Validate that the atomic writes number is within allowed range. */
if (atomic_writes > ATOMIC_WRITES_OFF) {
fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=
%lu, atomic_writes %lu
\n",
fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=
" ULINTPF ", atomic_writes " ULINTPF "
\n",
type, atomic_writes);
return(ULINT_UNDEFINED);
}
...
...
storage/innobase/include/fil0crypt.h
View file @
d23eb8e6
...
...
@@ -109,7 +109,7 @@ struct fil_space_crypt_t : st_encryption_scheme
The object is expected to be placed in a buffer that
has been zero-initialized. */
fil_space_crypt_t
(
u
l
int
new_type
,
uint
new_type
,
uint
new_min_key_version
,
uint
new_key_id
,
fil_encryption_t
new_encryption
)
...
...
@@ -117,10 +117,10 @@ struct fil_space_crypt_t : st_encryption_scheme
min_key_version
(
new_min_key_version
),
page0_offset
(
0
),
encryption
(
new_encryption
),
key_found
(),
mutex
(),
key_found
(
new_min_key_version
),
rotate_state
()
{
key_found
=
new_min_key_version
;
key_id
=
new_key_id
;
my_random_bytes
(
iv
,
sizeof
(
iv
));
mutex_create
(
fil_crypt_data_mutex_key
,
...
...
storage/innobase/include/fil0fil.ic
View file @
d23eb8e6
/*****************************************************************************
Copyright (c) 2015, MariaDB Corporation.
Copyright (c) 2015,
2017,
MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -137,7 +137,7 @@ fil_page_type_validate(
page_type == FIL_PAGE_TYPE_ZBLOB2 ||
page_type == FIL_PAGE_TYPE_COMPRESSED))) {
uint key_version = mach_read_from_4(page + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
u
l
int key_version = mach_read_from_4(page + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
bool page_compressed = (page_type == FIL_PAGE_PAGE_COMPRESSED);
bool page_compressed_encrypted = (page_type == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED);
ulint space = mach_read_from_4(page + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
...
...
@@ -149,28 +149,17 @@ fil_page_type_validate(
fil_system_exit();
/* Dump out the page info */
fprintf(stderr, "InnoDB: Space %lu offset %lu name %s page_type %lu page_type_name %s\n"
"InnoDB: key_version %u page_compressed %d page_compressed_encrypted %d lsn %llu compressed_len %lu\n",
space, offset, rspace->name, page_type, fil_get_page_type_name(page_type),
key_version, page_compressed, page_compressed_encrypted, (ulonglong)lsn, compressed_len);
fflush(stderr);
ut_ad(page_type == FIL_PAGE_PAGE_COMPRESSED ||
page_type == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED ||
page_type == FIL_PAGE_INDEX ||
page_type == FIL_PAGE_UNDO_LOG ||
page_type == FIL_PAGE_INODE ||
page_type == FIL_PAGE_IBUF_FREE_LIST ||
page_type == FIL_PAGE_TYPE_ALLOCATED ||
page_type == FIL_PAGE_IBUF_BITMAP ||
page_type == FIL_PAGE_TYPE_SYS ||
page_type == FIL_PAGE_TYPE_TRX_SYS ||
page_type == FIL_PAGE_TYPE_FSP_HDR ||
page_type == FIL_PAGE_TYPE_XDES ||
page_type == FIL_PAGE_TYPE_BLOB ||
page_type == FIL_PAGE_TYPE_ZBLOB ||
page_type == FIL_PAGE_TYPE_ZBLOB2 ||
page_type == FIL_PAGE_TYPE_COMPRESSED);
fprintf(stderr, "InnoDB: Page " ULINTPF ":" ULINTPF
" name %s page_type " ULINTPF " page_type_name %s\n"
"InnoDB: key_version " ULINTPF
" page_compressed %d page_compressed_encrypted %d lsn "
LSN_PF " compressed_len " ULINTPF "\n",
space, offset, rspace->name, page_type,
fil_get_page_type_name(page_type),
key_version,
page_compressed, page_compressed_encrypted,
lsn, compressed_len);
ut_error;
return false;
}
...
...
storage/xtradb/include/dict0dict.ic
View file @
d23eb8e6
...
...
@@ -540,15 +540,16 @@ dict_tf_is_valid(
/* Make sure there are no bits that we do not know about. */
if (unused != 0) {
fprintf(stderr,
"InnoDB: Error: table unused flags are
%ld"
"InnoDB: Error: table unused flags are
" ULINTPF
" in the data dictionary and are corrupted\n"
"InnoDB: Error: data dictionary flags are\n"
"InnoDB: compact %ld atomic_blobs %ld\n"
"InnoDB: unused %ld data_dir %ld zip_ssize %ld\n"
"InnoDB: page_compression %ld page_compression_level %ld\n"
"InnoDB: atomic_writes %ld\n",
"InnoDB: compact " ULINTPF " atomic_blobs " ULINTPF
"\nInnoDB: unused " ULINTPF " data_dir " ULINTPF
" zip_ssize " ULINTPF
"\nInnoDB: page_compression " ULINTPF
" page_compression_level " ULINTPF
"\nInnoDB: atomic_writes " ULINTPF "\n",
unused,
compact, atomic_blobs, unused, data_dir, zip_ssize,
page_compression, page_compression_level, atomic_writes
...
...
@@ -564,17 +565,20 @@ dict_tf_is_valid(
if (!compact) {
fprintf(stderr,
"InnoDB: Error: table compact flags are %ld"
"InnoDB: Error: table compact flags are "
ULINTPF
" in the data dictionary and are corrupted\n"
"InnoDB: Error: data dictionary flags are\n"
"InnoDB: compact %ld atomic_blobs %ld\n"
"InnoDB: unused %ld data_dir %ld zip_ssize %ld\n"
"InnoDB: page_compression %ld page_compression_level %ld\n"
"InnoDB: atomic_writes %ld\n",
"InnoDB: compact " ULINTPF
" atomic_blobs " ULINTPF "\n"
"InnoDB: unused " ULINTPF
" data_dir " ULINTPF " zip_ssize " ULINTPF
"\nInnoDB: page_compression " ULINTPF
" page_compression_level " ULINTPF
"\nInnoDB: atomic_writes " ULINTPF "\n",
compact, compact, atomic_blobs, unused, data_dir, zip_ssize,
page_compression, page_compression_level, atomic_writes
);
return(false);
}
...
...
@@ -582,17 +586,18 @@ dict_tf_is_valid(
/* Antelope does not support COMPRESSED row format. */
fprintf(stderr,
"InnoDB: Error: table flags are
%ld"
"InnoDB: Error: table flags are
" ULINTPF
" in the data dictionary and are corrupted\n"
"InnoDB: Error: data dictionary flags are\n"
"InnoDB: compact %ld atomic_blobs %ld\n"
"InnoDB: unused %ld data_dir %ld zip_ssize %ld\n"
"InnoDB: page_compression %ld page_compression_level %ld\n"
"InnoDB: atomic_writes %ld\n",
"InnoDB: compact " ULINTPF " atomic_blobs " ULINTPF
"\nInnoDB: unused " ULINTPF " data_dir " ULINTPF
" zip_ssize " ULINTPF
"\nInnoDB: page_compression " ULINTPF
" page_compression_level " ULINTPF
"\nInnoDB: atomic_writes " ULINTPF "\n",
flags, compact, atomic_blobs, unused, data_dir, zip_ssize,
page_compression, page_compression_level, atomic_writes
);
return(false);
}
...
...
@@ -606,12 +611,17 @@ dict_tf_is_valid(
|| zip_ssize > PAGE_ZIP_SSIZE_MAX) {
fprintf(stderr,
"InnoDB: Error: table compact flags are %ld in the data dictionary and are corrupted\n"
"InnoDB: Error: table compact flags are "
ULINTPF
" in the data dictionary and are corrupted\n"
"InnoDB: Error: data dictionary flags are\n"
"InnoDB: compact %ld atomic_blobs %ld\n"
"InnoDB: unused %ld data_dir %ld zip_ssize %ld\n"
"InnoDB: page_compression %ld page_compression_level %ld\n"
"InnoDB: atomic_writes %ld\n",
"InnoDB: compact " ULINTPF
" atomic_blobs " ULINTPF "\n"
"InnoDB: unused " ULINTPF
" data_dir " ULINTPF " zip_ssize " ULINTPF
"\nInnoDB: page_compression " ULINTPF
" page_compression_level " ULINTPF
"\nInnoDB: atomic_writes " ULINTPF "\n",
flags,
compact, atomic_blobs, unused, data_dir, zip_ssize,
page_compression, page_compression_level, atomic_writes
...
...
@@ -630,16 +640,19 @@ dict_tf_is_valid(
|| !atomic_blobs) {
fprintf(stderr,
"InnoDB: Error: table flags are %ld in the data dictionary and are corrupted\n"
"InnoDB: Error: table flags are " ULINTPF
" in the data dictionary and are corrupted\n"
"InnoDB: Error: data dictionary flags are\n"
"InnoDB: compact %ld atomic_blobs %ld\n"
"InnoDB: unused %ld data_dir %ld zip_ssize %ld\n"
"InnoDB: page_compression %ld page_compression_level %ld\n"
"InnoDB: atomic_writes %ld\n",
"InnoDB: compact " ULINTPF
" atomic_blobs " ULINTPF "\n"
"InnoDB: unused " ULINTPF
" data_dir " ULINTPF " zip_ssize " ULINTPF
"\nInnoDB: page_compression " ULINTPF
" page_compression_level " ULINTPF
"\nInnoDB: atomic_writes " ULINTPF "\n",
flags, compact, atomic_blobs, unused, data_dir, zip_ssize,
page_compression, page_compression_level, atomic_writes
);
return(false);
}
}
...
...
@@ -649,12 +662,16 @@ dict_tf_is_valid(
if(atomic_writes > ATOMIC_WRITES_OFF) {
fprintf(stderr,
"InnoDB: Error: table flags are %ld in the data dictionary and are corrupted\n"
"InnoDB: Error: table flags are " ULINTPF
" in the data dictionary and are corrupted\n"
"InnoDB: Error: data dictionary flags are\n"
"InnoDB: compact %ld atomic_blobs %ld\n"
"InnoDB: unused %ld data_dir %ld zip_ssize %ld\n"
"InnoDB: page_compression %ld page_compression_level %ld\n"
"InnoDB: atomic_writes %ld\n",
"InnoDB: compact " ULINTPF
" atomic_blobs " ULINTPF "\n"
"InnoDB: unused " ULINTPF
" data_dir " ULINTPF " zip_ssize " ULINTPF
"\nInnoDB: page_compression " ULINTPF
" page_compression_level " ULINTPF
"\nInnoDB: atomic_writes " ULINTPF "\n",
flags, compact, atomic_blobs, unused, data_dir, zip_ssize,
page_compression, page_compression_level, atomic_writes
);
...
...
@@ -699,7 +716,7 @@ 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",
fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=Redundant, zip_ssize
" ULINTPF " atomic_blobs " ULINTPF "
\n",
zip_ssize, atomic_blobs);
return(ULINT_UNDEFINED);
}
...
...
@@ -707,7 +724,7 @@ dict_sys_tables_type_validate(
/* 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",
fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=
" ULINTPF ", unused " ULINTPF "
\n",
type, unused);
return(ULINT_UNDEFINED);
}
...
...
@@ -723,7 +740,7 @@ 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",
fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=
" ULINTPF ", zip_ssize " ULINTPF "
\n",
type, zip_ssize);
return(ULINT_UNDEFINED);
}
...
...
@@ -734,14 +751,14 @@ 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",
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=
%lu, zip_ssize %lu
max %d\n",
fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=
" ULINTPF ", zip_ssize " ULINTPF "
max %d\n",
type, zip_ssize, PAGE_ZIP_SSIZE_MAX);
return(ULINT_UNDEFINED);
}
...
...
@@ -759,8 +776,8 @@ 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",
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);
}
...
...
@@ -768,7 +785,7 @@ dict_sys_tables_type_validate(
/* Validate that the atomic writes number is within allowed range. */
if (atomic_writes > ATOMIC_WRITES_OFF) {
fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=
%lu, atomic_writes %lu
\n",
fprintf(stderr, "InnoDB: Error: SYS_TABLES::TYPE=
" ULINTPF ", atomic_writes " ULINTPF "
\n",
type, atomic_writes);
return(ULINT_UNDEFINED);
}
...
...
storage/xtradb/include/fil0crypt.h
View file @
d23eb8e6
...
...
@@ -109,7 +109,7 @@ struct fil_space_crypt_t : st_encryption_scheme
The object is expected to be placed in a buffer that
has been zero-initialized. */
fil_space_crypt_t
(
u
l
int
new_type
,
uint
new_type
,
uint
new_min_key_version
,
uint
new_key_id
,
fil_encryption_t
new_encryption
)
...
...
@@ -117,10 +117,10 @@ struct fil_space_crypt_t : st_encryption_scheme
min_key_version
(
new_min_key_version
),
page0_offset
(
0
),
encryption
(
new_encryption
),
key_found
(),
mutex
(),
key_found
(
new_min_key_version
),
rotate_state
()
{
key_found
=
new_min_key_version
;
key_id
=
new_key_id
;
my_random_bytes
(
iv
,
sizeof
(
iv
));
mutex_create
(
fil_crypt_data_mutex_key
,
...
...
storage/xtradb/include/fil0fil.ic
View file @
d23eb8e6
/*****************************************************************************
Copyright (c) 2015, MariaDB Corporation.
Copyright (c) 2015,
2017,
MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -137,7 +137,7 @@ fil_page_type_validate(
page_type == FIL_PAGE_TYPE_ZBLOB2 ||
page_type == FIL_PAGE_TYPE_COMPRESSED))) {
uint key_version = mach_read_from_4(page + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
u
l
int key_version = mach_read_from_4(page + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
bool page_compressed = (page_type == FIL_PAGE_PAGE_COMPRESSED);
bool page_compressed_encrypted = (page_type == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED);
ulint space = mach_read_from_4(page + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
...
...
@@ -148,30 +148,18 @@ fil_page_type_validate(
fil_space_t* rspace = fil_space_get_by_id(space);
fil_system_exit();
/* Dump out the page info */
fprintf(stderr, "InnoDB: Space %lu offset %lu name %s page_type %lu page_type_name %s\n"
"InnoDB: key_version %u page_compressed %d page_compressed_encrypted %d lsn %llu compressed_len %lu\n",
space, offset, rspace->name, page_type, fil_get_page_type_name(page_type),
key_version, page_compressed, page_compressed_encrypted, (ulonglong)lsn, compressed_len);
fflush(stderr);
ut_ad(page_type == FIL_PAGE_PAGE_COMPRESSED ||
page_type == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED ||
page_type == FIL_PAGE_INDEX ||
page_type == FIL_PAGE_UNDO_LOG ||
page_type == FIL_PAGE_INODE ||
page_type == FIL_PAGE_IBUF_FREE_LIST ||
page_type == FIL_PAGE_TYPE_ALLOCATED ||
page_type == FIL_PAGE_IBUF_BITMAP ||
page_type == FIL_PAGE_TYPE_SYS ||
page_type == FIL_PAGE_TYPE_TRX_SYS ||
page_type == FIL_PAGE_TYPE_FSP_HDR ||
page_type == FIL_PAGE_TYPE_XDES ||
page_type == FIL_PAGE_TYPE_BLOB ||
page_type == FIL_PAGE_TYPE_ZBLOB ||
page_type == FIL_PAGE_TYPE_ZBLOB2 ||
page_type == FIL_PAGE_TYPE_COMPRESSED);
fprintf(stderr, "InnoDB: Page " ULINTPF ":" ULINTPF
" name %s page_type " ULINTPF " page_type_name %s\n"
"InnoDB: key_version " ULINTPF
" page_compressed %d page_compressed_encrypted %d lsn "
LSN_PF " compressed_len " ULINTPF "\n",
space, offset, rspace->name, page_type,
fil_get_page_type_name(page_type),
key_version,
page_compressed, page_compressed_encrypted,
lsn, compressed_len);
ut_error;
return false;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment