| 1 |
# This is the test for bug 47777. GEOMETRY |
| 2 |
# data is treated as BLOB data in innodb. |
| 3 |
# Consequently, its key value generation/storing |
| 4 |
# should follow the process for the BLOB |
| 5 |
# datatype as well. |
| 6 |
|
| 7 |
|
| 8 |
create table bug47777(c2 linestring not null) engine=innodb; |
| 9 |
|
| 10 |
insert into bug47777 values (ST_geomfromtext('linestring(1 2,3 4,5 6,7 8,9 10)')); |
| 11 |
|
| 12 |
# Verify correct row get inserted. |
| 13 |
select count(*) from bug47777 where c2 =ST_geomfromtext('linestring(1 2,3 4,5 6,7 8,9 10)'); |
| 14 |
|
| 15 |
# Update table bug47777 should be successful. |
| 16 |
--error ER_CANT_CREATE_GEOMETRY_OBJECT |
| 17 |
update bug47777 set c2=ST_GeomFromText('POINT(1 1)'); |
| 18 |
|
| 19 |
# Verify the row get updated successfully. The original |
| 20 |
# c2 value should be changed to ST_GeomFromText('POINT(1 1)'). |
| 21 |
select count(*) from bug47777 where c2 =ST_geomfromtext('linestring(1 2,3 4,5 6,7 8,9 10)'); |
| 22 |
select count(*) from bug47777 where c2 = ST_GeomFromText('POINT(1 1)'); |
| 23 |
|
| 24 |
drop table bug47777; |