Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -274,9 +274,6 @@ void bugs::expired_pwd()
274
274
{
275
275
logMsg (" bugs::expired_pwd" );
276
276
277
- // TODO: Enable it after fixing
278
- SKIP (" Removed untill fixed" );
279
-
280
277
if (getMySQLVersion (con) < 56006 )
281
278
{
282
279
SKIP (" The server does not support tested functionality(expired password)" );
@@ -294,7 +291,7 @@ void bugs::expired_pwd()
294
291
}
295
292
296
293
stmt->executeUpdate (" CREATE USER ccpp_expired_pwd IDENTIFIED BY 'foo'" );
297
- stmt->executeUpdate (" GRANT ALL ON test to ccpp_expired_pwd" );
294
+ stmt->executeUpdate (" GRANT ALL ON test.* to ccpp_expired_pwd" );
298
295
stmt->executeUpdate (" ALTER USER ccpp_expired_pwd PASSWORD EXPIRE" );
299
296
300
297
sql::ConnectOptionsMap opts;
@@ -345,7 +342,12 @@ void bugs::expired_pwd()
345
342
}
346
343
347
344
// Now setting new password and getting fully functional connection
348
- opts[" preInit" ]= sql::SQLString (" set password= password('bar')" );
345
+ if (getMySQLVersion (con) < 57006 )
346
+ opts[" preInit" ]= sql::SQLString (" set password= password('bar')" );
347
+ else
348
+ opts[" preInit" ]= sql::SQLString (" ALTER USER 'ccpp_expired_pwd' IDENTIFIED BY 'bar';" );
349
+
350
+
349
351
350
352
// Connect should go thru fine
351
353
try
0 commit comments