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
57628087
Commit
57628087
authored
Nov 23, 2007
by
Bradley C. Kuszmaul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed #20
git-svn-id:
file:///svn/tokudb@720
c7de825b-a66e-492c-adef-691d508d4ae1
parent
7f7555dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
newbrt/log.c
newbrt/log.c
+6
-0
newbrt/logformat.c
newbrt/logformat.c
+2
-0
No files found.
newbrt/log.c
View file @
57628087
#include <arpa/inet.h>
#include <ctype.h>
#include <unistd.h>
#include <dirent.h>
...
...
@@ -54,6 +55,8 @@ int tokulogger_create_and_open_logger (const char *directory, TOKULOGGER *result
return
tokulogger_log_bytes
(
result
,
0
,
""
);
}
int
log_format_version
=
0
;
int
tokulogger_log_bytes
(
TOKULOGGER
logger
,
int
nbytes
,
void
*
bytes
)
{
int
r
;
//fprintf(stderr, "%s:%d logging %d bytes\n", __FILE__, __LINE__, nbytes);
...
...
@@ -65,6 +68,9 @@ int tokulogger_log_bytes(TOKULOGGER logger, int nbytes, void *bytes) {
logger
->
fd
=
creat
(
fname
,
O_EXCL
|
0700
);
if
(
logger
->
fd
==-
1
)
return
errno
;
logger
->
next_log_file_number
++
;
int
version_l
=
htonl
(
log_format_version
);
r
=
write
(
logger
->
fd
,
"tokulogg"
,
8
);
if
(
r
!=
8
)
return
errno
;
r
=
write
(
logger
->
fd
,
&
version_l
,
4
);
if
(
r
!=
4
)
return
errno
;
}
if
(
logger
->
n_in_buf
+
nbytes
>
LOGGER_BUF_SIZE
)
{
struct
iovec
v
[
2
];
...
...
newbrt/logformat.c
View file @
57628087
...
...
@@ -29,6 +29,8 @@ struct logtype {
// In the fields, don't mention the command, the LSN, the CRC or the trailing LEN.
int
logformat_version_number
=
0
;
const
struct
logtype
logtypes
[]
=
{
{
"commit"
,
'C'
,
FA
{{
"TXNID"
,
"txnid"
},
NULLFIELD
}},
{
"delete"
,
'D'
,
FA
{{
"FILENUM"
,
"filenum"
},
...
...
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