Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

bk commit into 4.1 tree (holyfoot:1.2684) BUG#30955

From: <holyfoot(at)mysql.com>
Date: Wed Oct 03 2007 - 04:35:37 EDT


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@1.2684, 2007-10-03 13:35:35+05:00, holyfoot@mysql.com +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@1.26, 2007-10-03 13:35:33+05:00, holyfoot@mysql.com +6 -0     Bug #30955 geomfromtext() crasher.     

    test result

  mysql-test/t/gis.test@1.24, 2007-10-03 13:35:33+05:00, holyfoot@mysql.com +8 -0     Bug #30955 geomfromtext() crasher.     

    test case

Do you need help?X

  sql/gstream.cc@1.8, 2007-10-03 13:30:31+05:00, holyfoot@mysql.com +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;  

   /*

-- 
MySQL Code Commits Mailing List
For list archives: 
http://lists.mysql.com/commits
To unsubscribe:    
http://lists.mysql.com/commits?unsub=lists@pantek.com
Received on Wed Oct 3 05:42:08 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 09:51:19 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library