Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Something strange, bug ?

Help
lechosław
2011-07-19
2014-03-13
  • lechosław
    lechosław
    2011-07-19

    I found something strange in the code:

    Table "customer"
    create table customer (
      c_w_id         integer        not null,
      c_d_id         integer        not null,
      c_id           integer        not null,
      c_discount     decimal(4,4),
      c_credit       char(2),
      c_last         varchar(16),
    ………


    Code for inserting values:  (source file LoadJava)
    ……..
              custPrepStmt.setLong(1, customer.c_id);
                    custPrepStmt.setLong(2, customer.c_d_id);
                    custPrepStmt.setLong(3, customer.c_w_id);
                    custPrepStmt.setDouble(4, customer.c_discount);
                    custPrepStmt.setString(5, customer.c_credit);
    ………….
    The same for generating csv files.

    Pay attention that the order for c_id, c_d_id, c_w_id column is different.

    While running the benchmark test I'm receiving a lot of messages:

    TERMINAL=Term-07  TYPE=PAYMENT  COUNT=1
    java.lang.Exception: C_ID=2296 C_D_ID=5 C_W_ID=1 not found!
    at client.jTPCCTerminal.paymentTransaction(jTPCCTerminal.java:1310)
    at client.jTPCCTerminal.executeTransaction(jTPCCTerminal.java:289)
    at client.jTPCCTerminal.executeTransactions(jTPCCTerminal.java:164)
    at client.jTPCCTerminal.run(jTPCCTerminal.java:120)
    at java.lang.Thread.run(Thread.java:662)


    It is because the column "C_ID" is filled with number 1..(number of warehouses) but while generating the query the value for "C_ID" column takes values from 1 to 3000.

    May be I'm missing something - please tell it it is a bug or works as expected.

     
  • Denis Lussier
    Denis Lussier
    2014-03-13

    This has been fixed in version 4.0