Percona-Lab / sysbench-tpcc

Sysbench scripts to generate a tpcc-like workload for MySQL and PostgreSQL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FATAL: mysql_drv_query() returned error 1105 (Percona-XtraDB-Cluster prohibits use of DML command on a table

jangrui opened this issue · comments

os: centos 7.8
mysql: Percona-XtraDB-Cluster 5.7.30
sysbench: 1.0.20
sysbench-tpcc: 1.0.22

commented

Don't know if this works with your exact version of sysbench-tpcc but in master there is a custom script option force_pk which prevents above error:

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

tpcc.lua options:
  --enable_purge=STRING         Use purge transaction (yes, no) [no]
  --force_pk=N                  Force using auto-inc PK on history table [0]
  --mysql_storage_engine=STRING Storage engine, if MySQL is used [innodb]
  --mysql_table_options=STRING  Extra table options, if MySQL is used. e.g. 'COLLATE latin1_bin' []
  --pgsql_schema=STRING         Schema name for Pg(default:public) [public]
  --report_csv=STRING           Report output in csv (yes, no) [no]
  --scale=N                     Scale factor (warehouses) [100]
  --tables=N                    Number of tables [1]
  --trx_level=STRING            Transaction isolation level (RC, RR or SER) [RR]
  --use_fk=N                    Use foreign keys [1]

For PXC you should use --force_pk=1 options, it will create PK on history table. PXC requires to have primary keys on all tables.