library/src/blockclass/BP-BlockClass.cc
// adds a  result to the result stack (used for fetching data, one result per column)
adds a  result to the result stack (used for fetching data, one result per column)
adds a result to the result stack ( used for fetching data one result per column )
BP_ERROR_T Block::mysqlAddResult(enum_field_types col_type, char *buffer, size_t buffer_length)
{
	if(!this->mysqlSession)
		return ERR_FAILURE;
	BP_BLOCK_MARIADB_ENTER_CRITICAL_SECTION;
	this->mysql_results = (MYSQL_BIND *) tq_realloc(this->tq, this->mysql_results, sizeof(MYSQL_BIND) * (this->mysql_results_count + 1), BPLN);
	memset(&this->mysql_results[this->mysql_results_count], 0x00, sizeof(MYSQL_BIND));
	this->mysql_results[this->mysql_results_count].buffer_type   = col_type;
	this->mysql_results_count++;
	BP_BLOCK_MARIADB_LEAVE_CRITICAL_SECTION_AND_RETURN_FROM_FUNC(ERR_SUCCESS);
}
BP_ERROR_T Block :: mysqlAddResult ( enum_field_types col_type , char * buffer , size_t buffer_length ) { if ( ! this -> mysqlSession ) return ERR_FAILURE ; BP_BLOCK_MARIADB_ENTER_CRITICAL_SECTION ; this -> mysql_results = ( MYSQL_BIND * ) tq_realloc ( this -> tq , this -> mysql_results , sizeof ( MYSQL_BIND ) * ( this -> mysql_results_count + 1 ) , BPLN ) ; memset ( & this -> mysql_results [ this -> mysql_results_count ] , 0x00 , sizeof ( MYSQL_BIND ) ) ; this -> mysql_results [ this -> mysql_results_count ] . buffer_type = col_type ; this -> mysql_results_count ++ ; BP_BLOCK_MARIADB_LEAVE_CRITICAL_SECTION_AND_RETURN_FROM_FUNC ( ERR_SUCCESS ) ; }
adds a  result to the result stack (used for fetching data, one result per column)
adds a result to the result stack ( used for fetching data one result per column )
// ensure we have a mysql session // enter critical section // allocate space for new result // zero out element data // set arguments // this->mysql_results[this->mysql_results_count].buffer        = buffer; // this->mysql_results[this->mysql_results_count].buffer_length = buffer_length; // this->mysql_results[this->mysql_results_count].is_null       = (my_bool *)       tq_calloc(this->tq, sizeof(my_bool), 1, BPLN); // this->mysql_results[this->mysql_results_count].length        = (unsigned long *) tq_calloc(this->tq, sizeof(unsigned long ), 1, BPLN); // this->mysql_results[this->mysql_results_count].error         = (my_bool *)       tq_calloc(this->tq, sizeof(my_bool), 1, BPLN); // increment parameter counter // return indicating success