2012-02-07 16:22:36 +01:00
|
|
|
--source include/have_innodb.inc
|
2009-11-05 17:23:50 +04:00
|
|
|
# This is the test for bug 47777. GEOMETRY
|
|
|
|
# data is treated as BLOB data in innodb.
|
|
|
|
# Consequently, its key value generation/storing
|
|
|
|
# should follow the process for the BLOB
|
|
|
|
# datatype as well.
|
|
|
|
|
|
|
|
|
|
|
|
create table bug47777(c2 linestring not null, primary key (c2(1))) engine=innodb;
|
|
|
|
|
|
|
|
insert into bug47777 values (geomfromtext('linestring(1 2,3 4,5 6,7 8,9 10)'));
|
|
|
|
|
|
|
|
# Verify correct row get inserted.
|
|
|
|
select count(*) from bug47777 where c2 =geomfromtext('linestring(1 2,3 4,5 6,7 8,9 10)');
|
|
|
|
|
|
|
|
# Update table bug47777 should be successful.
|
2013-02-28 18:42:49 +01:00
|
|
|
update bug47777 set c2=GeomFromText('linestring(1 1)');
|
2009-11-05 17:23:50 +04:00
|
|
|
|
|
|
|
# Verify the row get updated successfully. The original
|
2013-02-28 18:42:49 +01:00
|
|
|
# c2 value should be changed to GeomFromText('linestring(1 1)').
|
2009-11-05 17:23:50 +04:00
|
|
|
select count(*) from bug47777 where c2 =geomfromtext('linestring(1 2,3 4,5 6,7 8,9 10)');
|
2013-02-28 18:42:49 +01:00
|
|
|
select count(*) from bug47777 where c2 = GeomFromText('linestring(1 1)');
|
2009-11-05 17:23:50 +04:00
|
|
|
|
|
|
|
drop table bug47777;
|