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
1e770439
Commit
1e770439
authored
Sep 02, 2009
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: Enclose some timestamp functions in #ifndef UNIV_HOTBACKUP.
parent
f1acb7fb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
include/ut0ut.h
include/ut0ut.h
+2
-0
page/page0zip.c
page/page0zip.c
+14
-0
ut/ut0ut.c
ut/ut0ut.c
+2
-0
No files found.
include/ut0ut.h
View file @
1e770439
...
@@ -216,6 +216,7 @@ UNIV_INTERN
...
@@ -216,6 +216,7 @@ UNIV_INTERN
ib_time_t
ib_time_t
ut_time
(
void
);
ut_time
(
void
);
/*=========*/
/*=========*/
#ifndef UNIV_HOTBACKUP
/**********************************************************//**
/**********************************************************//**
Returns system time.
Returns system time.
Upon successful completion, the value 0 is returned; otherwise the
Upon successful completion, the value 0 is returned; otherwise the
...
@@ -248,6 +249,7 @@ UNIV_INTERN
...
@@ -248,6 +249,7 @@ UNIV_INTERN
uint
uint
ut_time_ms
(
void
);
ut_time_ms
(
void
);
/*============*/
/*============*/
#endif
/* !UNIV_HOTBACKUP */
/**********************************************************//**
/**********************************************************//**
Returns the difference of two times in seconds.
Returns the difference of two times in seconds.
...
...
page/page0zip.c
View file @
1e770439
...
@@ -47,8 +47,10 @@ Created June 2005 by Marko Makela
...
@@ -47,8 +47,10 @@ Created June 2005 by Marko Makela
# define buf_LRU_stat_inc_unzip() ((void) 0)
# define buf_LRU_stat_inc_unzip() ((void) 0)
#endif
/* !UNIV_HOTBACKUP */
#endif
/* !UNIV_HOTBACKUP */
#ifndef UNIV_HOTBACKUP
/** Statistics on compression, indexed by page_zip_des_t::ssize - 1 */
/** Statistics on compression, indexed by page_zip_des_t::ssize - 1 */
UNIV_INTERN
page_zip_stat_t
page_zip_stat
[
PAGE_ZIP_NUM_SSIZE
-
1
];
UNIV_INTERN
page_zip_stat_t
page_zip_stat
[
PAGE_ZIP_NUM_SSIZE
-
1
];
#endif
/* !UNIV_HOTBACKUP */
/* Please refer to ../include/page0zip.ic for a description of the
/* Please refer to ../include/page0zip.ic for a description of the
compressed page format. */
compressed page format. */
...
@@ -1144,7 +1146,9 @@ page_zip_compress(
...
@@ -1144,7 +1146,9 @@ page_zip_compress(
ulint
*
offsets
=
NULL
;
ulint
*
offsets
=
NULL
;
ulint
n_blobs
=
0
;
ulint
n_blobs
=
0
;
byte
*
storage
;
/* storage of uncompressed columns */
byte
*
storage
;
/* storage of uncompressed columns */
#ifndef UNIV_HOTBACKUP
ullint
usec
=
ut_time_us
(
NULL
);
ullint
usec
=
ut_time_us
(
NULL
);
#endif
/* !UNIV_HOTBACKUP */
#ifdef PAGE_ZIP_COMPRESS_DBG
#ifdef PAGE_ZIP_COMPRESS_DBG
FILE
*
logfile
=
NULL
;
FILE
*
logfile
=
NULL
;
#endif
#endif
...
@@ -1208,7 +1212,9 @@ page_zip_compress(
...
@@ -1208,7 +1212,9 @@ page_zip_compress(
}
}
}
}
#endif
/* PAGE_ZIP_COMPRESS_DBG */
#endif
/* PAGE_ZIP_COMPRESS_DBG */
#ifndef UNIV_HOTBACKUP
page_zip_stat
[
page_zip
->
ssize
-
1
].
compressed
++
;
page_zip_stat
[
page_zip
->
ssize
-
1
].
compressed
++
;
#endif
/* !UNIV_HOTBACKUP */
if
(
UNIV_UNLIKELY
(
n_dense
*
PAGE_ZIP_DIR_SLOT_SIZE
if
(
UNIV_UNLIKELY
(
n_dense
*
PAGE_ZIP_DIR_SLOT_SIZE
>=
page_zip_get_size
(
page_zip
)))
{
>=
page_zip_get_size
(
page_zip
)))
{
...
@@ -1345,8 +1351,10 @@ err_exit:
...
@@ -1345,8 +1351,10 @@ err_exit:
fclose
(
logfile
);
fclose
(
logfile
);
}
}
#endif
/* PAGE_ZIP_COMPRESS_DBG */
#endif
/* PAGE_ZIP_COMPRESS_DBG */
#ifndef UNIV_HOTBACKUP
page_zip_stat
[
page_zip
->
ssize
-
1
].
compressed_usec
page_zip_stat
[
page_zip
->
ssize
-
1
].
compressed_usec
+=
ut_time_us
(
NULL
)
-
usec
;
+=
ut_time_us
(
NULL
)
-
usec
;
#endif
/* !UNIV_HOTBACKUP */
return
(
FALSE
);
return
(
FALSE
);
}
}
...
@@ -1404,12 +1412,14 @@ err_exit:
...
@@ -1404,12 +1412,14 @@ err_exit:
fclose
(
logfile
);
fclose
(
logfile
);
}
}
#endif
/* PAGE_ZIP_COMPRESS_DBG */
#endif
/* PAGE_ZIP_COMPRESS_DBG */
#ifndef UNIV_HOTBACKUP
{
{
page_zip_stat_t
*
zip_stat
page_zip_stat_t
*
zip_stat
=
&
page_zip_stat
[
page_zip
->
ssize
-
1
];
=
&
page_zip_stat
[
page_zip
->
ssize
-
1
];
zip_stat
->
compressed_ok
++
;
zip_stat
->
compressed_ok
++
;
zip_stat
->
compressed_usec
+=
ut_time_us
(
NULL
)
-
usec
;
zip_stat
->
compressed_usec
+=
ut_time_us
(
NULL
)
-
usec
;
}
}
#endif
/* !UNIV_HOTBACKUP */
return
(
TRUE
);
return
(
TRUE
);
}
}
...
@@ -2820,7 +2830,9 @@ page_zip_decompress(
...
@@ -2820,7 +2830,9 @@ page_zip_decompress(
ulint
trx_id_col
=
ULINT_UNDEFINED
;
ulint
trx_id_col
=
ULINT_UNDEFINED
;
mem_heap_t
*
heap
;
mem_heap_t
*
heap
;
ulint
*
offsets
;
ulint
*
offsets
;
#ifndef UNIV_HOTBACKUP
ullint
usec
=
ut_time_us
(
NULL
);
ullint
usec
=
ut_time_us
(
NULL
);
#endif
/* !UNIV_HOTBACKUP */
ut_ad
(
page_zip_simple_validate
(
page_zip
));
ut_ad
(
page_zip_simple_validate
(
page_zip
));
UNIV_MEM_ASSERT_W
(
page
,
UNIV_PAGE_SIZE
);
UNIV_MEM_ASSERT_W
(
page
,
UNIV_PAGE_SIZE
);
...
@@ -2976,12 +2988,14 @@ err_exit:
...
@@ -2976,12 +2988,14 @@ err_exit:
page_zip_fields_free
(
index
);
page_zip_fields_free
(
index
);
mem_heap_free
(
heap
);
mem_heap_free
(
heap
);
#ifndef UNIV_HOTBACKUP
{
{
page_zip_stat_t
*
zip_stat
page_zip_stat_t
*
zip_stat
=
&
page_zip_stat
[
page_zip
->
ssize
-
1
];
=
&
page_zip_stat
[
page_zip
->
ssize
-
1
];
zip_stat
->
decompressed
++
;
zip_stat
->
decompressed
++
;
zip_stat
->
decompressed_usec
+=
ut_time_us
(
NULL
)
-
usec
;
zip_stat
->
decompressed_usec
+=
ut_time_us
(
NULL
)
-
usec
;
}
}
#endif
/* !UNIV_HOTBACKUP */
/* Update the stat counter for LRU policy. */
/* Update the stat counter for LRU policy. */
buf_LRU_stat_inc_unzip
();
buf_LRU_stat_inc_unzip
();
...
...
ut/ut0ut.c
View file @
1e770439
...
@@ -132,6 +132,7 @@ ut_time(void)
...
@@ -132,6 +132,7 @@ ut_time(void)
return
(
time
(
NULL
));
return
(
time
(
NULL
));
}
}
#ifndef UNIV_HOTBACKUP
/**********************************************************//**
/**********************************************************//**
Returns system time.
Returns system time.
Upon successful completion, the value 0 is returned; otherwise the
Upon successful completion, the value 0 is returned; otherwise the
...
@@ -215,6 +216,7 @@ ut_time_ms(void)
...
@@ -215,6 +216,7 @@ ut_time_ms(void)
return
((
uint
)
tv
.
tv_sec
*
1000
+
tv
.
tv_usec
/
1000
);
return
((
uint
)
tv
.
tv_sec
*
1000
+
tv
.
tv_usec
/
1000
);
}
}
#endif
/* !UNIV_HOTBACKUP */
/**********************************************************//**
/**********************************************************//**
Returns the difference of two times in seconds.
Returns the difference of two times in seconds.
...
...
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