MantisBT - CDash
View Issue Details
0007806CDashpublic2008-10-13 15:042008-10-29 14:46
Todd Harrington 
Julien Jomier 
normalmajoralways
closedfixed 
1.2 
1.3 
0007806: MySQL error creating build groups
The MySQl buildgroup table requires that the description field be "NOT
NULL" but no default (empty string) is given.

CREATE TABLE `buildgroup` (
  <snip>
  `description` text NOT NULL,
  <snip>
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

None of the PHP commands that create entries in the buildgroup table
supply a description, and thus they all fail. Also, when creating a new project the creation of the default build groups (Continuous, Nightly, Experimantal) fails as well.

I resolved these issues locally by adding a default empty string
description to the MySQL schema:

  `description` text NOT NULL default ''

Another solution would be to change the code in manageBuildGroup.php from:

  $sql = "INSERT INTO buildgroup (name,projectid,starttime) VALUES ('$Name','$projectid','$starttime')";

to:

  $sql = "INSERT INTO buildgroup (name,projectid,starttime,description) VALUES ('$Name','$projectid','$starttime','')";

The best approach would probably be to do both. The first for new releases of cdash, and the second for backward compatibility with older database schemas.

No tags attached.
Issue History
2008-10-13 15:04Todd HarringtonNew Issue
2008-10-29 14:41Julien JomierStatusnew => assigned
2008-10-29 14:41Julien JomierAssigned To => Julien Jomier
2008-10-29 14:46Julien JomierNote Added: 0013973
2008-10-29 14:46Julien JomierStatusassigned => closed
2008-10-29 14:46Julien JomierResolutionopen => fixed
2008-10-29 14:46Julien JomierFixed in Version => 1.3

Notes
(0013973)
Julien Jomier   
2008-10-29 14:46   
Fixed in 1.3 Thanks for the report!