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
4458722f
Commit
4458722f
authored
Dec 07, 2004
by
mskold@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-4.1
parents
885a9d6e
477093eb
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
100 additions
and
3 deletions
+100
-3
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/r/have_exampledb.require
mysql-test/r/have_exampledb.require
+1
-1
mysql-test/t/gis-rtree.test
mysql-test/t/gis-rtree.test
+47
-0
sql/examples/ha_archive.cc
sql/examples/ha_archive.cc
+2
-1
No files found.
myisam/mi_check.c
View file @
4458722f
...
@@ -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 @
4458722f
...
@@ -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/r/have_exampledb.require
View file @
4458722f
Variable_name Value
Variable_name Value
have_example
db
YES
have_example
_engine
YES
mysql-test/t/gis-rtree.test
View file @
4458722f
...
@@ -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
;
sql/examples/ha_archive.cc
View file @
4458722f
...
@@ -528,6 +528,7 @@ error:
...
@@ -528,6 +528,7 @@ error:
int
ha_archive
::
write_row
(
byte
*
buf
)
int
ha_archive
::
write_row
(
byte
*
buf
)
{
{
z_off_t
written
;
z_off_t
written
;
Field_blob
**
field
;
DBUG_ENTER
(
"ha_archive::write_row"
);
DBUG_ENTER
(
"ha_archive::write_row"
);
statistic_increment
(
ha_write_count
,
&
LOCK_status
);
statistic_increment
(
ha_write_count
,
&
LOCK_status
);
...
@@ -543,7 +544,7 @@ int ha_archive::write_row(byte * buf)
...
@@ -543,7 +544,7 @@ int ha_archive::write_row(byte * buf)
We should probably mark the table as damagaged if the record is written
We should probably mark the table as damagaged if the record is written
but the blob fails.
but the blob fails.
*/
*/
for
(
Field_blob
**
field
=
table
->
blob_field
;
*
field
;
field
++
)
for
(
field
=
table
->
blob_field
;
*
field
;
field
++
)
{
{
char
*
ptr
;
char
*
ptr
;
uint32
size
=
(
*
field
)
->
get_length
();
uint32
size
=
(
*
field
)
->
get_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