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
df267c6c
Commit
df267c6c
authored
Sep 22, 2004
by
sergefp@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/mnt/tmp/mysql-4.0-bug-myisampack
parents
87a8e833
6e0ba8e6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
6 deletions
+16
-6
include/myisam.h
include/myisam.h
+1
-0
myisam/mi_check.c
myisam/mi_check.c
+1
-1
myisam/mi_create.c
myisam/mi_create.c
+9
-4
myisam/myisampack.c
myisam/myisampack.c
+5
-1
No files found.
include/myisam.h
View file @
df267c6c
...
...
@@ -96,6 +96,7 @@ typedef struct st_mi_create_info
ha_rows
reloc_rows
;
ulonglong
auto_increment
;
ulonglong
data_file_length
;
ulonglong
key_file_length
;
uint
raid_type
,
raid_chunks
;
ulong
raid_chunksize
;
uint
old_options
;
...
...
myisam/mi_check.c
View file @
df267c6c
...
...
@@ -3520,7 +3520,7 @@ int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename)
create_info
.
raid_chunksize
=
share
.
base
.
raid_chunksize
;
create_info
.
language
=
(
param
->
language
?
param
->
language
:
share
.
state
.
header
.
language
);
create_info
.
key_file_length
=
status_info
.
key_file_length
;
/* We don't have to handle symlinks here because we are using
HA_DONT_TOUCH_DATA */
if
(
mi_create
(
filename
,
...
...
myisam/mi_create.c
View file @
df267c6c
...
...
@@ -46,7 +46,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
ulong
reclength
,
real_reclength
,
min_pack_length
;
char
filename
[
FN_REFLEN
],
linkname
[
FN_REFLEN
],
*
linkname_ptr
;
ulong
pack_reclength
;
ulonglong
tot_length
,
max_rows
;
ulonglong
tot_length
,
max_rows
,
tmp
;
enum
en_fieldtype
type
;
MYISAM_SHARE
share
;
MI_KEYDEF
*
keydef
,
tmp_keydef
;
...
...
@@ -442,10 +442,15 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
share
.
state
.
auto_increment
=
ci
->
auto_increment
;
share
.
options
=
options
;
share
.
base
.
rec_reflength
=
pointer
;
/* Get estimate for index file length (this may be wrong for FT keys) */
tmp
=
(
tot_length
+
max_key_block_length
*
keys
*
MI_INDEX_BLOCK_MARGIN
)
/
MI_MIN_KEY_BLOCK_LENGTH
;
/*
use maximum of key_file_length we calculated and key_file_length value we
got from MYI file header (see also myisampack.c:save_state)
*/
share
.
base
.
key_reflength
=
mi_get_pointer_length
((
tot_length
+
max_key_block_length
*
keys
*
MI_INDEX_BLOCK_MARGIN
)
/
MI_MIN_KEY_BLOCK_LENGTH
,
3
);
mi_get_pointer_length
(
max
(
ci
->
key_file_length
,
tmp
),
3
);
share
.
base
.
keys
=
share
.
state
.
header
.
keys
=
keys
;
share
.
state
.
header
.
uniques
=
uniques
;
mi_int2store
(
share
.
state
.
header
.
key_parts
,
key_segs
);
...
...
myisam/myisampack.c
View file @
df267c6c
...
...
@@ -2041,7 +2041,11 @@ static int save_state(MI_INFO *isam_file,PACK_MRG_INFO *mrg,my_off_t new_length,
share
->
state
.
split
=
(
ha_rows
)
mrg
->
records
;
share
->
state
.
version
=
(
ulong
)
time
((
time_t
*
)
0
);
share
->
state
.
key_map
=
0
;
share
->
state
.
state
.
key_file_length
=
share
->
base
.
keystart
;
/*
Don't save key_file_length here, keep key_file_length of original file
so "myisamchk -rq" can use this value (this is necessary because index
size cannot be easily calculated for fulltext keys)
*/
for
(
key
=
0
;
key
<
share
->
base
.
keys
;
key
++
)
share
->
state
.
key_root
[
key
]
=
HA_OFFSET_ERROR
;
for
(
key
=
0
;
key
<
share
->
state
.
header
.
max_block_size
;
key
++
)
...
...
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