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
096555ff
Commit
096555ff
authored
Feb 18, 2003
by
serg@serg.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/home/bk/mysql-4.1
into serg.mysql.com:/usr/home/serg/Abk/mysql-4.1
parents
b5403e65
eced8a1d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
18 deletions
+17
-18
myisam/ft_dump.c
myisam/ft_dump.c
+1
-5
myisam/mi_check.c
myisam/mi_check.c
+8
-6
myisam/myisamdef.h
myisam/myisamdef.h
+1
-0
myisam/sort.c
myisam/sort.c
+7
-7
No files found.
myisam/ft_dump.c
View file @
096555ff
...
...
@@ -124,13 +124,9 @@ int main(int argc,char *argv[])
{
keylen
=*
(
info
->
lastkey
);
#if HA_FT_WTYPE == HA_KEYTYPE_FLOAT
subkeys
=
mi_sint4korr
(
info
->
lastkey
+
keylen
+
1
);
subkeys
=
ft_sintXkorr
(
info
->
lastkey
+
keylen
+
1
);
if
(
subkeys
>=
0
)
weight
=*
(
float
*
)
&
subkeys
;
#else
#error
#endif
snprintf
(
buf
,
MAX_LEN
,
"%.*s"
,(
int
)
keylen
,
info
->
lastkey
+
1
);
my_casedn_str
(
default_charset_info
,
buf
);
...
...
myisam/mi_check.c
View file @
096555ff
...
...
@@ -1893,6 +1893,7 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
{
sort_param
.
read_cache
=
param
->
read_cache
;
sort_param
.
keyinfo
=
share
->
keyinfo
+
sort_param
.
key
;
sort_param
.
seg
=
sort_param
.
keyinfo
->
seg
;
if
(
!
(((
ulonglong
)
1
<<
sort_param
.
key
)
&
key_map
))
{
/* Remember old statistics for key */
...
...
@@ -1906,7 +1907,7 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
if
((
!
(
param
->
testflag
&
T_SILENT
)))
printf
(
"- Fixing index %d
\n
"
,
sort_param
.
key
+
1
);
sort_param
.
max_pos
=
sort_param
.
pos
=
share
->
pack
.
header_length
;
keyseg
=
sort_param
.
keyinfo
->
seg
;
keyseg
=
sort_param
.
seg
;
bzero
((
char
*
)
sort_param
.
unique
,
sizeof
(
sort_param
.
unique
));
sort_param
.
key_length
=
share
->
rec_reflength
;
for
(
i
=
0
;
keyseg
[
i
].
type
!=
HA_KEYTYPE_END
;
i
++
)
...
...
@@ -2255,6 +2256,7 @@ int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info,
{
sort_param
[
i
].
key
=
key
;
sort_param
[
i
].
keyinfo
=
share
->
keyinfo
+
key
;
sort_param
[
i
].
seg
=
sort_param
[
i
].
keyinfo
->
seg
;
if
(
!
(((
ulonglong
)
1
<<
key
)
&
key_map
))
{
/* Remember old statistics for key */
...
...
@@ -2292,7 +2294,7 @@ int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info,
(
share
->
base
.
pack_reclength
*
i
));
sort_param
[
i
].
key_length
=
share
->
rec_reflength
;
for
(
keyseg
=
sort_param
[
i
].
keyinfo
->
seg
;
keyseg
->
type
!=
HA_KEYTYPE_END
;
for
(
keyseg
=
sort_param
[
i
].
seg
;
keyseg
->
type
!=
HA_KEYTYPE_END
;
keyseg
++
)
{
sort_param
[
i
].
key_length
+=
keyseg
->
length
;
...
...
@@ -3051,7 +3053,7 @@ static int sort_key_cmp(MI_SORT_PARAM *sort_param, const void *a,
const
void
*
b
)
{
uint
not_used
;
return
(
ha_key_cmp
(
sort_param
->
keyinfo
->
seg
,
*
((
uchar
**
)
a
),
*
((
uchar
**
)
b
),
return
(
ha_key_cmp
(
sort_param
->
seg
,
*
((
uchar
**
)
a
),
*
((
uchar
**
)
b
),
USE_WHOLE_KEY
,
SEARCH_SAME
,
&
not_used
));
}
/* sort_key_cmp */
...
...
@@ -3066,7 +3068,7 @@ static int sort_key_write(MI_SORT_PARAM *sort_param, const void *a)
if
(
sort_info
->
key_block
->
inited
)
{
cmp
=
ha_key_cmp
(
sort_param
->
keyinfo
->
seg
,
sort_info
->
key_block
->
lastkey
,
cmp
=
ha_key_cmp
(
sort_param
->
seg
,
sort_info
->
key_block
->
lastkey
,
(
uchar
*
)
a
,
USE_WHOLE_KEY
,
SEARCH_FIND
|
SEARCH_UPDATE
,
&
diff_pos
);
sort_param
->
unique
[
diff_pos
-
1
]
++
;
...
...
@@ -3091,7 +3093,7 @@ static int sort_key_write(MI_SORT_PARAM *sort_param, const void *a)
llbuff2
));
param
->
testflag
|=
T_RETRY_WITHOUT_QUICK
;
if
(
sort_info
->
param
->
testflag
&
T_VERBOSE
)
_mi_print_key
(
stdout
,
sort_param
->
keyinfo
->
seg
,(
uchar
*
)
a
,
USE_WHOLE_KEY
);
_mi_print_key
(
stdout
,
sort_param
->
seg
,(
uchar
*
)
a
,
USE_WHOLE_KEY
);
return
(
sort_delete_record
(
sort_param
));
}
#ifndef DBUG_OFF
...
...
@@ -3182,7 +3184,7 @@ static int sort_ft_key_write(MI_SORT_PARAM *sort_param, const void *a)
get_key_full_length_rdonly
(
val_off
,
ft_buf
->
lastkey
);
if
(
val_off
==
a_len
&&
mi_compare_text
(
sort_param
->
keyinfo
->
seg
->
charset
,
mi_compare_text
(
sort_param
->
seg
->
charset
,
((
uchar
*
)
a
)
+
1
,
a_len
-
1
,
ft_buf
->
lastkey
+
1
,
val_off
-
1
,
0
)
==
0
)
{
...
...
myisam/myisamdef.h
View file @
096555ff
...
...
@@ -295,6 +295,7 @@ typedef struct st_mi_sort_param
uint
maxbuffers
,
keys
,
find_length
,
sort_keys_length
;
my_bool
fix_datafile
,
master
;
MI_KEYDEF
*
keyinfo
;
HA_KEYSEG
*
seg
;
SORT_INFO
*
sort_info
;
uchar
**
sort_keys
;
byte
*
rec_buff
;
...
...
myisam/sort.c
View file @
096555ff
...
...
@@ -111,7 +111,7 @@ int _create_index_by_sort(MI_SORT_PARAM *info,my_bool no_messages,
DBUG_ENTER
(
"_create_index_by_sort"
);
DBUG_PRINT
(
"enter"
,(
"sort_length: %d"
,
info
->
key_length
));
if
(
info
->
keyinfo
->
flag
&
&
HA_VAR_LENGTH_KEY
)
if
(
info
->
keyinfo
->
flag
&
HA_VAR_LENGTH_KEY
)
{
info
->
write_keys
=
write_keys_varlen
;
info
->
read_to_buffer
=
read_to_buffer_varlen
;
...
...
@@ -622,7 +622,7 @@ inline int my_var_write(MI_SORT_PARAM *info,IO_CACHE *to_file,char *bufs)
{
int
err
;
uint16
len
=
_mi_keylength
(
info
->
keyinfo
,
bufs
);
if
((
err
=
my_b_write
(
to_file
,(
byte
*
)
&
len
,
sizeof
(
len
))))
return
(
err
);
if
((
err
=
my_b_write
(
to_file
,(
byte
*
)
bufs
,(
uint
)
len
)))
...
...
@@ -641,7 +641,7 @@ static int NEAR_F write_keys_varlen(MI_SORT_PARAM *info, register uchar **sort_k
qsort2
((
byte
*
)
sort_keys
,
count
,
sizeof
(
byte
*
),(
qsort2_cmp
)
info
->
key_cmp
,
info
);
if
(
!
my_b_inited
(
tempfile
)
&&
open_cached_file
(
tempfile
,
my_tmpdir
(
info
->
tmpdir
),
"ST"
,
open_cached_file
(
tempfile
,
my_tmpdir
(
info
->
tmpdir
),
"ST"
,
DISK_BUFFER_SIZE
,
info
->
sort_info
->
param
->
myf_rw
))
DBUG_RETURN
(
1
);
/* purecov: inspected */
...
...
@@ -650,7 +650,7 @@ static int NEAR_F write_keys_varlen(MI_SORT_PARAM *info, register uchar **sort_k
for
(
end
=
sort_keys
+
count
;
sort_keys
!=
end
;
sort_keys
++
)
{
if
((
err
=
my_var_write
(
info
,
tempfile
,
*
sort_keys
)))
DBUG_RETURN
(
err
);
DBUG_RETURN
(
err
);
}
DBUG_RETURN
(
0
);
}
/* write_keys_varlen */
...
...
@@ -777,7 +777,7 @@ static uint NEAR_F read_to_buffer_varlen(IO_CACHE *fromfile, BUFFPEK *buffpek,
uint16
length_of_key
=
0
;
uint
idx
;
uchar
*
buffp
;
if
((
count
=
(
uint
)
min
((
ha_rows
)
buffpek
->
max_keys
,
buffpek
->
count
)))
{
buffp
=
buffpek
->
base
;
...
...
@@ -786,11 +786,11 @@ static uint NEAR_F read_to_buffer_varlen(IO_CACHE *fromfile, BUFFPEK *buffpek,
{
if
(
my_pread
(
fromfile
->
file
,(
byte
*
)
&
length_of_key
,
sizeof
(
length_of_key
),
buffpek
->
file_pos
,
MYF_RW
))
return
((
uint
)
-
1
);
return
((
uint
)
-
1
);
buffpek
->
file_pos
+=
sizeof
(
length_of_key
);
if
(
my_pread
(
fromfile
->
file
,(
byte
*
)
buffp
,
length_of_key
,
buffpek
->
file_pos
,
MYF_RW
))
return
((
uint
)
-
1
);
return
((
uint
)
-
1
);
buffpek
->
file_pos
+=
length_of_key
;
buffp
=
buffp
+
sort_length
;
}
...
...
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