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
72ffd154
Commit
72ffd154
authored
Aug 06, 2008
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compiler warnings
parent
57cf6371
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
28 additions
and
29 deletions
+28
-29
storage/maria/ma_checkpoint.c
storage/maria/ma_checkpoint.c
+1
-1
storage/maria/ma_create.c
storage/maria/ma_create.c
+12
-13
storage/maria/ma_delete_table.c
storage/maria/ma_delete_table.c
+1
-1
storage/maria/ma_rename.c
storage/maria/ma_rename.c
+2
-2
storage/maria/unittest/ma_test_loghandler_first_lsn-t.c
storage/maria/unittest/ma_test_loghandler_first_lsn-t.c
+1
-1
storage/maria/unittest/ma_test_loghandler_max_lsn-t.c
storage/maria/unittest/ma_test_loghandler_max_lsn-t.c
+1
-1
storage/maria/unittest/ma_test_loghandler_noflush-t.c
storage/maria/unittest/ma_test_loghandler_noflush-t.c
+1
-1
storage/maria/unittest/ma_test_loghandler_nologs-t.c
storage/maria/unittest/ma_test_loghandler_nologs-t.c
+5
-5
storage/maria/unittest/ma_test_loghandler_pagecache-t.c
storage/maria/unittest/ma_test_loghandler_pagecache-t.c
+1
-1
storage/maria/unittest/ma_test_loghandler_purge-t.c
storage/maria/unittest/ma_test_loghandler_purge-t.c
+3
-3
No files found.
storage/maria/ma_checkpoint.c
View file @
72ffd154
...
...
@@ -222,7 +222,7 @@ static int really_execute_checkpoint(void)
*/
LEX_CUSTRING
log_array
[
TRANSLOG_INTERNAL_PARTS
+
5
];
log_array
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
checkpoint_start_log_horizon_char
;
(
uchar
*
)
checkpoint_start_log_horizon_char
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
0
].
length
=
total_rec_length
=
sizeof
(
checkpoint_start_log_horizon_char
);
for
(
i
=
0
;
i
<
(
sizeof
(
record_pieces
)
/
sizeof
(
record_pieces
[
0
]));
i
++
)
...
...
storage/maria/ma_create.c
View file @
72ffd154
...
...
@@ -1008,20 +1008,19 @@ int maria_create(const char *name, enum data_file_type datafile_type,
log_data
[
0
]
=
test
(
flags
&
HA_DONT_TOUCH_DATA
);
int2store
(
log_data
+
1
,
kfile_size_before_extension
);
int2store
(
log_data
+
1
+
2
,
share
.
base
.
keystart
);
log_array
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
name
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
(
uchar
*
)
name
;
/* we store the end-zero, for Recovery to just pass it to my_create() */
log_array
[
TRANSLOG_INTERNAL_PARTS
+
0
].
length
=
strlen
(
log_array
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
)
+
1
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
0
].
length
=
strlen
(
name
)
+
1
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
1
].
str
=
log_data
;
/* symlink description is also needed for re-creation by Recovery: */
log_array
[
TRANSLOG_INTERNAL_PARTS
+
2
].
str
=
(
ci
->
data_file_name
?
ci
->
data_file_name
:
empty_string
)
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
2
].
length
=
strlen
(
log_array
[
TRANSLOG_INTERNAL_PARTS
+
2
].
str
)
+
1
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
3
].
str
=
(
ci
->
index_file_name
?
ci
->
index_file_name
:
empty_string
)
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
3
].
length
=
strlen
(
log_array
[
TRANSLOG_INTERNAL_PARTS
+
3
].
str
)
+
1
;
{
const
char
*
s
=
ci
->
data_file_name
?
ci
->
data_file_name
:
empty_string
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
2
].
str
=
(
uchar
*
)
s
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
2
].
length
=
strlen
(
s
)
+
1
;
s
=
ci
->
index_file_name
?
ci
->
index_file_name
:
empty_string
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
3
].
str
=
(
uchar
*
)
s
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
3
].
length
=
strlen
(
s
)
+
1
;
}
for
(
k
=
TRANSLOG_INTERNAL_PARTS
;
k
<
(
sizeof
(
log_array
)
/
sizeof
(
log_array
[
0
]));
k
++
)
total_rec_length
+=
(
translog_size_t
)
log_array
[
k
].
length
;
...
...
@@ -1349,9 +1348,9 @@ int _ma_update_state_lsns_sub(MARIA_SHARE *share, LSN lsn, TrID create_trid,
int
res
;
LEX_CUSTRING
log_array
[
TRANSLOG_INTERNAL_PARTS
+
1
];
/* table name is logged only for information */
log_array
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
share
->
open_file_name
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
(
uchar
*
)
share
->
open_file_name
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
0
].
length
=
strlen
(
log_array
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
)
+
1
;
strlen
(
share
->
open_file_name
)
+
1
;
if
((
res
=
translog_write_record
(
&
lsn
,
LOGREC_IMPORTED_TABLE
,
&
dummy_transaction_object
,
NULL
,
(
translog_size_t
)
...
...
storage/maria/ma_delete_table.c
View file @
72ffd154
...
...
@@ -85,7 +85,7 @@ int maria_delete_table(const char *name)
*/
LSN
lsn
;
LEX_CUSTRING
log_array
[
TRANSLOG_INTERNAL_PARTS
+
1
];
log_array
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
name
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
(
uchar
*
)
name
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
0
].
length
=
strlen
(
name
)
+
1
;
if
(
unlikely
(
translog_write_record
(
&
lsn
,
LOGREC_REDO_DROP_TABLE
,
&
dummy_transaction_object
,
NULL
,
...
...
storage/maria/ma_rename.c
View file @
72ffd154
...
...
@@ -69,9 +69,9 @@ int maria_rename(const char *old_name, const char *new_name)
LSN
lsn
;
LEX_CUSTRING
log_array
[
TRANSLOG_INTERNAL_PARTS
+
2
];
uint
old_name_len
=
strlen
(
old_name
)
+
1
,
new_name_len
=
strlen
(
new_name
)
+
1
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
old_name
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
(
uchar
*
)
old_name
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
0
].
length
=
old_name_len
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
1
].
str
=
new_name
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
1
].
str
=
(
uchar
*
)
new_name
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
1
].
length
=
new_name_len
;
/*
For this record to be of any use for Recovery, we need the upper
...
...
storage/maria/unittest/ma_test_loghandler_first_lsn-t.c
View file @
72ffd154
...
...
@@ -113,7 +113,7 @@ int main(int argc __attribute__((unused)), char *argv[])
int4store
(
long_tr_id
,
0
);
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
(
char
*
)
long_tr_id
;
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
long_tr_id
;
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
length
=
6
;
if
(
translog_write_record
(
&
lsn
,
LOGREC_FIXED_RECORD_0LSN_EXAMPLE
,
...
...
storage/maria/unittest/ma_test_loghandler_max_lsn-t.c
View file @
72ffd154
...
...
@@ -104,7 +104,7 @@ int main(int argc __attribute__((unused)), char *argv[])
/* write more then 1 file */
int4store
(
long_tr_id
,
0
);
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
(
char
*
)
long_tr_id
;
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
long_tr_id
;
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
length
=
6
;
for
(
i
=
0
;
i
<
LOG_FILE_SIZE
/
6
;
i
++
)
{
...
...
storage/maria/unittest/ma_test_loghandler_noflush-t.c
View file @
72ffd154
...
...
@@ -93,7 +93,7 @@ int main(int argc __attribute__((unused)), char *argv[])
int4store
(
long_tr_id
,
0
);
long_tr_id
[
5
]
=
0xff
;
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
(
char
*
)
long_tr_id
;
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
long_tr_id
;
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
length
=
6
;
if
(
translog_write_record
(
&
first_lsn
,
LOGREC_FIXED_RECORD_0LSN_EXAMPLE
,
...
...
storage/maria/unittest/ma_test_loghandler_nologs-t.c
View file @
72ffd154
...
...
@@ -90,7 +90,7 @@ int main(int argc __attribute__((unused)), char *argv[])
/* write more then 1 file */
int4store
(
long_tr_id
,
0
);
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
(
char
*
)
long_tr_id
;
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
long_tr_id
;
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
length
=
6
;
if
(
translog_write_record
(
&
lsn
,
LOGREC_FIXED_RECORD_0LSN_EXAMPLE
,
...
...
@@ -98,7 +98,7 @@ int main(int argc __attribute__((unused)), char *argv[])
TRANSLOG_INTERNAL_PARTS
+
1
,
parts
,
NULL
,
NULL
))
{
fprintf
(
stderr
,
"Can't write record #
%lu
\n
"
,
(
ulong
)
0
);
fprintf
(
stderr
,
"Can't write record #
0
\n
"
);
translog_destroy
();
exit
(
1
);
}
...
...
@@ -111,7 +111,7 @@ int main(int argc __attribute__((unused)), char *argv[])
TRANSLOG_INTERNAL_PARTS
+
1
,
parts
,
NULL
,
NULL
))
{
fprintf
(
stderr
,
"Can't write record #
%lu
\n
"
,
(
ulong
)
0
);
fprintf
(
stderr
,
"Can't write record #
0
\n
"
);
translog_destroy
();
exit
(
1
);
}
...
...
@@ -164,7 +164,7 @@ int main(int argc __attribute__((unused)), char *argv[])
ok
(
1
,
"Log init OK"
);
int4store
(
long_tr_id
,
0
);
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
(
char
*
)
long_tr_id
;
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
long_tr_id
;
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
length
=
6
;
if
(
translog_write_record
(
&
lsn
,
LOGREC_FIXED_RECORD_0LSN_EXAMPLE
,
...
...
@@ -172,7 +172,7 @@ int main(int argc __attribute__((unused)), char *argv[])
TRANSLOG_INTERNAL_PARTS
+
1
,
parts
,
NULL
,
NULL
))
{
fprintf
(
stderr
,
"Can't write record #
%lu
\n
"
,
(
ulong
)
0
);
fprintf
(
stderr
,
"Can't write record #
0
\n
"
);
translog_destroy
();
exit
(
1
);
}
...
...
storage/maria/unittest/ma_test_loghandler_pagecache-t.c
View file @
72ffd154
...
...
@@ -131,7 +131,7 @@ int main(int argc __attribute__((unused)), char *argv[])
}
my_close
(
file1
.
file
,
MYF
(
MY_WME
));
int4store
(
long_tr_id
,
0
);
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
(
char
*
)
long_tr_id
;
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
long_tr_id
;
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
length
=
6
;
dummy_transaction_object
.
first_undo_lsn
=
TRANSACTION_LOGGED_LONG_ID
;
if
(
translog_write_record
(
&
lsn
,
...
...
storage/maria/unittest/ma_test_loghandler_purge-t.c
View file @
72ffd154
...
...
@@ -90,7 +90,7 @@ int main(int argc __attribute__((unused)), char *argv[])
/* write more then 1 file */
int4store
(
long_tr_id
,
0
);
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
(
char
*
)
long_tr_id
;
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
long_tr_id
;
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
length
=
6
;
if
(
translog_write_record
(
&
lsn
,
LOGREC_FIXED_RECORD_0LSN_EXAMPLE
,
...
...
@@ -136,7 +136,7 @@ int main(int argc __attribute__((unused)), char *argv[])
ok
(
1
,
"First file is removed"
);
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
(
char
*
)
long_buffer
;
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
long_buffer
;
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
length
=
LONG_BUFFER_SIZE
;
if
(
translog_write_record
(
&
lsn
,
LOGREC_VARIABLE_RECORD_0LSN_EXAMPLE
,
...
...
@@ -160,7 +160,7 @@ int main(int argc __attribute__((unused)), char *argv[])
ok
(
1
,
"Second and third files are not removed"
);
int4store
(
long_tr_id
,
0
);
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
(
char
*
)
long_tr_id
;
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
long_tr_id
;
parts
[
TRANSLOG_INTERNAL_PARTS
+
0
].
length
=
6
;
if
(
translog_write_record
(
&
lsn
,
LOGREC_FIXED_RECORD_0LSN_EXAMPLE
,
...
...
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