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
a580233a
Commit
a580233a
authored
May 03, 2001
by
monty@donna.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/home/bk/mysql into donna.mysql.fi:/home/my/bk/mysql
parents
68657024
7eb3c457
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
68 additions
and
21 deletions
+68
-21
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
Docs/manual.texi
Docs/manual.texi
+4
-4
innobase/buf/buf0buf.c
innobase/buf/buf0buf.c
+46
-10
innobase/buf/buf0flu.c
innobase/buf/buf0flu.c
+6
-0
innobase/include/buf0buf.h
innobase/include/buf0buf.h
+10
-0
innobase/log/log0recv.c
innobase/log/log0recv.c
+0
-6
innobase/row/row0sel.c
innobase/row/row0sel.c
+1
-1
No files found.
BitKeeper/etc/logging_ok
View file @
a580233a
...
...
@@ -6,3 +6,4 @@ monty@work.mysql.com
sasha@mysql.sashanet.com
serg@serg.mysql.com
paul@central.snake.net
jcole@main.burghcom.com
Docs/manual.texi
View file @
a580233a
...
...
@@ -22530,11 +22530,11 @@ non-transactional table will not change.
If you are using @code{BEGIN} or @code{SET AUTOCOMMIT=0}, you
should use the @strong{MySQL} binary log for backups instead of the
old
update log; The transaction is
stored in the binary log
in one chunk,
during @code{COMMIT}, the to ensure and @code{ROLLBACK}:ed
transactions are not stored.
@xref{Binary log}.
old
er update log. Transactions are
stored in the binary log
in one chunk,
upon @code{COMMIT}, to ensure that transactions which are
rolled back are not stored.
@xref{Binary log}.
The following commands automatically end
s an
transaction (as if you had done
The following commands automatically end
a
transaction (as if you had done
a @code{COMMIT} before executing the command):
@multitable @columnfractions .33 .33 .33
innobase/buf/buf0buf.c
View file @
a580233a
...
...
@@ -205,6 +205,27 @@ ibool buf_debug_prints = FALSE; /* If this is set TRUE,
the program prints info whenever
read-ahead or flush occurs */
/************************************************************************
Calculates a page checksum which is stored to the page when it is written
to a file. Note that we must be careful to calculate the same value
on 32-bit and 64-bit architectures. */
ulint
buf_calc_page_checksum
(
/*===================*/
/* out: checksum */
byte
*
page
)
/* in: buffer page */
{
ulint
checksum
;
checksum
=
ut_fold_binary
(
page
,
FIL_PAGE_FILE_FLUSH_LSN
);
+
ut_fold_binary
(
page
+
FIL_PAGE_DATA
,
UNIV_PAGE_SIZE
-
FIL_PAGE_DATA
-
FIL_PAGE_END_LSN
);
checksum
=
checksum
&
0xFFFFFFFF
;
return
(
checksum
);
}
/************************************************************************
Initializes a buffer control block when the buf_pool is created. */
static
...
...
@@ -1171,12 +1192,36 @@ buf_page_io_complete(
dulint
id
;
dict_index_t
*
index
;
ulint
io_type
;
ulint
checksum
;
ut_ad
(
block
);
io_type
=
block
->
io_fix
;
if
(
io_type
==
BUF_IO_READ
)
{
checksum
=
buf_calc_page_checksum
(
block
->
frame
);
/* From version 3.23.38 up we store the page checksum
to the 4 upper bytes of the page end lsn field */
if
((
mach_read_from_4
(
block
->
frame
+
FIL_PAGE_LSN
+
4
)
!=
mach_read_from_4
(
block
->
frame
+
UNIV_PAGE_SIZE
-
FIL_PAGE_END_LSN
+
4
))
||
(
checksum
!=
mach_read_from_4
(
block
->
frame
+
UNIV_PAGE_SIZE
-
FIL_PAGE_END_LSN
)
&&
mach_read_from_4
(
block
->
frame
+
FIL_PAGE_LSN
)
!=
mach_read_from_4
(
block
->
frame
+
UNIV_PAGE_SIZE
-
FIL_PAGE_END_LSN
)))
{
fprintf
(
stderr
,
"InnoDB: Database page corruption or a failed
\n
"
"InnoDB: file read of page %lu.
\n
"
,
block
->
offset
);
fprintf
(
stderr
,
"InnoDB: You may have to recover from a backup.
\n
"
);
exit
(
1
);
}
if
(
recv_recovery_is_on
())
{
recv_recover_page
(
TRUE
,
block
->
frame
,
block
->
space
,
block
->
offset
);
...
...
@@ -1208,17 +1253,8 @@ buf_page_io_complete(
ut_ad
(
buf_pool
->
n_pend_reads
>
0
);
buf_pool
->
n_pend_reads
--
;
buf_pool
->
n_pages_read
++
;
/*
if (0 != ut_dulint_cmp(
mach_read_from_8(block->frame + FIL_PAGE_LSN),
mach_read_from_8(block->frame + UNIV_PAGE_SIZE
- FIL_PAGE_END_LSN))) {
printf("DB error: file page corrupted!\n");
ut_error;
}
*/
rw_lock_x_unlock_gen
(
&
(
block
->
lock
),
BUF_IO_READ
);
rw_lock_x_unlock_gen
(
&
(
block
->
read_lock
),
BUF_IO_READ
);
...
...
innobase/buf/buf0flu.c
View file @
a580233a
...
...
@@ -222,6 +222,12 @@ buf_flush_write_block_low(
mach_write_to_8
(
block
->
frame
+
UNIV_PAGE_SIZE
-
FIL_PAGE_END_LSN
,
block
->
newest_modification
);
/* We overwrite the first 4 bytes of the end lsn field to store
a page checksum */
mach_write_to_4
(
block
->
frame
+
UNIV_PAGE_SIZE
-
FIL_PAGE_END_LSN
,
buf_calc_page_checksum
(
block
->
frame
));
fil_io
(
OS_FILE_WRITE
|
OS_AIO_SIMULATED_WAKE_LATER
,
FALSE
,
block
->
space
,
block
->
offset
,
0
,
UNIV_PAGE_SIZE
,
(
void
*
)
block
->
frame
,
(
void
*
)
block
);
...
...
innobase/include/buf0buf.h
View file @
a580233a
...
...
@@ -342,6 +342,16 @@ buf_frame_get_modify_clock(
/*=======================*/
/* out: value */
buf_frame_t
*
frame
);
/* in: pointer to a frame */
/************************************************************************
Calculates a page checksum which is stored to the page when it is written
to a file. Note that we must be careful to calculate the same value
on 32-bit and 64-bit architectures. */
ulint
buf_calc_page_checksum
(
/*===================*/
/* out: checksum */
byte
*
page
);
/* in: buffer page */
/**************************************************************************
Gets the page number of a pointer pointing within a buffer frame containing
a file page. */
...
...
innobase/log/log0recv.c
View file @
a580233a
...
...
@@ -882,12 +882,6 @@ recv_recover_page(
recv
=
UT_LIST_GET_NEXT
(
rec_list
,
recv
);
}
/* If the following assert fails, the file page is incompletely
written, and a recovery from a backup is required */
ut_a
(
0
==
ut_dulint_cmp
(
mach_read_from_8
(
page
+
FIL_PAGE_LSN
),
mach_read_from_8
(
page
+
UNIV_PAGE_SIZE
-
FIL_PAGE_END_LSN
)));
mutex_enter
(
&
(
recv_sys
->
mutex
));
recv_addr
->
state
=
RECV_PROCESSED
;
...
...
innobase/row/row0sel.c
View file @
a580233a
...
...
@@ -70,7 +70,7 @@ row_sel_sec_rec_is_for_clust_rec(
n
=
dict_index_get_n_ordering_defined_by_user
(
sec_index
);
for
(
i
=
0
;
i
++
;
i
<
n
)
{
for
(
i
=
0
;
i
<
n
;
i
++
)
{
col
=
dict_field_get_col
(
dict_index_get_nth_field
(
sec_index
,
i
));
...
...
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