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
477093eb
Commit
477093eb
authored
Dec 07, 2004
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk@192.168.21.1:/usr/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.6755
parents
f30049f4
e211b263
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
1 deletion
+97
-1
myisam/mi_check.c
myisam/mi_check.c
+9
-1
mysql-test/r/gis-rtree.result
mysql-test/r/gis-rtree.result
+41
-0
mysql-test/t/gis-rtree.test
mysql-test/t/gis-rtree.test
+47
-0
No files found.
myisam/mi_check.c
View file @
477093eb
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#ifdef HAVE_SYS_MMAN_H
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#include <sys/mman.h>
#endif
#endif
#include "rt_index.h"
#ifndef USE_RAID
#ifndef USE_RAID
#define my_raid_create(A,B,C,D,E,F,G) my_create(A,B,C,G)
#define my_raid_create(A,B,C,D,E,F,G) my_create(A,B,C,G)
...
@@ -1465,6 +1466,12 @@ static int writekeys(MI_CHECK *param, register MI_INFO *info, byte *buff,
...
@@ -1465,6 +1466,12 @@ static int writekeys(MI_CHECK *param, register MI_INFO *info, byte *buff,
if
(
_mi_ft_add
(
info
,
i
,(
char
*
)
key
,
buff
,
filepos
))
if
(
_mi_ft_add
(
info
,
i
,(
char
*
)
key
,
buff
,
filepos
))
goto
err
;
goto
err
;
}
}
else
if
(
info
->
s
->
keyinfo
[
i
].
flag
&
HA_SPATIAL
)
{
uint
key_length
=
_mi_make_key
(
info
,
i
,
key
,
buff
,
filepos
);
if
(
rtree_insert
(
info
,
i
,
key
,
key_length
))
goto
err
;
}
else
else
{
{
uint
key_length
=
_mi_make_key
(
info
,
i
,
key
,
buff
,
filepos
);
uint
key_length
=
_mi_make_key
(
info
,
i
,
key
,
buff
,
filepos
);
...
@@ -3987,7 +3994,8 @@ static my_bool mi_too_big_key_for_sort(MI_KEYDEF *key, ha_rows rows)
...
@@ -3987,7 +3994,8 @@ static my_bool mi_too_big_key_for_sort(MI_KEYDEF *key, ha_rows rows)
key
->
seg
->
charset
->
mbmaxlen
;
key
->
seg
->
charset
->
mbmaxlen
;
key_maxlength
+=
ft_max_word_len_for_sort
-
HA_FT_MAXBYTELEN
;
key_maxlength
+=
ft_max_word_len_for_sort
-
HA_FT_MAXBYTELEN
;
}
}
return
(
key
->
flag
&
(
HA_BINARY_PACK_KEY
|
HA_VAR_LENGTH_KEY
|
HA_FULLTEXT
)
&&
return
(
key
->
flag
&
HA_SPATIAL
)
||
(
key
->
flag
&
(
HA_BINARY_PACK_KEY
|
HA_VAR_LENGTH_KEY
|
HA_FULLTEXT
)
&&
((
ulonglong
)
rows
*
key_maxlength
>
((
ulonglong
)
rows
*
key_maxlength
>
(
ulonglong
)
myisam_max_temp_length
));
(
ulonglong
)
myisam_max_temp_length
));
}
}
...
...
mysql-test/r/gis-rtree.result
View file @
477093eb
...
@@ -757,3 +757,44 @@ SPATIAL KEY(g)
...
@@ -757,3 +757,44 @@ SPATIAL KEY(g)
) ENGINE=MyISAM;
) ENGINE=MyISAM;
INSERT INTO t1 (g) VALUES (GeomFromText('LineString(1 2, 2 3)')),(GeomFromText('LineString(1 2, 2 4)'));
INSERT INTO t1 (g) VALUES (GeomFromText('LineString(1 2, 2 3)')),(GeomFromText('LineString(1 2, 2 4)'));
drop table t1;
drop table t1;
CREATE TABLE t1 (
geoobjid INT NOT NULL,
line LINESTRING NOT NULL,
kind ENUM('po', 'pp', 'rr', 'dr', 'rd', 'ts', 'cl') NOT NULL DEFAULT 'po',
name VARCHAR(32),
SPATIAL KEY (line)
) engine=myisam;
ALTER TABLE t1 DISABLE KEYS;
INSERT INTO t1 (name, kind, line) VALUES
("Aadaouane", "pp", GeomFromText("POINT(32.816667 35.983333)")),
("Aadassiye", "pp", GeomFromText("POINT(35.816667 36.216667)")),
("Aadbel", "pp", GeomFromText("POINT(34.533333 36.100000)")),
("Aadchit", "pp", GeomFromText("POINT(33.347222 35.423611)")),
("Aadchite", "pp", GeomFromText("POINT(33.347222 35.423611)")),
("Aadchit el Qoussair", "pp", GeomFromText("POINT(33.283333 35.483333)")),
("Aaddaye", "pp", GeomFromText("POINT(36.716667 40.833333)")),
("'Aadeissa", "pp", GeomFromText("POINT(32.823889 35.698889)")),
("Aaderup", "pp", GeomFromText("POINT(55.216667 11.766667)")),
("Qalaat Aades", "pp", GeomFromText("POINT(33.503333 35.377500)")),
("A ad'ino", "pp", GeomFromText("POINT(54.812222 38.209167)")),
("Aadi Noia", "pp", GeomFromText("POINT(13.800000 39.833333)")),
("Aad La Macta", "pp", GeomFromText("POINT(35.779444 -0.129167)")),
("Aadland", "pp", GeomFromText("POINT(60.366667 5.483333)")),
("Aadliye", "pp", GeomFromText("POINT(33.366667 36.333333)")),
("Aadloun", "pp", GeomFromText("POINT(33.403889 35.273889)")),
("Aadma", "pp", GeomFromText("POINT(58.798333 22.663889)")),
("Aadma Asundus", "pp", GeomFromText("POINT(58.798333 22.663889)")),
("Aadmoun", "pp", GeomFromText("POINT(34.150000 35.650000)")),
("Aadneram", "pp", GeomFromText("POINT(59.016667 6.933333)")),
("Aadneskaar", "pp", GeomFromText("POINT(58.083333 6.983333)")),
("Aadorf", "pp", GeomFromText("POINT(47.483333 8.900000)")),
("Aadorp", "pp", GeomFromText("POINT(52.366667 6.633333)")),
("Aadouane", "pp", GeomFromText("POINT(32.816667 35.983333)")),
("Aadoui", "pp", GeomFromText("POINT(34.450000 35.983333)")),
("Aadouiye", "pp", GeomFromText("POINT(34.583333 36.183333)")),
("Aadouss", "pp", GeomFromText("POINT(33.512500 35.601389)")),
("Aadra", "pp", GeomFromText("POINT(33.616667 36.500000)")),
("Aadzi", "pp", GeomFromText("POINT(38.100000 64.850000)"));
ALTER TABLE t1 ENABLE KEYS;
INSERT INTO t1 (name, kind, line) VALUES ("austria", "pp", GeomFromText('LINESTRING(14.9906 48.9887,14.9946 48.9904,14.9947 48.9916)'));
drop table t1;
mysql-test/t/gis-rtree.test
View file @
477093eb
...
@@ -118,3 +118,50 @@ CREATE TABLE t1 (
...
@@ -118,3 +118,50 @@ CREATE TABLE t1 (
INSERT
INTO
t1
(
g
)
VALUES
(
GeomFromText
(
'LineString(1 2, 2 3)'
)),(
GeomFromText
(
'LineString(1 2, 2 4)'
));
INSERT
INTO
t1
(
g
)
VALUES
(
GeomFromText
(
'LineString(1 2, 2 3)'
)),(
GeomFromText
(
'LineString(1 2, 2 4)'
));
#select * from t1 where g<GeomFromText('LineString(1 2, 2 3)');
#select * from t1 where g<GeomFromText('LineString(1 2, 2 3)');
drop
table
t1
;
drop
table
t1
;
CREATE
TABLE
t1
(
geoobjid
INT
NOT
NULL
,
line
LINESTRING
NOT
NULL
,
kind
ENUM
(
'po'
,
'pp'
,
'rr'
,
'dr'
,
'rd'
,
'ts'
,
'cl'
)
NOT
NULL
DEFAULT
'po'
,
name
VARCHAR
(
32
),
SPATIAL
KEY
(
line
)
)
engine
=
myisam
;
ALTER
TABLE
t1
DISABLE
KEYS
;
INSERT
INTO
t1
(
name
,
kind
,
line
)
VALUES
(
"Aadaouane"
,
"pp"
,
GeomFromText
(
"POINT(32.816667 35.983333)"
)),
(
"Aadassiye"
,
"pp"
,
GeomFromText
(
"POINT(35.816667 36.216667)"
)),
(
"Aadbel"
,
"pp"
,
GeomFromText
(
"POINT(34.533333 36.100000)"
)),
(
"Aadchit"
,
"pp"
,
GeomFromText
(
"POINT(33.347222 35.423611)"
)),
(
"Aadchite"
,
"pp"
,
GeomFromText
(
"POINT(33.347222 35.423611)"
)),
(
"Aadchit el Qoussair"
,
"pp"
,
GeomFromText
(
"POINT(33.283333 35.483333)"
)),
(
"Aaddaye"
,
"pp"
,
GeomFromText
(
"POINT(36.716667 40.833333)"
)),
(
"'Aadeissa"
,
"pp"
,
GeomFromText
(
"POINT(32.823889 35.698889)"
)),
(
"Aaderup"
,
"pp"
,
GeomFromText
(
"POINT(55.216667 11.766667)"
)),
(
"Qalaat Aades"
,
"pp"
,
GeomFromText
(
"POINT(33.503333 35.377500)"
)),
(
"A ad'ino"
,
"pp"
,
GeomFromText
(
"POINT(54.812222 38.209167)"
)),
(
"Aadi Noia"
,
"pp"
,
GeomFromText
(
"POINT(13.800000 39.833333)"
)),
(
"Aad La Macta"
,
"pp"
,
GeomFromText
(
"POINT(35.779444 -0.129167)"
)),
(
"Aadland"
,
"pp"
,
GeomFromText
(
"POINT(60.366667 5.483333)"
)),
(
"Aadliye"
,
"pp"
,
GeomFromText
(
"POINT(33.366667 36.333333)"
)),
(
"Aadloun"
,
"pp"
,
GeomFromText
(
"POINT(33.403889 35.273889)"
)),
(
"Aadma"
,
"pp"
,
GeomFromText
(
"POINT(58.798333 22.663889)"
)),
(
"Aadma Asundus"
,
"pp"
,
GeomFromText
(
"POINT(58.798333 22.663889)"
)),
(
"Aadmoun"
,
"pp"
,
GeomFromText
(
"POINT(34.150000 35.650000)"
)),
(
"Aadneram"
,
"pp"
,
GeomFromText
(
"POINT(59.016667 6.933333)"
)),
(
"Aadneskaar"
,
"pp"
,
GeomFromText
(
"POINT(58.083333 6.983333)"
)),
(
"Aadorf"
,
"pp"
,
GeomFromText
(
"POINT(47.483333 8.900000)"
)),
(
"Aadorp"
,
"pp"
,
GeomFromText
(
"POINT(52.366667 6.633333)"
)),
(
"Aadouane"
,
"pp"
,
GeomFromText
(
"POINT(32.816667 35.983333)"
)),
(
"Aadoui"
,
"pp"
,
GeomFromText
(
"POINT(34.450000 35.983333)"
)),
(
"Aadouiye"
,
"pp"
,
GeomFromText
(
"POINT(34.583333 36.183333)"
)),
(
"Aadouss"
,
"pp"
,
GeomFromText
(
"POINT(33.512500 35.601389)"
)),
(
"Aadra"
,
"pp"
,
GeomFromText
(
"POINT(33.616667 36.500000)"
)),
(
"Aadzi"
,
"pp"
,
GeomFromText
(
"POINT(38.100000 64.850000)"
));
ALTER
TABLE
t1
ENABLE
KEYS
;
INSERT
INTO
t1
(
name
,
kind
,
line
)
VALUES
(
"austria"
,
"pp"
,
GeomFromText
(
'LINESTRING(14.9906 48.9887,14.9946 48.9904,14.9947 48.9916)'
));
drop
table
t1
;
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