Skip to content

Commit 5bc3024

Browse files
committed
5.5.61-38.13
1 parent 4fd1c7e commit 5bc3024

File tree

12 files changed

+135
-65
lines changed

12 files changed

+135
-65
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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,3 +308,8 @@ MYSQL_ADD_PLUGIN(innobase ${INNOBASE_SOURCES} STORAGE_ENGINE
308308
DEFAULT
309309
MODULE_OUTPUT_NAME ha_innodb
310310
LINK_LIBRARIES ${ZLIB_LIBRARY})
311+
312+
IF(WITH_INNOBASE_STORAGE_ENGINE)
313+
# Remove -DMYSQL_SERVER, it breaks embedded build
314+
SET_TARGET_PROPERTIES(innobase PROPERTIES COMPILE_DEFINITIONS "")
315+
ENDIF()

storage/xtradb/fsp/fsp0fsp.c

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -431,43 +431,6 @@ xdes_find_bit(
431431
return(ULINT_UNDEFINED);
432432
}
433433

434-
/**********************************************************************//**
435-
Looks for a descriptor bit having the desired value. Scans the extent in
436-
a direction opposite to xdes_find_bit.
437-
@return bit index of the bit, ULINT_UNDEFINED if not found */
438-
UNIV_INLINE
439-
ulint
440-
xdes_find_bit_downward(
441-
/*===================*/
442-
xdes_t* descr, /*!< in: descriptor */
443-
ulint bit, /*!< in: XDES_FREE_BIT or XDES_CLEAN_BIT */
444-
ibool val, /*!< in: desired bit value */
445-
ulint hint, /*!< in: hint of which bit position would be desirable */
446-
mtr_t* mtr) /*!< in: mtr */
447-
{
448-
ulint i;
449-
450-
ut_ad(descr && mtr);
451-
ut_ad(val <= TRUE);
452-
ut_ad(hint < FSP_EXTENT_SIZE);
453-
ut_ad(mtr_memo_contains_page(mtr, descr, MTR_MEMO_PAGE_X_FIX));
454-
for (i = hint + 1; i > 0; i--) {
455-
if (val == xdes_get_bit(descr, bit, i - 1, mtr)) {
456-
457-
return(i - 1);
458-
}
459-
}
460-
461-
for (i = FSP_EXTENT_SIZE - 1; i > hint; i--) {
462-
if (val == xdes_get_bit(descr, bit, i, mtr)) {
463-
464-
return(i);
465-
}
466-
}
467-
468-
return(ULINT_UNDEFINED);
469-
}
470-
471434
/**********************************************************************//**
472435
Returns the number of used pages in a descriptor.
473436
@return number of pages used */

storage/xtradb/handler/ha_innodb.cc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*****************************************************************************
22
3-
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All Rights Reserved.
3+
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All Rights Reserved.
44
Copyright (c) 2008, 2009 Google Inc.
55
Copyright (c) 2009, Percona Inc.
66
@@ -1938,6 +1938,7 @@ trx_is_registered_for_2pc(
19381938

19391939
/*********************************************************************//**
19401940
Note that a transaction owns the prepare_commit_mutex. */
1941+
#ifndef EXTENDED_FOR_COMMIT_ORDERED
19411942
static inline
19421943
void
19431944
trx_owns_prepare_commit_mutex_set(
@@ -1947,6 +1948,7 @@ trx_owns_prepare_commit_mutex_set(
19471948
ut_a(trx_is_registered_for_2pc(trx));
19481949
trx->owns_prepare_mutex = 1;
19491950
}
1951+
#endif // EXTENDED_FOR_COMMIT_ORDERED
19501952

19511953
/*********************************************************************//**
19521954
Note that a transaction has been registered with MySQL 2PC coordinator. */
@@ -5830,7 +5832,7 @@ build_template(
58305832
if (UNIV_LIKELY(templ_type == ROW_MYSQL_REC_FIELDS)) {
58315833
/* Decide which columns we should fetch
58325834
and which we can skip. */
5833-
register const ibool index_contains_field =
5835+
const ibool index_contains_field =
58345836
dict_index_contains_col_or_prefix(index, i);
58355837

58365838
if (!index_contains_field && prebuilt->read_just_key) {
@@ -6199,6 +6201,8 @@ ha_innobase::write_row(
61996201
innodb_srv_conc_enter_innodb(prebuilt->trx);
62006202

62016203
error = row_insert_for_mysql((byte*) record, prebuilt);
6204+
DEBUG_SYNC(user_thd, "ib_after_row_insert");
6205+
62026206

62036207
#ifdef EXTENDED_FOR_USERSTAT
62046208
if (UNIV_LIKELY(error == DB_SUCCESS && !trx->fake_changes)) {
@@ -7648,8 +7652,6 @@ create_table_def(
76487652
}
76497653
}
76507654

7651-
ut_a(field->type() < 256); /* we assume in dtype_form_prtype()
7652-
that this fits in one byte */
76537655
col_len = field->pack_length();
76547656

76557657
/* The MySQL pack length contains 1 or 2 bytes length field
@@ -10404,8 +10406,10 @@ ha_innobase::start_stmt(
1040410406
case SQLCOM_INSERT:
1040510407
case SQLCOM_UPDATE:
1040610408
case SQLCOM_DELETE:
10409+
case SQLCOM_REPLACE:
1040710410
init_table_handle_for_HANDLER();
1040810411
prebuilt->select_lock_type = LOCK_X;
10412+
prebuilt->stored_select_lock_type = LOCK_X;
1040910413
error = row_lock_table_for_mysql(prebuilt, NULL, 1);
1041010414

1041110415
if (error != DB_SUCCESS) {

storage/xtradb/handler/ha_innodb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ class ha_innobase: public handler
183183
ha_rows estimate_rows_upper_bound();
184184

185185
void update_create_info(HA_CREATE_INFO* create_info);
186-
int create(const char *name, register TABLE *form,
186+
int create(const char *name, TABLE *form,
187187
HA_CREATE_INFO *create_info);
188188
int truncate();
189189
int delete_table(const char *name);

storage/xtradb/include/data0type.ic

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ dtype_get_fixed_size_low(
446446
return(0);
447447
}
448448
#endif /* UNIV_DEBUG */
449+
// fallthrough
449450
case DATA_CHAR:
450451
case DATA_FIXBINARY:
451452
case DATA_INT:
@@ -524,6 +525,7 @@ dtype_get_min_size_low(
524525
return(0);
525526
}
526527
#endif /* UNIV_DEBUG */
528+
// fallthrough
527529
case DATA_CHAR:
528530
case DATA_FIXBINARY:
529531
case DATA_INT:

storage/xtradb/include/univ.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ component, i.e. we show M.N.P as M.N */
6464
(INNODB_VERSION_MAJOR << 8 | INNODB_VERSION_MINOR)
6565

6666
#ifndef PERCONA_INNODB_VERSION
67-
#define PERCONA_INNODB_VERSION 38.11
67+
#define PERCONA_INNODB_VERSION 38.13
6868
#endif
6969

7070
#define INNODB_VERSION_STR MYSQL_SERVER_VERSION

storage/xtradb/log/log0online.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,10 +1561,10 @@ log_online_open_bitmap_file_read_only(
15611561
if (srv_data_home_len
15621562
&& srv_data_home[srv_data_home_len-1]
15631563
!= SRV_PATH_SEPARATOR) {
1564-
ut_snprintf(bitmap_file->name, FN_REFLEN, "%s%c%s",
1564+
ut_snprintf(bitmap_file->name, sizeof(bitmap_file->name), "%s%c%s",
15651565
srv_data_home, SRV_PATH_SEPARATOR, name);
15661566
} else {
1567-
ut_snprintf(bitmap_file->name, FN_REFLEN, "%s%s",
1567+
ut_snprintf(bitmap_file->name, sizeof(bitmap_file->name), "%s%s",
15681568
srv_data_home, name);
15691569
}
15701570
bitmap_file->file

storage/xtradb/os/os0sync.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -226,24 +226,6 @@ os_cond_broadcast(
226226
#endif
227227
}
228228

229-
/*********************************************************//**
230-
Wakes one thread waiting for condition variable */
231-
UNIV_INLINE
232-
void
233-
os_cond_signal(
234-
/*==========*/
235-
os_cond_t* cond) /*!< in: condition variable. */
236-
{
237-
ut_a(cond);
238-
239-
#ifdef __WIN__
240-
ut_a(wake_condition_variable != NULL);
241-
wake_condition_variable(cond);
242-
#else
243-
ut_a(pthread_cond_signal(cond) == 0);
244-
#endif
245-
}
246-
247229
/*********************************************************//**
248230
Destroys condition variable */
249231
UNIV_INLINE

storage/xtradb/row/row0sel.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4298,6 +4298,7 @@ row_search_for_mysql(
42984298
prebuilt->new_rec_locks = 1;
42994299
}
43004300
err = DB_SUCCESS;
4301+
break;
43014302
case DB_SUCCESS:
43024303
break;
43034304
case DB_LOCK_WAIT:

0 commit comments

Comments
 (0)