@@ -935,6 +935,7 @@ MySQL_change_user(MySQL *self, PyObject *args, PyObject *kwds)
935
935
mysql_options (& self -> session , MYSQL_ENABLE_CLEARTEXT_PLUGIN , (char * )& abool );
936
936
}
937
937
938
+ #if MYSQL_VERSION_ID >= 80027
938
939
// Multi Factor Authentication: 1-factor password
939
940
if (password1 && strlen (password1 ) > 0 )
940
941
{
@@ -952,6 +953,7 @@ MySQL_change_user(MySQL *self, PyObject *args, PyObject *kwds)
952
953
{
953
954
mysql_options4 (& self -> session , MYSQL_OPT_USER_PASSWORD , & mfa_factor3 , password3 );
954
955
}
956
+ #endif
955
957
956
958
Py_BEGIN_ALLOW_THREADS
957
959
res = mysql_change_user (& self -> session , user , password , database );
@@ -1395,6 +1397,7 @@ MySQL_connect(MySQL *self, PyObject *args, PyObject *kwds)
1395
1397
}
1396
1398
}
1397
1399
1400
+ #if MYSQL_VERSION_ID >= 80027
1398
1401
// Multi Factor Authentication: 1-factor password
1399
1402
if (password1 && strlen (password1 ) > 0 )
1400
1403
{
@@ -1412,6 +1415,7 @@ MySQL_connect(MySQL *self, PyObject *args, PyObject *kwds)
1412
1415
{
1413
1416
mysql_options4 (& self -> session , MYSQL_OPT_USER_PASSWORD , & mfa_factor3 , password3 );
1414
1417
}
1418
+ #endif
1415
1419
1416
1420
Py_BEGIN_ALLOW_THREADS
1417
1421
res = mysql_real_connect (& self -> session , host , user , password , database ,
0 commit comments