View Issue Details

IDProjectCategoryView StatusLast Update
0009315mantisbtdb mssqlpublic2017-04-19 06:02
ReporterLordLarry Assigned Todregad  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
PlatformWindowsOSWindows ServerOS Version2003
Product Version1.2.0a1 
Target Version1.3.0-beta.2Fixed in Version1.3.0-beta.2 
Summary0009315: admin/install.php fails because of wrong ALTER TABLE
Description

$upgrade[] = Array('AlterColumnSQL', Array( db_get_table( 'mantis_user_pref_table' ), "redirect_delay I NOTNULL DEFAULT 0" ) );

which results in

ALTER TABLE mantis_user_pref_table ALTER COLUMN redirect_delay INT DEFAULT (0) NOT NULL

The resulting query gives an error in MSSQL: Incorrect syntax near the keyword 'DEFAULT'.

Something like this should work:

ALTER TABLE mantis_user_pref_table ALTER COLUMN redirect_delay INT NOT NULL
ALTER TABLE mantis_user_pref_table ADD DEFAULT (0) FOR redirect_delay

But I also get complaints about indexes not allowing the change.

Steps To Reproduce

Create a new MSSQL mantis database using admin/install.php

TagsNo tags attached.

Relationships

related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 
related to 0020565 closedcproensa Installation crashes when using SQL Server 2012 

Activities

LordLarry

LordLarry

2008-06-30 06:02

reporter   ~0018229

ALTER TABLE mantis_custom_field_table ALTER COLUMN possible_values TEXT NULL;

fails because of existing index when using MSSQL

LordLarry

LordLarry

2008-06-30 08:21

reporter   ~0018234

using MSSQL 2000

vboctor

vboctor

2008-06-30 11:23

manager   ~0018240

grangeway, are you able to reproduce this issue?

grangeway

grangeway

2013-04-05 17:57

reporter   ~0036385

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

dregad

dregad

2013-10-16 11:11

developer   ~0038281

Please try this again using a nightly build of the master branch.

grangeway

grangeway

2014-02-17 13:26

reporter   ~0039433

Marking as Suspended

MSSQL support is currently known broken. We are going to be replacing the DB Layer in Mantis to fix this properly after the next release.

I'd strongly advise using MYSQL for now.

The new DB layer already contains the appropriate fixes for MS SQL Support.

grangeway

grangeway

2014-03-27 19:12

reporter   ~0039772

MSSQL support is currently known broken. We are going to be replacing the DB Layer in Mantis to fix this properly after the next release.

I'd strongly advise using MYSQL for now.

The new DB layer already contains the appropriate fixes for MS SQL Support.

grangeway

grangeway

2014-05-16 15:00

reporter   ~0040316

MantisBT currently supports Mysql and has support for other database engines.

The support for other databases is known to be problematic.

Having implemented the current database layer into Mantis 10 years ago, I'm currently working on replacing the current layer.

If you are interested in using Mantis with non-mysql databases - for example, Oracle, PGSQL or MSSQL, and would be willing to help out testing the new database layer, please drop me an email at paul@mantisforge.org

In the meantime, I'd advise running Mantis with Mysql Only to avoid issues.

Thanks
Paul

dregad

dregad

2015-03-14 14:02

developer   ~0049219

Despite the fact that I am not actually able to test whether the problem is truly resolved since I don't have access to a MSSQL server setup, I'm marking this issue as fixed in 1.3.x on the grounds that the recent updates in ADOdb (which contain many improvements in the MSSQL driver) are likely to address it.

Should the problem persist (using a nightly build or a version > 1.3.0-beta.1), feel free to reopen this issue or to create a new one.