TPC-Council / HammerDB

HammerDB Database Load Testing and Benchmarking Tool
http://www.hammerdb.com
GNU General Public License v3.0
589 stars 119 forks source link

Fix MySQL/MariaDB TPROC-H build FK error #599

Closed sm-shaw closed 1 year ago

sm-shaw commented 1 year ago

Bug was introduced into MySQL/MariaDB TPROC-H schema with build https://github.com/TPC-Council/HammerDB/pull/556 resulting in following error creating tables

Error in Virtual User 1: Error: mysqlexec/db server: Referencing column 'L_ORDERKEY' and referenced column 'O_ORDERKEY' in foreign key constraint 'LINEITEM_ibfk_1' are incompatible.
Error in Virtual User 1: Error: mariaexec/db server: Can't create table `tpch`.`LINEITEM` (errno: 150 "Foreign key constraint is incorrectly formed")

PR changes O_ORDERKEY to bigint O_ORDERKEY BIGINT NOT NULL so FK is correctly formed. Fixed in both MySQL and MariaDB.

abondvt89 commented 1 year ago

Merging after reviews and approval of the three members of the code maintenance team.