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
a03ce7b9
Commit
a03ce7b9
authored
Jul 13, 2023
by
Alexey Botchkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-31521 bzero wipes more bytes than necessary in set_global_from_ddl_log_entry.
'defaults' made into 'constexpr' variables.
parent
a4e103ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
sql/ddl_log.cc
sql/ddl_log.cc
+15
-15
No files found.
sql/ddl_log.cc
View file @
a03ce7b9
...
...
@@ -141,23 +141,23 @@ static st_ddl_recovery recovery_state;
mysql_mutex_t
LOCK_gdl
;
/* Positions to different data in a ddl log block */
#define DDL_LOG_ENTRY_TYPE_POS 0
static
constexpr
unsigned
DDL_LOG_ENTRY_TYPE_POS
=
0
;
/*
Note that ACTION_TYPE and PHASE_POS must be after each other.
See update_phase()
*/
#define DDL_LOG_ACTION_TYPE_POS 1
#define DDL_LOG_PHASE_POS 2
#define DDL_LOG_NEXT_ENTRY_POS 4
static
constexpr
unsigned
DDL_LOG_ACTION_TYPE_POS
=
1
;
static
constexpr
unsigned
DDL_LOG_PHASE_POS
=
2
;
static
constexpr
unsigned
DDL_LOG_NEXT_ENTRY_POS
=
4
;
/* Flags to remember something unique about the query, like if .frm was used */
#define DDL_LOG_FLAG_POS 8
static
constexpr
unsigned
DDL_LOG_FLAG_POS
=
8
;
/* Used to store XID entry that was written to binary log */
#define DDL_LOG_XID_POS 10
static
constexpr
unsigned
DDL_LOG_XID_POS
=
10
;
/* Used to store unique uuid from the .frm file */
#define DDL_LOG_UUID_POS 18
static
constexpr
unsigned
DDL_LOG_UUID_POS
=
18
;
/* ID_POS can be used to store something unique, like file size (4 bytes) */
#define DDL_LOG_ID_POS DDL_LOG_UUID_POS + MY_UUID_SIZE
#define DDL_LOG_END_POS DDL_LOG_ID_POS + 8
static
constexpr
unsigned
DDL_LOG_ID_POS
=
DDL_LOG_UUID_POS
+
MY_UUID_SIZE
;
static
constexpr
unsigned
DDL_LOG_END_POS
=
DDL_LOG_ID_POS
+
8
;
/*
Position to where names are stored in the ddl log blocks. The current
...
...
@@ -165,19 +165,19 @@ mysql_mutex_t LOCK_gdl;
space for constants in the header than what is between DDL_LOG_ID_POS and
DDL_LOG_TMP_NAME_POS.
*/
#define DDL_LOG_TMP_NAME_POS 56
static
constexpr
unsigned
DDL_LOG_TMP_NAME_POS
=
56
;
/* Definitions for the ddl log header, the first block in the file */
/* IO_SIZE is stored in the header and can thus be changed */
#define DDL_LOG_IO_SIZE IO_SIZE
static
constexpr
unsigned
DDL_LOG_IO_SIZE
=
IO_SIZE
;
/* Header is stored in positions 0-3 */
#define DDL_LOG_IO_SIZE_POS 4
#define DDL_LOG_NAME_OFFSET_POS 6
static
constexpr
unsigned
DDL_LOG_IO_SIZE_POS
=
4
;
static
constexpr
unsigned
DDL_LOG_NAME_OFFSET_POS
=
6
;
/* Marks if we have done a backup of the ddl log */
#define DDL_LOG_BACKUP_OFFSET_POS 8
static
constexpr
unsigned
DDL_LOG_BACKUP_OFFSET_POS
=
8
;
/* Sum of the above variables */
#define DDL_LOG_HEADER_SIZE 4+2+2+1
static
constexpr
unsigned
DDL_LOG_HEADER_SIZE
=
4
+
2
+
2
+
1
;
/**
Sync the ddl log file.
...
...
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