Skip to content

Commit cd6be55

Browse files
author
лаврин
committed
Changed error expected at login failure caused by expired password from 1862 to 1820 in the driver and in the related testcase.
1 parent 5df59f7 commit cd6be55

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

driver/mysql_connection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
7171
#include "mysql_debug.h"
7272

7373
#ifndef ER_MUST_CHANGE_PASSWORD_LOGIN
74-
# define ER_MUST_CHANGE_PASSWORD_LOGIN 1862
74+
# define ER_MUST_CHANGE_PASSWORD_LOGIN 1820
7575
#endif
7676

7777
namespace sql

test/unit/bugs/bugs.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ void bugs::expired_pwd()
293293
}
294294
catch (sql::SQLException &e)
295295
{
296-
ASSERT_EQUALS(1862, e.getErrorCode()/*ER_MUST_CHANGE_PASSWORD_LOGIN*/);
296+
ASSERT_EQUALS(1820, e.getErrorCode()/*ER_MUST_CHANGE_PASSWORD_LOGIN*/);
297297
}
298298

299299
/* ... Now with it */
@@ -327,6 +327,8 @@ void bugs::expired_pwd()
327327
}
328328

329329
// Trying to connect with new pwd
330+
opts.erase("preInit");
331+
opts.erase("OPT_CAN_HANDLE_EXPIRED_PASSWORDS");
330332
opts["password"]= sql::SQLString("bar");
331333
opts["CLIENT_MULTI_STATEMENTS"]= true;
332334
opts["postInit"]= sql::SQLString("create table test.ccpp_expired_pwd(i int);"

0 commit comments

Comments
 (0)