@@ -2457,9 +2457,6 @@ void connection::connectAttrAdd()
2457
2457
{
2458
2458
logMsg (" connection::connectAttr - MYSQL_OPT_CONNECT_ATTR_ADD|MYSQL_OPT_CONNECT_ATTR_DELETE" );
2459
2459
2460
- // TODO: Enable it after fixing
2461
- SKIP (" Removed untill fixed" );
2462
-
2463
2460
int serverVersion=getMySQLVersion (con);
2464
2461
if ( serverVersion < 56006 )
2465
2462
{
@@ -2628,11 +2625,11 @@ void connection::connectAttrAdd()
2628
2625
if (perf_conn_attr_size < 512 ) {
2629
2626
SKIP (" The performance_schema_session_connect_attrs_size is less then 512" );
2630
2627
} else if (perf_conn_attr_size >= 512 && perf_conn_attr_size < 1024 ) {
2631
- max_count= 32 ;
2628
+ max_count= 20 ;
2632
2629
} else if (perf_conn_attr_size >= 1024 && perf_conn_attr_size < 2048 ) {
2633
- max_count= 64 ;
2630
+ max_count= 50 ;
2634
2631
} else if (perf_conn_attr_size >= 2048 ) {
2635
- max_count= 128 ;
2632
+ max_count= 100 ;
2636
2633
}
2637
2634
2638
2635
try
@@ -2645,7 +2642,7 @@ void connection::connectAttrAdd()
2645
2642
2646
2643
for (i=1 ; i <= max_count; ++i) {
2647
2644
skey.str (" " );
2648
- skey << " keymu" << i;
2645
+ skey << " keymu" << std::setw ( 3 ) << std::setfill ( ' 0 ' ) << i;
2649
2646
connectAttrMap[skey.str ()] = " value" ;
2650
2647
}
2651
2648
@@ -2659,12 +2656,12 @@ void connection::connectAttrAdd()
2659
2656
stmt.reset (conn2->createStatement ());
2660
2657
res.reset (stmt->executeQuery (" SELECT ATTR_NAME, ATTR_VALUE FROM "
2661
2658
" 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;" ));
2663
2660
2664
2661
i=0 ;
2665
2662
while (res->next ()) {
2666
2663
skey.str (" " );
2667
- skey << " keymu" << ++i;
2664
+ skey << " keymu" << std::setw ( 3 ) << std::setfill ( ' 0 ' ) << ++i;
2668
2665
ASSERT_EQUALS (res->getString (" ATTR_NAME" ), skey.str ());
2669
2666
ASSERT_EQUALS (res->getString (" ATTR_VALUE" ), " value" );
2670
2667
}
@@ -3078,7 +3075,7 @@ void connection::localInfile()
3078
3075
3079
3076
sql::SQLString orig_dir_path = load_data_path;
3080
3077
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 );
3082
3079
3083
3080
conn->setClientOption (OPT_LOAD_DATA_LOCAL_DIR, nullptr );
3084
3081
@@ -3239,19 +3236,25 @@ void connection::localInfile()
3239
3236
temp_dir = " /tmp/" ;
3240
3237
#endif
3241
3238
3242
- dir = temp_dir + " test/" ;
3239
+ #ifndef _WIN32
3240
+ std::string pid = std::to_string (getpid ());
3241
+ #else
3242
+ std::string pid = std::to_string (GetCurrentProcessId ());
3243
+ #endif
3244
+
3245
+ dir = temp_dir + std::string (" test" )+pid+" /" ;
3243
3246
file_path = dir + " infile.txt" ;
3244
3247
3245
3248
dataDir dir_test (dir);
3246
- dataDir dir_link (temp_dir + " test_link/" );
3247
- dataDir dir_subdir_link (temp_dir + " test_subdir_link/" );
3249
+ dataDir dir_link (temp_dir + " test_link" + pid + " /" );
3250
+ dataDir dir_subdir_link (temp_dir + " test_subdir_link" + pid + " /" );
3248
3251
3249
3252
dataFile infile (dir, " infile.txt" );
3250
3253
3251
3254
#ifndef _WIN32
3252
- dataFile infile_wo (" /tmp/test/ " , " infile_wo.txt" , true );
3253
- dataSymlink sl (file_path, temp_dir + " test_link/link_infile.txt" );
3254
- dataSymlink sld (dir, temp_dir + " test_subdir_link/subdir" );
3255
+ dataFile infile_wo (dir , " infile_wo.txt" , true );
3256
+ dataSymlink sl (file_path, temp_dir + " test_link" + pid + " /link_infile.txt" );
3257
+ dataSymlink sld (dir, temp_dir + " test_subdir_link" + pid + " /subdir" );
3255
3258
std::string sld_file = sld.path ();
3256
3259
sld_file.append (" /infile.txt" );
3257
3260
#endif
0 commit comments