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
2b7aa60b
Commit
2b7aa60b
authored
Nov 13, 2019
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use constexpr for constants on data pages
parent
ae72205e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
20 deletions
+21
-20
storage/innobase/include/dict0dict.h
storage/innobase/include/dict0dict.h
+1
-1
storage/innobase/include/page0page.h
storage/innobase/include/page0page.h
+6
-6
storage/innobase/include/trx0sys.h
storage/innobase/include/trx0sys.h
+2
-2
storage/innobase/include/trx0undo.h
storage/innobase/include/trx0undo.h
+12
-11
No files found.
storage/innobase/include/dict0dict.h
View file @
2b7aa60b
...
...
@@ -37,7 +37,7 @@ extern bool innodb_table_stats_not_found;
extern
bool
innodb_index_stats_not_found
;
/** the first table or index ID for other than hard-coded system tables */
#define DICT_HDR_FIRST_ID 10
constexpr
uint8_t
DICT_HDR_FIRST_ID
=
10
;
/********************************************************************//**
Get the database name length in a table name.
...
...
storage/innobase/include/page0page.h
View file @
2b7aa60b
...
...
@@ -158,12 +158,12 @@ Otherwise written as 0. @see PAGE_ROOT_AUTO_INC */
not necessarily collation order;
this record may have been deleted */
/* Directions of cursor movement */
#define PAGE_LEFT 1
#define PAGE_RIGHT 2
#define PAGE_SAME_REC 3
#define PAGE_SAME_PAGE 4
#define PAGE_NO_DIRECTION 5
/* Directions of cursor movement
(stored in PAGE_DIRECTION field)
*/
constexpr
uint16_t
PAGE_LEFT
=
1
;
constexpr
uint16_t
PAGE_RIGHT
=
2
;
constexpr
uint16_t
PAGE_SAME_REC
=
3
;
constexpr
uint16_t
PAGE_SAME_PAGE
=
4
;
constexpr
uint16_t
PAGE_NO_DIRECTION
=
5
;
#ifndef UNIV_INNOCHECKSUM
...
...
storage/innobase/include/trx0sys.h
View file @
2b7aa60b
...
...
@@ -344,9 +344,9 @@ FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID. */
/*-------------------------------------------------------------*/
/** Contents of TRX_SYS_DOUBLEWRITE_MAGIC */
#define TRX_SYS_DOUBLEWRITE_MAGIC_N 536853855
constexpr
uint32_t
TRX_SYS_DOUBLEWRITE_MAGIC_N
=
536853855
;
/** Contents of TRX_SYS_DOUBLEWRITE_SPACE_ID_STORED */
#define TRX_SYS_DOUBLEWRITE_SPACE_ID_STORED_N 1783657386
constexpr
uint32_t
TRX_SYS_DOUBLEWRITE_SPACE_ID_STORED_N
=
1783657386
;
/** Size of the doublewrite block in pages */
#define TRX_SYS_DOUBLEWRITE_BLOCK_SIZE FSP_EXTENT_SIZE
...
...
storage/innobase/include/trx0undo.h
View file @
2b7aa60b
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 201
8
, MariaDB Corporation.
Copyright (c) 2017, 201
9
, 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
...
...
@@ -308,16 +308,17 @@ trx_undo_mem_create_at_db_start(trx_rseg_t* rseg, ulint id, ulint page_no,
and delete markings: in short,
modifys (the name 'UPDATE' is a
historical relic) */
/* States of an undo log segment */
#define TRX_UNDO_ACTIVE 1
/* contains an undo log of an active
transaction */
#define TRX_UNDO_CACHED 2
/* cached for quick reuse */
#define TRX_UNDO_TO_FREE 3
/* insert undo segment can be freed */
#define TRX_UNDO_TO_PURGE 4
/* update undo segment will not be
reused: it can be freed in purge when
all undo data in it is removed */
#define TRX_UNDO_PREPARED 5
/* contains an undo log of an
prepared transaction */
/* TRX_UNDO_STATE values of an undo log segment */
/** contains an undo log of an active transaction */
constexpr
uint16_t
TRX_UNDO_ACTIVE
=
1
;
/** cached for quick reuse */
constexpr
uint16_t
TRX_UNDO_CACHED
=
2
;
/** old_insert undo segment that can be freed */
constexpr
uint16_t
TRX_UNDO_TO_FREE
=
3
;
/** can be freed in purge when all undo data in it is removed */
constexpr
uint16_t
TRX_UNDO_TO_PURGE
=
4
;
/** contains an undo log of a prepared transaction */
constexpr
uint16_t
TRX_UNDO_PREPARED
=
5
;
#ifndef UNIV_INNOCHECKSUM
...
...
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