diff --git a/test/ClientTest.cpp b/test/ClientTest.cpp index 38dd022cc..74afec695 100644 --- a/test/ClientTest.cpp +++ b/test/ClientTest.cpp @@ -123,6 +123,19 @@ printResponse(Response &response, Data data = std::vector()) " code=" << err.errcode << std::endl; return; } + if (response.body.metadata != std::nullopt) { + std::cout << "RESPONSE SQL METADATA:" << std::endl; + for (const auto &column : response.body.metadata->column_maps) { + std::cout << "column=" << column.field_name << + " type=" << column.field_type << + " collation=" << column.collation << + " is_nullable=" << column.is_nullable << + " is_autoincrement" << column.is_autoincrement; + if (column.span.has_value()) + std::cout << " span=" << column.span.value(); + std::cout << std::endl; + } + } if (response.body.data != std::nullopt) { if (!response.body.data->decode(data)) { std::cerr << "FAILED TO DECODE DATA" << std::endl; @@ -750,8 +763,8 @@ single_conn_sql(Connector &client) fail_unless(rc == 0); TEST_CASE("CREATE TABLE"); - std::string stmt_str = "CREATE TABLE IF NOT EXISTS tsql (column1 UNSIGNED PRIMARY KEY, " - "column2 VARCHAR(50), column3 DOUBLE);"; + std::string stmt_str = "CREATE TABLE IF NOT EXISTS tsql (COLUMN1 UNSIGNED PRIMARY KEY, " + "COLUMN2 VARCHAR(50), COLUMN3 DOUBLE);"; auto stmt = StmtProcessor::process(client, conn, stmt_str); rid_t create_table = conn.execute(stmt, std::make_tuple()); @@ -848,8 +861,8 @@ single_conn_sql(Connector &client) TEST_CASE("CREATE TABLE with autoincrement and collation"); stmt_str = "CREATE TABLE IF NOT EXISTS tsql " - "(column1 UNSIGNED PRIMARY KEY AUTOINCREMENT, " - "column2 STRING COLLATE \"unicode\", column3 DOUBLE);"; + "(COLUMN1 UNSIGNED PRIMARY KEY AUTOINCREMENT, " + "COLUMN2 STRING COLLATE \"unicode\", COLUMN3 DOUBLE);"; stmt = StmtProcessor::process(client, conn, stmt_str); create_table = conn.execute(stmt, std::make_tuple()); client.wait(conn, create_table, WAIT_TIMEOUT);