From 2b491daa1cd91fbb03f0a425cb57ec85c5a72bf2 Mon Sep 17 00:00:00 2001 From: Narayanan V Date: Thu, 30 Apr 2009 18:16:49 +0530 Subject: [PATCH] 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 | 12 ++++++++++++ mysql-test/std_data/bug37631.MYD | 0 mysql-test/std_data/bug37631.MYI | Bin 0 -> 1024 bytes mysql-test/std_data/bug37631.frm | Bin 0 -> 8590 bytes mysql-test/t/upgrade.test | 14 ++++++++++++++ storage/myisam/ha_myisam.cc | 4 ++-- 6 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 mysql-test/std_data/bug37631.MYD create mode 100644 mysql-test/std_data/bug37631.MYI create mode 100644 mysql-test/std_data/bug37631.frm diff --git a/mysql-test/r/upgrade.result b/mysql-test/r/upgrade.result index 711e69094f7..da6201692a9 100644 --- a/mysql-test/r/upgrade.result +++ b/mysql-test/r/upgrade.result @@ -57,6 +57,18 @@ s1 1 drop table `txu@0023p@0023p1`; drop table `txu#p#p1`; +# +# Bug#37631 Incorrect key file for table after upgrading from 5.0 to 5.1 +# +# copy table created using mysql4.0 into the data dir +# check the table created using mysql 4.0 +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check error Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it! +# query the table created using mysql 4.0 +SELECT * FROM t1; +c1 c2 c3 +DROP TABLE t1; truncate t1; drop table t1; drop database if exists `tabc`; diff --git a/mysql-test/std_data/bug37631.MYD b/mysql-test/std_data/bug37631.MYD new file mode 100644 index 00000000000..e69de29bb2d diff --git a/mysql-test/std_data/bug37631.MYI b/mysql-test/std_data/bug37631.MYI new file mode 100644 index 0000000000000000000000000000000000000000..8bf14b46add28b82cb45f9017f45ed63ed9b8fa6 GIT binary patch literal 1024 zcmezOkDZZ$iLsAi149bK83tws21W)BMg|c04<@k?|DgaP#ezizE+Ov2$TBc!h&BtA?DHX7n;2BO`g1~dd2ivamx%`D6iqktR(uth8gLxBOr4;0sAU}w-` t4XbHm5frOAwZ81008!jB|88B literal 0 HcmV?d00001 diff --git a/mysql-test/std_data/bug37631.frm b/mysql-test/std_data/bug37631.frm new file mode 100644 index 0000000000000000000000000000000000000000..2742a387c383c603c5af688a8b932855c09aedb2 GIT binary patch literal 8590 zcmeI$Jqm+B5C!13JI4GqDMD&N6q3fj6C_=VfY_z>BAy`E%q_B+m|!P@5KwqiEbHoy z!&knSS*``x86X9oh|!fzvFaZBHc0{meJ^=V0SZun0u-PC1t>rP3Q&Lo6rjK)1dK%3 zz(x?$*v~{EY!gAx45ZOC;InaMb-kUdyPL$wV}@|SaErP3Q&Lo6rcbF zC_sT(2s{jSvl#SGLu$%_3r^ZS#