Generate different stmt_id if clients ask for the same multiple times

pull/1287/head
René Cannaò 9 years ago
parent ab87981484
commit d27327a003

@ -939,6 +939,7 @@ MySQL_STMT_Global_info *MySQL_STMT_Manager_v14::find_prepared_statement_by_stmt_
uint32_t MySQL_STMTs_local_v14::generate_new_client_stmt_id(uint64_t global_statement_id) {
uint32_t ret=0;
/*
//auto s2 = global_stmt_to_client_ids.find(global_statement_id);
std::pair<std::multimap<uint64_t,uint32_t>::iterator, std::multimap<uint64_t,uint32_t>::iterator> itret;
itret = global_stmt_to_client_ids.equal_range(global_statement_id);
@ -946,6 +947,7 @@ uint32_t MySQL_STMTs_local_v14::generate_new_client_stmt_id(uint64_t global_stat
ret = it->second;
return ret;
}
*/
if (free_client_ids.size()) {
ret=free_client_ids.top();
free_client_ids.pop();

@ -2680,6 +2680,7 @@ handler_again:
#else
global_stmtid=stmt_info->statement_id;
myds->myconn->local_stmts->backend_insert(global_stmtid,CurrentQuery.mysql_stmt);
if (previous_status.size() == 0)
client_stmtid=client_myds->myconn->local_stmts->generate_new_client_stmt_id(global_stmtid);
#endif
CurrentQuery.mysql_stmt=NULL;

Loading…
Cancel
Save