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
16a2ea9d
Commit
16a2ea9d
authored
Feb 19, 2003
by
gluh@gluh.mysql.r18.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge sgluhov@work.mysql.com:/home/bk/mysql-4.1
into gluh.mysql.r18.ru:/home/gluh/mysql-4.1.uvar
parents
ae911ef8
7bcf7f90
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
621 additions
and
37 deletions
+621
-37
Docs/internals.texi
Docs/internals.texi
+581
-3
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/rt_index.c
myisam/rt_index.c
+1
-1
myisam/rt_key.c
myisam/rt_key.c
+2
-2
myisam/rt_split.c
myisam/rt_split.c
+1
-1
myisam/rt_test.c
myisam/rt_test.c
+1
-1
myisam/sort.c
myisam/sort.c
+7
-7
sql/field.cc
sql/field.cc
+0
-1
sql/ha_innodb.cc
sql/ha_innodb.cc
+1
-0
sql/mysqld.cc
sql/mysqld.cc
+2
-1
sql/opt_range.cc
sql/opt_range.cc
+1
-1
sql/sql_table.cc
sql/sql_table.cc
+14
-8
No files found.
Docs/internals.texi
View file @
16a2ea9d
This diff is collapsed.
Click to expand it.
myisam/ft_dump.c
View file @
16a2ea9d
...
...
@@ -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 @
16a2ea9d
...
...
@@ -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 @
16a2ea9d
...
...
@@ -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/rt_index.c
View file @
16a2ea9d
...
...
@@ -785,7 +785,7 @@ int rtree_delete(MI_INFO *info, uint keynr, uchar *key, uint key_length)
goto
err1
;
}
if
(
ReinsertList
.
pages
)
free
(
ReinsertList
.
pages
);
my_free
((
byte
*
)
ReinsertList
.
pages
,
MYF
(
0
)
);
/* check for redundant root (not leaf, 1 child) and eliminate */
if
((
old_root
=
info
->
s
->
state
.
key_root
[
keynr
])
==
HA_OFFSET_ERROR
)
...
...
myisam/rt_key.c
View file @
16a2ea9d
...
...
@@ -56,7 +56,7 @@ int rtree_add_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key,
}
return
(
rtree_split_page
(
info
,
keyinfo
,
page_buf
,
key
,
key_length
,
new_page
)
?
-
1
:
0
);
new_page
)
?
-
1
:
1
);
}
/*
...
...
@@ -69,7 +69,7 @@ int rtree_delete_key(MI_INFO *info, uchar *page_buf, uchar *key,
uchar
*
key_start
;
key_start
=
key
-
nod_flag
;
if
(
nod_flag
)
if
(
!
nod_flag
)
key_length
+=
info
->
s
->
base
.
rec_reflength
;
memmove
(
key_start
,
key
+
key_length
,
page_size
-
key_length
-
...
...
myisam/rt_split.c
View file @
16a2ea9d
...
...
@@ -263,7 +263,7 @@ int rtree_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key,
int
max_keys
=
(
mi_getint
(
page
)
-
2
)
/
(
full_length
);
n_dim
=
(
keyinfo
->
keysegs
-
1
)
/
2
;
n_dim
=
keyinfo
->
keysegs
/
2
;
{
int
coord_buf_size
=
n_dim
*
2
*
sizeof
(
double
)
*
(
max_keys
+
1
+
4
);
...
...
myisam/rt_test.c
View file @
16a2ea9d
...
...
@@ -55,7 +55,7 @@ int run_test(const char *filename)
int
key_type
=
HA_KEYTYPE_DOUBLE
;
int
key_length
=
8
;
int
null_fields
=
0
;
int
nrecords
=
30
;
int
nrecords
=
30
0
;
int
rec_length
=
0
;
int
uniques
=
0
;
int
i
;
...
...
myisam/sort.c
View file @
16a2ea9d
...
...
@@ -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
;
...
...
sql/field.cc
View file @
16a2ea9d
...
...
@@ -4530,7 +4530,6 @@ void Field_geom::get_key_image(char *buff,uint length,CHARSET_INFO *cs,
ulong
blob_length
=
get_length
(
ptr
);
char
*
blob
;
get_ptr
(
&
blob
);
memcpy
(
buff
+
2
,
blob
,
length
);
MBR
mbr
;
Geometry
gobj
;
...
...
sql/ha_innodb.cc
View file @
16a2ea9d
...
...
@@ -2293,6 +2293,7 @@ convert_search_mode_to_innobase(
case
HA_READ_BEFORE_KEY
:
return
(
PAGE_CUR_L
);
case
HA_READ_PREFIX
:
return
(
PAGE_CUR_GE
);
case
HA_READ_PREFIX_LAST
:
return
(
PAGE_CUR_LE
);
case
HA_READ_PREFIX_LAST_OR_PREV
:
return
(
PAGE_CUR_LE
);
/* In MySQL HA_READ_PREFIX and HA_READ_PREFIX_LAST always
use a complete-field-prefix of a kay value as the search
tuple. I.e., it is not allowed that the last field would
...
...
sql/mysqld.cc
View file @
16a2ea9d
...
...
@@ -1260,7 +1260,8 @@ void yyerror(const char *s)
{
THD
*
thd
=
current_thd
;
char
*
yytext
=
(
char
*
)
thd
->
lex
.
tok_start
;
if
(
!
strcmp
(
s
,
"parse error"
))
/* "parse error" changed into "syntax error" between bison 1.75 and 1.875 */
if
(
strcmp
(
s
,
"parse error"
)
==
0
||
strcmp
(
s
,
"syntax error"
)
==
0
)
s
=
ER
(
ER_SYNTAX_ERROR
);
net_printf
(
thd
,
ER_PARSE_ERROR
,
s
,
yytext
?
(
char
*
)
yytext
:
""
,
thd
->
lex
.
yylineno
);
...
...
sql/opt_range.cc
View file @
16a2ea9d
...
...
@@ -2153,7 +2153,7 @@ check_quick_keys(PARAM *param,uint idx,SEL_ARG *key_tree,
if
(
tmp_min_flag
&
GEOM_FLAG
)
{
tmp
=
param
->
table
->
file
->
records_in_range
((
int
)
keynr
,
(
byte
*
)(
param
->
min_key
+
1
),
records_in_range
((
int
)
keynr
,
(
byte
*
)(
param
->
min_key
),
min_key_length
,
(
ha_rkey_function
)(
tmp_min_flag
^
GEOM_FLAG
),
(
byte
*
)
NullS
,
0
,
HA_READ_KEY_EXACT
);
...
...
sql/sql_table.cc
View file @
16a2ea9d
...
...
@@ -705,14 +705,6 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
{
if
(
key
->
type
==
Key
::
FULLTEXT
)
column
->
length
=
1
;
/* ft-code ignores it anyway :-) */
else
if
(
key
->
type
==
Key
::
SPATIAL
)
{
/*
BAR: 4 is: (Xmin,Xmax,Ymin,Ymax), this is for 2D case
Lately we'll extend this code to support more dimensions
*/
column
->
length
=
4
*
sizeof
(
double
);
}
else
{
my_printf_error
(
ER_BLOB_KEY_WITHOUT_LENGTH
,
...
...
@@ -722,6 +714,17 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
}
}
}
if
(
key
->
type
==
Key
::
SPATIAL
)
{
if
(
!
column
->
length
)
{
/*
BAR: 4 is: (Xmin,Xmax,Ymin,Ymax), this is for 2D case
Lately we'll extend this code to support more dimensions
*/
column
->
length
=
4
*
sizeof
(
double
);
}
}
if
(
!
(
sql_field
->
flags
&
NOT_NULL_FLAG
))
{
if
(
key
->
type
==
Key
::
PRIMARY
)
...
...
@@ -757,6 +760,9 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
DBUG_RETURN
(
-
1
);
}
}
else
if
(
f_is_geom
(
sql_field
->
pack_flag
))
{
}
else
if
(
column
->
length
>
length
||
((
f_is_packed
(
sql_field
->
pack_flag
)
||
((
file
->
table_flags
()
&
HA_NO_PREFIX_CHAR_KEYS
)
&&
...
...
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