Skip to content

Commit febe379

Browse files
authored
Fix: Changed INSERT statements of templated benchmarks (#447)
INSERT query was not working due to duplicate primary keys Simple solutions on the query did not work for all systems (For example _INSERT IGNORE, INSERT -- IF NOT EXISTS_). For now I changed the table of the insert to one that does not have a primary key. This PR tries to solve #428
1 parent 42655b8 commit febe379

File tree

8 files changed

+20
-30
lines changed

8 files changed

+20
-30
lines changed

config/cockroachdb/sample_templated_config.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<work>
2525
<time>10</time>
2626
<rate>100</rate>
27-
<weights>20,20,10,10,10,10,10<!-- FIXME: ,10 --></weights>
27+
<weights>20,20,10,10,10,10,10,10</weights>
2828
</work>
2929
</works>
3030

@@ -51,10 +51,8 @@
5151
<transactiontype>
5252
<name>DeleteItem</name>
5353
</transactiontype>
54-
<!-- FIXME:
5554
<transactiontype>
5655
<name>InsertItem</name>
5756
</transactiontype>
58-
-->
5957
</transactiontypes>
6058
</parameters>

config/mariadb/sample_templated_config.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<work>
2626
<time>10</time>
2727
<rate>100</rate>
28-
<weights>20,20,10,10,10,10,10<!-- FIXME: ,10 --></weights>
28+
<weights>20,20,10,10,10,10,10,10</weights>
2929
</work>
3030
</works>
3131

@@ -52,10 +52,8 @@
5252
<transactiontype>
5353
<name>DeleteItem</name>
5454
</transactiontype>
55-
<!-- FIXME:
5655
<transactiontype>
5756
<name>InsertItem</name>
5857
</transactiontype>
59-
-->
6058
</transactiontypes>
6159
</parameters>

config/mysql/sample_templated_config.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<work>
2626
<time>10</time>
2727
<rate>100</rate>
28-
<weights>20,20,10,10,10,10,10<!-- FIXME: ,10 --></weights>
28+
<weights>20,20,10,10,10,10,10,10</weights>
2929
</work>
3030
</works>
3131

@@ -52,10 +52,8 @@
5252
<transactiontype>
5353
<name>DeleteItem</name>
5454
</transactiontype>
55-
<!-- FIXME:
5655
<transactiontype>
5756
<name>InsertItem</name>
5857
</transactiontype>
59-
-->
6058
</transactiontypes>
6159
</parameters>

config/oracle/sample_templated_config.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<work>
2626
<time>10</time>
2727
<rate>100</rate>
28-
<weights>20,20,10,10,10,10,10<!-- FIXME: ,10 --></weights>
28+
<weights>20,20,10,10,10,10,10,10</weights>
2929
</work>
3030
</works>
3131

@@ -52,10 +52,8 @@
5252
<transactiontype>
5353
<name>DeleteItem</name>
5454
</transactiontype>
55-
<!-- FIXME:
5655
<transactiontype>
5756
<name>InsertItem</name>
5857
</transactiontype>
59-
-->
6058
</transactiontypes>
6159
</parameters>

config/postgres/sample_templated_config.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<work>
2626
<time>10</time>
2727
<rate>100</rate>
28-
<weights>20,20,10,10,10,10,10<!-- FIXME: ,10 --></weights>
28+
<weights>20,20,10,10,10,10,10,10</weights>
2929
</work>
3030
</works>
3131

@@ -52,10 +52,8 @@
5252
<transactiontype>
5353
<name>DeleteItem</name>
5454
</transactiontype>
55-
<!-- FIXME:
5655
<transactiontype>
5756
<name>InsertItem</name>
5857
</transactiontype>
59-
-->
6058
</transactiontypes>
6159
</parameters>

config/sqlite/sample_templated_config.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<work>
2323
<time>10</time>
2424
<rate>100</rate>
25-
<weights>20,20,10,10,10,10,10<!-- FIXME: ,10 --></weights>
25+
<weights>20,20,10,10,10,10,10,10</weights>
2626
</work>
2727
</works>
2828

@@ -49,10 +49,8 @@
4949
<transactiontype>
5050
<name>DeleteItem</name>
5151
</transactiontype>
52-
<!-- FIXME:
5352
<transactiontype>
5453
<name>InsertItem</name>
5554
</transactiontype>
56-
-->
5755
</transactiontypes>
5856
</parameters>

config/sqlserver/sample_templated_config.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<work>
2626
<time>10</time>
2727
<rate>100</rate>
28-
<weights>20,20,10,10,10,10,10<!-- FIXME: ,10 --></weights>
28+
<weights>20,20,10,10,10,10,10,10</weights>
2929
</work>
3030
</works>
3131

@@ -52,10 +52,8 @@
5252
<transactiontype>
5353
<name>DeleteItem</name>
5454
</transactiontype>
55-
<!-- FIXME:
5655
<transactiontype>
5756
<name>InsertItem</name>
5857
</transactiontype>
59-
-->
6058
</transactiontypes>
6159
</parameters>

data/templated/example.xml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,23 +79,27 @@
7979
<value>255.0</value>
8080
</values>
8181
</template>
82-
<!-- FIXME: This results in primary key failures due to duplicate keys.
8382
<template name="InsertItem">
84-
<query><![CDATA[INSERT INTO item VALUES(?,?,?,?,?)]]></query>
83+
<query><![CDATA[INSERT INTO history VALUES(?,?,?,?,?,?,?,?)]]></query>
8584
<types>
8685
<type>INTEGER</type>
87-
<type>VARCHAR</type>
86+
<type>INTEGER</type>
87+
<type>INTEGER</type>
88+
<type>INTEGER</type>
89+
<type>INTEGER</type>
90+
<type>TIMESTAMP</type>
8891
<type>FLOAT</type>
8992
<type>VARCHAR</type>
90-
<type>INTEGER</type>
9193
</types>
9294
<values>
93-
<value>100001</value>
94-
<value>Testname</value>
95-
<value>255.1</value>
96-
<value>Testdata</value>
9795
<value>1</value>
96+
<value>1</value>
97+
<value>1</value>
98+
<value>1</value>
99+
<value>1</value>
100+
<value>2022-10-10 11:30:30</value>
101+
<value>1.0</value>
102+
<value>Test</value>
98103
</values>
99104
</template>
100-
-->
101105
</templates>

0 commit comments

Comments
 (0)