Skip to content

Commit bbcb173

Browse files
committed
5.6.41-84.1
1 parent 6b84fdb commit bbcb173

33 files changed

+433
-173
lines changed

storage/xtradb/.clang-format

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# generated with:
2+
# clang-format-5.0 -style=Google --dump-config
3+
4+
Language: Cpp
5+
# BasedOnStyle: Google
6+
AccessModifierOffset: -1
7+
AlignAfterOpenBracket: Align
8+
AlignConsecutiveAssignments: false
9+
AlignEscapedNewlines: Left
10+
AlignOperands: true
11+
AlignTrailingComments: true
12+
AllowAllParametersOfDeclarationOnNextLine: true
13+
AllowShortBlocksOnASingleLine: false
14+
AllowShortCaseLabelsOnASingleLine: false
15+
AllowShortFunctionsOnASingleLine: All
16+
AlwaysBreakAfterDefinitionReturnType: None
17+
AlwaysBreakBeforeMultilineStrings: true
18+
AlwaysBreakTemplateDeclarations: true
19+
BinPackArguments: true
20+
BinPackParameters: true
21+
BraceWrapping:
22+
AfterClass: false
23+
AfterControlStatement: false
24+
AfterEnum: false
25+
AfterFunction: false
26+
AfterNamespace: false
27+
AfterObjCDeclaration: false
28+
AfterStruct: false
29+
AfterUnion: false
30+
BeforeCatch: false
31+
BeforeElse: false
32+
IndentBraces: false
33+
SplitEmptyFunction: true
34+
SplitEmptyRecord: true
35+
SplitEmptyNamespace: true
36+
BreakBeforeBinaryOperators: None
37+
BreakBeforeBraces: Attach
38+
BreakBeforeInheritanceComma: false
39+
BreakBeforeTernaryOperators: true
40+
BreakConstructorInitializersBeforeComma: false
41+
BreakConstructorInitializers: BeforeColon
42+
BreakAfterJavaFieldAnnotations: false
43+
BreakStringLiterals: true
44+
CommentPragmas: '^ IWYU pragma:'
45+
CompactNamespaces: false
46+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
47+
ConstructorInitializerIndentWidth: 4
48+
ContinuationIndentWidth: 4
49+
Cpp11BracedListStyle: true
50+
DisableFormat: false
51+
ExperimentalAutoDetectBinPacking: false
52+
FixNamespaceComments: true
53+
ForEachMacros:
54+
- foreach
55+
- Q_FOREACH
56+
- BOOST_FOREACH
57+
IncludeCategories:
58+
- Regex: '^<.*\.h>'
59+
Priority: 1
60+
- Regex: '^<.*'
61+
Priority: 2
62+
- Regex: '.*'
63+
Priority: 3
64+
IncludeIsMainRegex: '([-_](test|unittest))?$'
65+
IndentCaseLabels: true
66+
IndentWrappedFunctionNames: false
67+
JavaScriptQuotes: Leave
68+
JavaScriptWrapImports: true
69+
KeepEmptyLinesAtTheStartOfBlocks: false
70+
MacroBlockBegin: ''
71+
MacroBlockEnd: ''
72+
NamespaceIndentation: None
73+
ObjCBlockIndentWidth: 2
74+
ObjCSpaceAfterProperty: false
75+
ObjCSpaceBeforeProtocolList: false
76+
PenaltyBreakAssignment: 2
77+
PenaltyBreakBeforeFirstCallParameter: 1
78+
PenaltyBreakComment: 300
79+
PenaltyBreakFirstLessLess: 120
80+
PenaltyBreakString: 1000
81+
PenaltyExcessCharacter: 1000000
82+
PenaltyReturnTypeOnItsOwnLine: 200
83+
SortUsingDeclarations: true
84+
SpaceAfterTemplateKeyword: true
85+
SpaceBeforeAssignmentOperators: true
86+
SpaceBeforeParens: ControlStatements
87+
SpaceInEmptyParentheses: false
88+
SpacesBeforeTrailingComments: 2
89+
SpacesInAngles: false
90+
SpacesInContainerLiterals: true
91+
SpacesInCStyleCastParentheses: false
92+
SpacesInParentheses: false
93+
SpacesInSquareBrackets: false
94+
Standard: Auto
95+
TabWidth: 8
96+
97+
98+
# changes for MySQL 5.x (InnoDB)
99+
AlignConsecutiveDeclarations: true
100+
AllowShortIfStatementsOnASingleLine: false
101+
AllowShortLoopsOnASingleLine: false
102+
AlwaysBreakAfterReturnType: All
103+
ColumnLimit: 78
104+
DerivePointerAlignment: false
105+
IndentWidth: 8
106+
MaxEmptyLinesToKeep: 2
107+
PointerAlignment: Right
108+
ReflowComments: false
109+
SortIncludes: false
110+
SpaceAfterCStyleCast: true
111+
UseTab: Always

storage/xtradb/CMakeLists.txt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ IF(UNIX)
2929
ADD_DEFINITIONS(-DLINUX_NATIVE_AIO=1)
3030
LINK_LIBRARIES(aio)
3131
ENDIF()
32-
IF(HAVE_LIBNUMA)
33-
LINK_LIBRARIES(numa)
34-
ENDIF()
3532
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP*")
3633
ADD_DEFINITIONS("-DUNIV_HPUX")
3734
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "AIX")
@@ -448,9 +445,19 @@ IF(WITH_INNODB)
448445
SET(WITH_INNOBASE_STORAGE_ENGINE TRUE)
449446
ENDIF()
450447

448+
UNSET(NUMA_LIBRARY)
449+
IF(HAVE_LIBNUMA)
450+
SET(NUMA_LIBRARY "numa")
451+
ENDIF()
452+
451453
MYSQL_ADD_PLUGIN(innobase ${INNOBASE_SOURCES} STORAGE_ENGINE
452454
DEFAULT
453455
MODULE_OUTPUT_NAME ha_innodb
454-
LINK_LIBRARIES ${ZLIB_LIBRARY})
456+
LINK_LIBRARIES ${ZLIB_LIBRARY} ${NUMA_LIBRARY})
455457

456-
ADD_DEPENDENCIES(innobase GenError)
458+
IF(WITH_INNOBASE_STORAGE_ENGINE)
459+
# Remove -DMYSQL_SERVER, it breaks embedded build
460+
SET_TARGET_PROPERTIES(innobase PROPERTIES COMPILE_DEFINITIONS "")
461+
462+
ADD_DEPENDENCIES(innobase GenError)
463+
ENDIF()

storage/xtradb/buf/buf0buf.cc

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ Created 11/5/1995 Heikki Tuuri
5353
#include "page0zip.h"
5454
#include "srv0mon.h"
5555
#include "buf0checksum.h"
56+
57+
UNIV_INTERN my_bool srv_numa_interleave = FALSE;
58+
5659
#ifdef HAVE_LIBNUMA
5760
#include <numa.h>
5861
#include <numaif.h>
@@ -1129,7 +1132,8 @@ buf_chunk_init(
11291132
/*===========*/
11301133
buf_pool_t* buf_pool, /*!< in: buffer pool instance */
11311134
buf_chunk_t* chunk, /*!< out: chunk of buffers */
1132-
ulint mem_size) /*!< in: requested size in bytes */
1135+
ulint mem_size, /*!< in: requested size in bytes */
1136+
bool populate) /*!< in: virtual page preallocation */
11331137
{
11341138
buf_block_t* block;
11351139
byte* frame;
@@ -1145,7 +1149,7 @@ buf_chunk_init(
11451149
+ (UNIV_PAGE_SIZE - 1), UNIV_PAGE_SIZE);
11461150

11471151
chunk->mem_size = mem_size;
1148-
chunk->mem = os_mem_alloc_large(&chunk->mem_size);
1152+
chunk->mem = os_mem_alloc_large(&chunk->mem_size, populate);
11491153

11501154
if (UNIV_UNLIKELY(chunk->mem == NULL)) {
11511155

@@ -1364,6 +1368,7 @@ buf_pool_init_instance(
13641368
/*===================*/
13651369
buf_pool_t* buf_pool, /*!< in: buffer pool instance */
13661370
ulint buf_pool_size, /*!< in: size in bytes */
1371+
bool populate, /*!< in: virtual page preallocation */
13671372
ulint instance_no) /*!< in: id of the instance */
13681373
{
13691374
ulint i;
@@ -1392,7 +1397,7 @@ buf_pool_init_instance(
13921397

13931398
UT_LIST_INIT(buf_pool->free);
13941399

1395-
if (!buf_chunk_init(buf_pool, chunk, buf_pool_size)) {
1400+
if (!buf_chunk_init(buf_pool, chunk, buf_pool_size, populate)) {
13961401
mem_free(chunk);
13971402
mem_free(buf_pool);
13981403

@@ -1518,6 +1523,7 @@ dberr_t
15181523
buf_pool_init(
15191524
/*==========*/
15201525
ulint total_size, /*!< in: size of the total pool in bytes */
1526+
bool populate, /*!< in: virtual page preallocation */
15211527
ulint n_instances) /*!< in: number of instances */
15221528
{
15231529
ulint i;
@@ -1548,7 +1554,7 @@ buf_pool_init(
15481554
for (i = 0; i < n_instances; i++) {
15491555
buf_pool_t* ptr = &buf_pool_ptr[i];
15501556

1551-
if (buf_pool_init_instance(ptr, size, i) != DB_SUCCESS) {
1557+
if (buf_pool_init_instance(ptr, size, populate, i) != DB_SUCCESS) {
15521558

15531559
/* Free all the instances created so far. */
15541560
buf_pool_free(i);

storage/xtradb/buf/buf0dump.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,9 @@ buf_dump(
201201
{
202202
#define SHOULD_QUIT() (SHUTTING_DOWN() && obey_shutdown)
203203

204+
static const char format_name[]= "%s.incomplete";
204205
char full_filename[OS_FILE_MAX_PATH];
205-
char tmp_filename[OS_FILE_MAX_PATH];
206+
char tmp_filename[OS_FILE_MAX_PATH + sizeof(format_name)];
206207
char now[32];
207208
FILE* f;
208209
ulint i;
@@ -213,7 +214,7 @@ buf_dump(
213214
srv_buf_dump_filename);
214215

215216
ut_snprintf(tmp_filename, sizeof(tmp_filename),
216-
"%s.incomplete", full_filename);
217+
format_name, full_filename);
217218

218219
buf_dump_status(STATUS_NOTICE, "Dumping buffer pool(s) to %s",
219220
full_filename);

storage/xtradb/dict/dict0dict.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*****************************************************************************
22
3-
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved.
3+
Copyright (c) 1996, 2018, Oracle and/or its affiliates. All Rights Reserved.
44
Copyright (c) 2012, Facebook Inc.
55
66
This program is free software; you can redistribute it and/or modify it under
@@ -3391,7 +3391,10 @@ dict_foreign_find_index(
33913391
&& dict_foreign_qualify_index(
33923392
table, col_names, columns, n_cols,
33933393
index, types_idx,
3394-
check_charsets, check_null)) {
3394+
check_charsets, check_null)
3395+
&& (!(index->online_status ==
3396+
ONLINE_INDEX_ABORTED_DROPPED
3397+
||index->online_status == ONLINE_INDEX_ABORTED))) {
33953398
return(index);
33963399
}
33973400

storage/xtradb/fts/fts0blex.cc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -701,9 +701,9 @@ extern int fts0blex (yyscan_t yyscanner);
701701
*/
702702
YY_DECL
703703
{
704-
register yy_state_type yy_current_state;
705-
register char *yy_cp, *yy_bp;
706-
register int yy_act;
704+
yy_state_type yy_current_state;
705+
char *yy_cp, *yy_bp;
706+
int yy_act;
707707
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
708708

709709
#line 43 "fts0blex.l"
@@ -753,7 +753,7 @@ YY_DECL
753753
yy_match:
754754
do
755755
{
756-
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
756+
YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
757757
if ( yy_accept[yy_current_state] )
758758
{
759759
yyg->yy_last_accepting_state = yy_current_state;
@@ -984,9 +984,9 @@ case YY_STATE_EOF(INITIAL):
984984
static int yy_get_next_buffer (yyscan_t yyscanner)
985985
{
986986
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
987-
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
988-
register char *source = yyg->yytext_ptr;
989-
register int number_to_move, i;
987+
char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
988+
char *source = yyg->yytext_ptr;
989+
int number_to_move, i;
990990
int ret_val;
991991

992992
if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
@@ -1118,15 +1118,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
11181118

11191119
static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
11201120
{
1121-
register yy_state_type yy_current_state;
1122-
register char *yy_cp;
1121+
yy_state_type yy_current_state;
1122+
char *yy_cp;
11231123
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
11241124

11251125
yy_current_state = yyg->yy_start;
11261126

11271127
for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
11281128
{
1129-
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1129+
YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
11301130
if ( yy_accept[yy_current_state] )
11311131
{
11321132
yyg->yy_last_accepting_state = yy_current_state;
@@ -1151,11 +1151,11 @@ static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
11511151
*/
11521152
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
11531153
{
1154-
register int yy_is_jam;
1154+
int yy_is_jam;
11551155
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
1156-
register char *yy_cp = yyg->yy_c_buf_p;
1156+
char *yy_cp = yyg->yy_c_buf_p;
11571157

1158-
register YY_CHAR yy_c = 1;
1158+
YY_CHAR yy_c = 1;
11591159
if ( yy_accept[yy_current_state] )
11601160
{
11611161
yyg->yy_last_accepting_state = yy_current_state;
@@ -1912,7 +1912,7 @@ int fts0blex_destroy (yyscan_t yyscanner)
19121912
#ifndef yytext_ptr
19131913
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
19141914
{
1915-
register int i;
1915+
int i;
19161916
for ( i = 0; i < n; ++i )
19171917
s1[i] = s2[i];
19181918
}
@@ -1921,7 +1921,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yys
19211921
#ifdef YY_NEED_STRLEN
19221922
static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
19231923
{
1924-
register int n;
1924+
int n;
19251925
for ( n = 0; s[n]; ++n )
19261926
;
19271927

0 commit comments

Comments
 (0)