Merge pull request #2060 from sysown/v2.0.5-2059

Fix bug with stored procedures
pull/2069/head
René Cannaò 7 years ago committed by GitHub
commit 2afbee4e3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,7 +11,7 @@ class MySQL_ResultSet {
public:
bool transfer_started;
bool resultset_completed;
bool reset_pid;
//bool reset_pid;
uint8_t sid;
MySQL_Data_Stream *myds;
MySQL_Protocol *myprot;

@ -3748,7 +3748,7 @@ void * monitor_AWS_Aurora_thread_HG(void *arg) {
max_lag_ms = atoi(r->fields[5]);
}
if (check_interval_ms == 0) {
check_interval_ms = atoi(r->fields[5]);
check_interval_ms = atoi(r->fields[6]);
}
if (check_timeout_ms == 0) {
check_timeout_ms = atoi(r->fields[7]);

@ -513,6 +513,7 @@ bool MySQL_Protocol::generate_pkt_EOF(bool send, void **ptr, unsigned int *len,
if ((*myds)->myconn->options.no_backslash_escapes) {
internal_status += SERVER_STATUS_NO_BACKSLASH_ESCAPES;
}
(*myds)->pkt_sid=sequence_id;
}
memcpy(_ptr+l, &warnings, sizeof(uint16_t)); l+=sizeof(uint16_t);
memcpy(_ptr+l, &internal_status, sizeof(uint16_t));
@ -536,6 +537,9 @@ bool MySQL_Protocol::generate_pkt_EOF(bool send, void **ptr, unsigned int *len,
#ifdef DEBUG
if (dump_pkt) { __dump_pkt(__func__,_ptr,size); }
#endif
if (*myds) {
(*myds)->pkt_sid=sequence_id;
}
return true;
}
@ -585,6 +589,9 @@ bool MySQL_Protocol::generate_pkt_ERR(bool send, void **ptr, unsigned int *len,
if ((*myds)->sess)
if ((*myds)->sess->thread)
(*myds)->sess->thread->status_variables.generated_pkt_err++;
if (*myds) {
(*myds)->pkt_sid=sequence_id;
}
return true;
}
@ -653,6 +660,9 @@ bool MySQL_Protocol::generate_pkt_OK(bool send, void **ptr, unsigned int *len, u
#ifdef DEBUG
if (dump_pkt) { __dump_pkt(__func__,_ptr,size); }
#endif
if (*myds) {
(*myds)->pkt_sid=sequence_id;
}
return true;
}
@ -2092,7 +2102,7 @@ stmt_execute_metadata_t * MySQL_Protocol::get_binds_from_pkt(void *ptr, unsigned
MySQL_ResultSet::MySQL_ResultSet() {
buffer = NULL;
reset_pid = true;
//reset_pid = true;
}
void MySQL_ResultSet::init(MySQL_Protocol *_myprot, MYSQL_RES *_res, MYSQL *_my, MYSQL_STMT *_stmt) {
transfer_started=false;
@ -2110,15 +2120,15 @@ void MySQL_ResultSet::init(MySQL_Protocol *_myprot, MYSQL_RES *_res, MYSQL *_my,
if (myprot) { // if myprot = NULL , this is a mirror
myds=myprot->get_myds();
}
if (reset_pid==true) {
//if (reset_pid==true) {
sid=0;
//PSarrayOUT = NULL;
if (myprot) { // if myprot = NULL , this is a mirror
sid=myds->pkt_sid+1;
//PSarrayOUT = new PtrSizeArray(8);
}
}
reset_pid=true;
//}
//reset_pid=true;
result=_res;
resultset_size=0;
num_rows=0;

@ -3552,7 +3552,7 @@ handler_again:
if (myconn->MyRS_reuse) {
delete myconn->MyRS_reuse;
}
myconn->MyRS->reset_pid = false;
//myconn->MyRS->reset_pid = false;
myconn->MyRS_reuse = myconn->MyRS;
myconn->MyRS=NULL;
}

Loading…
Cancel
Save