@@ -56,9 +56,11 @@ TEST_F(StatementCacheTests, DisableTableTest) {
56
56
std::vector<std::shared_ptr<Statement>> statements;
57
57
std::set<oid_t > ref_table = {0 , 1 , 2 , 3 };
58
58
std::string query = " SELECT * FROM TEST" ;
59
+
60
+ LOG_INFO (" Pareparing statements" );
59
61
// Prepare the 4 statements
60
62
for (size_t i = 0 ; i < 4 ; i++) {
61
- std::string name ( " " + i);
63
+ std::string name = std::to_string ( i);
62
64
ref_table.erase (i);
63
65
auto stmt = std::make_shared<Statement>(name, query);
64
66
stmt->SetReferencedTables (ref_table);
@@ -67,7 +69,8 @@ TEST_F(StatementCacheTests, DisableTableTest) {
67
69
}
68
70
69
71
oid_t table = 0 ;
70
- // Insert statements in to the table
72
+ LOG_INFO (" Putting statements into cache" );
73
+ // Insert statements in to the cache
71
74
for (auto &stmt : statements) {
72
75
EXPECT_EQ (3 , stmt->GetReferencedTables ().size ());
73
76
EXPECT_EQ (0 , stmt->GetReferencedTables ().count (table));
@@ -81,12 +84,13 @@ TEST_F(StatementCacheTests, DisableTableTest) {
81
84
cache->AddStatement (stmt);
82
85
}
83
86
87
+ LOG_INFO (" Notify cache the disabled table oid 2" );
84
88
// Disable the cache
85
89
cache->NotifyInvalidTable (2 );
86
90
87
91
// plan 0 1 3 need to replan while 2 do not
88
92
for (oid_t i = 0 ; i < 4 ; i++) {
89
- std::string name = " " + i ;
93
+ std::string name = std::to_string (i) ;
90
94
auto stmt = cache->GetStatement (name);
91
95
EXPECT_NE (nullptr , stmt);
92
96
if (i != 2 ) {
0 commit comments