Skip to content

Commit 934fbbc

Browse files
Mikael Ronströmsreedhars
authored andcommitted
BUG#22884995: Problem with multiple LIST_TABLES_CONF signals, table put in list multiple times, fix of WL#8937
(cherry picked from commit 847b2e0a81a06fb685bb423524cea5ebbcded018)
1 parent 3b4fe9e commit 934fbbc

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed

storage/ndb/src/kernel/blocks/backup/Backup.cpp

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4406,27 +4406,12 @@ Backup::execLIST_TABLES_CONF(Signal* signal)
44064406
}//if
44074407
tabPtr.p->tableType = tableType;
44084408
tabPtr.p->tableId = tableId;
4409-
}//for
4410-
}
4411-
{
4412-
TablePtr tabPtr;
4413-
jam();
4414-
for (ptr.p->tables.first(tabPtr);
4415-
tabPtr.i !=RNIL;
4416-
ptr.p->tables.next(tabPtr))
4417-
{
4418-
/**
4419-
* Insert into table map after completing loop to avoid
4420-
* complex error handling.
4421-
*/
4422-
jamLine(tabPtr.p->tableId);
44234409
#ifdef VM_TRACE
44244410
TablePtr locTabPtr;
44254411
ndbassert(findTable(ptr, locTabPtr, tabPtr.p->tableId) == false);
44264412
#endif
44274413
insertTableMap(tabPtr, ptr.i, tabPtr.p->tableId);
4428-
}
4429-
jam();
4414+
}//for
44304415
}
44314416

44324417
releaseSections(handle);

storage/ndb/test/ndbapi/testDict.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <random.h>
2929
#include <NdbAutoPtr.hpp>
3030
#include <NdbMixRestarter.hpp>
31+
#include <NdbBackup.hpp>
3132
#include <NdbSqlUtil.hpp>
3233
#include <NdbEnv.h>
3334
#include <ndb_rand.h>
@@ -1056,6 +1057,19 @@ runDropTakeoverTest(NDBT_Context* ctx, NDBT_Step* step)
10561057
return NDBT_OK;
10571058
}
10581059

1060+
int
1061+
runBackup(NDBT_Context* ctx, NDBT_Step* step)
1062+
{
1063+
NdbBackup backup;
1064+
Uint32 backupId = 0;
1065+
backup.clearOldBackups();
1066+
if (backup.start(backupId) == -1)
1067+
{
1068+
return NDBT_FAILED;
1069+
}
1070+
return NDBT_OK;
1071+
}
1072+
10591073
int
10601074
runCreateMaxTables(NDBT_Context* ctx, NDBT_Step* step)
10611075
{
@@ -11457,6 +11471,13 @@ TESTCASE("CreateMaxTables",
1145711471
INITIALIZER(runCreateMaxTables);
1145811472
INITIALIZER(runDropMaxTables);
1145911473
}
11474+
TESTCASE("BackupMaxTables",
11475+
"Create max amount of tables and verify backup works\n"){
11476+
TC_PROPERTY("tables", 200);
11477+
INITIALIZER(runCreateMaxTables);
11478+
INITIALIZER(runBackup);
11479+
INITIALIZER(runDropMaxTables);
11480+
}
1146011481
TESTCASE("PkSizes",
1146111482
"Create tables with all different primary key sizes.\n"\
1146211483
"Test all data operations insert, update, delete etc.\n"\

0 commit comments

Comments
 (0)