summaryrefslogtreecommitdiff
path: root/myisam/myisamdef.h
diff options
context:
space:
mode:
authorunknown <ramil@mysql.com>2005-09-05 16:31:42 +0500
committerunknown <ramil@mysql.com>2005-09-05 16:31:42 +0500
commit943f8335f11c30b6188589e484ceacd1b1b786f8 (patch)
tree5f9ea51f99e9886c06f9dabb584f907504392950 /myisam/myisamdef.h
parent9e796abb5bcd8215c07936cefd94813b011f2c2f (diff)
downloadmariadb-git-943f8335f11c30b6188589e484ceacd1b1b786f8.tar.gz
a fix (bug #4214: Table corruption with myisampack and large BLOB objects).
myisam/mi_check.c: a fix (bug #4214: Table corruption with myisampack and large BLOB objects). - pass version to the save_pack_length(). myisam/mi_packrec.c: a fix (bug #4214: Table corruption with myisampack and large BLOB objects). - code cleanup: read_pack_length() and calc_pack_length() introduced, save_pack_length() modified: now the behavior depends on packing version - save packing version in the share->pack.version - pass it to the read_pack_length() myisam/mi_static.c: a fix (bug #4214: Table corruption with myisampack and large BLOB objects). - packing version set to 2 myisam/myisamdef.h: a fix (bug #4214: Table corruption with myisampack and large BLOB objects). - packing version slot introduced (see MI_PACK) myisam/myisampack.c: a fix (bug #4214: Table corruption with myisampack and large BLOB objects). - code cleanup - pass version to the calc_pack_length() and save_pack_length()
Diffstat (limited to 'myisam/myisamdef.h')
-rw-r--r--myisam/myisamdef.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/myisam/myisamdef.h b/myisam/myisamdef.h
index a41bcf5449b..15b310e907e 100644
--- a/myisam/myisamdef.h
+++ b/myisam/myisamdef.h
@@ -149,6 +149,7 @@ typedef struct st_mi_blob /* Info of record */
typedef struct st_mi_isam_pack {
ulong header_length;
uint ref_length;
+ uchar version;
} MI_PACK;
@@ -669,7 +670,9 @@ extern void _myisam_log_record(enum myisam_log_commands command,MI_INFO *info,
int result);
extern my_bool _mi_memmap_file(MI_INFO *info);
extern void _mi_unmap_file(MI_INFO *info);
-extern uint save_pack_length(byte *block_buff,ulong length);
+extern uint save_pack_length(uint version, byte *block_buff, ulong length);
+extern uint read_pack_length(uint version, const uchar *buf, ulong *length);
+extern uint calc_pack_length(uint version, ulong length);
uint mi_state_info_write(File file, MI_STATE_INFO *state, uint pWrite);
char *mi_state_info_read(char *ptr, MI_STATE_INFO *state);