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
bfcb85ea
Commit
bfcb85ea
authored
Oct 16, 2008
by
Mikael Ronstrom
Browse files
Options
Browse Files
Download
Plain Diff
merge Google changes to make it compile
parents
ac5809d2
b82a4e41
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
32 deletions
+62
-32
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+15
-0
storage/innobase/include/ut0ut.h
storage/innobase/include/ut0ut.h
+14
-2
storage/innobase/mem/mem0pool.c
storage/innobase/mem/mem0pool.c
+2
-0
storage/innobase/os/os0file.c
storage/innobase/os/os0file.c
+4
-9
storage/innobase/srv/srv0srv.c
storage/innobase/srv/srv0srv.c
+7
-19
storage/innobase/ut/ut0ut.c
storage/innobase/ut/ut0ut.c
+20
-2
No files found.
storage/innobase/handler/ha_innodb.cc
View file @
bfcb85ea
...
...
@@ -148,6 +148,21 @@ long innobase_max_merged_io = 64;
/* Number of background IO threads for read and write. */
long
innobase_read_io_threads
,
innobase_write_io_threads
;
/* Max number of IO requests merged to perform large IO in background
IO threads.
*/
long
innobase_max_merged_io
=
64
;
/* Number of background IO threads for read and write. */
long
innobase_read_io_threads
,
innobase_write_io_threads
;
/* Default number of IO per second supported by server. Tunes background
IO rate. */
static
long
innobase_io_capacity
=
100
;
/* Write dirty pages when pct dirty is less than max pct dirty */
static
my_bool
innobase_extra_dirty_writes
=
TRUE
;
/* The following counter is used to convey information to InnoDB
about server activity: in selects it is not sensible to call
srv_active_wake_master_thread after each fetch or search, we only do
...
...
storage/innobase/include/ut0ut.h
View file @
bfcb85ea
...
...
@@ -145,13 +145,25 @@ ib_time_t
ut_time
(
void
);
/*=========*/
/**************************************************************
Returns system time. */
Returns system time
in args, 0 on success
. */
void
int
ut_usectime
(
/*========*/
ulint
*
sec
,
/* out: seconds since the Epoch */
ulint
*
ms
);
/* out: microseconds since the Epoch+*sec */
/**************************************************************
Returns diff in microseconds (end_sec,end_ms) - (start_sec,start_ms). */
ib_longlong
ut_usecdiff
(
/*========*/
ulint
end_sec
,
/* in: seconds since the Epoch */
ulint
end_ms
,
/* in: microseconds since the Epoch+*sec1 */
ulint
start_sec
,
/* in: seconds since the Epoch */
ulint
start_ms
);
/* in: microseconds since the Epoch+*sec2 */
/**************************************************************
Returns the difference of two times in seconds. */
...
...
storage/innobase/mem/mem0pool.c
View file @
bfcb85ea
...
...
@@ -330,6 +330,7 @@ mem_area_alloc(
mem_pool_t
*
pool
)
/* in: memory pool */
{
#ifdef UNIV_DISABLE_MEM_POOL
(
void
)
pool
;
/* Remove compiler warning */
return
malloc
(
size
);
#else
/* UNIV_DISABLE_MEM_POOL */
mem_area_t
*
area
;
...
...
@@ -464,6 +465,7 @@ mem_area_free(
mem_pool_t
*
pool
)
/* in: memory pool */
{
#ifdef UNIV_DISABLE_MEM_POOL
(
void
)
pool
;
/* Remove compiler warning */
free
(
ptr
);
#else
/* UNIV_DISABLE_MEM_POOL */
mem_area_t
*
area
;
...
...
storage/innobase/os/os0file.c
View file @
bfcb85ea
...
...
@@ -220,17 +220,12 @@ ulint os_file_n_pending_pwrites = 0;
ulint
os_n_pending_writes
=
0
;
ulint
os_n_pending_reads
=
0
;
/* TODO -- does InnoDB provide a portable method for this? */
static
double
time_usecs
()
{
#ifdef __WIN__
return
0
.
0
;
#else
struct
timeval
tv
;
if
(
gettimeofday
(
&
tv
,
NULL
))
ulint
sec
,
ms
;
if
(
ut_usectime
(
&
sec
,
&
ms
))
return
0
;
else
return
tv
.
tv_sec
*
1000000
.
0
+
tv
.
tv_usec
;
#endif
return
sec
*
1000000
.
0
+
ms
;
}
/***************************************************************************
...
...
@@ -3734,7 +3729,7 @@ os_aio_windows_handle(
ut_a
(
slot
->
reserved
);
if
(
orig_seg
!=
ULINT_UNDEFINED
)
{
if
(
global_segment
!=
ULINT_UNDEFINED
)
{
srv_set_io_thread_op_info
(
orig_seg
,
"get windows aio return value"
);
}
...
...
storage/innobase/srv/srv0srv.c
View file @
bfcb85ea
...
...
@@ -666,21 +666,6 @@ ulint srv_n_threads[SRV_MASTER + 1];
static
void
srv_reset_free_tickets
(
trx_t
*
trx
);
/*************************************************************************
Return the difference in microseconds between 'end' and 'start'
*/
static
ib_longlong
mics_diff
(
ulint
start_sec
,
ulint
start_usec
,
ulint
end_sec
,
ulint
end_usec
)
{
ib_longlong
end_mics
=
end_sec
*
1000000LL
+
end_usec
;
ib_longlong
start_mics
=
start_sec
*
1000000LL
+
start_usec
;
if
(
end_mics
>
start_mics
)
return
end_mics
-
start_mics
;
else
return
0
;
}
static
void
time_spin_delay
()
{
ulint
start_sec
,
end_sec
;
...
...
@@ -689,14 +674,17 @@ static void time_spin_delay()
srv_timed_spin_delay
=
0
;
ut_usectime
(
&
start_sec
,
&
start_usec
);
if
(
ut_usectime
(
&
start_sec
,
&
start_usec
))
return
;
for
(
i
=
0
;
i
<
SYNC_SPIN_ROUNDS
;
++
i
)
for
(
i
=
0
;
i
<
(
int
)
SYNC_SPIN_ROUNDS
;
++
i
)
ut_delay
(
ut_rnd_interval
(
0
,
srv_spin_wait_delay
));
ut_usectime
(
&
end_sec
,
&
end_usec
);
if
(
ut_usectime
(
&
end_sec
,
&
end_usec
))
return
;
srv_timed_spin_delay
=
mics_diff
(
start_sec
,
start_usec
,
end_sec
,
end_usec
);
srv_timed_spin_delay
=
ut_usecdiff
(
end_sec
,
end_usec
,
start_sec
,
start_usec
);
}
/*************************************************************************
...
...
storage/innobase/ut/ut0ut.c
View file @
bfcb85ea
...
...
@@ -114,7 +114,7 @@ ut_time(void)
/**************************************************************
Returns system time. */
void
int
ut_usectime
(
/*========*/
ulint
*
sec
,
/* out: seconds since the Epoch */
...
...
@@ -122,9 +122,27 @@ ut_usectime(
{
struct
timeval
tv
;
ut_gettimeofday
(
&
tv
,
NULL
);
int
r
=
ut_gettimeofday
(
&
tv
,
NULL
);
*
sec
=
(
ulint
)
tv
.
tv_sec
;
*
ms
=
(
ulint
)
tv
.
tv_usec
;
return
r
;
}
/**************************************************************
Returns diff in microseconds (end_sec,end_ms) - (start_sec,start_ms) */
ib_longlong
ut_usecdiff
(
/*========*/
ulint
end_sec
,
/* in: seconds since the Epoch */
ulint
end_ms
,
/* in: microseconds since the Epoch+*sec1 */
ulint
start_sec
,
/* in: seconds since the Epoch */
ulint
start_ms
)
/* in: microseconds since the Epoch+*sec2 */
{
ib_longlong
end_mics
=
end_sec
*
1000000LL
+
end_ms
;
ib_longlong
start_mics
=
start_sec
*
1000000LL
+
start_ms
;
return
end_mics
-
start_mics
;
}
/**************************************************************
...
...
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