Skip to content

Commit 4a4b3a6

Browse files
authored
CPP-755 UDT schema metadata not properly populated/updated (#439)
*A typo in `ControlConnection` prevents UDT schema metadata from being properly updated. * Fix schema meta race in UDT example
1 parent fd9b73d commit 4a4b3a6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/udt/udt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,6 @@ int main(int argc, char* argv[]) {
248248
return -1;
249249
}
250250

251-
schema_meta = cass_session_get_schema_meta(session);
252-
253251
execute_query(session,
254252
"CREATE KEYSPACE examples WITH replication = { \
255253
'class': 'SimpleStrategy', 'replication_factor': '3' }");
@@ -263,6 +261,8 @@ int main(int argc, char* argv[]) {
263261
execute_query(session,
264262
"CREATE TABLE examples.udt (id timeuuid, address frozen<address>, PRIMARY KEY(id))");
265263

264+
schema_meta = cass_session_get_schema_meta(session);
265+
266266
insert_into_udt(session);
267267
select_from_udt(session);
268268

src/control_connector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ void ControlConnector::handle_query_schema(SchemaConnectorRequestCallback* callb
327327
schema_.views = callback->result("views");
328328
schema_.columns = callback->result("columns");
329329
schema_.indexes = callback->result("indexes");
330-
schema_.user_types = callback->result("types");
330+
schema_.user_types = callback->result("user_types");
331331
schema_.functions = callback->result("functions");
332332
schema_.aggregates = callback->result("aggregates");
333333
schema_.virtual_keyspaces = callback->result("virtual_keyspaces");

0 commit comments

Comments
 (0)