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
8efd5648
Commit
8efd5648
authored
Nov 29, 2002
by
wax@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/wax/mysql-4n into mysql.com:/home/wax/mysql-4mi
parents
5921189e
ff368e95
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
193 additions
and
53 deletions
+193
-53
include/myisam.h
include/myisam.h
+0
-27
myisam/mi_check.c
myisam/mi_check.c
+1
-4
myisam/myisamdef.h
myisam/myisamdef.h
+38
-1
myisam/sort.c
myisam/sort.c
+154
-21
No files found.
include/myisam.h
View file @
8efd5648
...
...
@@ -360,31 +360,6 @@ typedef struct st_sort_info
pthread_cond_t
cond
;
}
SORT_INFO
;
typedef
struct
st_mi_sort_param
{
pthread_t
thr
;
IO_CACHE
read_cache
,
tempfile
,
tempfile_for_exceptions
;
DYNAMIC_ARRAY
buffpek
;
ulonglong
unique
[
MI_MAX_KEY_SEG
+
1
];
my_off_t
pos
,
max_pos
,
filepos
,
start_recpos
;
uint
key
,
key_length
,
real_key_length
,
sortbuff_size
;
uint
maxbuffers
,
keys
,
find_length
,
sort_keys_length
;
my_bool
fix_datafile
,
master
;
MI_KEYDEF
*
keyinfo
;
SORT_INFO
*
sort_info
;
uchar
**
sort_keys
;
byte
*
rec_buff
;
void
*
wordlist
,
*
wordptr
;
char
*
record
;
MY_TMPDIR
*
tmpdir
;
int
(
*
key_cmp
)(
struct
st_mi_sort_param
*
,
const
void
*
,
const
void
*
);
int
(
*
key_read
)(
struct
st_mi_sort_param
*
,
void
*
);
int
(
*
key_write
)(
struct
st_mi_sort_param
*
,
const
void
*
);
void
(
*
lock_in_memory
)(
MI_CHECK
*
);
}
MI_SORT_PARAM
;
/* functions in mi_check */
void
myisamchk_init
(
MI_CHECK
*
param
);
int
chk_status
(
MI_CHECK
*
param
,
MI_INFO
*
info
);
...
...
@@ -415,9 +390,7 @@ int filecopy(MI_CHECK *param, File to,File from,my_off_t start,
my_off_t
length
,
const
char
*
type
);
int
movepoint
(
MI_INFO
*
info
,
byte
*
record
,
my_off_t
oldpos
,
my_off_t
newpos
,
uint
prot_key
);
int
sort_write_record
(
MI_SORT_PARAM
*
sort_param
);
int
write_data_suffix
(
SORT_INFO
*
sort_info
,
my_bool
fix_datafile
);
int
_create_index_by_sort
(
MI_SORT_PARAM
*
info
,
my_bool
no_messages
,
ulong
);
int
test_if_almost_full
(
MI_INFO
*
info
);
int
recreate_table
(
MI_CHECK
*
param
,
MI_INFO
**
org_info
,
char
*
filename
);
void
mi_disable_non_unique_index
(
MI_INFO
*
info
,
ha_rows
rows
);
...
...
myisam/mi_check.c
View file @
8efd5648
...
...
@@ -3682,10 +3682,7 @@ static my_bool mi_too_big_key_for_sort(MI_KEYDEF *key, ha_rows rows)
key_maxlength
+=
ft_max_word_len_for_sort
-
HA_FT_MAXLEN
;
return
(
key
->
flag
&
(
HA_BINARY_PACK_KEY
|
HA_VAR_LENGTH_KEY
|
HA_FULLTEXT
)
&&
((
ulonglong
)
rows
*
key_maxlength
>
(
ulonglong
)
myisam_max_temp_length
||
(
ulonglong
)
rows
*
(
key_maxlength
-
key
->
minlength
)
/
2
>
myisam_max_extra_temp_length
||
(
rows
==
0
&&
(
key_maxlength
/
key
->
minlength
)
>
2
)));
(
ulonglong
)
myisam_max_temp_length
));
}
...
...
myisam/myisamdef.h
View file @
8efd5648
...
...
@@ -275,7 +275,41 @@ struct st_myisam_info {
int
rtree_recursion_depth
;
};
typedef
struct
st_buffpek
{
my_off_t
file_pos
;
/* Where we are in the sort file */
uchar
*
base
,
*
key
;
/* Key pointers */
ha_rows
count
;
/* Number of rows in table */
ulong
mem_count
;
/* numbers of keys in memory */
ulong
max_keys
;
/* Max keys in buffert */
}
BUFFPEK
;
typedef
struct
st_mi_sort_param
{
pthread_t
thr
;
IO_CACHE
read_cache
,
tempfile
,
tempfile_for_exceptions
;
DYNAMIC_ARRAY
buffpek
;
ulonglong
unique
[
MI_MAX_KEY_SEG
+
1
];
my_off_t
pos
,
max_pos
,
filepos
,
start_recpos
;
uint
key
,
key_length
,
real_key_length
,
sortbuff_size
;
uint
maxbuffers
,
keys
,
find_length
,
sort_keys_length
;
my_bool
fix_datafile
,
master
;
MI_KEYDEF
*
keyinfo
;
SORT_INFO
*
sort_info
;
uchar
**
sort_keys
;
byte
*
rec_buff
;
void
*
wordlist
,
*
wordptr
;
char
*
record
;
MY_TMPDIR
*
tmpdir
;
int
(
*
key_cmp
)(
struct
st_mi_sort_param
*
,
const
void
*
,
const
void
*
);
int
(
*
key_read
)(
struct
st_mi_sort_param
*
,
void
*
);
int
(
*
key_write
)(
struct
st_mi_sort_param
*
,
const
void
*
);
void
(
*
lock_in_memory
)(
MI_CHECK
*
);
NEAR
int
(
*
write_keys
)(
struct
st_mi_sort_param
*
,
register
uchar
**
,
uint
,
struct
st_buffpek
*
,
IO_CACHE
*
);
NEAR
uint
(
*
read_to_buffer
)(
IO_CACHE
*
,
struct
st_buffpek
*
,
uint
);
NEAR
int
(
*
write_key
)(
struct
st_mi_sort_param
*
,
IO_CACHE
*
,
char
*
,
uint
,
uint
);
}
MI_SORT_PARAM
;
/* Some defines used by isam-funktions */
#define USE_WHOLE_KEY MI_MAX_KEY_BUFF*2
/* Use whole key in _mi_search() */
...
...
@@ -662,6 +696,9 @@ int thr_write_keys(MI_SORT_PARAM *sort_param);
pthread_handler_decl
(
thr_find_all_keys
,
arg
);
#endif
int
sort_write_record
(
MI_SORT_PARAM
*
sort_param
);
int
_create_index_by_sort
(
MI_SORT_PARAM
*
info
,
my_bool
no_messages
,
ulong
);
#ifdef __cplusplus
}
#endif
...
...
myisam/sort.c
View file @
8efd5648
This diff is collapsed.
Click to expand it.
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