[tools] testbot: Fix the type of inherited auto-increment columns.

Francois Gouget fgouget at codeweavers.com
Mon May 30 11:44:40 CDT 2022


Some objects, such as jobs, use a database-generated auto-increment
integer as their primary key. However objects that 'inherit' such
primary keys, such as Steps, do not. So the corresponding property
descriptor should be a regular integer. Otherwise the DBIBackend will
try to fetch a unique id that does not exist.
Fortunately this issue has so far been masked by the 'master columns'
mechanism.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/lib/WineTestBot/Records.pm | 2 +-
 testbot/lib/WineTestBot/Steps.pm   | 2 +-
 testbot/lib/WineTestBot/Tasks.pm   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/testbot/lib/WineTestBot/Records.pm b/testbot/lib/WineTestBot/Records.pm
index fd8e574ea..6002d1c2f 100644
--- a/testbot/lib/WineTestBot/Records.pm
+++ b/testbot/lib/WineTestBot/Records.pm
@@ -83,7 +83,7 @@ my @PropertyDescriptors = (
   CreateBasicPropertyDescriptor("Value", "Value", !1, !1, "A", 64),
 );
 my @FlatPropertyDescriptors = (
-  CreateBasicPropertyDescriptor("RecordGroupId", "Group id", 1, 1, "S", 10),
+  CreateBasicPropertyDescriptor("RecordGroupId", "Group id", 1, 1, "N", 10),
   @PropertyDescriptors
 );
 
diff --git a/testbot/lib/WineTestBot/Steps.pm b/testbot/lib/WineTestBot/Steps.pm
index 0f65d631c..860dc4920 100644
--- a/testbot/lib/WineTestBot/Steps.pm
+++ b/testbot/lib/WineTestBot/Steps.pm
@@ -247,7 +247,7 @@ my @PropertyDescriptors = (
 );
 SetDetailrefKeyPrefix("Step", @PropertyDescriptors);
 my @FlatPropertyDescriptors = (
-  CreateBasicPropertyDescriptor("JobId", "Job id", 1, 1, "S", 10),
+  CreateBasicPropertyDescriptor("JobId", "Job id", 1, 1, "N", 10),
   @PropertyDescriptors
 );
 
diff --git a/testbot/lib/WineTestBot/Tasks.pm b/testbot/lib/WineTestBot/Tasks.pm
index 5cc2cc667..50ce9604a 100644
--- a/testbot/lib/WineTestBot/Tasks.pm
+++ b/testbot/lib/WineTestBot/Tasks.pm
@@ -368,7 +368,7 @@ my @PropertyDescriptors = (
   CreateBasicPropertyDescriptor("TestFailures", "Failures", !1, !1, "N", 6),
 );
 my @FlatPropertyDescriptors = (
-  CreateBasicPropertyDescriptor("JobId", "Job id", 1, 1, "S", 10),
+  CreateBasicPropertyDescriptor("JobId", "Job id", 1, 1, "N", 10),
   CreateBasicPropertyDescriptor("StepNo", "Step no",  1,  1, "N", 2),
   @PropertyDescriptors
 );
-- 
2.30.2




More information about the wine-devel mailing list