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
a8b6524b
Commit
a8b6524b
authored
17 years ago
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: Use ut_dulint_zero and ut_dulint_is_zero whenever possible.
parent
f88827d8
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
22 additions
and
30 deletions
+22
-30
dict/dict0mem.c
dict/dict0mem.c
+2
-2
fsp/fsp0fsp.c
fsp/fsp0fsp.c
+11
-17
lock/lock0lock.c
lock/lock0lock.c
+1
-2
read/read0read.c
read/read0read.c
+2
-3
row/row0undo.c
row/row0undo.c
+1
-1
row/row0vers.c
row/row0vers.c
+1
-1
trx/trx0purge.c
trx/trx0purge.c
+1
-1
trx/trx0trx.c
trx/trx0trx.c
+2
-2
trx/trx0undo.c
trx/trx0undo.c
+1
-1
No files found.
dict/dict0mem.c
View file @
a8b6524b
...
...
@@ -238,7 +238,7 @@ dict_mem_index_create(
heap
=
mem_heap_create
(
DICT_HEAP_SIZE
);
index
=
mem_heap_alloc
(
heap
,
sizeof
(
dict_index_t
));
index
->
id
=
ut_dulint_
create
(
0
,
0
)
;
index
->
id
=
ut_dulint_
zero
;
index
->
heap
=
heap
;
index
->
type
=
type
;
...
...
@@ -257,7 +257,7 @@ dict_mem_index_create(
index
->
cached
=
FALSE
;
index
->
to_be_dropped
=
FALSE
;
index
->
trx_id
=
ut_dulint_
create
(
0
,
0
)
;
index
->
trx_id
=
ut_dulint_
zero
;
memset
(
&
index
->
lock
,
0
,
sizeof
index
->
lock
);
#ifdef UNIV_DEBUG
index
->
magic_n
=
DICT_INDEX_MAGIC_N
;
...
...
This diff is collapsed.
Click to expand it.
fsp/fsp0fsp.c
View file @
a8b6524b
...
...
@@ -1789,8 +1789,7 @@ fsp_seg_inode_page_find_used(
inode
=
fsp_seg_inode_page_get_nth_inode
(
page
,
i
,
zip_size
,
mtr
);
if
(
ut_dulint_cmp
(
mach_read_from_8
(
inode
+
FSEG_ID
),
ut_dulint_zero
)
!=
0
)
{
if
(
!
ut_dulint_is_zero
(
mach_read_from_8
(
inode
+
FSEG_ID
)))
{
/* This is used */
return
(
i
);
...
...
@@ -1820,8 +1819,7 @@ fsp_seg_inode_page_find_free(
inode
=
fsp_seg_inode_page_get_nth_inode
(
page
,
i
,
zip_size
,
mtr
);
if
(
ut_dulint_cmp
(
mach_read_from_8
(
inode
+
FSEG_ID
),
ut_dulint_zero
)
==
0
)
{
if
(
ut_dulint_is_zero
(
mach_read_from_8
(
inode
+
FSEG_ID
)))
{
/* This is unused */
return
(
i
);
...
...
@@ -2507,7 +2505,7 @@ fseg_alloc_free_page_low(
==
FSEG_MAGIC_N_VALUE
);
seg_id
=
mtr_read_dulint
(
seg_inode
+
FSEG_ID
,
mtr
);
ut_ad
(
ut_dulint_cmp
(
seg_id
,
ut_dulint_zero
)
>
0
);
ut_ad
(
!
ut_dulint_is_zero
(
seg_id
)
);
reserved
=
fseg_n_reserved_pages_low
(
seg_inode
,
&
used
,
mtr
);
...
...
@@ -3955,9 +3953,8 @@ fsp_validate(
seg_inode
=
fsp_seg_inode_page_get_nth_inode
(
seg_inode_page
,
n
,
zip_size
,
&
mtr
);
ut_a
(
ut_dulint_cmp
(
mach_read_from_8
(
seg_inode
+
FSEG_ID
),
ut_dulint_zero
)
!=
0
);
ut_a
(
!
ut_dulint_is_zero
(
mach_read_from_8
(
seg_inode
+
FSEG_ID
)));
fseg_validate_low
(
seg_inode
,
&
mtr
);
descr_count
+=
flst_get_len
(
seg_inode
+
FSEG_FREE
,
...
...
@@ -4002,9 +3999,8 @@ fsp_validate(
seg_inode
=
fsp_seg_inode_page_get_nth_inode
(
seg_inode_page
,
n
,
zip_size
,
&
mtr
);
if
(
ut_dulint_cmp
(
mach_read_from_8
(
seg_inode
+
FSEG_ID
),
ut_dulint_zero
)
!=
0
)
{
if
(
!
ut_dulint_is_zero
(
mach_read_from_8
(
seg_inode
+
FSEG_ID
)))
{
fseg_validate_low
(
seg_inode
,
&
mtr
);
descr_count
+=
flst_get_len
(
...
...
@@ -4142,9 +4138,8 @@ fsp_print(
seg_inode
=
fsp_seg_inode_page_get_nth_inode
(
seg_inode_page
,
n
,
zip_size
,
&
mtr
);
ut_a
(
ut_dulint_cmp
(
mach_read_from_8
(
seg_inode
+
FSEG_ID
),
ut_dulint_zero
)
!=
0
);
ut_a
(
!
ut_dulint_is_zero
(
mach_read_from_8
(
seg_inode
+
FSEG_ID
)));
fseg_print_low
(
seg_inode
,
&
mtr
);
n_segs
++
;
...
...
@@ -4181,9 +4176,8 @@ fsp_print(
seg_inode
=
fsp_seg_inode_page_get_nth_inode
(
seg_inode_page
,
n
,
zip_size
,
&
mtr
);
if
(
ut_dulint_cmp
(
mach_read_from_8
(
seg_inode
+
FSEG_ID
),
ut_dulint_zero
)
!=
0
)
{
if
(
!
ut_dulint_is_zero
(
mach_read_from_8
(
seg_inode
+
FSEG_ID
)))
{
fseg_print_low
(
seg_inode
,
&
mtr
);
n_segs
++
;
...
...
This diff is collapsed.
Click to expand it.
lock/lock0lock.c
View file @
a8b6524b
...
...
@@ -4054,8 +4054,7 @@ lock_release_off_kernel(
ut_ad
(
lock_get_type
(
lock
)
&
LOCK_TABLE
);
if
(
lock_get_mode
(
lock
)
!=
LOCK_IS
&&
0
!=
ut_dulint_cmp
(
trx
->
undo_no
,
ut_dulint_zero
))
{
&&
!
ut_dulint_is_zero
(
trx
->
undo_no
))
{
/* The trx may have modified the table. We
block the use of the MySQL query cache for
...
...
This diff is collapsed.
Click to expand it.
read/read0read.c
View file @
a8b6524b
...
...
@@ -173,8 +173,7 @@ read_view_oldest_copy_or_open_new(
n
=
old_view
->
n_trx_ids
;
if
(
ut_dulint_cmp
(
old_view
->
creator_trx_id
,
ut_dulint_create
(
0
,
0
))
!=
0
)
{
if
(
!
ut_dulint_is_zero
(
old_view
->
creator_trx_id
))
{
n
++
;
}
else
{
needs_insert
=
FALSE
;
...
...
@@ -251,7 +250,7 @@ read_view_open_now(
view
->
creator_trx_id
=
cr_trx_id
;
view
->
type
=
VIEW_NORMAL
;
view
->
undo_no
=
ut_dulint_
create
(
0
,
0
)
;
view
->
undo_no
=
ut_dulint_
zero
;
/* No future transactions should be visible in the view */
...
...
This diff is collapsed.
Click to expand it.
row/row0undo.c
View file @
a8b6524b
...
...
@@ -526,7 +526,7 @@ row_undo_build_dict_undo_list(
}
/* We will do our own deletes */
trx
->
table_id
=
ut_dulint_
create
(
0
,
0
)
;
trx
->
table_id
=
ut_dulint_
zero
;
if
(
trx
->
dict_undo_list
==
NULL
)
{
dict_undo_create_list
(
trx
);
...
...
This diff is collapsed.
Click to expand it.
row/row0vers.c
View file @
a8b6524b
...
...
@@ -561,7 +561,7 @@ row_vers_build_for_semi_consistent_read(
mem_heap_t
*
heap
=
NULL
;
byte
*
buf
;
ulint
err
;
dulint
rec_trx_id
=
ut_dulint_
create
(
0
,
0
)
;
dulint
rec_trx_id
=
ut_dulint_
zero
;
ut_ad
(
dict_index_is_clust
(
index
));
ut_ad
(
mtr_memo_contains_page
(
mtr
,
rec
,
MTR_MEMO_PAGE_X_FIX
)
...
...
This diff is collapsed.
Click to expand it.
trx/trx0purge.c
View file @
a8b6524b
...
...
@@ -541,7 +541,7 @@ trx_purge_truncate_history(void)
trx_purge_arr_get_biggest
(
purge_sys
->
arr
,
&
limit_trx_no
,
&
limit_undo_no
);
if
(
ut_dulint_
cmp
(
limit_trx_no
,
ut_dulint_zero
)
==
0
)
{
if
(
ut_dulint_
is_zero
(
limit_trx_no
)
)
{
limit_trx_no
=
purge_sys
->
purge_trx_no
;
limit_undo_no
=
purge_sys
->
purge_undo_no
;
...
...
This diff is collapsed.
Click to expand it.
trx/trx0trx.c
View file @
a8b6524b
...
...
@@ -127,7 +127,7 @@ trx_create(
trx
->
must_flush_log_later
=
FALSE
;
trx
->
dict_operation
=
FALSE
;
trx
->
table_id
=
ut_dulint_
create
(
0
,
0
)
;
trx
->
table_id
=
ut_dulint_
zero
;
trx
->
dict_undo_list
=
NULL
;
trx
->
dict_redo_list
=
NULL
;
trx
->
sync_cb
=
NULL
;
...
...
@@ -1774,7 +1774,7 @@ trx_print(
fputs
(
", holds adaptive hash latch"
,
f
);
}
if
(
ut_dulint_cmp
(
trx
->
undo_no
,
ut_dulint_zero
)
!=
0
)
{
if
(
!
ut_dulint_is_zero
(
trx
->
undo_no
)
)
{
newline
=
TRUE
;
fprintf
(
f
,
", undo log entries %lu"
,
(
ulong
)
ut_dulint_get_low
(
trx
->
undo_no
));
...
...
This diff is collapsed.
Click to expand it.
trx/trx0undo.c
View file @
a8b6524b
...
...
@@ -1120,7 +1120,7 @@ trx_undo_truncate_start(
ut_ad
(
mutex_own
(
&
(
rseg
->
mutex
)));
if
(
0
==
ut_dulint_cmp
(
limit
,
ut_dulint_zero
))
{
if
(
ut_dulint_is_zero
(
limit
))
{
return
;
}
...
...
This diff is collapsed.
Click to expand it.
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