Skip to content

Commit 8c0ac28

Browse files
committed
Fix connectAttrAdd UT
Fix localInfile UT on OSX
1 parent acba551 commit 8c0ac28

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

test/unit/classes/connection.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2457,9 +2457,6 @@ void connection::connectAttrAdd()
24572457
{
24582458
logMsg("connection::connectAttr - MYSQL_OPT_CONNECT_ATTR_ADD|MYSQL_OPT_CONNECT_ATTR_DELETE");
24592459

2460-
//TODO: Enable it after fixing
2461-
SKIP("Removed untill fixed");
2462-
24632460
int serverVersion=getMySQLVersion(con);
24642461
if ( serverVersion < 56006)
24652462
{
@@ -2645,7 +2642,7 @@ void connection::connectAttrAdd()
26452642

26462643
for (i=1; i <= max_count; ++i) {
26472644
skey.str("");
2648-
skey << "keymu" << i;
2645+
skey << "keymu" << std::setw(3) << std::setfill('0') << i;
26492646
connectAttrMap[skey.str()] = "value";
26502647
}
26512648

@@ -2659,12 +2656,12 @@ void connection::connectAttrAdd()
26592656
stmt.reset(conn2->createStatement());
26602657
res.reset(stmt->executeQuery("SELECT ATTR_NAME, ATTR_VALUE FROM "
26612658
"performance_schema.session_account_connect_attrs WHERE "
2662-
"ATTR_NAME LIKE '%keymu%' ORDER BY SUBSTRING(ATTR_NAME, 6)+0 ASC;"));
2659+
"ATTR_NAME LIKE '%keymu%' ORDER BY SUBSTRING(ATTR_NAME, 6) ASC;"));
26632660

26642661
i=0;
26652662
while (res->next()) {
26662663
skey.str("");
2667-
skey << "keymu" << ++i;
2664+
skey << "keymu" << std::setw(3) << std::setfill('0') << ++i;
26682665
ASSERT_EQUALS(res->getString("ATTR_NAME"), skey.str());
26692666
ASSERT_EQUALS(res->getString("ATTR_VALUE"), "value");
26702667
}
@@ -3078,7 +3075,7 @@ void connection::localInfile()
30783075

30793076
sql::SQLString orig_dir_path = load_data_path;
30803077
sql::SQLString dir_path = conn->getClientOption(OPT_LOAD_DATA_LOCAL_DIR);
3081-
ASSERT_EQUALS(orig_dir_path, dir_path);
3078+
ASSERT( dir_path->find(orig_dir_path) != sql::SQLString::npos);
30823079

30833080
conn->setClientOption(OPT_LOAD_DATA_LOCAL_DIR, nullptr);
30843081

0 commit comments

Comments
 (0)