summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorNarayanan V <v.narayanan@sun.com>2009-04-30 18:16:49 +0530
committerNarayanan V <v.narayanan@sun.com>2009-04-30 18:16:49 +0530
commitdb83fda90d704c14770ecaa4f6dd9be9501e834b (patch)
tree6a25256782b5cdcc9013222598cd798ff4f2db42 /storage
parent755d312e8456da751f432fd0e9c211dc4aeba131 (diff)
downloadmariadb-git-db83fda90d704c14770ecaa4f6dd9be9501e834b.tar.gz
BUG#37631 - Incorrect key file for table after upgrading from 5.0 to 5.1
This patch adds corrections to the original patch submitted 2009-04-08 (http://lists.mysql.com/commits/71607): - fixed that the original patch didn't work because of an incorrect condition; - added a test case. mysql-test/r/upgrade.result: Bug#37631 Incorrect key file for table after upgrading from 5.0 to 5.1 Result file for test case mysql-test/std_data/bug37631.MYD: Bug#37631 Incorrect key file for table after upgrading from 5.0 to 5.1 table created in mysql 4.0 mysql-test/std_data/bug37631.MYI: Bug#37631 Incorrect key file for table after upgrading from 5.0 to 5.1 table created in mysql 4.0 mysql-test/std_data/bug37631.frm: Bug#37631 Incorrect key file for table after upgrading from 5.0 to 5.1 table created in mysql 4.0 mysql-test/t/upgrade.test: Bug#37631 Incorrect key file for table after upgrading from 5.0 to 5.1 Adds test for checking that upgrade works on a table which is created by a mysql server version <= 4.0. storage/myisam/ha_myisam.cc: Bug#37631 Incorrect key file for table after upgrading from 5.0 to 5.1 Fix the conformance checker to relax checking for the correct version of the tables (for tables created by mysql server version <= 4.0)
Diffstat (limited to 'storage')
-rw-r--r--storage/myisam/ha_myisam.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index dd66c255475..a939a263a0f 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -392,7 +392,7 @@ int check_definition(MI_KEYDEF *t1_keyinfo, MI_COLUMNDEF *t1_recinfo,
test(t2_keyinfo[i].flag & HA_SPATIAL)));
DBUG_RETURN(1);
}
- if ((mysql_40_compat &&
+ if ((!mysql_40_compat &&
t1_keyinfo[i].key_alg != t2_keyinfo[i].key_alg) ||
t1_keyinfo[i].keysegs != t2_keyinfo[i].keysegs)
{
@@ -424,7 +424,7 @@ int check_definition(MI_KEYDEF *t1_keyinfo, MI_COLUMNDEF *t1_recinfo,
t1_keysegs_j__type= HA_KEYTYPE_VARBINARY1; /* purecov: inspected */
}
- if ((mysql_40_compat &&
+ if ((!mysql_40_compat &&
t1_keysegs[j].language != t2_keysegs[j].language) ||
t1_keysegs_j__type != t2_keysegs[j].type ||
t1_keysegs[j].null_bit != t2_keysegs[j].null_bit ||