List:Commits« Previous MessageNext Message »
From:ingo Date:February 1 2006 3:46pm
Subject:bk commit into 5.0 tree (ingo:1.2010) BUG#8841
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of mydev. When mydev 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.2010 06/02/01 16:46:44 ingo@stripped +3 -0
  Bug#8841 - CHECKSUM TABLE is broken in MyISAM
  There are (at least) two implementations of the checksum
  computation. One is in MyISAM for the quick checksum. It
  is executed on every row change. The other is in the
  SQL layer for the extended checksum. It retrieves all rows
  of a table via the respective storage engine.
  
  In former MySQL versions varchars were stored with their 
  maximum length, but now with their real length similar to
  blobs.
  
  This change had been forgotten to take care of in the
  extended checksum calculation. Hence too much data was
  checksumed. In MyISAM this change had been taken care of 
  already. Only the real data is included in the checksum.
  
  I changed mysql_checksum_table() so that it uses the
  length information of true varchar fields instead
  of the field length like in former varchar 
  implementations.

  sql/sql_table.cc
    1.295 06/02/01 16:46:39 ingo@stripped +2 -1
    Bug#8841 - CHECKSUM TABLE is broken in MyISAM
    Changed mysql_checksum_table() so that it uses the
    length information of true varchar fields instead
    of the field length like in former varchar 
    implementations.

  mysql-test/r/myisam.result
    1.72 06/02/01 16:46:39 ingo@stripped +3 -3
    Bug#8841 - CHECKSUM TABLE is broken in MyISAM
    Fixed test results.

  mysql-test/r/innodb.result
    1.154 06/02/01 16:46:38 ingo@stripped +5 -5
    Bug#8841 - CHECKSUM TABLE is broken in MyISAM
    Fixed test results.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	ingo
# Host:	chilla.local
# Root:	/home/mydev/mysql-5.0-bug8841

--- 1.294/sql/sql_table.cc	2006-01-17 09:44:13 +01:00
+++ 1.295/sql/sql_table.cc	2006-02-01 16:46:39 +01:00
@@ -4218,7 +4218,8 @@
 	    for (uint i= 0; i < t->s->fields; i++ )
 	    {
 	      Field *f= t->field[i];
-	      if (f->type() == FIELD_TYPE_BLOB)
+	      if ((f->type() == FIELD_TYPE_BLOB) ||
+                  (f->type() == MYSQL_TYPE_VARCHAR))
 	      {
 		String tmp;
 		f->val_str(&tmp);

--- 1.153/mysql-test/r/innodb.result	2006-01-18 13:20:47 +01:00
+++ 1.154/mysql-test/r/innodb.result	2006-02-01 16:46:38 +01:00
@@ -1457,16 +1457,16 @@
 checksum table t1, t2, t3, t4;
 Table	Checksum
 test.t1	2948697075
-test.t2	3835700799
-test.t3	3835700799
+test.t2	2948697075
+test.t3	2948697075
 test.t4	NULL
 Warnings:
 Error	1146	Table 'test.t4' doesn't exist
 checksum table t1, t2, t3, t4 extended;
 Table	Checksum
-test.t1	3092701434
-test.t2	3835700799
-test.t3	3835700799
+test.t1	2948697075
+test.t2	2948697075
+test.t3	2948697075
 test.t4	NULL
 Warnings:
 Error	1146	Table 'test.t4' doesn't exist

--- 1.71/mysql-test/r/myisam.result	2005-11-16 10:13:05 +01:00
+++ 1.72/mysql-test/r/myisam.result	2006-02-01 16:46:39 +01:00
@@ -531,14 +531,14 @@
 checksum table t1, t2, t3;
 Table	Checksum
 test.t1	2948697075
-test.t2	3092701434
+test.t2	2948697075
 test.t3	NULL
 Warnings:
 Error	1146	Table 'test.t3' doesn't exist
 checksum table t1, t2, t3 extended;
 Table	Checksum
-test.t1	3092701434
-test.t2	3092701434
+test.t1	2948697075
+test.t2	2948697075
 test.t3	NULL
 Warnings:
 Error	1146	Table 'test.t3' doesn't exist
Thread
bk commit into 5.0 tree (ingo:1.2010) BUG#8841ingo1 Feb