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
c4a1c72b
Commit
c4a1c72b
authored
Dec 02, 2006
by
brian@zim.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Formailized the row buffer structure, implemented new streaming format.
parent
16b79adf
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
251 additions
and
79 deletions
+251
-79
mysql-test/r/archive.result
mysql-test/r/archive.result
+1
-1
mysql-test/t/archive.test
mysql-test/t/archive.test
+1
-1
storage/archive/ha_archive.cc
storage/archive/ha_archive.cc
+225
-75
storage/archive/ha_archive.h
storage/archive/ha_archive.h
+24
-2
No files found.
mysql-test/r/archive.result
View file @
c4a1c72b
drop table if exists t1,t2,t3;
drop table if exists t1,t2,t3
,t4,t5
;
CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
...
...
mysql-test/t/archive.test
View file @
c4a1c72b
...
...
@@ -6,7 +6,7 @@
--
source
include
/
have_binlog_format_mixed_or_statement
.
inc
--
disable_warnings
drop
table
if
exists
t1
,
t2
,
t3
;
drop
table
if
exists
t1
,
t2
,
t3
,
t4
,
t5
;
--
enable_warnings
CREATE
TABLE
t1
(
...
...
storage/archive/ha_archive.cc
View file @
c4a1c72b
This diff is collapsed.
Click to expand it.
storage/archive/ha_archive.h
View file @
c4a1c72b
...
...
@@ -27,6 +27,12 @@
ha_example.h.
*/
typedef
struct
st_archive_record_buffer
{
byte
*
buffer
;
int
length
;
}
archive_record_buffer
;
typedef
struct
st_archive_share
{
char
*
table_name
;
char
data_file_name
[
FN_REFLEN
];
...
...
@@ -43,18 +49,23 @@ typedef struct st_archive_share {
ulonglong
forced_flushes
;
ulonglong
mean_rec_length
;
char
real_path
[
FN_REFLEN
];
uint
meta_version
;
uint
data_version
;
}
ARCHIVE_SHARE
;
/*
Version for file format.
1 - Initial Version
1 - Initial Version (Never Released)
2 - Stream Compression, seperate blobs, no packing
3 - One steam (row and blobs), with packing
*/
#define ARCHIVE_VERSION
2
#define ARCHIVE_VERSION
3
class
ha_archive
:
public
handler
{
THR_LOCK_DATA
lock
;
/* MySQL lock */
ARCHIVE_SHARE
*
share
;
/* Shared lock info */
azio_stream
archive
;
/* Archive file we are working with */
my_off_t
current_position
;
/* The position of the row we just read */
byte
byte_buffer
[
IO_SIZE
];
/* Initial buffer for our string */
...
...
@@ -65,6 +76,10 @@ class ha_archive: public handler
const
byte
*
current_key
;
uint
current_key_len
;
uint
current_k_offset
;
archive_record_buffer
*
record_buffer
;
archive_record_buffer
*
create_record_buffer
(
ulonglong
length
);
void
destroy_record_buffer
(
archive_record_buffer
*
r
);
public:
ha_archive
(
handlerton
*
hton
,
TABLE_SHARE
*
table_arg
);
...
...
@@ -105,7 +120,10 @@ class ha_archive: public handler
int
rnd_next
(
byte
*
buf
);
int
rnd_pos
(
byte
*
buf
,
byte
*
pos
);
int
get_row
(
azio_stream
*
file_to_read
,
byte
*
buf
);
int
get_row_version2
(
azio_stream
*
file_to_read
,
byte
*
buf
);
int
get_row_version3
(
azio_stream
*
file_to_read
,
byte
*
buf
);
int
read_meta_file
(
File
meta_file
,
ha_rows
*
rows
,
uint
*
meta_version
,
ulonglong
*
auto_increment
,
ulonglong
*
forced_flushes
,
char
*
real_path
);
...
...
@@ -137,5 +155,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
);
int
unpack_row
(
azio_stream
*
file_to_read
,
char
*
record
);
int
pack_row
(
const
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