Below is the list of changes that have just been committed into a local
4.1 repository of hf. When hf does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-10-03 13:35:35+05:00, holyfoot@stripped +3 -0
Bug #30955 geomfromtext() crasher.
end-of-line check missed in Gis_read_stream::get_next_word,
what can lead to crashes (expecially with NULL strings).
End-of-line check added
mysql-test/r/gis.result@stripped, 2007-10-03 13:35:33+05:00, holyfoot@stripped +6 -0
Bug #30955 geomfromtext() crasher.
test result
mysql-test/t/gis.test@stripped, 2007-10-03 13:35:33+05:00, holyfoot@stripped +8 -0
Bug #30955 geomfromtext() crasher.
test case
sql/gstream.cc@stripped, 2007-10-03 13:30:31+05:00, holyfoot@stripped +1 -1
Bug #30955 geomfromtext() crasher
diff -Nrup a/mysql-test/r/gis.result b/mysql-test/r/gis.result
--- a/mysql-test/r/gis.result 2007-03-26 15:17:39 +05:00
+++ b/mysql-test/r/gis.result 2007-10-03 13:35:33 +05:00
@@ -724,4 +724,10 @@ SELECT * FROM t1;
a
NULL
DROP TABLE t1;
+CREATE TABLE `t1` ( `col9` set('a'), `col89` date);
+INSERT INTO `t1` VALUES ('','0000-00-00');
+select geomfromtext(col9,col89) as a from t1;
+a
+NULL
+DROP TABLE t1;
End of 4.1 tests
diff -Nrup a/mysql-test/t/gis.test b/mysql-test/t/gis.test
--- a/mysql-test/t/gis.test 2007-03-26 15:17:39 +05:00
+++ b/mysql-test/t/gis.test 2007-10-03 13:35:33 +05:00
@@ -419,4 +419,12 @@ INSERT INTO t1 VALUES (NULL);
SELECT * FROM t1;
DROP TABLE t1;
+#
+# Bug #30955 geomfromtext() crasher
+#
+CREATE TABLE `t1` ( `col9` set('a'), `col89` date);
+INSERT INTO `t1` VALUES ('','0000-00-00');
+select geomfromtext(col9,col89) as a from t1;
+DROP TABLE t1;
+
--echo End of 4.1 tests
diff -Nrup a/sql/gstream.cc b/sql/gstream.cc
--- a/sql/gstream.cc 2004-03-15 16:32:26 +04:00
+++ b/sql/gstream.cc 2007-10-03 13:30:31 +05:00
@@ -45,7 +45,7 @@ bool Gis_read_stream::get_next_word(LEX_
skip_space();
res->str= (char*) m_cur;
/* The following will also test for \0 */
- if (!my_isvar_start(&my_charset_bin, *m_cur))
+ if ((m_cur >= m_limit) || !my_isvar_start(&my_charset_bin, *m_cur))
return 1;
/*
| Thread |
|---|
| • bk commit into 4.1 tree (holyfoot:1.2684) BUG#30955 | holyfoot | 3 Oct |