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
e64a3df4
Commit
e64a3df4
authored
Mar 17, 2020
by
Alexey Botchkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-21959 GIS error message doesn't show the wrong value, just the type.
Error message now shows the whole value.
parent
89698cef
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
8 deletions
+16
-8
mysql-test/r/gis.result
mysql-test/r/gis.result
+1
-1
mysql-test/suite/innodb/r/innodb-online-alter-gis.result
mysql-test/suite/innodb/r/innodb-online-alter-gis.result
+1
-1
mysql-test/suite/innodb_gis/r/1.result
mysql-test/suite/innodb_gis/r/1.result
+2
-2
mysql-test/suite/innodb_gis/r/gis.result
mysql-test/suite/innodb_gis/r/gis.result
+2
-2
sql/field.cc
sql/field.cc
+10
-2
No files found.
mysql-test/r/gis.result
View file @
e64a3df4
...
...
@@ -1689,7 +1689,7 @@ NULL
#
create table t1 (pt point);
insert into t1 values(Geomfromtext('POLYGON((1 1, 2 2, 2 1, 1 1))'));
ERROR 22007: Incorrect POINT value: 'POLYGON' for column `test`.`t1`.`pt` at row 1
ERROR 22007: Incorrect POINT value: 'POLYGON
((1 1,2 2,2 1,1 1))
' for column `test`.`t1`.`pt` at row 1
drop table t1;
SELECT st_astext(ST_Buffer(ST_PolygonFromText('POLYGON((3 5, 2 4, 2 5, 3 5))'), -100));
st_astext(ST_Buffer(ST_PolygonFromText('POLYGON((3 5, 2 4, 2 5, 3 5))'), -100))
...
...
mysql-test/suite/innodb/r/innodb-online-alter-gis.result
View file @
e64a3df4
...
...
@@ -42,7 +42,7 @@ drop table t1;
#
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
ALTER TABLE t1 ADD COLUMN b LINESTRING DEFAULT POINT(1,1);
ERROR 22007: Incorrect LINESTRING value: 'POINT' for column ``.``.`b` at row 1
ERROR 22007: Incorrect LINESTRING value: 'POINT
(1 1)
' for column ``.``.`b` at row 1
DESCRIBE t1;
Field Type Null Key Default Extra
a int(11) YES NULL
...
...
mysql-test/suite/innodb_gis/r/1.result
View file @
e64a3df4
...
...
@@ -1038,9 +1038,9 @@ SET @a=0x00000000030000000000000000000000000000000000144000000000000014400000000
SET @a=ST_POLYFROMWKB(@a);
create table t1(a polygon NOT NULL)engine=InnoDB;
insert into t1 values (ST_geomfromtext("point(0 1)"));
ERROR 22007: Incorrect POLYGON value: 'POINT' for column `test`.`t1`.`a` at row 1
ERROR 22007: Incorrect POLYGON value: 'POINT
(0 1)
' for column `test`.`t1`.`a` at row 1
insert into t1 values (ST_geomfromtext("point(1 0)"));
ERROR 22007: Incorrect POLYGON value: 'POINT' for column `test`.`t1`.`a` at row 1
ERROR 22007: Incorrect POLYGON value: 'POINT
(1 0)
' for column `test`.`t1`.`a` at row 1
select * from (select polygon(t1.a) as p from t1 order by t1.a) d;
p
drop table t1;
...
...
mysql-test/suite/innodb_gis/r/gis.result
View file @
e64a3df4
...
...
@@ -1034,9 +1034,9 @@ SET @a=0x00000000030000000000000000000000000000000000144000000000000014400000000
SET @a=ST_POLYFROMWKB(@a);
create table t1(a polygon NOT NULL)engine=innodb;
insert into t1 values (ST_geomfromtext("point(0 1)"));
ERROR 22007: Incorrect POLYGON value: 'POINT' for column `test`.`t1`.`a` at row 1
ERROR 22007: Incorrect POLYGON value: 'POINT
(0 1)
' for column `test`.`t1`.`a` at row 1
insert into t1 values (ST_geomfromtext("point(1 0)"));
ERROR 22007: Incorrect POLYGON value: 'POINT' for column `test`.`t1`.`a` at row 1
ERROR 22007: Incorrect POLYGON value: 'POINT
(1 0)
' for column `test`.`t1`.`a` at row 1
select * from (select polygon(t1.a) as p from t1 order by t1.a) d;
p
drop table t1;
...
...
sql/field.cc
View file @
e64a3df4
...
...
@@ -8841,18 +8841,26 @@ int Field_geom::store(const char *from, uint length, CHARSET_INFO *cs)
{
const
char
*
db
=
table
->
s
->
db
.
str
;
const
char
*
tab_name
=
table
->
s
->
table_name
.
str
;
Geometry_buffer
buffer
;
Geometry
*
geom
=
NULL
;
String
wkt
;
const
char
*
dummy
;
if
(
!
db
)
db
=
""
;
if
(
!
tab_name
)
tab_name
=
""
;
wkt
.
set_charset
(
&
my_charset_latin1
);
if
(
!
(
geom
=
Geometry
::
construct
(
&
buffer
,
from
,
length
))
||
geom
->
as_wkt
(
&
wkt
,
&
dummy
))
goto
err
;
my_error
(
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
,
MYF
(
0
),
Geometry
::
ci_collection
[
geom_type
]
->
m_name
.
str
,
Geometry
::
ci_collection
[
wkb_type
]
->
m_name
.
str
,
db
,
tab_name
,
field_name
,
wkt
.
c_ptr
(),
db
,
tab_name
,
field_name
,
(
ulong
)
table
->
in_use
->
get_stmt_da
()
->
current_row_for_warning
());
goto
err_exit
;
}
...
...
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