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
cf9b8d33
Commit
cf9b8d33
authored
Sep 11, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-maria
into gbichot4.local:/home/mysql_src/mysql-maria-no-flush-state
parents
48189ca4
0b2ba820
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
358 additions
and
24 deletions
+358
-24
storage/maria/ma_blockrec.c
storage/maria/ma_blockrec.c
+2
-2
storage/maria/ma_loghandler.c
storage/maria/ma_loghandler.c
+2
-0
storage/maria/ma_recovery.c
storage/maria/ma_recovery.c
+2
-0
storage/maria/ma_test1.c
storage/maria/ma_test1.c
+3
-3
storage/maria/ma_test_recovery
storage/maria/ma_test_recovery
+1
-1
storage/maria/ma_test_recovery.expected
storage/maria/ma_test_recovery.expected
+348
-18
No files found.
storage/maria/ma_blockrec.c
View file @
cf9b8d33
...
...
@@ -2347,8 +2347,8 @@ static my_bool write_block_record(MARIA_HA *info,
in the first/second case, Recovery, when it sees the CLR_END in the
REDO phase, may decrement/increment the records' count.
*/
/** @todo when Monty has UNDO_UPDATE coded, revisit this */
log_data
[
LSN_STORE_SIZE
+
FILEID_STORE_SIZE
]
=
LOGREC_UNDO_ROW_DELETE
;
log_data
[
LSN_STORE_SIZE
+
FILEID_STORE_SIZE
]
=
old_record
?
LOGREC_UNDO_ROW_UPDATE
:
LOGREC_UNDO_ROW_DELETE
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
(
char
*
)
log_data
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
0
].
length
=
sizeof
(
log_data
);
...
...
storage/maria/ma_loghandler.c
View file @
cf9b8d33
...
...
@@ -6434,6 +6434,8 @@ static my_bool write_hook_for_clr_end(enum translog_record_type type
case
LOGREC_UNDO_ROW_INSERT
:
tbl_info
->
s
->
state
.
state
.
records
--
;
break
;
case
LOGREC_UNDO_ROW_UPDATE
:
break
;
default:
DBUG_ASSERT
(
0
);
}
...
...
storage/maria/ma_recovery.c
View file @
cf9b8d33
...
...
@@ -979,6 +979,8 @@ prototype_redo_exec_hook(CLR_END)
case
LOGREC_UNDO_ROW_INSERT
:
info
->
s
->
state
.
state
.
records
--
;
break
;
case
LOGREC_UNDO_ROW_UPDATE
:
break
;
default:
DBUG_ASSERT
(
0
);
}
...
...
storage/maria/ma_test1.c
View file @
cf9b8d33
...
...
@@ -248,7 +248,7 @@ static int run_test(const char *filename)
if
(
testflag
==
2
)
{
printf
(
"
t
erminating after inserts
\n
"
);
printf
(
"
T
erminating after inserts
\n
"
);
goto
end
;
}
...
...
@@ -309,7 +309,7 @@ static int run_test(const char *filename)
if
(
testflag
==
3
)
{
printf
(
"Terminating after update
\n
"
);
printf
(
"Terminating after update
s
\n
"
);
goto
end
;
}
if
(
!
silent
)
...
...
@@ -372,7 +372,7 @@ static int run_test(const char *filename)
if
(
testflag
==
4
)
{
printf
(
"
t
erminating after deletes
\n
"
);
printf
(
"
T
erminating after deletes
\n
"
);
goto
end
;
}
...
...
storage/maria/ma_test_recovery
View file @
cf9b8d33
...
...
@@ -131,7 +131,7 @@ do
for
test_undo
in
1 2 3
do
# first iteration tests rollback of insert, second tests rollback of delete
set
--
"ma_test1
$silent
-M -T -c -N
$blobs
"
"--testflag=1"
"--testflag=2"
"ma_test1
$silent
-M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace
$blobs
"
"--testflag=3"
"--testflag=4"
set
--
"ma_test1
$silent
-M -T -c -N
$blobs
"
"--testflag=1"
"--testflag=2"
"ma_test1
$silent
-M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace
$blobs
"
"--testflag=3"
"--testflag=4"
"ma_test1
$silent
-M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace
$blobs
"
"--testflag=2"
"--testflag=3"
# -N (create NULL fields) is needed because --test-undo adds it anyway
while
[
$#
!=
0
]
do
...
...
storage/maria/ma_test_recovery.expected
View file @
cf9b8d33
...
...
@@ -73,7 +73,7 @@ Differences in maria_chk -dvv, recovery not yet perfect !
Testing the REDO AND UNDO PHASE
TEST WITH ma_test1 -s -M -T -c -N --testflag=1 (commit at end)
TEST WITH ma_test1 -s -M -T -c -N --testflag=2 --test-undo=1 (additional aborted work)
t
erminating after inserts
T
erminating after inserts
Dying on request without maria_commit()/maria_close()
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
...
...
@@ -126,9 +126,9 @@ Differences in maria_chk -dvv, recovery not yet perfect !
> 1 2 6 unique number NULL 0 8192
========DIFF END=======
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace --testflag=3 (commit at end)
Terminating after update
Terminating after update
s
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace --testflag=4 --test-undo=1 (additional aborted work)
t
erminating after deletes
T
erminating after deletes
Dying on request without maria_commit()/maria_close()
applying log
testing idempotency
...
...
@@ -150,9 +150,64 @@ Differences in maria_chk -dvv, recovery not yet perfect !
---
> 1 2 6 unique number NULL 0 8192
========DIFF END=======
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace --testflag=2 (commit at end)
Terminating after inserts
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace --testflag=3 --test-undo=1 (additional aborted work)
Terminating after updates
Dying on request without maria_commit()/maria_close()
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
< Checksum: 2428948025
---
> Checksum: 3026590807
11c11
< Datafile length: 16384 Keyfile length: 16384
---
> Datafile length: 16384 Keyfile length: 8192
18c18
< 1 2 6 unique number NULL 0 8192 8192
---
> 1 2 6 unique number NULL 0 8192
========DIFF END=======
testing idempotency
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
< Checksum: 2428948025
---
> Checksum: 3026590807
11c11
< Datafile length: 16384 Keyfile length: 16384
---
> Datafile length: 16384 Keyfile length: 8192
18c18
< 1 2 6 unique number NULL 0 8192 8192
---
> 1 2 6 unique number NULL 0 8192
========DIFF END=======
testing applying of CLRs to recreate table
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
< Checksum: 2428948025
---
> Checksum: 0
11c11
< Datafile length: 16384 Keyfile length: 16384
---
> Datafile length: 16384 Keyfile length: 8192
18c18
< 1 2 6 unique number NULL 0 8192 8192
---
> 1 2 6 unique number NULL 0 8192
========DIFF END=======
TEST WITH ma_test1 -s -M -T -c -N --testflag=1 (commit at end)
TEST WITH ma_test1 -s -M -T -c -N --testflag=2 --test-undo=2 (additional aborted work)
t
erminating after inserts
T
erminating after inserts
Dying on request without maria_commit()/maria_close()
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
...
...
@@ -205,9 +260,9 @@ Differences in maria_chk -dvv, recovery not yet perfect !
> 1 2 6 unique number NULL 0 8192
========DIFF END=======
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace --testflag=3 (commit at end)
Terminating after update
Terminating after update
s
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace --testflag=4 --test-undo=2 (additional aborted work)
t
erminating after deletes
T
erminating after deletes
Dying on request without maria_commit()/maria_close()
applying log
testing idempotency
...
...
@@ -229,9 +284,64 @@ Differences in maria_chk -dvv, recovery not yet perfect !
---
> 1 2 6 unique number NULL 0 8192
========DIFF END=======
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace --testflag=2 (commit at end)
Terminating after inserts
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace --testflag=3 --test-undo=2 (additional aborted work)
Terminating after updates
Dying on request without maria_commit()/maria_close()
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
< Checksum: 2428948025
---
> Checksum: 3026590807
11c11
< Datafile length: 16384 Keyfile length: 16384
---
> Datafile length: 16384 Keyfile length: 8192
18c18
< 1 2 6 unique number NULL 0 8192 8192
---
> 1 2 6 unique number NULL 0 8192
========DIFF END=======
testing idempotency
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
< Checksum: 2428948025
---
> Checksum: 3026590807
11c11
< Datafile length: 16384 Keyfile length: 16384
---
> Datafile length: 16384 Keyfile length: 8192
18c18
< 1 2 6 unique number NULL 0 8192 8192
---
> 1 2 6 unique number NULL 0 8192
========DIFF END=======
testing applying of CLRs to recreate table
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
< Checksum: 2428948025
---
> Checksum: 0
11c11
< Datafile length: 16384 Keyfile length: 16384
---
> Datafile length: 16384 Keyfile length: 8192
18c18
< 1 2 6 unique number NULL 0 8192 8192
---
> 1 2 6 unique number NULL 0 8192
========DIFF END=======
TEST WITH ma_test1 -s -M -T -c -N --testflag=1 (commit at end)
TEST WITH ma_test1 -s -M -T -c -N --testflag=2 --test-undo=3 (additional aborted work)
t
erminating after inserts
T
erminating after inserts
Dying on request without maria_commit()/maria_close()
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
...
...
@@ -284,9 +394,9 @@ Differences in maria_chk -dvv, recovery not yet perfect !
> 1 2 6 unique number NULL 0 8192
========DIFF END=======
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace --testflag=3 (commit at end)
Terminating after update
Terminating after update
s
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace --testflag=4 --test-undo=3 (additional aborted work)
t
erminating after deletes
T
erminating after deletes
Dying on request without maria_commit()/maria_close()
applying log
testing idempotency
...
...
@@ -308,9 +418,64 @@ Differences in maria_chk -dvv, recovery not yet perfect !
---
> 1 2 6 unique number NULL 0 8192
========DIFF END=======
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace --testflag=2 (commit at end)
Terminating after inserts
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace --testflag=3 --test-undo=3 (additional aborted work)
Terminating after updates
Dying on request without maria_commit()/maria_close()
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
< Checksum: 2428948025
---
> Checksum: 0
11c11
< Datafile length: 16384 Keyfile length: 16384
---
> Datafile length: 16384 Keyfile length: 8192
18c18
< 1 2 6 unique number NULL 0 8192 8192
---
> 1 2 6 unique number NULL 0 8192
========DIFF END=======
testing idempotency
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
< Checksum: 2428948025
---
> Checksum: 0
11c11
< Datafile length: 16384 Keyfile length: 16384
---
> Datafile length: 16384 Keyfile length: 8192
18c18
< 1 2 6 unique number NULL 0 8192 8192
---
> 1 2 6 unique number NULL 0 8192
========DIFF END=======
testing applying of CLRs to recreate table
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
< Checksum: 2428948025
---
> Checksum: 0
11c11
< Datafile length: 16384 Keyfile length: 16384
---
> Datafile length: 16384 Keyfile length: 8192
18c18
< 1 2 6 unique number NULL 0 8192 8192
---
> 1 2 6 unique number NULL 0 8192
========DIFF END=======
TEST WITH ma_test1 -s -M -T -c -N -b --testflag=1 (commit at end)
TEST WITH ma_test1 -s -M -T -c -N -b --testflag=2 --test-undo=1 (additional aborted work)
t
erminating after inserts
T
erminating after inserts
Dying on request without maria_commit()/maria_close()
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
...
...
@@ -363,9 +528,9 @@ Differences in maria_chk -dvv, recovery not yet perfect !
> 1 2 6 unique varchar BLOB NULL 0 8192
========DIFF END=======
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace -b --testflag=3 (commit at end)
Terminating after update
Terminating after update
s
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace -b --testflag=4 --test-undo=1 (additional aborted work)
t
erminating after deletes
T
erminating after deletes
Dying on request without maria_commit()/maria_close()
applying log
testing idempotency
...
...
@@ -387,9 +552,64 @@ Differences in maria_chk -dvv, recovery not yet perfect !
---
> 1 2 6 unique varchar BLOB NULL 0 8192
========DIFF END=======
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace -b --testflag=2 (commit at end)
Terminating after inserts
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace -b --testflag=3 --test-undo=1 (additional aborted work)
Terminating after updates
Dying on request without maria_commit()/maria_close()
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
< Checksum: 529753687
---
> Checksum: 800025671
11c11
< Datafile length: 49152 Keyfile length: 16384
---
> Datafile length: 49152 Keyfile length: 8192
18c18
< 1 2 6 unique varchar BLOB NULL 0 8192 8192
---
> 1 2 6 unique varchar BLOB NULL 0 8192
========DIFF END=======
testing idempotency
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
< Checksum: 529753687
---
> Checksum: 800025671
11c11
< Datafile length: 49152 Keyfile length: 16384
---
> Datafile length: 49152 Keyfile length: 8192
18c18
< 1 2 6 unique varchar BLOB NULL 0 8192 8192
---
> 1 2 6 unique varchar BLOB NULL 0 8192
========DIFF END=======
testing applying of CLRs to recreate table
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
< Checksum: 529753687
---
> Checksum: 0
11c11
< Datafile length: 49152 Keyfile length: 16384
---
> Datafile length: 49152 Keyfile length: 8192
18c18
< 1 2 6 unique varchar BLOB NULL 0 8192 8192
---
> 1 2 6 unique varchar BLOB NULL 0 8192
========DIFF END=======
TEST WITH ma_test1 -s -M -T -c -N -b --testflag=1 (commit at end)
TEST WITH ma_test1 -s -M -T -c -N -b --testflag=2 --test-undo=2 (additional aborted work)
t
erminating after inserts
T
erminating after inserts
Dying on request without maria_commit()/maria_close()
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
...
...
@@ -442,9 +662,9 @@ Differences in maria_chk -dvv, recovery not yet perfect !
> 1 2 6 unique varchar BLOB NULL 0 8192
========DIFF END=======
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace -b --testflag=3 (commit at end)
Terminating after update
Terminating after update
s
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace -b --testflag=4 --test-undo=2 (additional aborted work)
t
erminating after deletes
T
erminating after deletes
Dying on request without maria_commit()/maria_close()
applying log
testing idempotency
...
...
@@ -466,9 +686,64 @@ Differences in maria_chk -dvv, recovery not yet perfect !
---
> 1 2 6 unique varchar BLOB NULL 0 8192
========DIFF END=======
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace -b --testflag=2 (commit at end)
Terminating after inserts
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace -b --testflag=3 --test-undo=2 (additional aborted work)
Terminating after updates
Dying on request without maria_commit()/maria_close()
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
< Checksum: 529753687
---
> Checksum: 800025671
11c11
< Datafile length: 49152 Keyfile length: 16384
---
> Datafile length: 49152 Keyfile length: 8192
18c18
< 1 2 6 unique varchar BLOB NULL 0 8192 8192
---
> 1 2 6 unique varchar BLOB NULL 0 8192
========DIFF END=======
testing idempotency
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
< Checksum: 529753687
---
> Checksum: 800025671
11c11
< Datafile length: 49152 Keyfile length: 16384
---
> Datafile length: 49152 Keyfile length: 8192
18c18
< 1 2 6 unique varchar BLOB NULL 0 8192 8192
---
> 1 2 6 unique varchar BLOB NULL 0 8192
========DIFF END=======
testing applying of CLRs to recreate table
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
< Checksum: 529753687
---
> Checksum: 0
11c11
< Datafile length: 49152 Keyfile length: 16384
---
> Datafile length: 49152 Keyfile length: 8192
18c18
< 1 2 6 unique varchar BLOB NULL 0 8192 8192
---
> 1 2 6 unique varchar BLOB NULL 0 8192
========DIFF END=======
TEST WITH ma_test1 -s -M -T -c -N -b --testflag=1 (commit at end)
TEST WITH ma_test1 -s -M -T -c -N -b --testflag=2 --test-undo=3 (additional aborted work)
t
erminating after inserts
T
erminating after inserts
Dying on request without maria_commit()/maria_close()
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
...
...
@@ -521,9 +796,9 @@ Differences in maria_chk -dvv, recovery not yet perfect !
> 1 2 6 unique varchar BLOB NULL 0 8192
========DIFF END=======
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace -b --testflag=3 (commit at end)
Terminating after update
Terminating after update
s
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace -b --testflag=4 --test-undo=3 (additional aborted work)
t
erminating after deletes
T
erminating after deletes
Dying on request without maria_commit()/maria_close()
applying log
testing idempotency
...
...
@@ -545,3 +820,58 @@ Differences in maria_chk -dvv, recovery not yet perfect !
---
> 1 2 6 unique varchar BLOB NULL 0 8192
========DIFF END=======
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace -b --testflag=2 (commit at end)
Terminating after inserts
TEST WITH ma_test1 -s -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace -b --testflag=3 --test-undo=3 (additional aborted work)
Terminating after updates
Dying on request without maria_commit()/maria_close()
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
< Checksum: 529753687
---
> Checksum: 0
11c11
< Datafile length: 49152 Keyfile length: 16384
---
> Datafile length: 49152 Keyfile length: 8192
18c18
< 1 2 6 unique varchar BLOB NULL 0 8192 8192
---
> 1 2 6 unique varchar BLOB NULL 0 8192
========DIFF END=======
testing idempotency
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
< Checksum: 529753687
---
> Checksum: 0
11c11
< Datafile length: 49152 Keyfile length: 16384
---
> Datafile length: 49152 Keyfile length: 8192
18c18
< 1 2 6 unique varchar BLOB NULL 0 8192 8192
---
> 1 2 6 unique varchar BLOB NULL 0 8192
========DIFF END=======
testing applying of CLRs to recreate table
applying log
Differences in maria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
< Checksum: 529753687
---
> Checksum: 0
11c11
< Datafile length: 49152 Keyfile length: 16384
---
> Datafile length: 49152 Keyfile length: 8192
18c18
< 1 2 6 unique varchar BLOB NULL 0 8192 8192
---
> 1 2 6 unique varchar BLOB NULL 0 8192
========DIFF END=======
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