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
056ec4ab
Commit
056ec4ab
authored
Mar 11, 2017
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some compilation warnings.
parent
e5b155a4
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
46 deletions
+36
-46
storage/innobase/include/os0file.h
storage/innobase/include/os0file.h
+4
-7
storage/innobase/include/row0sel.h
storage/innobase/include/row0sel.h
+3
-2
storage/innobase/log/log0recv.cc
storage/innobase/log/log0recv.cc
+11
-10
storage/innobase/os/os0file.cc
storage/innobase/os/os0file.cc
+4
-10
storage/innobase/row/row0sel.cc
storage/innobase/row/row0sel.cc
+14
-17
No files found.
storage/innobase/include/os0file.h
View file @
056ec4ab
...
...
@@ -426,15 +426,12 @@ class IORequest {
}
}
/**
Punch a hole in the file if it was a write
/**
Free storage space associated with a section of the file.
@param[in] fh Open file handle
@param[in] len Compressed buffer length for write
@param[in] off Starting offset (SEEK_SET)
@param[in] len Size of the hole
@return DB_SUCCESS or error code */
dberr_t
punch_hole
(
os_file_t
fh
,
os_offset_t
offset
,
os_offset_t
len
);
dberr_t
punch_hole
(
os_file_t
fh
,
os_offset_t
off
,
ulint
len
);
private:
/** Page to be written on write operation. */
...
...
storage/innobase/include/row0sel.h
View file @
056ec4ab
/*****************************************************************************
Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 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
...
...
@@ -223,8 +224,8 @@ row_count_rtree_recs(
/*******************************************************************//**
Checks if MySQL at the moment is allowed for this table to retrieve a
consistent read result, or store it to the query cache.
@return
TRUE if
storing or retrieving from the query cache is permitted */
i
bool
@return
whether
storing or retrieving from the query cache is permitted */
bool
row_search_check_if_query_cache_permitted
(
/*======================================*/
trx_t
*
trx
,
/*!< in: transaction object */
...
...
storage/innobase/log/log0recv.cc
View file @
056ec4ab
...
...
@@ -2726,18 +2726,16 @@ recv_scan_log_recs(
stored to the hash table; this is reset
if just debug checking is needed, or
when the available_memory runs out */
const
byte
*
buf
,
/*!< in: buffer containing a log
segment or garbage */
ulint
len
,
/*!< in: buffer length */
const
byte
*
log_block
,
/*!< in: log segment */
lsn_t
checkpoint_lsn
,
/*!< in: latest checkpoint LSN */
lsn_t
start_lsn
,
/*!< in: buffer start lsn */
lsn_t
start_lsn
,
/*!< in: buffer start LSN */
lsn_t
end_lsn
,
/*!< in: buffer end LSN */
lsn_t
*
contiguous_lsn
,
/*!< in/out: it is known that all log
groups contain contiguous log data up
to this lsn */
lsn_t
*
group_scanned_lsn
)
/*!< out: scanning succeeded up to
this lsn */
{
const
byte
*
log_block
=
buf
;
lsn_t
scanned_lsn
=
start_lsn
;
bool
finished
=
false
;
ulint
data_len
;
...
...
@@ -2745,8 +2743,11 @@ recv_scan_log_recs(
bool
apply
=
recv_sys
->
mlog_checkpoint_lsn
!=
0
;
ut_ad
(
start_lsn
%
OS_FILE_LOG_BLOCK_SIZE
==
0
);
ut_ad
(
len
%
OS_FILE_LOG_BLOCK_SIZE
==
0
);
ut_ad
(
len
>=
OS_FILE_LOG_BLOCK_SIZE
);
ut_ad
(
end_lsn
%
OS_FILE_LOG_BLOCK_SIZE
==
0
);
ut_ad
(
end_lsn
>=
start_lsn
+
OS_FILE_LOG_BLOCK_SIZE
);
const
byte
*
const
log_end
=
log_block
+
ulint
(
end_lsn
-
start_lsn
);
do
{
ut_ad
(
!
finished
);
...
...
@@ -2842,7 +2843,7 @@ recv_scan_log_recs(
}
else
{
log_block
+=
OS_FILE_LOG_BLOCK_SIZE
;
}
}
while
(
log_block
<
buf
+
len
);
}
while
(
log_block
<
log_end
);
*
group_scanned_lsn
=
scanned_lsn
;
...
...
@@ -2938,9 +2939,9 @@ recv_group_scan_log_recs(
}
while
(
end_lsn
!=
start_lsn
&&
!
recv_scan_log_recs
(
available_mem
,
&
store_to_hash
,
log_sys
->
buf
,
end_lsn
-
start_lsn
,
checkpoint_lsn
,
start_lsn
,
contiguous_lsn
,
&
group
->
scanned_lsn
));
start_lsn
,
end_lsn
,
contiguous_lsn
,
&
group
->
scanned_lsn
));
if
(
recv_sys
->
found_corrupt_log
||
recv_sys
->
found_corrupt_fs
)
{
DBUG_RETURN
(
false
);
...
...
storage/innobase/os/os0file.cc
View file @
056ec4ab
...
...
@@ -1920,8 +1920,7 @@ LinuxAIOHandler::collect()
slot
->
err
=
slot
->
type
.
punch_hole
(
slot
->
file
,
slot
->
offset
,
static_cast
<
os_offset_t
>
(
slot
->
len
));
slot
->
offset
,
slot
->
len
);
}
else
{
slot
->
err
=
DB_SUCCESS
;
}
...
...
@@ -4881,9 +4880,7 @@ os_file_io(
&&
!
type
.
is_log
()
&&
type
.
is_write
()
&&
type
.
punch_hole
())
{
*
err
=
type
.
punch_hole
(
file
,
offset
,
static_cast
<
os_offset_t
>
(
n
));
*
err
=
type
.
punch_hole
(
file
,
offset
,
n
);
}
else
{
*
err
=
DB_SUCCESS
;
...
...
@@ -5541,10 +5538,7 @@ os_file_punch_hole(
@param[in] len Size of the hole
@return DB_SUCCESS or error code */
dberr_t
IORequest
::
punch_hole
(
os_file_t
fh
,
os_offset_t
off
,
os_offset_t
len
)
IORequest
::
punch_hole
(
os_file_t
fh
,
os_offset_t
off
,
ulint
len
)
{
/* In this debugging mode, we act as if punch hole is supported,
and then skip any calls to actually punch a hole here.
...
...
@@ -5553,7 +5547,7 @@ IORequest::punch_hole(
return
(
DB_SUCCESS
);
);
os_offset_t
trim_len
=
static_cast
<
os_offset_t
>
(
get_trim_length
(
len
)
);
ulint
trim_len
=
get_trim_length
(
len
);
if
(
trim_len
==
0
)
{
return
(
DB_SUCCESS
);
...
...
storage/innobase/row/row0sel.cc
View file @
056ec4ab
...
...
@@ -2,7 +2,7 @@
Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Copyright (c) 2015, MariaDB Corporation.
Copyright (c) 2015,
2017,
MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
...
...
@@ -3260,7 +3260,9 @@ row_sel_store_mysql_rec(
getting selected. The non-key virtual columns may
not be materialized and we should skip them. */
if
(
dfield_get_type
(
dfield
)
->
mtype
==
DATA_MISSING
)
{
#ifdef UNIV_DEBUG
ulint
prefix
;
#endif
/* UNIV_DEBUG */
ut_ad
(
prebuilt
->
m_read_virtual_key
);
/* If it is part of index key the data should
...
...
@@ -5947,23 +5949,20 @@ row_count_rtree_recs(
/*******************************************************************//**
Checks if MySQL at the moment is allowed for this table to retrieve a
consistent read result, or store it to the query cache.
@return
TRUE if
storing or retrieving from the query cache is permitted */
i
bool
@return
whether
storing or retrieving from the query cache is permitted */
bool
row_search_check_if_query_cache_permitted
(
/*======================================*/
trx_t
*
trx
,
/*!< in: transaction object */
const
char
*
norm_name
)
/*!< in: concatenation of database name,
'/' char, table name */
{
dict_table_t
*
table
;
ibool
ret
=
FALSE
;
table
=
dict_table_open_on_name
(
dict_table_t
*
table
=
dict_table_open_on_name
(
norm_name
,
FALSE
,
FALSE
,
DICT_ERR_IGNORE_NONE
);
if
(
table
==
NULL
)
{
return
(
FALSE
);
return
(
false
);
}
/* Start the transaction if it is not started yet */
...
...
@@ -5975,18 +5974,16 @@ row_search_check_if_query_cache_permitted(
read/write from/to the cache.
If a read view has not been created for the transaction then it doesn't
really matter what this transactin sees. If a read view was created
really matter what this transacti
o
n sees. If a read view was created
then the view low_limit_id is the max trx id that this transaction
saw at the time of the read view creation. */
if
(
lock_table_get_n_locks
(
table
)
==
0
const
bool
ret
=
lock_table_get_n_locks
(
table
)
==
0
&&
((
trx
->
id
!=
0
&&
trx
->
id
>=
table
->
query_cache_inv_id
)
||
!
MVCC
::
is_view_active
(
trx
->
read_view
)
||
trx
->
read_view
->
low_limit_id
()
>=
table
->
query_cache_inv_id
))
{
ret
=
TRUE
;
>=
table
->
query_cache_inv_id
);
if
(
ret
)
{
/* If the isolation level is high, assign a read view for the
transaction if it does not yet have one */
...
...
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