mirror of
https://github.com/MariaDB/server.git
synced 2026-04-29 03:35:34 +02:00
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
Removed unused variable in create_dest_frm() method
This commit is contained in:
parent
952f8bda78
commit
0b8696591a
3 changed files with 6 additions and 3 deletions
|
|
@ -91,12 +91,14 @@ CREATE TABLE t1(a INT);
|
|||
INSERT INTO t1 VALUES(20);
|
||||
CREATE TABLE t2(a INT);
|
||||
INSERT INTO t2 VALUES(40);
|
||||
FLUSH TABLE t1,t2;
|
||||
#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.
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ let $i=9;
|
|||
--disable_query_log
|
||||
while ($i)
|
||||
{
|
||||
INSERT INTO t1 SELECT ROUND(a * RAND() * 10) from t1;
|
||||
INSERT INTO t1 SELECT a from t1;
|
||||
dec $i;
|
||||
}
|
||||
--enable_query_log
|
||||
|
|
@ -136,11 +136,12 @@ let $i=9;
|
|||
--disable_query_log
|
||||
while ($i)
|
||||
{
|
||||
INSERT INTO t2 SELECT ROUND(a * RAND() * 10) from t2;
|
||||
INSERT INTO t2 SELECT a from t2;
|
||||
dec $i;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
FLUSH TABLE t1,t2;
|
||||
--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)
|
||||
|
|
@ -153,6 +154,7 @@ SELECT COUNT(a) FROM t3;
|
|||
# It should finish the join operation successfully
|
||||
#############################################################################
|
||||
--echo # ===== myisampack.2 =====
|
||||
FLUSH TABLE t3;
|
||||
--remove_file $MYSQLD_DATADIR/test/t3.MYI
|
||||
--remove_file $MYSQLD_DATADIR/test/t3.MYD
|
||||
--exec $MYISAMPACK --join=$MYSQLD_DATADIR/test/t3 $MYSQLD_DATADIR/test/t1 $MYSQLD_DATADIR/test/t2 2>&1
|
||||
|
|
|
|||
|
|
@ -781,7 +781,6 @@ static int compress(PACK_MRG_INFO *mrg,char *result_table)
|
|||
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");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue