Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007680TestLinkInstallerpublic2016-09-22 15:262018-06-16 17:28
ReporterabIng 
Assigned Tofman 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformWINDOWSOSOS Version
Product Version1.9.15 (2015 Q4) 
Fixed in Version1.9.18 (2018 Q3) 
Summary0007680: Bug in MSSQL/testlink_create_tables.sql while creating plugins table
DescriptionWhen I install 1.9.15 with MS SQL (10.50.1600) the following error appears:

Processing:sql/mssql/testlink_create_tables.sql

==============================================================================
 DB Access Error - debug_print_backtrace() OUTPUT START
 ATTENTION: Enabling more debug info will produce path disclosure weakness (CWE-200)
            Having this additional Information could be useful for reporting
            issue to development TEAM.
 ==============================================================================
#0 database->exec_query(CREATE TABLE /*prefix*/plugins (
  plugin_id int NOT NULL IDENTITY(1,1) CONSTRAINT /*prefix*/DF_plugins_plugin_id DEFAULT ((0)),
  basename VARCHAR(100) NOT NULL,
  enabled tinyint NOT NULL CONSTRAINT /*prefix*/DF_plugins_enabled DEFAULT ((0)),
  author_id int NOT NULL,
  creation_ts datetime NOT NULL CONSTRAINT /*prefix*/DF_plugins_creation_ts DEFAULT (getdate()),
 CONSTRAINT /*prefix*/PK_plugins PRIMARY KEY CLUSTERED
 (
  plugin_id ASC
 ) ON [PRIMARY]
) ON [PRIMARY]) called at [D:\Web\testlink-1.9.15\install\sqlParser.class.php:103]
#1 SqlParser->process(sql/mssql/testlink_create_tables.sql) called at [D:\Web\testlink-1.9.15\install\installNewDB.php:427]
-------------

When I execute the query in SQL Server Management Studio the error message is:
Msg 1754, Level 16, State 0, Line 1
Defaults cannot be created on columns with an IDENTITY attribute. Table 'plugins', column 'plugin_id'.
Msg 1750, Level 16, State 0, Line 1
Could not create constraint. See previous errors.
-------
Solution: remove constraint.
The same error appears with the next statement when plugins_configuration table is created.
After removing these two constraints the installation script works properly.
TagsNo tags attached.
Database (MySQL,Postgres,etc)MS SQL
Browser
PHP Version
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Files

- Relationships
has duplicate 0007743resolvedfman Unable to deploy on MSSQL 2008 R2 
related to 0008280resolvedfman Installation script fails (MS SQL used) 

-  Notes
(0025922)
abIng (reporter)
2017-01-25 09:07

The problem is not fixed in 1.9.16.
The installation procedure finishes OK if I remove constraints for the first fields of two last tables:
CREATE TABLE /*prefix*/plugins (
  plugin_id int NOT NULL IDENTITY(1,1),
  basename VARCHAR(100) NOT NULL,
  enabled tinyint NOT NULL CONSTRAINT /*prefix*/DF_plugins_enabled DEFAULT ((0)),
  author_id int NOT NULL,
  creation_ts datetime NOT NULL CONSTRAINT /*prefix*/DF_plugins_creation_ts DEFAULT (getdate()),
 CONSTRAINT /*prefix*/PK_plugins PRIMARY KEY CLUSTERED
 (
  plugin_id ASC
 ) ON [PRIMARY]
) ON [PRIMARY];

CREATE TABLE /*prefix*/plugins_configuration (
  plugin_config_id int IDENTITY(1,1) NOT NULL ,
  testproject_id int NOT NULL CONSTRAINT /*prefix*/DF_plugins_configuration__testproject_id DEFAULT ((0)),
  config_key VARCHAR(255) NOT NULL,
  config_type int NOT NULL,
  config_value VARCHAR(255) NOT NULL,
  author_id int NOT NULL,
  creation_ts datetime NOT NULL CONSTRAINT /*prefix*/DF_plugins_configuration__creation_ts DEFAULT (getdate()),
 CONSTRAINT /*prefix*/PK_plugins_configuration PRIMARY KEY CLUSTERED
 (
  plugin_config_id ASC
 ) ON [PRIMARY]
) ON [PRIMARY];
(0027581)
abIng (reporter)
2018-06-13 12:29

The problem is not fixed in 1.9.17.
See also http://mantis.testlink.org/view.php?id=8280 [^] and http://mantis.testlink.org/view.php?id=7743 [^]
(0027590)
fman (administrator)
2018-06-16 16:57

if ticket status is not set to resolved then this means that issue is still open, then your note on problem still on 1.9.17 provides no help.
(0027596)
fman (administrator)
2018-06-16 17:28

https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/522352792272801c2df317fc5111ddb88e2273b7 [^]

- Issue History
Date Modified Username Field Change
2016-09-22 15:26 abIng New Issue
2016-09-25 10:09 fman QA Team - Task Workflow Status => TBD
2016-09-25 10:09 fman Summary Bug in mssql/testlink_create_tables.sql while creating plugins table => Bug in MSSQL/testlink_create_tables.sql while creating plugins table
2017-01-25 09:07 abIng Note Added: 0025922
2018-06-13 12:29 abIng Note Added: 0027581
2018-06-16 16:57 fman Note Added: 0027590
2018-06-16 17:01 fman Relationship added related to 0008280
2018-06-16 17:02 fman Relationship added has duplicate 0007743
2018-06-16 17:28 fman Note Added: 0027596
2018-06-16 17:28 fman Fixed in Version => 1.9.18 (2018 Q3)
2018-06-16 17:28 fman QA Team - Task Workflow Status TBD => READY FOR TESTING
2018-06-16 17:28 fman Status new => resolved
2018-06-16 17:28 fman Resolution open => fixed
2018-06-16 17:28 fman Assigned To => fman



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker