2014-12-22 09:52 EST

View Issue Details Jump to Notes ] Wiki ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0008256mantisbtinstallationpublic2007-10-04 01:38
Reporterpva 
Assigned Togiallu 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSLinuxOS Version
Product Version1.0.8 
Target Version1.0.9Fixed in Version1.0.9 
Summary0008256: Install process fails creating db tables. regression: 1.0.7 works.
DescriptionThe problem initially was reported here:

http://www.mantisbt.org/forums/viewtopic.php?t=3345 [^]

and although in that discussion there are unanswered questions left behind this bug report (and I really appreciate answers) the bug itself I'll report here.

The problem is that in the 1.0.8 the installation proces fails on:

Create Schema ( CreateTableSQL on mantis_config_table )

BAD
CREATE TABLE mantis_config_table ( config_id VARCHAR(64) NOT NULL, project_id INTEGER NOT NULL DEFAULT 0, user_id INTEGER NOT NULL DEFAULT 0, access_reqd INTEGER DEFAULT 0, type INTEGER DEFAULT 90, value XS NOT NULL, PRIMARY KEY (config_id, project_id, user_id) )TYPE=MyISAM
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'XS NOT NULL, PRIMARY KEY (config_id, project_id, user_id) )TYPE' at line 7

I found that if I revert back the following change:

+++++++++++++++++++++++++++++++++++++++++++++++++++
--- /usr/share/webapps/mantisbt/1.0.7/htdocs/core/database_api.php 2007-05-11 15:09:18.000000000 +0400
+++ /usr/share/webapps/mantisbt/1.0.8/htdocs/core/database_api.php 2007-07-23 14:19:22.000000000 +0400
@@ -6,7 +6,7 @@
        # See the README and LICENSE files for details

        # --------------------------------------------------------
- # $Id: database_api.php,v 1.46.6.1 2006/01/05 03:54:19 thraxisp Exp $
+ # $Id: database_api.php,v 1.46.6.1.4.1 2007/05/26 22:23:50 giallu Exp $
        # --------------------------------------------------------

        ### Database ###
@@ -16,7 +16,7 @@

        $t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR;

- require_once( $t_core_dir . 'adodb/adodb.inc.php' );
+ require_once( 'adodb/adodb.inc.php' );

        # An array in which all executed queries are stored. This is used for profiling
        $g_queries_array = array();

+++++++++++++++++++++++++++++++++++++++++++++++++++

everything works.

That's amd64 server with dev-db/mysql-5.0.42, dev-lang/php-5.2.2-r1, apache-2, and mantisbt-1.0.8.
Steps To ReproduceJust try to do fresh install.
TagsNo tags attached.
Attached Files
  • patch file icon mantisbt-1.0.8-avoid-XS-type-in-schema.php.patch (3,619 bytes) 2007-08-12 02:38 - 
    --- admin/schema.php.orig	2007-08-12 09:51:24.000000000 +0400
    +++ admin/schema.php	2007-08-12 09:53:25.000000000 +0400
    @@ -26,7 +26,7 @@
     			  user_id I DEFAULT '0' PRIMARY,
     			  access_reqd I DEFAULT '0',
     			  type I DEFAULT '90',
    -			  value XS NOTNULL",
    +			  value XL NOTNULL",
     Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS')));
     $upgrade[] = Array('CreateIndexSQL',Array('idx_config',config_get('mantis_config_table'),'config_id'));
     
    @@ -108,9 +108,9 @@
     
     $upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_bug_text_table'),"
       id 			 I  PRIMARY UNSIGNED NOTNULL AUTOINCREMENT,
    -  description 		XS NOTNULL,
    -  steps_to_reproduce 	XS NOTNULL,
    -  additional_information XS NOTNULL
    +  description 		XL NOTNULL,
    +  steps_to_reproduce 	XL NOTNULL,
    +  additional_information XL NOTNULL
     ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS')));
     
     $upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_bugnote_table'),"
    @@ -129,7 +129,7 @@
     
     $upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_bugnote_text_table'),"
       id 			 I  UNSIGNED NOTNULL PRIMARY AUTOINCREMENT,
    -  note 			XS NOTNULL
    +  note 			XL NOTNULL
     ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS')));
     
     $upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_custom_field_project_table'),"
    @@ -174,7 +174,7 @@
       project_id 		 I  NOTNULL DEFAULT '0',
       is_public 		L DEFAULT NULL,
       name 			C(64) NOTNULL DEFAULT \" '' \",
    -  filter_string 	XS NOTNULL
    +  filter_string 	XL NOTNULL
     ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS')));
     
     $upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_news_table'),"
    @@ -186,7 +186,7 @@
       view_state 		I2 NOTNULL DEFAULT '10',
       announcement 		L NOTNULL DEFAULT '0',
       headline 		C(64) NOTNULL DEFAULT \" '' \",
    -  body 			XS NOTNULL
    +  body 			XL NOTNULL
     ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS')));
     
     $upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_project_category_table'),"
    @@ -222,7 +222,7 @@
       view_state 		I2 NOTNULL DEFAULT '10',
       access_min 		I2 NOTNULL DEFAULT '10',
       file_path 		C(250) NOTNULL DEFAULT \" '' \",
    -  description 		XS NOTNULL
    +  description 		XL NOTNULL
     ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS')));
     $upgrade[] = Array('CreateIndexSQL',Array('idx_project_id',config_get('mantis_project_table'),'id'));
     $upgrade[] = Array('CreateIndexSQL',Array('idx_project_name',config_get('mantis_project_table'),'name',Array('UNIQUE')));
    @@ -240,7 +240,7 @@
       project_id 		 I  UNSIGNED NOTNULL DEFAULT '0',
       version 		C(64) NOTNULL DEFAULT \" '' \",
       date_order 		T NOTNULL DEFAULT '1970-01-01 00:00:01',
    -  description 		XS NOTNULL,
    +  description 		XL NOTNULL,
       released 		L NOTNULL DEFAULT '1'
     ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS')));
     $upgrade[] = Array('CreateIndexSQL',Array('idx_project_version',config_get('mantis_project_version_table'),'project_id,version',Array('UNIQUE')));
    @@ -265,7 +265,7 @@
     			  type I NOTNULL,
     			  timestamp T NOTNULL,
     			  expiry T,
    -			  value XS NOTNULL",
    +			  value XL NOTNULL",
     Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS')));
     
     $upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_user_pref_table'),"
    @@ -313,7 +313,7 @@
       platform 		C(32) NOTNULL DEFAULT \" '' \",
       os 			C(32) NOTNULL DEFAULT \" '' \",
       os_build 		C(32) NOTNULL DEFAULT \" '' \",
    -  description 		XS NOTNULL
    +  description 		XL NOTNULL
     ",Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS')));
     
     $upgrade[] = Array('CreateTableSQL',Array(config_get('mantis_user_table'),"
    
    patch file icon mantisbt-1.0.8-avoid-XS-type-in-schema.php.patch (3,619 bytes) 2007-08-12 02:38 + 

- Relationships
+ Relationships

-  Notes
User avatar

~0015414

giallu (developer)

That modifcation was done in order to use (when available) the system ADODB.
I specifically requested that, as it is usually considered a packaging error (at least, it is in Fedora) to use bundled 3rd party libraries insted of system wide ones.

So, for a start, what ADODB version have you around in your system?
User avatar

~0015415

pva (reporter)

dev-php/adodb-4.94. But seems that 495a have been released, so I'll try to download it and report back results.
User avatar

~0015416

pva (reporter)

Well with 495a and 4.72 I have the same result. I've tried to put the full path into
require_once( '/usr/share/php/adodb/adodb.inc.php' );
and also nothing changes the same result. (BTW. This path is in 'include_path = ".:/usr/share/php5:/usr/share/php"' of php.ini) What else can cause this problem?
User avatar

~0015417

giallu (developer)

Ok. I think I now understand what is going on... On the devel branch, soon after the database_api.php change, there was an update of ADODB to a newer version, dropping in the operation some specific mantis patches to it.

The schema.php file was modified as well to avoid using the XS type (which was introduced by the mantis patch and not exists in upstream ADODB). see:

http://mantisbt.cvs.sourceforge.net/mantisbt/mantisbt/admin/schema.php?r1=1.15&r2=1.16 [^]

Now, given this analysis and the recently formalized policy for what should/should not land on the stable branch, I think we should revert the change to database_api.php for 1.0.9.
User avatar

~0015422

pva (reporter)

Thank you for clarification. Seems that the link on patch you gave is for HEAD, but in any case, XS -> XL substitution fixes the issue (attached patch is actually for 1.0.8).
User avatar

~0015473

giallu (developer)

Reverted the last commit on database_api.php so that now it works as in 1.0.7.
+  Notes

+ Related Changesets

- Issue History
Date Modified Username Field Change
2007-08-11 02:13 pva New Issue
2007-08-11 03:12 giallu Note Added: 0015414
2007-08-11 04:20 pva Note Added: 0015415
2007-08-11 04:57 pva Note Added: 0015416
2007-08-11 10:23 giallu Note Added: 0015417
2007-08-11 10:30 giallu Target Version => 1.0.9
2007-08-12 02:38 pva File Added: mantisbt-1.0.8-avoid-XS-type-in-schema.php.patch
2007-08-12 02:40 pva Note Added: 0015422
2007-08-21 17:58 giallu Status new => resolved
2007-08-21 17:58 giallu Fixed in Version => 1.0.9
2007-08-21 17:58 giallu Resolution open => fixed
2007-08-21 17:58 giallu Assigned To => giallu
2007-08-21 17:58 giallu Note Added: 0015473
2007-10-04 01:38 vboctor Status resolved => closed
2008-11-11 09:04 giallu Changeset attached master-1.0.x 91a6b8ca =>
+ Issue History