Skip to content

bad argument #3 to 'format' #26

@littlexsparkee

Description

@littlexsparkee

The full error is

FATAL: `thread_run' function failed: ...cal/Cellar/sysbench/1.0.17_1/share/sysbench/tpcc_run.lua:648: bad argument #3 to 'format' (number expected, got nil)

It seems to happen randomly, some long runs complete and some shorter ones encounter this right at the start. The error points to this command:

UPDATE customer%d
                        SET c_balance = c_balance + %f,
                            c_delivery_cnt = c_delivery_cnt + 1
                      WHERE c_id = %d
                        AND c_d_id = %d
                        AND c_w_id = %d]])
                      :format(table_num, sm_ol_amount, o_c_id, d_id, w_id)

When I run the query that generates o_c_id, I get a value though. It's quite puzzling; I thought it had to do with data corruption from exiting the command unexpectedly but it happens even after a fresh prepare and not tampering with anything. Hopefully you can shed some light on it. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions