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
60d827b6
Commit
60d827b6
authored
Jan 09, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into zim.(none):/home/brian/mysql/archive-5.1
parents
63a33172
6d8f89b8
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
265 additions
and
31 deletions
+265
-31
sql/field.h
sql/field.h
+9
-1
sql/ha_archive.cc
sql/ha_archive.cc
+239
-25
sql/ha_archive.h
sql/ha_archive.h
+17
-5
No files found.
sql/field.h
View file @
60d827b6
...
@@ -253,7 +253,15 @@ public:
...
@@ -253,7 +253,15 @@ public:
ptr
-=
row_offset
;
ptr
-=
row_offset
;
return
tmp
;
return
tmp
;
}
}
inline
longlong
val_int
(
char
*
new_ptr
)
{
char
*
old_ptr
=
ptr
;
longlong
return_value
;
ptr
=
new_ptr
;
return_value
=
val_int
();
ptr
=
old_ptr
;
return
return_value
;
}
inline
String
*
val_str
(
String
*
str
,
char
*
new_ptr
)
inline
String
*
val_str
(
String
*
str
,
char
*
new_ptr
)
{
{
char
*
old_ptr
=
ptr
;
char
*
old_ptr
=
ptr
;
...
...
sql/ha_archive.cc
View file @
60d827b6
This diff is collapsed.
Click to expand it.
sql/ha_archive.h
View file @
60d827b6
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
#pragma interface
/* gcc class implementation */
#pragma interface
/* gcc class implementation */
#endif
#endif
#include <values.h>
#include <zlib.h>
#include <zlib.h>
#include "../storage/archive/azlib.h"
#include "../storage/archive/azlib.h"
...
@@ -38,13 +39,14 @@ typedef struct st_archive_share {
...
@@ -38,13 +39,14 @@ typedef struct st_archive_share {
bool
dirty
;
/* Flag for if a flush should occur */
bool
dirty
;
/* Flag for if a flush should occur */
bool
crashed
;
/* Meta file is crashed */
bool
crashed
;
/* Meta file is crashed */
ha_rows
rows_recorded
;
/* Number of rows in tables */
ha_rows
rows_recorded
;
/* Number of rows in tables */
ulonglong
auto_increment_value
;
}
ARCHIVE_SHARE
;
}
ARCHIVE_SHARE
;
/*
/*
Version for file format.
Version for file format.
1 - Initial Version
1 - Initial Version
*/
*/
#define ARCHIVE_VERSION
1
#define ARCHIVE_VERSION
2
class
ha_archive
:
public
handler
class
ha_archive
:
public
handler
{
{
...
@@ -68,13 +70,22 @@ public:
...
@@ -68,13 +70,22 @@ public:
const
char
**
bas_ext
()
const
;
const
char
**
bas_ext
()
const
;
ulong
table_flags
()
const
ulong
table_flags
()
const
{
{
return
(
HA_REC_NOT_IN_SEQ
|
HA_NOT_EXACT_COUNT
|
HA_NO_AUTO_INCREMENT
|
return
(
HA_REC_NOT_IN_SEQ
|
HA_NOT_EXACT_COUNT
|
HA_FILE_BASED
|
HA_CAN_INSERT_DELAYED
|
HA_CAN_GEOMETRY
);
HA_FILE_BASED
|
HA_CAN_INSERT_DELAYED
|
HA_CAN_GEOMETRY
);
}
}
ulong
index_flags
(
uint
idx
,
uint
part
,
bool
all_parts
)
const
ulong
index_flags
(
uint
idx
,
uint
part
,
bool
all_parts
)
const
{
{
return
0
;
return
HA_ONLY_WHOLE_INDEX
;
}
}
ulonglong
get_auto_increment
();
uint
max_supported_keys
()
const
{
return
1
;
}
uint
max_supported_key_length
()
const
{
return
sizeof
(
ulonglong
);
}
uint
max_supported_key_part_length
()
const
{
return
sizeof
(
ulonglong
);
}
int
index_init
(
uint
keynr
,
bool
sorted
);
virtual
int
index_read
(
byte
*
buf
,
const
byte
*
key
,
uint
key_len
,
enum
ha_rkey_function
find_flag
);
virtual
int
index_read_idx
(
byte
*
buf
,
uint
index
,
const
byte
*
key
,
uint
key_len
,
enum
ha_rkey_function
find_flag
);
int
open
(
const
char
*
name
,
int
mode
,
uint
test_if_locked
);
int
open
(
const
char
*
name
,
int
mode
,
uint
test_if_locked
);
int
close
(
void
);
int
close
(
void
);
int
write_row
(
byte
*
buf
);
int
write_row
(
byte
*
buf
);
...
@@ -84,8 +95,9 @@ public:
...
@@ -84,8 +95,9 @@ public:
int
rnd_next
(
byte
*
buf
);
int
rnd_next
(
byte
*
buf
);
int
rnd_pos
(
byte
*
buf
,
byte
*
pos
);
int
rnd_pos
(
byte
*
buf
,
byte
*
pos
);
int
get_row
(
azio_stream
*
file_to_read
,
byte
*
buf
);
int
get_row
(
azio_stream
*
file_to_read
,
byte
*
buf
);
int
read_meta_file
(
File
meta_file
,
ha_rows
*
rows
);
int
read_meta_file
(
File
meta_file
,
ha_rows
*
rows
,
ulonglong
*
auto_increment
);
int
write_meta_file
(
File
meta_file
,
ha_rows
rows
,
bool
dirty
);
int
write_meta_file
(
File
meta_file
,
ha_rows
rows
,
ulonglong
auto_increment
,
bool
dirty
);
ARCHIVE_SHARE
*
get_share
(
const
char
*
table_name
,
TABLE
*
table
);
ARCHIVE_SHARE
*
get_share
(
const
char
*
table_name
,
TABLE
*
table
);
int
free_share
(
ARCHIVE_SHARE
*
share
);
int
free_share
(
ARCHIVE_SHARE
*
share
);
bool
auto_repair
()
const
{
return
1
;
}
// For the moment we just do this
bool
auto_repair
()
const
{
return
1
;
}
// For the moment we just do this
...
...
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