[tpcc-mysql] payment.c c_new_data not used
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
percona-tools |
New
|
Undecided
|
Unassigned |
Bug Description
in payment.c, a field c_new_data is populated and the value is never used.
The comment indicates that c_new_data should be written to the customer table:
/*EXEC_SQL UPDATE customer
SET c_balance = :c_balance, c_data = :c_new_data
WHERE c_w_id = :c_w_id
AND c_d_id = :c_d_id
AND c_id = :c_id;*/
However, the code writes c_data instead of c_new_data:
memset(param, 0, sizeof(MYSQL_BIND) * 5); /* initialize */
param[
param[0].buffer = &c_balance;
param[
param[1].buffer = c_data;
param[
It should be:
param[1].buffer = c_new_data;
param[