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
9910198a
Commit
9910198a
authored
Oct 15, 2005
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Additional fix for bug #12267 (Can't use POINT for primary key)
parent
7fb1ffd0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
1 deletion
+12
-1
mysql-test/r/gis.result
mysql-test/r/gis.result
+3
-0
mysql-test/t/gis.test
mysql-test/t/gis.test
+3
-0
sql/sql_table.cc
sql/sql_table.cc
+3
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+3
-1
No files found.
mysql-test/r/gis.result
View file @
9910198a
...
@@ -682,6 +682,9 @@ POINT(1 1)
...
@@ -682,6 +682,9 @@ POINT(1 1)
drop function fn3;
drop function fn3;
create table t1(pt POINT);
create table t1(pt POINT);
alter table t1 add primary key pti(pt);
alter table t1 add primary key pti(pt);
drop table t1;
create table t1(pt GEOMETRY);
alter table t1 add primary key pti(pt);
ERROR 42000: BLOB/TEXT column 'pt' used in key specification without a key length
ERROR 42000: BLOB/TEXT column 'pt' used in key specification without a key length
alter table t1 add primary key pti(pt(20));
alter table t1 add primary key pti(pt(20));
drop table t1;
drop table t1;
mysql-test/t/gis.test
View file @
9910198a
...
@@ -399,6 +399,9 @@ drop function fn3;
...
@@ -399,6 +399,9 @@ drop function fn3;
# Bug #12267 (primary key over GIS)
# Bug #12267 (primary key over GIS)
#
#
create
table
t1
(
pt
POINT
);
create
table
t1
(
pt
POINT
);
alter
table
t1
add
primary
key
pti
(
pt
);
drop
table
t1
;
create
table
t1
(
pt
GEOMETRY
);
--
error
1170
--
error
1170
alter
table
t1
add
primary
key
pti
(
pt
);
alter
table
t1
add
primary
key
pti
(
pt
);
alter
table
t1
add
primary
key
pti
(
pt
(
20
));
alter
table
t1
add
primary
key
pti
(
pt
(
20
));
...
...
sql/sql_table.cc
View file @
9910198a
...
@@ -1156,6 +1156,9 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
...
@@ -1156,6 +1156,9 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
my_error
(
ER_BLOB_USED_AS_KEY
,
MYF
(
0
),
column
->
field_name
);
my_error
(
ER_BLOB_USED_AS_KEY
,
MYF
(
0
),
column
->
field_name
);
DBUG_RETURN
(
-
1
);
DBUG_RETURN
(
-
1
);
}
}
if
(
f_is_geom
(
sql_field
->
pack_flag
)
&&
sql_field
->
geom_type
==
Field
::
GEOM_POINT
)
column
->
length
=
21
;
if
(
!
column
->
length
)
if
(
!
column
->
length
)
{
{
my_error
(
ER_BLOB_KEY_WITHOUT_LENGTH
,
MYF
(
0
),
column
->
field_name
);
my_error
(
ER_BLOB_KEY_WITHOUT_LENGTH
,
MYF
(
0
),
column
->
field_name
);
...
...
sql/sql_yacc.yy
View file @
9910198a
...
@@ -2969,7 +2969,9 @@ type:
...
@@ -2969,7 +2969,9 @@ type:
spatial_type:
spatial_type:
GEOMETRY_SYM { $$= Field::GEOM_GEOMETRY; }
GEOMETRY_SYM { $$= Field::GEOM_GEOMETRY; }
| GEOMETRYCOLLECTION { $$= Field::GEOM_GEOMETRYCOLLECTION; }
| GEOMETRYCOLLECTION { $$= Field::GEOM_GEOMETRYCOLLECTION; }
| POINT_SYM { $$= Field::GEOM_POINT; }
| POINT_SYM { Lex->length= (char*)"21";
$$= Field::GEOM_POINT;
}
| MULTIPOINT { $$= Field::GEOM_MULTIPOINT; }
| MULTIPOINT { $$= Field::GEOM_MULTIPOINT; }
| LINESTRING { $$= Field::GEOM_LINESTRING; }
| LINESTRING { $$= Field::GEOM_LINESTRING; }
| MULTILINESTRING { $$= Field::GEOM_MULTILINESTRING; }
| MULTILINESTRING { $$= Field::GEOM_MULTILINESTRING; }
...
...
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