#At file:///home/satya/WORK/mysql-6.0-bugteam-36573-push/
3020 Satya B 2009-02-05
Addition to BUG#36573 - myisampack --join does not create destination table .frm
file
Added FLUSH TABLES before myisampack --join operation to fix the test warnings or
errors
modified:
mysql-test/r/myisampack.result
mysql-test/t/myisampack.test
storage/myisam/myisampack.c
per-file messages:
mysql-test/r/myisampack.result
result file for the modified testcase
mysql-test/t/myisampack.test
Added FLUSH TABLES before mysiampack --join operation
storage/myisam/myisampack.c
Removed variable error in create_dest_frm() to avoid unused variable warning
=== modified file 'mysql-test/r/myisampack.result'
--- a/mysql-test/r/myisampack.result 2009-02-03 09:51:32 +0000
+++ b/mysql-test/r/myisampack.result 2009-02-05 13:03:09 +0000
@@ -60,12 +60,14 @@ CREATE TABLE t1(a INT);
INSERT INTO t1 VALUES(20);
CREATE TABLE t2(a INT);
INSERT INTO t2 VALUES(40);
+FLUSH TABLE t3;
#If the myisampack --join operation is successful, we have table t3(.frm)
#so we should be able to query about the table from server.
SELECT COUNT(a) FROM t3;
COUNT(a)
1024
# ===== myisampack.2 =====
+FLUSH TABLE t3;
#Tests the myisampack join operation with an existing destination .frm file,
#the command should return correct exit status(0) and
#we should be able to query the table.
@@ -82,6 +84,7 @@ ERROR 42S02: Table 'test.t3' doesn't exi
# ===== myisampack.4 =====
#Tests the myisampack join operation with an existing destination .frm,.MYI,.MDI
#the command should fail with exit status 2
+FLUSH TABLE t3;
myisampack: Can't create/write to file (Errcode: 17)
Aborted: file is not compressed
DROP TABLE t1,t2,t3;
=== modified file 'mysql-test/t/myisampack.test'
--- a/mysql-test/t/myisampack.test 2009-02-03 09:51:32 +0000
+++ b/mysql-test/t/myisampack.test 2009-02-05 13:03:09 +0000
@@ -98,6 +98,7 @@ while ($i)
}
--enable_query_log
+FLUSH TABLE t3;
--exec $MYISAMPACK --join=$MYSQLD_DATADIR/test/t3 $MYSQLD_DATADIR/test/t1
$MYSQLD_DATADIR/test/t2 2>&1
--echo #If the myisampack --join operation is successful, we have table t3(.frm)
@@ -112,6 +113,7 @@ SELECT COUNT(a) FROM t3;
--echo # ===== myisampack.2 =====
--remove_file $MYSQLD_DATADIR/test/t3.MYI
--remove_file $MYSQLD_DATADIR/test/t3.MYD
+FLUSH TABLE t3;
--exec $MYISAMPACK --join=$MYSQLD_DATADIR/test/t3 $MYSQLD_DATADIR/test/t1
$MYSQLD_DATADIR/test/t2 2>&1
--echo #Tests the myisampack join operation with an existing destination .frm file,
--echo #the command should return correct exit status(0) and
@@ -167,6 +169,7 @@ SELECT COUNT(a) FROM t3;
# Replace everything after starting with "Aborted: " until ending with "is" with
# "Aborted: file is/
#
+FLUSH TABLE t3;
--replace_regex /.*myisampack(\.exe)?: Can't create\/write to file .*\(/myisampack: Can't
create\/write to file (/ /Aborted: .*is/Aborted: file is/
--error 2
--exec $MYISAMPACK --join=$MYSQLD_DATADIR/test/t3 $MYSQLD_DATADIR/test/t1
$MYSQLD_DATADIR/test/t2 2>&1
=== modified file 'storage/myisam/myisampack.c'
--- a/storage/myisam/myisampack.c 2009-02-03 09:51:32 +0000
+++ b/storage/myisam/myisampack.c 2009-02-05 13:03:09 +0000
@@ -786,7 +786,6 @@ static int compress(PACK_MRG_INFO *mrg,c
static int create_dest_frm(char *source_table, char *dest_table)
{
char source_name[FN_REFLEN], dest_name[FN_REFLEN];
- int error;
DBUG_ENTER("create_dest_frm");
| Thread |
|---|
| • bzr commit into mysql-6.0-bugteam branch (satya.bn:3020) Bug#36573 | Satya B | 5 Feb 2009 |