From 50808b211527a165386b771c6f13d3ca7ba29f1a Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 Apr 2008 18:37:01 +0200 Subject: Fix for BUG#35570 "CHECKSUM TABLE unreliable if LINESTRING field (same content / differen checksum)" This will be back-ported to 5.x trees but the work for R-tree logging critically needs this patch in Maria now. mysql-test/r/myisam.result: checksums are identical; without the code fix they were all different mysql-test/t/myisam.test: test that same tables give same checksums sql/sql_table.cc: Type GEOMETRY is implemented on top of type BLOB, so, just like for BLOB, its 'field' contains pointers which it does not make sense to include in the checksum; it rather has to be converted to a string and then we can compute the checksum. --- mysql-test/t/myisam.test | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'mysql-test/t/myisam.test') diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 29df6a6e9c8..4cbc633e608 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -1285,5 +1285,19 @@ create table t1 (n int not null, c char(1)) transactional=1; show create table t1; drop table t1; ---echo End of 5.1 tests +# +# Test of BUG#35570 CHECKSUM TABLE unreliable if LINESTRING field +# (same content / differen checksum) +# +CREATE TABLE t1 (line LINESTRING NOT NULL) engine=myisam; +INSERT INTO t1 VALUES (GeomFromText("POINT(0 0)")); +checksum table t1; +CREATE TABLE t2 (line LINESTRING NOT NULL) engine=myisam; +INSERT INTO t2 VALUES (GeomFromText("POINT(0 0)")); +checksum table t2; +CREATE TABLE t3 select * from t1; +checksum table t3; +drop table t1,t2,t3; + +--echo End of 5.1 tests -- cgit v1.2.1