Code Monkey home page Code Monkey logo

dbt5's Introduction

dbt5's People

Contributors

amulsul avatar bwinchester avatar jk-ozlabs avatar ksyx avatar markwkm avatar petergeoghegan avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

dbt5's Issues

Sub-transaction for trade_result.sql Frame 6

storedproc/pgsql/pgsql/trade_order.sql

The sub-transaction control should be added as the commit transaction are identified in the TPC-Ev1.14 Pseudo-code (Page 159 of 287).

Starting the sub-transaction would be after line 597

The preliminary conversion to a stored procedure would be implemented by adhering to convention and adding Frame 6's commit after the "WHERE CA_ID = acct_id;" on line 620.

There is no ROLLBACK call in neither the 3.3.8.2 Trade-Result Transaction Database Footprint nor the Trade-Result_Frame-6 Pseudo-code to implement.

Updating the CREATE FUNCTION with CREATE PROCEDURE on line 581

The parameter changes to handle the return values would be after line 622.


Modification to the C++ code to call the procedure would be on line 154 of dbt5/TradeResultDB.cpp

Sub-transaction for trade_update.sql Frame 3

storedproc/pgsql/pgsql/trade_update.sql

The sub-transaction control should be added as the start transaction and the commit transaction are identified in the TPC-Ev1.14 Pseudo-code (Page 176 of 287).

Starting the sub-transaction would be on line 391

The preliminary conversion to a stored procedure would be implemented by adhering to convention and adding COMMIT after the "END LOOP;" on line 572.

There are no explicit ROLLBACK calls in either the 3.3.10.2 Trade-Update Transaction Database Footprint or the Trade-Update_Frame-3 Pseudo-code to implement.

Updating the CREATE FUNCTION with CREATE PROCEDURE on line 363

The parameter changes to handle the return values would be on line 521 and line 571.


Modification to the C++ code to call the procedure would be on line 249

Possible type mismatch for t_comm parameter in C version of TRF5_1?

While running dbt5-run I encountered exceptions in TradeResult, but it appears that the error message of exception thrown in

<< PQresultErrorMessage(res) << endl;
rollback();
throw msg.str().c_str();
has already been freed in the catch block at
} catch (const char *str) {
pid_t pid = syscall(SYS_gettid);
ostringstream msg;
msg << time(NULL) << " " << pid << " "
<< szTransactionName[pMessage->TxnType] << endl;
pThrParam->pBrokerageHouse->logErrorMessage(msg.str());
iRet = CBaseTxnErr::EXPECTED_ROLLBACK;
, leading str to be a garbage value.
Therefore I ran TestTxn with gdb and got the followings:

(gdb) p sql
$1 = 0x7fffe8009de0 "SELECT * FROM TradeResultFrame5(4300000001,19.54,'CMPT','2024-5-22 0:53:15',200000008728315,27.14)"
(gdb) printf "%s", (const char *)PQresultErrorMessage(res)
ERROR:  numeric field overflow
DETAIL:  A field with precision 10, scale 2 must round to an absolute value less than 10^8.
CONTEXT:  SQL statement "UPDATE trade
SET t_comm = $1
  , t_dts = $2
  , t_st_id = $3
  , t_trade_price = $4
WHERE t_id = $5"

This statement appears to be TRF5_1 and upon checking the implementation I found that all values related with comm_amount is processed using float8/double, and there is not another mention of FLOAT4OID in the repo. After changing it to FLOAT8OID the exception is no longer thrown, but I cannot figure out a reason, and I am also wondering whether there are any rationale behind using FLOAT4 specifically for this parameter? Thanks.

CREATE DOMAIN VALUE_T AS NUMERIC(10,2) NULL;

t_comm VALUE_T NOT NULL CHECK (t_comm >= 0),

#define SQLTRF5_1 \
"UPDATE trade\n" \
"SET t_comm = $1\n" \
" , t_dts = $2\n" \
" , t_st_id = $3\n" \
" , t_trade_price = $4\n" \
"WHERE t_id = $5"

double comm_amount;

comm_amount = DatumGetFloat8(DirectFunctionCall1(
numeric_float8_no_overflow, PointerGetDatum(comm_amount_num)));

{ SQLTRF5_1, 5, { FLOAT4OID, TIMESTAMPOID, TEXTOID, FLOAT8OID, INT8OID } },

image

Sub-transaction for trade_order.sql Frame 6

storedproc/pgsql/pgsql/trade_order.sql

Note: Trade_Order.SQL, Frames 5 & 6 are not implemented for the rollback or commit transaction

The sub-transaction control should be added as the commit transaction are identified in the TPC-Ev1.14 Pseudo-code (Page 139 of 287).

Starting the sub-transaction would be after line 528

The preliminary conversion to a stored procedure would be implemented by adhering to convention and adding Frame 6 after the "RETURN trade_id;" on line 528.

There is an COMMIT call in the 3.3.7.2 Trade-Order Transaction Database Footprint and the Trade-Order_Frame-6 Pseudo-code to implement.

Updating the CREATE FUNCTION with CREATE PROCEDURE on line 528

The parameter changes to handle the return values would be after line 528 as the customer, customer's account, and the broker for the account would be referenced. (Page 122 of 287)

3.3.7 The Trade-Order Transaction

...
The Trade-Order Transaction is invoked by the EGenDriverCE. It consists of six Frames. The Transaction starts by using the account ID passed into the Transaction to obtain information on the customer, the customer's account, and the broker for the account.
...


Modification to the C++ code to call the procedure would be on line 170 of dbt5/TradeOrderDB.cpp

Sub-transaction for data_maintenance.sql Frame 1

storedproc/pgsql/pgsql/trade_order.sql

The sub-transaction control should be added as the commit transaction are identified in the TPC-Ev1.14 Pseudo-code (Page 190 of 287).

Starting the sub-transaction would be at line 51

The preliminary conversion to a stored procedure would be implemented by adhering to convention and modifying Frame 1 on line 51 as after line 345 there should be the COMMIT.

There is neither a ROLLBACK call in the 3.3.11.2 Data-Maintenance Transaction Database Footprint and the Data-Maintenance_Frame-1 Pseudo-code to implement.

Updating the CREATE FUNCTION with CREATE PROCEDURE on line 16

There would be no parameter changes to handle the return values at line 345.


Modification to the C++ code to call the procedure would be on line 34 of dbt5/DataMaintenanceDB.cpp

Sub-transaction for trade_order.sql Frame 5

storedproc/pgsql/pgsql/trade_order.sql Frame 5 (MISSING)

Note: Trade_Order.SQL, Frames 5 & 6 are not implemented for the rollback or commit transaction

The sub-transaction control should be added as the rollback transaction and the commit transaction are identified in the TPC-Ev1.14 Pseudo-code (Page 137 of 287).

Starting the sub-transaction would be after line 528

The preliminary conversion to a stored procedure would be implemented by adhering to convention and adding Frame 5 after the "RETURN trade_id;" on line 528.

There is an ROLLBACK call in the 3.3.7.2 Trade-Order Transaction Database Footprint and the Trade-Order_Frame-5 Pseudo-code to implement.

Updating the CREATE FUNCTION with CREATE PROCEDURE on line 528

The parameter changes to handle the return values would be after line 528 as the customer, customer's account, and the broker for the account would be referenced. (Page 122 of 287)

3.3.7 The Trade-Order Transaction

...
The Trade-Order Transaction is invoked by the EGenDriverCE. It consists of six Frames. The Transaction starts by using the account ID passed into the Transaction to obtain information on the customer, the customer's account, and the broker for the account.
...


Modification to the C++ code to call the procedure would be on line 154 of dbt5/TradeOrderDB.cpp

Error during egen build on IBM power ppc64le

dbt5-build-egen tool is throwing error while building the egen. Followed instructions in https://github.com/osdldbt/dbt5/blob/main/doc/user-guide.rst to build the tool

dbt5-build-egen /tmp/egen
ERROR: missing 'series' file in '/usr/share/dbt5/patches', try "dbt5-build-egen --help" for more information.

tried another way but I see different error

dbt5-build-egen --build-only /tmp/egen

../src/../inc/TableTemplate.h: In instantiation of 'void TPCE::TableTemplate<T>::ClearRecord() [with T = TPCE::SECURITY_ROW]': ../src/../inc/SecurityTable.h:143:25: required from here ../src/../inc/TableTemplate.h:144:32: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'struct TPCE::SECURITY_ROW' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess] void ClearRecord() { memset(&m_row, 0, sizeof(m_row)); } ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_common.h:58, from ../src/../inc/CustomerAccountsAndPermissionsTable.h:44, from ../src/../inc/TxnHarnessStructs.h:48, from ../src/../inc/MEETradingFloor.h:50, from ../src/MEETradingFloor.cpp:42: ../src/../inc/TableRows.h:302:16: note: 'struct TPCE::SECURITY_ROW' declared here typedef struct SECURITY_ROW ^~~~~~~~~~~~ In file included from ../src/MEETickerTape.cpp:42: ../src/../inc/MEETickerTape.h: In constructor 'TPCE::CMEETickerTape::CMEETickerTape(TPCE::CMEESUTInterface*, TPCE::CMEEPriceBoard*, TPCE::CDateTime*, TPCE::CDateTime*, const TPCE::DataFileManager&)': ../src/../inc/MEETickerTape.h:81:25: warning: 'TPCE::CMEETickerTape::m_pCurrentTime' will be initialized after [-Wreorder] CDateTime* m_pCurrentTime; ^~~~~~~~~~~~~~ In file included from ../src/MEETickerTape.cpp:42: ../src/../inc/MEETickerTape.h:70:36: warning: 'const StatusTypeDataFile_t& TPCE::CMEETickerTape::m_StatusType' [-Wreorder] const StatusTypeDataFile_t& m_StatusType; ^~~~~~~~~~~~ ../src/MEETickerTape.cpp:84:1: warning: when initialized here [-Wreorder] CMEETickerTape::CMEETickerTape( CMEESUTInterface* pSUT, CMEEPriceBoard* pPriceBoard, CDateTime* pBaseTime, CDateTime* pCurrentTime, const DataFileManager &dfm ) ^~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_common.h:59, from ../src/../inc/CustomerAccountsAndPermissionsTable.h:44, from ../src/../inc/TxnHarnessStructs.h:48, from ../src/../inc/MEETradingFloor.h:50, from ../src/MEETradingFloor.cpp:42: ../src/../inc/TableTemplate.h: In instantiation of 'void TPCE::TableTemplate<T>::ClearRecord() [with T = TPCE::DAILY_MARKET_GEN_ROW]': ../src/../inc/DailyMarketTable.h:138:25: required from here ../src/../inc/TableTemplate.h:144:32: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'struct TPCE::DAILY_MARKET_GEN_ROW' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess] void ClearRecord() { memset(&m_row, 0, sizeof(m_row)); } ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_stdafx.h:71, from ../src/../inc/MEEPriceBoard.h:47, from ../src/../inc/MEETradingFloor.h:53, from ../src/MEETradingFloor.cpp:42: ../src/../inc/DailyMarketTable.h:67:20: note: 'struct TPCE::DAILY_MARKET_GEN_ROW' declared here typedef struct DAILY_MARKET_GEN_ROW ^~~~~~~~~~~~~~~~~~~~ In file included from ../src/MEETickerTape.cpp:42: ../src/../inc/MEETickerTape.h: In constructor 'TPCE::CMEETickerTape::CMEETickerTape(TPCE::CMEESUTInterface*, TPCE::CMEEPriceBoard*, TPCE::CDateTime*, TPCE::CDateTime*, TPCE::RNGSEED, const TPCE::DataFileManager&)': ../src/../inc/MEETickerTape.h:81:25: warning: 'TPCE::CMEETickerTape::m_pCurrentTime' will be initialized after [-Wreorder] CDateTime* m_pCurrentTime; ^~~~~~~~~~~~~~ In file included from ../src/MEETickerTape.cpp:42: ../src/../inc/MEETickerTape.h:70:36: warning: 'const StatusTypeDataFile_t& TPCE::CMEETickerTape::m_StatusType' [-Wreorder] const StatusTypeDataFile_t& m_StatusType; ^~~~~~~~~~~~ ../src/MEETickerTape.cpp:100:1: warning: when initialized here [-Wreorder] CMEETickerTape::CMEETickerTape( CMEESUTInterface* pSUT, CMEEPriceBoard* pPriceBoard, CDateTime* pBaseTime, CDateTime* pCurrentTime, RNGSEED RNGSeed, const DataFileManager &dfm ) ^~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_common.h:59, from ../src/../inc/CustomerAccountsAndPermissionsTable.h:44, from ../src/../inc/TxnHarnessStructs.h:48, from ../src/../inc/MEETradingFloor.h:50, from ../src/MEETradingFloor.cpp:42: ../src/../inc/TableTemplate.h: In instantiation of 'void TPCE::TableTemplate<T>::ClearRecord() [with T = TPCE::NEWS_ITEM_AND_XREF_ROW]': ../src/../inc/NewsItemAndXRefTable.h:122:25: required from here ../src/../inc/TableTemplate.h:144:32: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'struct TPCE::NEWS_ITEM_AND_XREF_ROW' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess] void ClearRecord() { memset(&m_row, 0, sizeof(m_row)); } ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_stdafx.h:76, from ../src/../inc/MEEPriceBoard.h:47, from ../src/../inc/MEETradingFloor.h:53, from ../src/MEETradingFloor.cpp:42: ../src/../inc/NewsItemAndXRefTable.h:57:20: note: 'struct TPCE::NEWS_ITEM_AND_XREF_ROW' declared here typedef struct NEWS_ITEM_AND_XREF_ROW ^~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_common.h:59, from ../src/../inc/CustomerAccountsAndPermissionsTable.h:44, from ../src/../inc/TxnHarnessStructs.h:48, from ../src/../inc/MEETradingFloor.h:50, from ../src/MEETradingFloor.cpp:42: ../src/../inc/TableTemplate.h: In instantiation of 'void TPCE::TableTemplate<T>::ClearRecord() [with T = TPCE::LAST_TRADE_ROW]': ../src/../inc/LastTradeTable.h:95:25: required from here ../src/../inc/TableTemplate.h:144:32: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'struct TPCE::LAST_TRADE_ROW' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess] void ClearRecord() { memset(&m_row, 0, sizeof(m_row)); } ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_common.h:58, from ../src/../inc/CustomerAccountsAndPermissionsTable.h:44, from ../src/../inc/TxnHarnessStructs.h:48, from ../src/../inc/MEETradingFloor.h:50, from ../src/MEETradingFloor.cpp:42: ../src/../inc/TableRows.h:266:16: note: 'struct TPCE::LAST_TRADE_ROW' declared here typedef struct LAST_TRADE_ROW ^~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_common.h:59, from ../src/../inc/CustomerAccountsAndPermissionsTable.h:44, from ../src/../inc/TxnHarnessStructs.h:48, from ../src/../inc/MEETickerTape.h:50, from ../src/MEETickerTape.cpp:42: ../src/../inc/TableTemplate.h: In instantiation of 'void TPCE::TableTemplate<T>::ClearRecord() [with T = TPCE::COMPANY_ROW]': ../src/../inc/CompanyTable.h:126:25: required from here ../src/../inc/TableTemplate.h:144:32: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'struct TPCE::COMPANY_ROW' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess] void ClearRecord() { memset(&m_row, 0, sizeof(m_row)); } ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_common.h:58, from ../src/../inc/CustomerAccountsAndPermissionsTable.h:44, from ../src/../inc/TxnHarnessStructs.h:48, from ../src/../inc/MEETickerTape.h:50, from ../src/MEETickerTape.cpp:42: ../src/../inc/TableRows.h:114:16: note: 'struct TPCE::COMPANY_ROW' declared here typedef struct COMPANY_ROW ^~~~~~~~~~~ In file included from ../src/../inc/EGenTables_common.h:59, from ../src/../inc/CustomerAccountsAndPermissionsTable.h:44, from ../src/../inc/TxnHarnessStructs.h:48, from ../src/../inc/MEETickerTape.h:50, from ../src/MEETickerTape.cpp:42: ../src/../inc/TableTemplate.h: In instantiation of 'void TPCE::TableTemplate<T>::ClearRecord() [with T = TPCE::FINANCIAL_GEN_ROW]': ../src/../inc/FinancialTable.h:196:25: required from here ../src/../inc/TableTemplate.h:144:32: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'struct TPCE::FINANCIAL_GEN_ROW' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess] void ClearRecord() { memset(&m_row, 0, sizeof(m_row)); } ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_stdafx.h:64, from ../src/../inc/MEEPriceBoard.h:47, from ../src/../inc/MEETickerTape.h:53, from ../src/MEETickerTape.cpp:42: ../src/../inc/FinancialTable.h:87:20: note: 'struct TPCE::FINANCIAL_GEN_ROW' declared here typedef struct FINANCIAL_GEN_ROW ^~~~~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_common.h:59, from ../src/../inc/CustomerAccountsAndPermissionsTable.h:44, from ../src/../inc/TxnHarnessStructs.h:48, from ../src/../inc/MEETickerTape.h:50, from ../src/MEETickerTape.cpp:42: ../src/../inc/TableTemplate.h: In instantiation of 'void TPCE::TableTemplate<T>::ClearRecord() [with T = TPCE::SECURITY_ROW]': ../src/../inc/SecurityTable.h:143:25: required from here ../src/../inc/TableTemplate.h:144:32: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'struct TPCE::SECURITY_ROW' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess] void ClearRecord() { memset(&m_row, 0, sizeof(m_row)); } ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_common.h:58, from ../src/../inc/CustomerAccountsAndPermissionsTable.h:44, from ../src/../inc/TxnHarnessStructs.h:48, from ../src/../inc/MEETickerTape.h:50, from ../src/MEETickerTape.cpp:42: ../src/../inc/TableRows.h:302:16: note: 'struct TPCE::SECURITY_ROW' declared here typedef struct SECURITY_ROW ^~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_common.h:59, from ../src/../inc/CustomerAccountsAndPermissionsTable.h:44, from ../src/../inc/TxnHarnessStructs.h:48, from ../src/../inc/MEETickerTape.h:50, from ../src/MEETickerTape.cpp:42: ../src/../inc/TableTemplate.h: In instantiation of 'void TPCE::TableTemplate<T>::ClearRecord() [with T = TPCE::DAILY_MARKET_GEN_ROW]': ../src/../inc/DailyMarketTable.h:138:25: required from here ../src/../inc/TableTemplate.h:144:32: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'struct TPCE::DAILY_MARKET_GEN_ROW' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess] void ClearRecord() { memset(&m_row, 0, sizeof(m_row)); } ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_stdafx.h:71, from ../src/../inc/MEEPriceBoard.h:47, from ../src/../inc/MEETickerTape.h:53, from ../src/MEETickerTape.cpp:42: ../src/../inc/DailyMarketTable.h:67:20: note: 'struct TPCE::DAILY_MARKET_GEN_ROW' declared here typedef struct DAILY_MARKET_GEN_ROW

custom postgresql loader is not generating the correct number of rows

At least as recent as the update for egen v1.14.0, generating flat files and loading produces the expected number of rows, so this suggests there something wrong with the custom code path in EGenLoader.

The pgsql-check-db script suggests only the growing tables (expect trade_request) have issues:

GROWING TABLES
==============

cash_transaction 79488000 ~ 15897761
holding 4406400 ~ 888468
holding_history 115776000 ~ 23156714
holding_summary 248900 ~ 49786
settlement 86400000 ~ 17280000
trade 8640000 ~ 17280000
trade_history 207360000 ~ 41472674
trade_request 0 = 0

Build issues on Debian

I have a debian 12 with libpq-dev and the library installed.

I always get those build issues when I try to build tpc-e tools:

s/SecurityDetailDB.o transactions/TradeCleanupDB.o transactions/TradeLookupDB.o transactions/TradeOrderDB.o transactions/TradeResultDB.o transactions/TradeStatusDB.o transactions/TradeUpdat
eDB.o transactions/TxnBaseDB.o \                                                                                                                                                             
                        DateTime.o error.o Random.o Money.o EGenVersion.o locking.o threading.o condition.o \                                                                                
                        interfaces/DMSUTtest.o interfaces/MEESUTtest.o TestTransactions/TestTxn.o interfaces/TxnHarnessSendToMarketTest.o \                                                  
                        ../lib/libegen.a \                                                                                                                                                   
                         \                                                                                                                                                                   
                        -o ../bin/TestTxn; \                                                                                                                                                 
cd ../prj; \                                                                                                                                                                                 
ls -l ../bin                                                                                                                                                                                 
total 7552                                                                                                                                                                                   
drwxr-xr-x  2 root root    4096 Feb 16 13:16 .                                                                                                                                               
drwxr-xr-x 15 root root    4096 Feb 16 13:16 ..                                                                                                                                              
-rw-r--r--  1 root root       0 Feb 16 13:16 BrokerageHouseMain                                                                                                                              
-rw-r--r--  1 root root       0 Feb 16 13:16 DriverMain                                                                                                                                      
-rwxr-xr-x  1 root root 6645312 Feb 16 13:16 EGenLoader                                                                                                                                      
-rwxr-xr-x  1 root root  749480 Feb 16 13:16 EGenValidate                                                                                                                                    
-rw-r--r--  1 root root 4095527 Feb 16 13:16 MarketExchangeMain                                                                                                                              
-rw-r--r--  1 root root       0 Feb 16 13:16 TestTxn                                                                                                                                         
/usr/bin/ld: transactions/pgsql/DBConnection.o: in function `CDBConnection::CDBConnection(char const*, char const*, char const*)':
/root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:120: undefined reference to `PQconnectdb'            
/usr/bin/ld: transactions/pgsql/DBConnection.o: in function `CDBConnection::~CDBConnection()':                                                                                               
/root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:126: undefined reference to `PQfinish'               
/usr/bin/ld: transactions/pgsql/DBConnection.o: in function `CDBConnection::begin()':                                                                                                        
/root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:132: undefined reference to `PQexec'                                                                                               
/usr/bin/ld: /root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:133: undefined reference to `PQclear'             
/usr/bin/ld: transactions/pgsql/DBConnection.o: in function `CDBConnection::connect()':                                                                                                      
/root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:139: undefined reference to `PQconnectdb'
/usr/bin/ld: transactions/pgsql/DBConnection.o: in function `CDBConnection::commit()':                                                                                                       
/root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:145: undefined reference to `PQexec'                                                                                               
/usr/bin/ld: /root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:146: undefined reference to `PQclear'
/usr/bin/ld: transactions/pgsql/DBConnection.o: in function `CDBConnection::escape(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
/root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:152: undefined reference to `PQescapeLiteral'     
/usr/bin/ld: transactions/pgsql/DBConnection.o: in function `CDBConnection::disconnect()':                                                                                                   
/root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:161: undefined reference to `PQfinish'            
/usr/bin/ld: transactions/pgsql/DBConnection.o: in function `CDBConnection::exec(char const*, int, unsigned int const*, char const* const*, int const*, int const*, int)':                   
/root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:176: undefined reference to `PQexecParams'                                                                                         
/usr/bin/ld: /root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:178: undefined reference to `PQresultStatus'
/usr/bin/ld: /root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:194: undefined reference to `PQresultErrorMessage'

0.00 trtps on start

Good day! Try to build and start benchmark on debian12.
I have made some changes and create a fork. Due to file system and os users add some new options for files.
Also solve the problem with libpq-dev by changing LDFLAGS with LIBS in dbt5-build-egen.in file.
I use flat generation and remove DCOMPILE_CUSTOM_LOAD becouse i cant finde files for custom load and have some error with it.

Commands for generate:
make -f Makefile.cmake debug
dbt5-build-egen --include-dir=/opt/dbt5 --source-dir=/opt/dbt5/src --patch-dir=/opt/dbt5/patches /tmp/egen
dbt5-build -c 5000 -t 5000 --db-host=localhost --db-port=5432 --db-user=postgres -o /u02 --tpcetools=/tmp/egen -m FLAT pgsql
than i tried to start:
dbt5 run -c 1000 -t 1000 -n dbt5 -q postgres -h localhost -d 120 --tpcetools=/tmp/egen -p 5432 pgsql /tmp/results
and i get this: Reported Throughput: 0.00 trtps. Also there is some errors in brokerageHouse work:

-->dbt5 - Brokerage House
-->Listening on port: 30000
-->
-->Using the following database settings:
--> Database hostname: localhost
--> Database port: 5432
--> Database name: dbt5
-->Using the following Market Exchange Emulator settings:
--> Hostname: localhost
--> Port: 30010
-->Brokerage House opened for business, waiting for traders...
-->*** array length (0) does not match expections (20): ../src/transactions/pgsql/DBConnection.cpp:2368
-->*** array length (0) does not match expections (20): ../src/transactions/pgsql/DBConnection.cpp:2389
-->*** array length (0) does not match expections (20): ../src/transactions/pgsql/DBConnection.cpp:2162
-->*** array length (0) does not match expections (20): ../src/transactions/pgsql/DBConnection.cpp:2183
-->*** array length (0) does not match expections (20): ../src/transactions/pgsql/DBConnection.cpp:2162
-->*** array length (0) does not match expections (20): ../src/transactions/pgsql/DBConnection.cpp:2183
-->*** array length (2) does not match expections (1): ../src/transactions/pgsql/DBConnection.cpp:591
-->*** array length (3) does not match expections (2): ../src/transactions/pgsql/DBConnection.cpp:591
-->*** array length (4) does not match expections (2): ../src/transactions/pgsql/DBConnection.cpp:591
-->*** array length (5) does not match expections (3): ../src/transactions/pgsql/DBConnection.cpp:591

and so on. Full file is here bh.txt
Can you help me to fix this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.