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
568aa832
Commit
568aa832
authored
Dec 07, 2004
by
unknown
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
a700754e
6c68f27c
Changes
5
Hide 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 @
568aa832
...
...
@@ -26,6 +26,7 @@
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif
#include "rt_index.h"
#ifndef USE_RAID
#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,
if
(
_mi_ft_add
(
info
,
i
,(
char
*
)
key
,
buff
,
filepos
))
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
{
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)
key
->
seg
->
charset
->
mbmaxlen
;
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
)
myisam_max_temp_length
));
}
...
...
mysql-test/r/gis-rtree.result
View file @
568aa832
...
...
@@ -757,3 +757,44 @@ SPATIAL KEY(g)
) ENGINE=MyISAM;
INSERT INTO t1 (g) VALUES (GeomFromText('LineString(1 2, 2 3)')),(GeomFromText('LineString(1 2, 2 4)'));
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 @
568aa832
Variable_name Value
have_example
db
YES
have_example
_engine
YES
mysql-test/t/gis-rtree.test
View file @
568aa832
...
...
@@ -118,3 +118,50 @@ CREATE TABLE t1 (
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)');
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 @
568aa832
...
...
@@ -528,6 +528,7 @@ int ha_archive::create(const char *name, TABLE *table_arg,
int
ha_archive
::
write_row
(
byte
*
buf
)
{
z_off_t
written
;
Field_blob
**
field
;
DBUG_ENTER
(
"ha_archive::write_row"
);
statistic_increment
(
ha_write_count
,
&
LOCK_status
);
...
...
@@ -543,7 +544,7 @@ int ha_archive::write_row(byte * buf)
We should probably mark the table as damagaged if the record is written
but the blob fails.
*/
for
(
Field_blob
**
field
=
table
->
blob_field
;
*
field
;
field
++
)
for
(
field
=
table
->
blob_field
;
*
field
;
field
++
)
{
char
*
ptr
;
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