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
4e8d92e5
Commit
4e8d92e5
authored
Jan 12, 2007
by
brian@zim.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Final cleanup for new archive internal format. All new headers work.
parent
ab1a97f5
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
107 deletions
+71
-107
storage/archive/archive_reader.c
storage/archive/archive_reader.c
+9
-6
storage/archive/azio.c
storage/archive/azio.c
+1
-2
storage/archive/ha_archive.cc
storage/archive/ha_archive.cc
+56
-94
storage/archive/ha_archive.h
storage/archive/ha_archive.h
+5
-5
No files found.
storage/archive/archive_reader.c
View file @
4e8d92e5
...
...
@@ -26,12 +26,15 @@ int main(int argc, char *argv[])
printf
(
"Version :%u
\n
"
,
reader_handle
.
version
);
printf
(
"Start position :%llu
\n
"
,
(
unsigned
long
long
)
reader_handle
.
start
);
printf
(
"Block size :%u
\n
"
,
reader_handle
.
block_size
);
printf
(
"Rows: %llu
\n
"
,
reader_handle
.
rows
);
printf
(
"Autoincrement: %llu
\n
"
,
reader_handle
.
auto_increment
);
printf
(
"Check Point: %llu
\n
"
,
reader_handle
.
check_point
);
printf
(
"Forced Flushes: %llu
\n
"
,
reader_handle
.
forced_flushes
);
printf
(
"State: %s
\n
"
,
(
reader_handle
.
dirty
?
"dirty"
:
"clean"
));
if
(
reader_handle
.
version
>
2
)
{
printf
(
"Block size :%u
\n
"
,
reader_handle
.
block_size
);
printf
(
"Rows: %llu
\n
"
,
reader_handle
.
rows
);
printf
(
"Autoincrement: %llu
\n
"
,
reader_handle
.
auto_increment
);
printf
(
"Check Point: %llu
\n
"
,
reader_handle
.
check_point
);
printf
(
"Forced Flushes: %llu
\n
"
,
reader_handle
.
forced_flushes
);
printf
(
"State: %s
\n
"
,
(
reader_handle
.
dirty
?
"dirty"
:
"clean"
));
}
azclose
(
&
reader_handle
);
...
...
storage/archive/azio.c
View file @
4e8d92e5
...
...
@@ -49,7 +49,7 @@ void read_header(azio_stream *s, unsigned char *buffer);
int
az_open
(
azio_stream
*
s
,
const
char
*
path
,
int
Flags
,
File
fd
)
{
int
err
;
int
level
=
Z_
NO_COMPRESSION
;
/* Z_DEFAULT_COMPRESSION;*/
/* compression level */
int
level
=
Z_
DEFAULT_COMPRESSION
;
/* compression level */
int
strategy
=
Z_DEFAULT_STRATEGY
;
/* compression strategy */
s
->
stream
.
zalloc
=
(
alloc_func
)
0
;
...
...
@@ -165,7 +165,6 @@ void write_header(azio_stream *s)
int4store
(
ptr
+
AZ_FRM_POS
,
0
);
/* FRM Block */
int4store
(
ptr
+
AZ_META_POS
,
0
);
/* Meta Block */
int8store
(
ptr
+
AZ_START_POS
,
(
unsigned
long
long
)
s
->
start
);
/* Start of Data Block Index Block */
printf
(
"ROWS %llu
\n
"
,
s
->
rows
);
int8store
(
ptr
+
AZ_ROW_POS
,
(
unsigned
long
long
)
s
->
rows
);
/* Start of Data Block Index Block */
int8store
(
ptr
+
AZ_FLUSH_POS
,
(
unsigned
long
long
)
s
->
forced_flushes
);
/* Start of Data Block Index Block */
int8store
(
ptr
+
AZ_CHECK_POS
,
(
unsigned
long
long
)
s
->
check_point
);
/* Start of Data Block Index Block */
...
...
storage/archive/ha_archive.cc
View file @
4e8d92e5
This diff is collapsed.
Click to expand it.
storage/archive/ha_archive.h
View file @
4e8d92e5
...
...
@@ -28,7 +28,7 @@
typedef
struct
st_archive_record_buffer
{
byte
*
buffer
;
int
length
;
uint32
length
;
}
archive_record_buffer
;
...
...
@@ -71,7 +71,7 @@ class ha_archive: public handler
uint
current_k_offset
;
archive_record_buffer
*
record_buffer
;
archive_record_buffer
*
create_record_buffer
(
u
longlong
length
);
archive_record_buffer
*
create_record_buffer
(
u
nsigned
int
length
);
void
destroy_record_buffer
(
archive_record_buffer
*
r
);
public:
...
...
@@ -137,9 +137,9 @@ class ha_archive: public handler
bool
is_crashed
()
const
;
int
check
(
THD
*
thd
,
HA_CHECK_OPT
*
check_opt
);
bool
check_and_repair
(
THD
*
thd
);
int
max_row_length
(
const
byte
*
buf
);
bool
fix_rec_buff
(
int
length
);
uint32
max_row_length
(
const
byte
*
buf
);
bool
fix_rec_buff
(
unsigned
int
length
);
int
unpack_row
(
azio_stream
*
file_to_read
,
char
*
record
);
unsigned
int
pack_row
(
const
byte
*
record
);
unsigned
int
pack_row
(
byte
*
record
);
};
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