List:Commits« Previous MessageNext Message »
From:Ramil Kalimullin Date:August 26 2008 1:57pm
Subject:bzr push into mysql-5.0 branch (ramil:2674 to 2676) Bug#37277
View as plain text  
 2676 Ramil Kalimullin	2008-08-26
      Fix for bug#37277: Potential crash when a spatial index isn't the first key
      
      Typo fixed.
      No test case as we actually don't use rtree_get_first() 
      and rtree_get_next() at present.
modified:
  myisam/rt_index.c

 2675 Ramil Kalimullin	2008-08-26
      Fix for bug #37310: 'on update CURRENT_TIMESTAMP' option crashes the table
      
      Problem: data consistency check (maximum record length) for a correct
      MyISAM table with CHECKSUM=1 and ROW_FORMAT=DYNAMIC option 
      may fail due to wrong inner MyISAM parameter. In result we may 
      have the table marked as 'corrupted'. 
      
      Fix: properly set MyISAM maximum record length parameter.
modified:
  myisam/mi_create.c
  mysql-test/r/myisam.result
  mysql-test/t/myisam.test

 2674 Alexey Botchkov	2008-08-26
      merging fixes
modified:
  mysql-test/r/symlink.result
  mysql-test/t/symlink.test

=== modified file 'myisam/mi_create.c'
--- a/myisam/mi_create.c	2007-07-11 09:37:47 +0000
+++ b/myisam/mi_create.c	2008-08-26 13:48:50 +0000
@@ -192,7 +192,7 @@ int mi_create(const char *name,uint keys
   packed=(packed+7)/8;
   if (pack_reclength != INT_MAX32)
     pack_reclength+= reclength+packed +
-      test(test_all_bits(options, HA_OPTION_CHECKSUM | HA_PACK_RECORD));
+      test(test_all_bits(options, HA_OPTION_CHECKSUM | HA_OPTION_PACK_RECORD));
   min_pack_length+=packed;
 
   if (!ci->data_file_length && ci->max_rows)

=== modified file 'myisam/rt_index.c'
--- a/myisam/rt_index.c	2007-10-05 10:41:56 +0000
+++ b/myisam/rt_index.c	2008-08-26 13:51:06 +0000
@@ -389,7 +389,7 @@ int rtree_get_first(MI_INFO *info, uint 
   info->rtree_recursion_depth = -1;
   info->buff_used = 1;
   
-  return rtree_get_req(info, &keyinfo[keynr], key_length, root, 0);
+  return rtree_get_req(info, keyinfo, key_length, root, 0);
 }
 
 
@@ -436,7 +436,7 @@ int rtree_get_next(MI_INFO *info, uint k
       return -1;
     }
   
-    return rtree_get_req(info, &keyinfo[keynr], key_length, root, 0);
+    return rtree_get_req(info, keyinfo, key_length, root, 0);
   }
 }
 

=== modified file 'mysql-test/r/myisam.result'
--- a/mysql-test/r/myisam.result	2008-05-06 16:43:46 +0000
+++ b/mysql-test/r/myisam.result	2008-08-26 13:48:50 +0000
@@ -1861,4 +1861,26 @@ id	ref
 3	2
 4	5
 DROP TABLE t1, t2;
+CREATE TABLE t1 (a INT) ENGINE=MyISAM CHECKSUM=1 ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES (0);
+UPDATE t1 SET a=1;
+SELECT a FROM t1;
+a
+1
+CHECK TABLE t1;
+Table	Op	Msg_type	Msg_text
+test.t1	check	status	OK
+INSERT INTO t1 VALUES (0), (5), (4), (2);
+UPDATE t1 SET a=2;
+SELECT a FROM t1;
+a
+2
+2
+2
+2
+2
+CHECK TABLE t1;
+Table	Op	Msg_type	Msg_text
+test.t1	check	status	OK
+DROP TABLE t1;
 End of 5.0 tests

=== modified file 'mysql-test/t/myisam.test'
--- a/mysql-test/t/myisam.test	2008-01-16 11:15:57 +0000
+++ b/mysql-test/t/myisam.test	2008-08-26 13:48:50 +0000
@@ -1210,4 +1210,19 @@ SELECT * FROM t1;
 
 DROP TABLE t1, t2;
 
+
+#
+# Bug#37310: 'on update CURRENT_TIMESTAMP' option crashes the table
+#
+CREATE TABLE t1 (a INT) ENGINE=MyISAM CHECKSUM=1 ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES (0);
+UPDATE t1 SET a=1;
+SELECT a FROM t1;
+CHECK TABLE t1;
+INSERT INTO t1 VALUES (0), (5), (4), (2);
+UPDATE t1 SET a=2;
+SELECT a FROM t1;
+CHECK TABLE t1;
+DROP TABLE t1; 
+
 --echo End of 5.0 tests

Thread
bzr push into mysql-5.0 branch (ramil:2674 to 2676) Bug#37277Ramil Kalimullin26 Aug