View Issue Details

IDProjectCategoryView StatusLast Update
0008564mantisbtdb db2public2007-11-23 19:00
Reporterfskinner Assigned Toslashsplat 
PriorityhighSeverityblockReproducibilityalways
Status closedResolutionfixed 
PlatformIBM i5OSi5/OSOS VersionV5R3M0
Fixed in Version1.1.0rc3 
Summary0008564: Attempting installation of MANTIS400, table not being created
Description

CREATE TABLE mantis_bug_file_table ( id INTEGER GENERATED ALWAYS AS IDENTITY, bug_id INTEGER DEFAULT 0 NOT NULL, title VARCHAR(250) DEFAULT '' NOT NULL, description VARCHAR(250) DEFAULT '' NOT NULL, diskfile VARCHAR(250) DEFAULT '' NOT NULL, filename VARCHAR(250) DEFAULT '' NOT NULL, folder VARCHAR(250) DEFAULT '' NOT NULL, filesize INTEGER DEFAULT 0 NOT NULL, file_type VARCHAR(250) DEFAULT '' NOT NULL, date_added TIMESTAMP DEFAULT '1970-01-01 00:00:00' NOT NULL, content BLOB, PRIMARY KEY (id) )
DEFAULT, identity, or sequence attribute is not valid. SQLCODE=-574

I believe the format of the default date is incorrect for DB2. It should be '1970-01-01-00-00-00-010000'. I don't which PHP script to change to correct this problem.

TagsNo tags attached.
Attached Files
8564.diff (848 bytes)   
Index: adodb-db2.inc.php
===================================================================
--- adodb-db2.inc.php	(revision 4765)
+++ adodb-db2.inc.php	(working copy)
@@ -35,8 +35,8 @@
 	
         // See #8386 for more details
 	// original: var $fmtTimeStamp = "'Y-m-d-H:i:s'";
-	// DB2 valid formats: Y-m-d-H.i.s (IBM SQL format, center dash and dots) or Y-m-d H:i:s (ISO format, center space and colons). We'll use ISO: Y-m-d H:i:s  
-	var $fmtTimeStamp = "'Y-m-d H:i:s'";
+	// DB2 valid formats: Y-m-d-H.i.s (IBM SQL format, center dash and dots) or Y-m-d H:i:s (ISO format, center space and colons). Since i5/OS v5r3 supports only IBM SQL format, we'll use it: Y-m-d-H.i.s  
+	var $fmtTimeStamp = "'Y-m-d-H.i.s'";
 	var $replaceQuote = "''"; // string to use to replace quotes
 	var $dataProvider = "db2";
 	var $hasAffectedRows = true;
8564.diff (848 bytes)   

Activities

slashsplat

slashsplat

2007-11-09 15:56

developer   ~0016130

We had resolved that issue in the released version... Let us research and will get right back to you!

slashsplat

slashsplat

2007-11-09 15:58

developer   ~0016131

Was this code downloaded from mantis400.com, or installed from the CD distributed by Curbstone?

fskinner

fskinner

2007-11-09 16:02

reporter   ~0016132

I downloaded the .iso file from the mantis400.com. I then created a CD from the file and use LODRUN to install to our i5 server

slashsplat

slashsplat

2007-11-09 23:18

developer   ~0016136

Last edited: 2007-11-10 04:02

EDIT: See the note from 0400 subsequent to this, please.
If that is not it, then read this note.

Is it possible that this was the second time you installed to the same schema?

What OS version?
What version of PHP?
You can see that with a file like localinfo.php containing just

<?php print "PHP runs under the user: [" . system('whoami') . "]
"; phpinfo(); ?>

and then execute it.

slashsplat

slashsplat

2007-11-10 04:00

developer   ~0016139

The only thing that seems possible is that the field "Type of Database" in the install configuration screen was NOT set to "db2/400 (experimental)".

We have re-tested the ISO image and installed it successfully. Please confirm that the database type is correct. Note that the DEFAULT is NOT db2, but the old standard, MySQL. Those statements are NOT compatible with DB2 for sure.

When you re-install, please make sure to use a NEW schema name for the database. Mantis does not expect the tables to exist on a second install.