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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
f7079888
Commit
f7079888
authored
Jun 20, 2005
by
marko@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InnoDB: Remove warnings detected by GCC 4.0.0
parent
85515b57
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
37 additions
and
47 deletions
+37
-47
innobase/fsp/fsp0fsp.c
innobase/fsp/fsp0fsp.c
+3
-1
innobase/include/dyn0dyn.h
innobase/include/dyn0dyn.h
+1
-1
innobase/include/dyn0dyn.ic
innobase/include/dyn0dyn.ic
+2
-5
innobase/include/mtr0log.h
innobase/include/mtr0log.h
+7
-7
innobase/log/log0log.c
innobase/log/log0log.c
+6
-15
innobase/log/log0recv.c
innobase/log/log0recv.c
+6
-6
innobase/mtr/mtr0log.c
innobase/mtr/mtr0log.c
+9
-8
innobase/row/row0sel.c
innobase/row/row0sel.c
+3
-4
No files found.
innobase/fsp/fsp0fsp.c
View file @
f7079888
...
...
@@ -2325,7 +2325,6 @@ fseg_alloc_free_page_low(
dulint
seg_id
;
ulint
used
;
ulint
reserved
;
fil_addr_t
first
;
xdes_t
*
descr
;
/* extent of the hinted page */
ulint
ret_page
;
/* the allocated page offset, FIL_NULL
if could not be allocated */
...
...
@@ -2428,6 +2427,8 @@ fseg_alloc_free_page_low(
}
else
if
(
reserved
-
used
>
0
)
{
/* 5. We take any unused page from the segment
==============================================*/
fil_addr_t
first
;
if
(
flst_get_len
(
seg_inode
+
FSEG_NOT_FULL
,
mtr
)
>
0
)
{
first
=
flst_get_first
(
seg_inode
+
FSEG_NOT_FULL
,
mtr
);
...
...
@@ -2435,6 +2436,7 @@ fseg_alloc_free_page_low(
first
=
flst_get_first
(
seg_inode
+
FSEG_FREE
,
mtr
);
}
else
{
ut_error
;
return
(
FIL_NULL
);
}
ret_descr
=
xdes_lst_get_descriptor
(
space
,
first
,
mtr
);
...
...
innobase/include/dyn0dyn.h
View file @
f7079888
...
...
@@ -132,7 +132,7 @@ void
dyn_push_string
(
/*============*/
dyn_array_t
*
arr
,
/* in: dyn array */
byte
*
str
,
/* in: string to write */
const
byte
*
str
,
/* in: string to write */
ulint
len
);
/* in: string length */
/*#################################################################*/
...
...
innobase/include/dyn0dyn.ic
View file @
f7079888
...
...
@@ -324,10 +324,9 @@ void
dyn_push_string(
/*============*/
dyn_array_t* arr, /* in: dyn array */
byte*
str, /* in: string to write */
const byte*
str, /* in: string to write */
ulint len) /* in: string length */
{
byte* ptr;
ulint n_copied;
while (len > 0) {
...
...
@@ -337,9 +336,7 @@ dyn_push_string(
n_copied = len;
}
ptr = (byte*) dyn_array_push(arr, n_copied);
ut_memcpy(ptr, str, n_copied);
memcpy(dyn_array_push(arr, n_copied), str, n_copied);
str += n_copied;
len -= n_copied;
...
...
innobase/include/mtr0log.h
View file @
f7079888
...
...
@@ -41,10 +41,10 @@ corresponding log record to the mini-transaction log. */
void
mlog_write_string
(
/*==============*/
byte
*
ptr
,
/* in: pointer where to write */
byte
*
str
,
/* in: string to write */
ulint
len
,
/* in: string length */
mtr_t
*
mtr
);
/* in: mini-transaction handle */
byte
*
ptr
,
/* in: pointer where to write */
const
byte
*
str
,
/* in: string to write */
ulint
len
,
/* in: string length */
mtr_t
*
mtr
);
/* in: mini-transaction handle */
/************************************************************
Writes initial part of a log record consisting of one-byte item
type and four-byte space and page numbers. */
...
...
@@ -85,9 +85,9 @@ Catenates n bytes to the mtr log. */
void
mlog_catenate_string
(
/*=================*/
mtr_t
*
mtr
,
/* in: mtr */
byte
*
str
,
/* in: string to write */
ulint
len
);
/* in: string length */
mtr_t
*
mtr
,
/* in: mtr */
const
byte
*
str
,
/* in: string to write */
ulint
len
);
/* in: string length */
/************************************************************
Catenates a compressed ulint to mlog. */
UNIV_INLINE
...
...
innobase/log/log0log.c
View file @
f7079888
...
...
@@ -2038,8 +2038,6 @@ log_checkpoint_margin(void)
ulint
checkpoint_age
;
ulint
advance
;
dulint
oldest_lsn
;
dulint
new_oldest
;
ibool
do_preflush
;
ibool
sync
;
ibool
checkpoint_sync
;
ibool
do_checkpoint
;
...
...
@@ -2047,7 +2045,6 @@ log_checkpoint_margin(void)
loop:
sync
=
FALSE
;
checkpoint_sync
=
FALSE
;
do_preflush
=
FALSE
;
do_checkpoint
=
FALSE
;
mutex_enter
(
&
(
log
->
mutex
));
...
...
@@ -2067,21 +2064,13 @@ loop:
/* A flush is urgent: we have to do a synchronous preflush */
sync
=
TRUE
;
advance
=
2
*
(
age
-
log
->
max_modified_age_sync
);
new_oldest
=
ut_dulint_add
(
oldest_lsn
,
advance
);
do_preflush
=
TRUE
;
advance
=
2
*
(
age
-
log
->
max_modified_age_async
);
}
else
if
(
age
>
log
->
max_modified_age_async
)
{
/* A flush is not urgent: we do an asynchronous preflush */
advance
=
age
-
log
->
max_modified_age_async
;
new_oldest
=
ut_dulint_add
(
oldest_lsn
,
advance
);
do_preflush
=
TRUE
;
}
else
{
advance
=
0
;
}
checkpoint_age
=
ut_dulint_minus
(
log
->
lsn
,
log
->
last_checkpoint_lsn
);
...
...
@@ -2105,7 +2094,9 @@ loop:
mutex_exit
(
&
(
log
->
mutex
));
if
(
do_preflush
)
{
if
(
advance
)
{
dulint
new_oldest
=
ut_dulint_add
(
oldest_lsn
,
advance
);
success
=
log_preflush_pool_modified_pages
(
new_oldest
,
sync
);
/* If the flush succeeded, this thread has done its part
...
...
innobase/log/log0recv.c
View file @
f7079888
...
...
@@ -543,7 +543,7 @@ recv_find_max_checkpoint(
"InnoDB: to create the InnoDB data files, but log file creation failed.
\n
"
"InnoDB: If that is the case, please refer to
\n
"
"InnoDB: http://dev.mysql.com/doc/mysql/en/Error_creating_InnoDB.html
\n
"
);
*
max_field
=
0
;
return
(
DB_ERROR
);
}
...
...
@@ -1818,25 +1818,25 @@ recv_parse_log_rec(
new_ptr
=
mlog_parse_initial_log_record
(
ptr
,
end_ptr
,
type
,
space
,
page_no
);
if
(
!
new_ptr
)
{
*
body
=
new_ptr
;
if
(
UNIV_UNLIKELY
(
!
new_ptr
))
{
return
(
0
);
}
/* Check that page_no is sensible */
if
(
*
page_no
>
0x8FFFFFFFUL
)
{
if
(
UNIV_UNLIKELY
(
*
page_no
>
0x8FFFFFFFUL
)
)
{
recv_sys
->
found_corrupt_log
=
TRUE
;
return
(
0
);
}
*
body
=
new_ptr
;
new_ptr
=
recv_parse_or_apply_log_rec_body
(
*
type
,
new_ptr
,
end_ptr
,
NULL
,
NULL
);
if
(
new_ptr
==
NULL
)
{
if
(
UNIV_UNLIKELY
(
new_ptr
==
NULL
)
)
{
return
(
0
);
}
...
...
innobase/mtr/mtr0log.c
View file @
f7079888
...
...
@@ -23,9 +23,9 @@ Catenates n bytes to the mtr log. */
void
mlog_catenate_string
(
/*=================*/
mtr_t
*
mtr
,
/* in: mtr */
byte
*
str
,
/* in: string to write */
ulint
len
)
/* in: string length */
mtr_t
*
mtr
,
/* in: mtr */
const
byte
*
str
,
/* in: string to write */
ulint
len
)
/* in: string length */
{
dyn_array_t
*
mlog
;
...
...
@@ -302,14 +302,15 @@ corresponding log record to the mini-transaction log. */
void
mlog_write_string
(
/*==============*/
byte
*
ptr
,
/* in: pointer where to write */
byte
*
str
,
/* in: string to write */
ulint
len
,
/* in: string length */
mtr_t
*
mtr
)
/* in: mini-transaction handle */
byte
*
ptr
,
/* in: pointer where to write */
const
byte
*
str
,
/* in: string to write */
ulint
len
,
/* in: string length */
mtr_t
*
mtr
)
/* in: mini-transaction handle */
{
byte
*
log_ptr
;
if
(
ptr
<
buf_pool
->
frame_zero
||
ptr
>=
buf_pool
->
high_end
)
{
if
(
UNIV_UNLIKELY
(
ptr
<
buf_pool
->
frame_zero
)
||
UNIV_UNLIKELY
(
ptr
>=
buf_pool
->
high_end
))
{
fprintf
(
stderr
,
"InnoDB: Error: trying to write to a stray memory location %p
\n
"
,
ptr
);
ut_error
;
...
...
innobase/row/row0sel.c
View file @
f7079888
...
...
@@ -630,6 +630,8 @@ row_sel_get_clust_rec(
ulint
*
offsets
=
offsets_
;
*
offsets_
=
(
sizeof
offsets_
)
/
sizeof
*
offsets_
;
*
out_rec
=
NULL
;
offsets
=
rec_get_offsets
(
rec
,
btr_pcur_get_btr_cur
(
&
plan
->
pcur
)
->
index
,
offsets
,
ULINT_UNDEFINED
,
&
heap
);
...
...
@@ -663,8 +665,6 @@ row_sel_get_clust_rec(
clustered index record did not exist in the read view of
trx. */
clust_rec
=
NULL
;
goto
func_exit
;
}
...
...
@@ -733,7 +733,6 @@ row_sel_get_clust_rec(
if
((
old_vers
||
rec_get_deleted_flag
(
rec
,
plan
->
table
->
comp
))
&&
!
row_sel_sec_rec_is_for_clust_rec
(
rec
,
plan
->
index
,
clust_rec
,
index
))
{
clust_rec
=
NULL
;
goto
func_exit
;
}
}
...
...
@@ -742,8 +741,8 @@ row_sel_get_clust_rec(
row_sel_fetch_columns
(
index
,
clust_rec
,
offsets
,
UT_LIST_GET_FIRST
(
plan
->
columns
));
func_exit:
*
out_rec
=
clust_rec
;
func_exit:
err
=
DB_SUCCESS
;
err_exit:
if
(
UNIV_LIKELY_NULL
(
heap
))
{
...
...
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