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
5e2aaf69
Commit
5e2aaf69
authored
Nov 11, 2007
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comments
parent
086b34c9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
5 deletions
+23
-5
storage/maria/ma_checkpoint.c
storage/maria/ma_checkpoint.c
+7
-5
storage/maria/ma_pagecache.c
storage/maria/ma_pagecache.c
+4
-0
storage/maria/ma_recovery.c
storage/maria/ma_recovery.c
+5
-0
storage/maria/ma_write.c
storage/maria/ma_write.c
+7
-0
No files found.
storage/maria/ma_checkpoint.c
View file @
5e2aaf69
...
@@ -501,11 +501,6 @@ filter_flush_data_file_evenly(enum pagecache_page_type type,
...
@@ -501,11 +501,6 @@ filter_flush_data_file_evenly(enum pagecache_page_type type,
@note MikaelR questioned why the same thread does two different jobs, the
@note MikaelR questioned why the same thread does two different jobs, the
risk could be that while a checkpoint happens no LRD flushing happens.
risk could be that while a checkpoint happens no LRD flushing happens.
@note MikaelR noted that he observed that Linux's file cache may never
fsync to disk until this cache is full, at which point it decides to empty
the cache, making the machine very slow. A solution was to fsync after
writing 2 MB.
*/
*/
pthread_handler_t
ma_checkpoint_background
(
void
*
arg
)
pthread_handler_t
ma_checkpoint_background
(
void
*
arg
)
...
@@ -622,6 +617,13 @@ pthread_handler_t ma_checkpoint_background(void *arg)
...
@@ -622,6 +617,13 @@ pthread_handler_t ma_checkpoint_background(void *arg)
if
(
filter_param
.
max_pages
==
0
)
/* bunch all flushed, sleep */
if
(
filter_param
.
max_pages
==
0
)
/* bunch all flushed, sleep */
break
;
/* and we will continue with the same file */
break
;
/* and we will continue with the same file */
dfile
++
;
/* otherwise all this file is flushed, move to next file */
dfile
++
;
/* otherwise all this file is flushed, move to next file */
/*
MikaelR noted that he observed that Linux's file cache may never
fsync to disk until this cache is full, at which point it decides
to empty the cache, making the machine very slow. A solution was
to fsync after writing 2 MB. So we might want to fsync() here if
we wrote enough pages.
*/
}
}
filter_param
.
is_data_file
=
FALSE
;
filter_param
.
is_data_file
=
FALSE
;
while
(
kfile
!=
kfiles_end
)
while
(
kfile
!=
kfiles_end
)
...
...
storage/maria/ma_pagecache.c
View file @
5e2aaf69
...
@@ -3568,6 +3568,10 @@ static int flush_cached_blocks(PAGECACHE *pagecache,
...
@@ -3568,6 +3568,10 @@ static int flush_cached_blocks(PAGECACHE *pagecache,
PCBLOCK_NUMBER
(
pagecache
,
block
),
(
ulong
)
block
,
PCBLOCK_NUMBER
(
pagecache
,
block
),
(
ulong
)
block
,
block
->
pins
));
block
->
pins
));
DBUG_ASSERT
(
block
->
pins
==
1
);
DBUG_ASSERT
(
block
->
pins
==
1
);
/**
@todo If page is contiguous with next page to flush, group flushes in
one single my_pwrite().
*/
error
=
pagecache_fwrite
(
pagecache
,
file
,
error
=
pagecache_fwrite
(
pagecache
,
file
,
block
->
buffer
,
block
->
buffer
,
block
->
hash_link
->
pageno
,
block
->
hash_link
->
pageno
,
...
...
storage/maria/ma_recovery.c
View file @
5e2aaf69
...
@@ -253,6 +253,11 @@ int maria_apply_log(LSN from_lsn, enum maria_apply_log_way apply,
...
@@ -253,6 +253,11 @@ int maria_apply_log(LSN from_lsn, enum maria_apply_log_way apply,
there was a crash during a DDL (see comment in execution of
there was a crash during a DDL (see comment in execution of
REDO_RENAME_TABLE ).
REDO_RENAME_TABLE ).
*/
*/
/**
@todo RECOVERY BUG instead of this warning, whenever log becomes
incomplete (ALTER TABLE, CREATE SELECT) write a log record
LOGREC_INCOMPLETE; when seeing this record, print warning below.
*/
tprint
(
tracef
,
"WARNING: MySQL server currently disables log records"
tprint
(
tracef
,
"WARNING: MySQL server currently disables log records"
" about insertion of data by ALTER TABLE"
" about insertion of data by ALTER TABLE"
" (copy_data_between_tables()), applying of log records may"
" (copy_data_between_tables()), applying of log records may"
...
...
storage/maria/ma_write.c
View file @
5e2aaf69
...
@@ -176,8 +176,15 @@ int maria_write(MARIA_HA *info, uchar *record)
...
@@ -176,8 +176,15 @@ int maria_write(MARIA_HA *info, uchar *record)
info
->
cur_row
.
checksum
;
info
->
cur_row
.
checksum
;
}
}
if
(
share
->
base
.
auto_key
)
if
(
share
->
base
.
auto_key
)
{
/**
@todo RECOVERY BUG
if updated here, it's not recoverable (no mutex => checkpoint may see a
crazy value and flush it into the table's state on disk).
*/
set_if_bigger
(
info
->
s
->
state
.
auto_increment
,
set_if_bigger
(
info
->
s
->
state
.
auto_increment
,
ma_retrieve_auto_increment
(
info
,
record
));
ma_retrieve_auto_increment
(
info
,
record
));
}
info
->
update
=
(
HA_STATE_CHANGED
|
HA_STATE_AKTIV
|
HA_STATE_WRITTEN
|
info
->
update
=
(
HA_STATE_CHANGED
|
HA_STATE_AKTIV
|
HA_STATE_WRITTEN
|
HA_STATE_ROW_CHANGED
);
HA_STATE_ROW_CHANGED
);
info
->
state
->
records
+=
!
share
->
now_transactional
;
/*otherwise already done*/
info
->
state
->
records
+=
!
share
->
now_transactional
;
/*otherwise already done*/
...
...
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