Merge branch '2.3' into 2.4

This commit is contained in:
Markus Mäkelä
2019-07-02 08:38:15 +03:00
16 changed files with 75 additions and 29 deletions

View File

@ -140,14 +140,15 @@ typedef enum
*/
typedef struct mysql_session
{
uint8_t client_sha1[MYSQL_SCRAMBLE_LEN]; /*< SHA1(password) */
char user[MYSQL_USER_MAXLEN + 1]; /*< username */
char db[MYSQL_DATABASE_MAXLEN + 1]; /*< database */
int auth_token_len; /*< token length */
uint8_t* auth_token; /*< token */
bool correct_authenticator; /*< is session using mysql_native_password? */
uint8_t next_sequence; /*< Next packet sequence */
bool auth_switch_sent; /*< Expecting a response to AuthSwitchRequest? */
uint8_t client_sha1[MYSQL_SCRAMBLE_LEN]; /*< SHA1(password) */
char user[MYSQL_USER_MAXLEN + 1]; /*< username */
char db[MYSQL_DATABASE_MAXLEN + 1]; /*< database */
int auth_token_len; /*< token length */
uint8_t* auth_token; /*< token */
bool correct_authenticator; /*< is session using mysql_native_password? */
uint8_t next_sequence; /*< Next packet sequence */
bool auth_switch_sent; /*< Expecting a response to AuthSwitchRequest? */
bool changing_user; /*< True if a COM_CHANGE_USER is in progress */
} MYSQL_session;
/** Protocol packing macros. */

View File

@ -233,6 +233,16 @@ public:
return m_reply_state == REPLY_STATE_DONE;
}
/**
* Check if a partial response has been received from the backend
*
* @return True if some parts of the reply have been received
*/
bool reply_has_started() const
{
return m_reply_state != REPLY_STATE_START && m_reply_state != REPLY_STATE_DONE;
}
void process_packets(GWBUF* buffer);
// Controlled by the session