MySQL 8.0.39
Source Code Documentation
multi_factor_passwordopt-vars.h File Reference
#include "mysql.h"

Go to the source code of this file.

Macros

#define PARSE_COMMAND_LINE_PASSWORD_OPTION
 

Functions

void parse_command_line_password_option (const struct my_option *opt, char *argument)
 parse passwords for –password or –password<N> option where N = 1,2,3 More...
 
void set_password_options (MYSQL *mysql)
 Set password in mysql->options. More...
 
void free_passwords ()
 Release memory for opt_password. More...
 

Variables

char * opt_password [MAX_AUTH_FACTORS]
 
bool tty_password [MAX_AUTH_FACTORS]
 

Macro Definition Documentation

◆ PARSE_COMMAND_LINE_PASSWORD_OPTION

#define PARSE_COMMAND_LINE_PASSWORD_OPTION
Value:
case 'p': \
parse_command_line_password_option(opt, argument); \
break; \
parse_command_line_password_option(opt, argument); \
break;
@ MYSQL_OPT_USER_PASSWORD
Definition: mysql.h:215

Function Documentation

◆ free_passwords()

void free_passwords ( )

Release memory for opt_password.

◆ parse_command_line_password_option()

void parse_command_line_password_option ( const struct my_option opt,
char *  argument 
)

parse passwords for –password or –password<N> option where N = 1,2,3

parse passwords for –password or –password<N> option where N = 1,2,3

This method checks if password value is specified or not. If not then a flag is set to let client accept password from terminal.

Parameters
optpassword option
argumentvalue specified for –password<1,2,3> or –password

◆ set_password_options()

void set_password_options ( MYSQL mysql)

Set password in mysql->options.

Set password in mysql->options.

If tty_password is true get password from terminal and update in opt_password and set tty_password to false

If opt_password is populated call mysql_options4()

Variable Documentation

◆ opt_password

char* opt_password[MAX_AUTH_FACTORS]
extern

◆ tty_password

bool tty_password[MAX_AUTH_FACTORS]
extern