|
|
|
|
@ -3342,46 +3342,48 @@ handler_again:
|
|
|
|
|
goto handler_again;
|
|
|
|
|
}
|
|
|
|
|
if (mirror==false) { // do not care about autocommit and charset if mirror
|
|
|
|
|
if (handler_again___verify_init_connect()) {
|
|
|
|
|
goto handler_again;
|
|
|
|
|
}
|
|
|
|
|
if (ldap_ctx) {
|
|
|
|
|
if (handler_again___verify_ldap_user_variable()) {
|
|
|
|
|
if (mybe->server_myds->DSS == STATE_READY) {
|
|
|
|
|
if (handler_again___verify_init_connect()) {
|
|
|
|
|
goto handler_again;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (handler_again___verify_backend_charset()) {
|
|
|
|
|
goto handler_again;
|
|
|
|
|
}
|
|
|
|
|
if (handler_again___verify_backend_autocommit()) {
|
|
|
|
|
goto handler_again;
|
|
|
|
|
}
|
|
|
|
|
if (handler_again___verify_backend_sql_log_bin()) {
|
|
|
|
|
goto handler_again;
|
|
|
|
|
}
|
|
|
|
|
if (handler_again___verify_backend_sql_mode()) {
|
|
|
|
|
goto handler_again;
|
|
|
|
|
}
|
|
|
|
|
if (handler_again___verify_backend_time_zone()) {
|
|
|
|
|
goto handler_again;
|
|
|
|
|
}
|
|
|
|
|
if (status==PROCESSING_STMT_EXECUTE) {
|
|
|
|
|
CurrentQuery.mysql_stmt=myconn->local_stmts->find_backend_stmt_by_global_id(CurrentQuery.stmt_global_id);
|
|
|
|
|
if (CurrentQuery.mysql_stmt==NULL) {
|
|
|
|
|
MySQL_STMT_Global_info *stmt_info=NULL;
|
|
|
|
|
// the connection we too doesn't have the prepared statements prepared
|
|
|
|
|
// we try to create it now
|
|
|
|
|
stmt_info=GloMyStmt->find_prepared_statement_by_stmt_id(CurrentQuery.stmt_global_id);
|
|
|
|
|
CurrentQuery.QueryLength=stmt_info->query_length;
|
|
|
|
|
CurrentQuery.QueryPointer=(unsigned char *)stmt_info->query;
|
|
|
|
|
previous_status.push(PROCESSING_STMT_EXECUTE);
|
|
|
|
|
NEXT_IMMEDIATE(PROCESSING_STMT_PREPARE);
|
|
|
|
|
if (CurrentQuery.stmt_global_id!=stmt_info->statement_id) {
|
|
|
|
|
PROXY_TRACE();
|
|
|
|
|
if (ldap_ctx) {
|
|
|
|
|
if (handler_again___verify_ldap_user_variable()) {
|
|
|
|
|
goto handler_again;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (handler_again___verify_backend_charset()) {
|
|
|
|
|
goto handler_again;
|
|
|
|
|
}
|
|
|
|
|
if (handler_again___verify_backend_autocommit()) {
|
|
|
|
|
goto handler_again;
|
|
|
|
|
}
|
|
|
|
|
if (handler_again___verify_backend_sql_log_bin()) {
|
|
|
|
|
goto handler_again;
|
|
|
|
|
}
|
|
|
|
|
if (handler_again___verify_backend_sql_mode()) {
|
|
|
|
|
goto handler_again;
|
|
|
|
|
}
|
|
|
|
|
if (handler_again___verify_backend_time_zone()) {
|
|
|
|
|
goto handler_again;
|
|
|
|
|
}
|
|
|
|
|
if (status==PROCESSING_STMT_EXECUTE) {
|
|
|
|
|
CurrentQuery.mysql_stmt=myconn->local_stmts->find_backend_stmt_by_global_id(CurrentQuery.stmt_global_id);
|
|
|
|
|
if (CurrentQuery.mysql_stmt==NULL) {
|
|
|
|
|
MySQL_STMT_Global_info *stmt_info=NULL;
|
|
|
|
|
// the connection we too doesn't have the prepared statements prepared
|
|
|
|
|
// we try to create it now
|
|
|
|
|
stmt_info=GloMyStmt->find_prepared_statement_by_stmt_id(CurrentQuery.stmt_global_id);
|
|
|
|
|
CurrentQuery.QueryLength=stmt_info->query_length;
|
|
|
|
|
CurrentQuery.QueryPointer=(unsigned char *)stmt_info->query;
|
|
|
|
|
previous_status.push(PROCESSING_STMT_EXECUTE);
|
|
|
|
|
NEXT_IMMEDIATE(PROCESSING_STMT_PREPARE);
|
|
|
|
|
if (CurrentQuery.stmt_global_id!=stmt_info->statement_id) {
|
|
|
|
|
PROXY_TRACE();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (myconn->async_state_machine==ASYNC_IDLE) {
|
|
|
|
|
@ -5827,6 +5829,11 @@ void MySQL_Session::add_ldap_comment_to_pkt(PtrSize_t *_pkt) {
|
|
|
|
|
|
|
|
|
|
void MySQL_Session::finishQuery(MySQL_Data_Stream *myds, MySQL_Connection *myconn, bool prepared_stmt_with_no_params) {
|
|
|
|
|
myds->myconn->reduce_auto_increment_delay_token();
|
|
|
|
|
if (locked_on_hostgroup >= 0) {
|
|
|
|
|
if (qpo->multiplex == -1) {
|
|
|
|
|
myds->myconn->set_status_no_multiplex(true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (mysql_thread___multiplexing && (myds->myconn->reusable==true) && myds->myconn->IsActiveTransaction()==false && myds->myconn->MultiplexDisabled()==false) {
|
|
|
|
|
if (mysql_thread___connection_delay_multiplex_ms && mirror==false) {
|
|
|
|
|
myds->wait_until=thread->curtime+mysql_thread___connection_delay_multiplex_ms*1000;
|
|
|
|
|
|