Skip to content

Commit e6c9903

Browse files
committed
WL#13277 REPLACE T18 WITH T1 IN AUTOTEST TESTCASES
Modifies testScan to use table T1 instead of T18 and removes T18 from the set of tables in NDBT_Tables.cpp. testScan requires a table with just a single column primary key to check for corrupted tuples. So, it doesn't need a special table with two column primary key, T18. And, T18 isn't being used by any of the testcases other than testScan. A test was done by going back to the commit which introduced the testcase to make sure that it can use an existing table T1 instead of creating it's own table. So, testScan is modified to use T1 and the definition of T18 is removed from NDBT_Tables.cpp. Change-Id: I78474415d0ec00466b0f25cecfe2cbbd3e3a55c0
1 parent 79d7b1d commit e6c9903

File tree

5 files changed

+13
-29
lines changed

5 files changed

+13
-29
lines changed

storage/ndb/test/ndbapi/testScan.cpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1961,8 +1961,6 @@ namespace TupErr
19611961
struct Row
19621962
{
19631963
int pk1;
1964-
int pk2;
1965-
int a1;
19661964
};
19671965

19681966
static int
@@ -1983,7 +1981,7 @@ namespace TupErr
19831981

19841982
for (int i = 0; i<totalRowCount; i++)
19851983
{
1986-
const Row row = {i, 0, i};
1984+
const Row row = {i};
19871985

19881986
const NdbOperation* const operation=
19891987
trans->insertTuple(record, reinterpret_cast<const char*>(&row));
@@ -2093,19 +2091,19 @@ namespace TupErr
20932091
NdbInterpretedCode code(tab);
20942092

20952093
/**
2096-
* Build an interpreter code sequence that causes rows with pk1==50 to
2097-
* abort the scan, and that skips all other rows.
2094+
* Build an interpreter code sequence that causes rows with kol1==50 to
2095+
* abort the scan, and that skips all other rows(kol1 is a primary key).
20982096
*/
2099-
const NdbDictionary::Column* const col = tab->getColumn("PK1");
2097+
const NdbDictionary::Column* const col = tab->getColumn("KOL1");
21002098
require(col != NULL);
21012099
require(code.read_attr(1, col) == 0);
21022100
require(code.load_const_u32(2, 50) == 0);
21032101
require(code.branch_eq(1, 2, 0) == 0);
21042102

2105-
// Exit here if pk1!=50. Skip this row.
2103+
// Exit here if kol1!=50. Skip this row.
21062104
require(code.interpret_exit_nok(626) == 0);
21072105

2108-
// Go here if pk1==50. Abort scan.
2106+
// Go here if kol1==50. Abort scan.
21092107
require(code.def_label(0) == 0);
21102108
require(code.interpret_exit_nok(6000) == 0);
21112109
require(code.finalise() == 0);
@@ -2858,13 +2856,13 @@ TESTCASE("Bug13394788", "")
28582856
FINALIZER(runClearTable);
28592857
}
28602858
TESTCASE("TupCheckSumError", ""){
2861-
// TABLE("T18");
2859+
// TABLE("T1");
28622860
INITIALIZER(TupErr::populateTable);
28632861
STEP(TupErr::doCheckSumQuery);
28642862
FINALIZER(runClearTable);
28652863
}
28662864
TESTCASE("InterpretNok6000", ""){
2867-
// TABLE("T18");
2865+
// TABLE("T1");
28682866
INITIALIZER(TupErr::populateTable);
28692867
STEP(TupErr::doInterpretNok6000Query);
28702868
FINALIZER(runClearTable);

storage/ndb/test/run-test/daily-basic--01-tests.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
1616
# GENERATED FILE
1717
#
1818
cmd: testScan
19-
args: -n TupCheckSumError T18
19+
args: -n TupCheckSumError T1
2020
max-time: 180
2121

2222
cmd: test_event

storage/ndb/test/run-test/daily-basic--04-tests.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# GENERATED FILE
1717
#
1818
cmd: testScan
19-
args: -n InterpretNok6000 T18
19+
args: -n InterpretNok6000 T1
2020
max-time: 180
2121

2222
cmd: testNdbApi

storage/ndb/test/run-test/daily-basic-tests.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2016,11 +2016,11 @@ args: -n SlowDihFileWrites T1
20162016

20172017
max-time : 300
20182018
cmd: testScan
2019-
args: -n TupCheckSumError T18
2019+
args: -n TupCheckSumError T1
20202020

20212021
max-time : 300
20222022
cmd: testScan
2023-
args: -n InterpretNok6000 T18
2023+
args: -n InterpretNok6000 T1
20242024

20252025
# Bug18408671 added on 17.04.2014
20262026
#max-time : 300

storage/ndb/test/src/NDBT_Tables.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -605,19 +605,6 @@ static
605605
const
606606
NDBT_Table T16("T16", sizeof(T16Attribs)/sizeof(NDBT_Attribute), T16Attribs);
607607

608-
/* Table with tuple as primary key used in testScan */
609-
static
610-
const
611-
NDBT_Attribute T18Attribs[] = {
612-
NDBT_Attribute("PK1", NdbDictionary::Column::Unsigned, 1, true),
613-
NDBT_Attribute("PK2", NdbDictionary::Column::Unsigned, 1, true),
614-
NDBT_Attribute("A1", NdbDictionary::Column::Unsigned, 1),
615-
};
616-
617-
static
618-
const
619-
NDBT_Table T18("T18", sizeof(T18Attribs)/sizeof(NDBT_Attribute), T18Attribs);
620-
621608
/*
622609
C2 DHCP TABLES, MAYBE THESE SHOULD BE MOVED TO THE UTIL_TABLES?
623610
*/
@@ -782,7 +769,6 @@ NDBT_Table *test_tables[]=
782769
&T14,
783770
&T15,
784771
&T16,
785-
&T18,
786772
&I1,
787773
&I2,
788774
&I3,

0 commit comments

Comments
 (0)