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
32904dc5
Commit
32904dc5
authored
Mar 13, 2020
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.1 into 10.2
parents
5257bcfc
7b082fb0
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
53 additions
and
92 deletions
+53
-92
client/mysqlbinlog.cc
client/mysqlbinlog.cc
+7
-7
sql/sql_select.cc
sql/sql_select.cc
+1
-1
storage/innobase/btr/btr0defragment.cc
storage/innobase/btr/btr0defragment.cc
+3
-0
storage/innobase/include/buf0buf.h
storage/innobase/include/buf0buf.h
+2
-2
storage/innobase/include/page0zip.h
storage/innobase/include/page0zip.h
+6
-10
storage/innobase/page/page0zip.cc
storage/innobase/page/page0zip.cc
+17
-48
storage/xtradb/include/buf0buf.h
storage/xtradb/include/buf0buf.h
+2
-2
storage/xtradb/page/page0zip.cc
storage/xtradb/page/page0zip.cc
+15
-22
No files found.
client/mysqlbinlog.cc
View file @
32904dc5
/*
Copyright (c) 2000, 2014, Oracle and/or its affiliates.
Copyright (c) 2009, 20
14
, MariaDB
Copyright (c) 2009, 20
20
, MariaDB
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
...
...
@@ -176,7 +176,7 @@ enum Exit_status {
*/
static
Annotate_rows_log_event
*
annotate_event
=
NULL
;
void
free_annotate_event
()
static
void
free_annotate_event
()
{
if
(
annotate_event
)
{
...
...
@@ -921,7 +921,7 @@ static bool print_row_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
}
}
/*
/*
end of statement check:
i) destroy/free ignored maps
ii) if skip event
...
...
@@ -932,21 +932,21 @@ static bool print_row_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
*/
if
(
is_stmt_end
)
{
/*
/*
Now is safe to clear ignored map (clear_tables will also
delete original table map events stored in the map).
*/
if
(
print_event_info
->
m_table_map_ignored
.
count
()
>
0
)
print_event_info
->
m_table_map_ignored
.
clear_tables
();
/*
/*
If there is a kept Annotate event and all corresponding
rbr-events were filtered away, the Annotate event was not
freed and it is just the time to do it.
*/
free_annotate_event
();
free_annotate_event
();
/*
/*
One needs to take into account an event that gets
filtered but was last event in the statement. If this is
the case, previous rows events that were written into
...
...
sql/sql_select.cc
View file @
32904dc5
...
...
@@ -4599,7 +4599,7 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
for
(
i
=
0
;
i
<
join
->
table_count
;
i
++
)
if
(
double
rr
=
join
->
best_positions
[
i
].
records_read
)
records
=
COST_MULT
(
records
,
rr
);
ha_rows
rows
=
records
>
HA_ROWS_MAX
?
HA_ROWS_MAX
:
(
ha_rows
)
records
;
ha_rows
rows
=
records
>
(
double
)
HA_ROWS_MAX
?
HA_ROWS_MAX
:
(
ha_rows
)
records
;
set_if_smaller
(
rows
,
unit
->
select_limit_cnt
);
join
->
select_lex
->
increase_derived_records
(
rows
);
}
...
...
storage/innobase/btr/btr0defragment.cc
View file @
32904dc5
...
...
@@ -39,6 +39,9 @@ Modified 30/07/2014 Jan Lindström jan.lindstrom@mariadb.com
#include <list>
using
std
::
list
;
using
std
::
min
;
/* When there's no work, either because defragment is disabled, or because no
query is submitted, thread checks state every BTR_DEFRAGMENT_SLEEP_IN_USECS.*/
#define BTR_DEFRAGMENT_SLEEP_IN_USECS 1000000
...
...
storage/innobase/include/buf0buf.h
View file @
32904dc5
...
...
@@ -1400,7 +1400,7 @@ buf_page_encrypt_before_write(
NOTE! The definition appears here only for other modules of this
directory (buf) to see it. Do not use from outside! */
typedef
struc
t
{
struct
buf_tmp_buffer_
t
{
private:
int32
reserved
;
/*!< true if this slot is reserved
*/
...
...
@@ -1430,7 +1430,7 @@ typedef struct {
return
!
my_atomic_fas32_explicit
(
&
reserved
,
true
,
MY_MEMORY_ORDER_RELAXED
);
}
}
buf_tmp_buffer_t
;
};
/** The common buffer control block structure
for compressed and uncompressed frames */
...
...
storage/innobase/include/page0zip.h
View file @
32904dc5
...
...
@@ -2,7 +2,7 @@
Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
Copyright (c) 2017, 20
19
, MariaDB Corporation.
Copyright (c) 2017, 20
20
, 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
...
...
@@ -503,15 +503,11 @@ page_zip_calc_checksum(
#endif
);
/**********************************************************************//**
Verify a compressed page's checksum.
@return TRUE if the stored checksum is valid according to the value of
innodb_checksum_algorithm */
ibool
page_zip_verify_checksum
(
/*=====================*/
const
void
*
data
,
/*!< in: compressed page */
ulint
size
);
/*!< in: size of compressed page */
/** Validate the checksum on a ROW_FORMAT=COMPRESSED page.
@param data ROW_FORMAT=COMPRESSED page
@param size size of the page, in bytes
@return whether the stored checksum matches innodb_checksum_algorithm */
bool
page_zip_verify_checksum
(
const
void
*
data
,
size_t
size
);
#ifndef UNIV_INNOCHECKSUM
/**********************************************************************//**
...
...
storage/innobase/page/page0zip.cc
View file @
32904dc5
...
...
@@ -4986,60 +4986,30 @@ page_zip_calc_checksum(
return
(
0
);
}
/**********************************************************************//**
Verify a compressed page's checksum.
@return TRUE if the stored checksum is valid according to the value of
innodb_checksum_algorithm */
ibool
page_zip_verify_checksum
(
/*=====================*/
const
void
*
data
,
/*!< in: compressed page */
ulint
size
)
/*!< in: size of compressed page */
/** Validate the checksum on a ROW_FORMAT=COMPRESSED page.
@param data ROW_FORMAT=COMPRESSED page
@param size size of the page, in bytes
@return whether the stored checksum matches innodb_checksum_algorithm */
bool
page_zip_verify_checksum
(
const
void
*
data
,
size_t
size
)
{
const
uint32_t
stored
=
mach_read_from_4
(
static_cast
<
const
byte
*>
(
data
)
+
FIL_PAGE_SPACE_OR_CHKSUM
);
const
srv_checksum_algorithm_t
curr_algo
=
static_cast
<
srv_checksum_algorithm_t
>
(
srv_checksum_algorithm
);
#if FIL_PAGE_LSN % 8
#error "FIL_PAGE_LSN must be 64 bit aligned"
#endif
if
(
curr_algo
==
SRV_CHECKSUM_ALGORITHM_NONE
)
{
return
true
;
}
/* Check if page is empty */
if
(
stored
==
0
&&
*
reinterpret_cast
<
const
ib_uint64_t
*>
(
static_cast
<
const
char
*>
(
data
)
+
FIL_PAGE_LSN
)
==
0
)
{
/* make sure that the page is really empty */
#ifdef UNIV_INNOCHECKSUM
ulint
i
;
for
(
i
=
0
;
i
<
size
;
i
++
)
{
if
(
*
((
const
char
*
)
data
+
i
)
!=
0
)
break
;
for
(
size_t
i
=
0
;
i
<
size
;
i
++
)
{
if
(
static_cast
<
const
byte
*>
(
data
)[
i
]
!=
0
)
{
goto
not_all_zeroes
;
}
if
(
i
>=
size
)
{
if
(
log_file
)
{
fprintf
(
log_file
,
"Page::%llu is empty and"
" uncorrupted
\n
"
,
cur_page_num
);
}
return
(
TRUE
);
}
#else
for
(
ulint
i
=
0
;
i
<
size
;
i
++
)
{
if
(
*
((
const
char
*
)
data
+
i
)
!=
0
)
{
return
(
FALSE
);
}
}
/* Empty page */
return
(
TRUE
);
#endif
/* UNIV_INNOCHECKSUM */
}
const
srv_checksum_algorithm_t
curr_algo
=
static_cast
<
srv_checksum_algorithm_t
>
(
srv_checksum_algorithm
);
return
true
;
if
(
curr_algo
==
SRV_CHECKSUM_ALGORITHM_NONE
)
{
return
(
TRUE
);
}
not_all_zeroes:
const
uint32_t
stored
=
mach_read_from_4
(
static_cast
<
const
byte
*>
(
data
)
+
FIL_PAGE_SPACE_OR_CHKSUM
);
uint32_t
calc
=
page_zip_calc_checksum
(
data
,
size
,
curr_algo
);
...
...
@@ -5055,7 +5025,6 @@ page_zip_verify_checksum(
}
if
(
!
strict_verify
)
{
const
uint32_t
crc32
=
page_zip_calc_checksum
(
data
,
size
,
SRV_CHECKSUM_ALGORITHM_CRC32
);
...
...
storage/xtradb/include/buf0buf.h
View file @
32904dc5
...
...
@@ -1528,7 +1528,7 @@ buf_page_encrypt_before_write(
NOTE! The definition appears here only for other modules of this
directory (buf) to see it. Do not use from outside! */
typedef
struc
t
{
struct
buf_tmp_buffer_
t
{
private:
int32
reserved
;
/*!< true if this slot is reserved
*/
...
...
@@ -1558,7 +1558,7 @@ typedef struct {
return
!
my_atomic_fas32_explicit
(
&
reserved
,
true
,
MY_MEMORY_ORDER_RELAXED
);
}
}
buf_tmp_buffer_t
;
};
/** The common buffer control block structure
for compressed and uncompressed frames */
...
...
storage/xtradb/page/page0zip.cc
View file @
32904dc5
...
...
@@ -4927,35 +4927,28 @@ page_zip_verify_checksum(
ib_uint32_t
crc32
=
0
/* silence bogus warning */
;
ib_uint32_t
innodb
=
0
/* silence bogus warning */
;
stored
=
static_cast
<
ib_uint32_t
>
(
mach_read_from_4
(
static_cast
<
const
unsigned
char
*>
(
data
)
+
FIL_PAGE_SPACE_OR_CHKSUM
)
);
const
srv_checksum_algorithm_t
curr_algo
=
static_cast
<
srv_checksum_algorithm_t
>
(
srv_checksum_algorithm
);
#if FIL_PAGE_LSN % 8
#error "FIL_PAGE_LSN must be 64 bit aligned"
#endif
if
(
curr_algo
==
SRV_CHECKSUM_ALGORITHM_NONE
)
{
return
true
;
}
/* Check if page is empty */
if
(
stored
==
0
&&
*
reinterpret_cast
<
const
ib_uint64_t
*>
(
static_cast
<
const
char
*>
(
data
)
+
FIL_PAGE_LSN
)
==
0
)
{
/* make sure that the page is really empty */
for
(
ulint
i
=
0
;
i
<
size
;
i
++
)
{
if
(
*
((
const
char
*
)
data
+
i
)
!=
0
)
{
return
(
FALSE
);
}
bool
all_zeroes
=
true
;
for
(
size_t
i
=
0
;
i
<
size
;
i
++
)
{
if
(
static_cast
<
const
byte
*>
(
data
)[
i
]
!=
0
)
{
all_zeroes
=
false
;
break
;
}
/* Empty page */
return
(
TRUE
);
}
const
srv_checksum_algorithm_t
curr_algo
=
static_cast
<
srv_checksum_algorithm_t
>
(
srv_checksum_algorithm
);
if
(
curr_algo
==
SRV_CHECKSUM_ALGORITHM_NONE
)
{
return
(
TRUE
);
if
(
all_zeroes
)
{
return
true
;
}
stored
=
static_cast
<
ib_uint32_t
>
(
mach_read_from_4
(
static_cast
<
const
unsigned
char
*>
(
data
)
+
FIL_PAGE_SPACE_OR_CHKSUM
));
calc
=
static_cast
<
ib_uint32_t
>
(
page_zip_calc_checksum
(
data
,
size
,
curr_algo
));
...
...
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