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
cbc0f195
Commit
cbc0f195
authored
Sep 12, 2005
by
jan@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge jlindstrom@bk-internal.mysql.com:/home/bk/mysql-5.0
into hundin.mysql.fi:/home/jan/mysql-5.0
parents
7205d371
2097f142
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
extra/Makefile.am
extra/Makefile.am
+1
-1
extra/innochecksum.c
extra/innochecksum.c
+8
-4
No files found.
extra/Makefile.am
View file @
cbc0f195
...
@@ -38,7 +38,7 @@ $(top_builddir)/include/mysqld_ername.h: $(top_builddir)/include/mysqld_error.h
...
@@ -38,7 +38,7 @@ $(top_builddir)/include/mysqld_ername.h: $(top_builddir)/include/mysqld_error.h
$(top_builddir)/include/sql_state.h
:
$(top_builddir)/include/mysqld_error.h
$(top_builddir)/include/sql_state.h
:
$(top_builddir)/include/mysqld_error.h
bin_PROGRAMS
=
replace comp_err perror resolveip my_print_defaults
\
bin_PROGRAMS
=
replace comp_err perror resolveip my_print_defaults
\
resolve_stack_dump mysql_waitpid
#
innochecksum
resolve_stack_dump mysql_waitpid innochecksum
noinst_PROGRAMS
=
charset2html
noinst_PROGRAMS
=
charset2html
# Don't update the files from bitkeeper
# Don't update the files from bitkeeper
...
...
extra/innochecksum.c
View file @
cbc0f195
...
@@ -140,10 +140,11 @@ int main(int argc, char **argv) {
...
@@ -140,10 +140,11 @@ int main(int argc, char **argv) {
int
now
;
// current time
int
now
;
// current time
int
lastt
;
// last time
int
lastt
;
// last time
ulint
oldcsum
,
oldcsumfield
,
csum
,
csumfield
,
logseq
,
logseqfield
;
// ulints for checksum storage
ulint
oldcsum
,
oldcsumfield
,
csum
,
csumfield
,
logseq
,
logseqfield
;
// ulints for checksum storage
struct
stat
64
st
;
// for stat, if you couldn't guess
struct
stat
st
;
// for stat, if you couldn't guess
unsigned
long
long
int
size
;
// size of file (has to be 64 bits)
unsigned
long
long
int
size
;
// size of file (has to be 64 bits)
ulint
pages
;
// number of pages in file
ulint
pages
;
// number of pages in file
ulint
start_page
=
0
,
end_page
=
0
,
use_end_page
=
0
;
// for starting and ending at certain pages
ulint
start_page
=
0
,
end_page
=
0
,
use_end_page
=
0
;
// for starting and ending at certain pages
off_t
offset
=
0
;
int
just_count
=
0
;
// if true, just print page count
int
just_count
=
0
;
// if true, just print page count
int
verbose
=
0
;
int
verbose
=
0
;
int
debug
=
0
;
int
debug
=
0
;
...
@@ -202,7 +203,7 @@ int main(int argc, char **argv) {
...
@@ -202,7 +203,7 @@ int main(int argc, char **argv) {
}
}
// stat the file to get size and page count
// stat the file to get size and page count
if
(
stat
64
(
argv
[
optind
],
&
st
))
{
if
(
stat
(
argv
[
optind
],
&
st
))
{
perror
(
"error statting file"
);
perror
(
"error statting file"
);
return
1
;
return
1
;
}
}
...
@@ -217,7 +218,7 @@ int main(int argc, char **argv) {
...
@@ -217,7 +218,7 @@ int main(int argc, char **argv) {
}
}
// open the file for reading
// open the file for reading
f
=
fopen
64
(
argv
[
optind
],
"r"
);
f
=
fopen
(
argv
[
optind
],
"r"
);
if
(
!
f
)
{
if
(
!
f
)
{
perror
(
"error opening file"
);
perror
(
"error opening file"
);
return
1
;
return
1
;
...
@@ -230,7 +231,10 @@ int main(int argc, char **argv) {
...
@@ -230,7 +231,10 @@ int main(int argc, char **argv) {
perror
(
"unable to obtain file descriptor number"
);
perror
(
"unable to obtain file descriptor number"
);
return
1
;
return
1
;
}
}
if
(
lseek64
(
fd
,
start_page
*
UNIV_PAGE_SIZE
,
SEEK_SET
)
!=
(
start_page
*
UNIV_PAGE_SIZE
))
{
offset
=
(
off_t
)
start_page
*
(
off_t
)
UNIV_PAGE_SIZE
;
if
(
lseek
(
fd
,
offset
,
SEEK_SET
)
!=
offset
)
{
perror
(
"unable to seek to necessary offset"
);
perror
(
"unable to seek to necessary offset"
);
return
1
;
return
1
;
}
}
...
...
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