View Issue Details

IDProjectCategoryView StatusLast Update
0016878mantisbtdb mssqlpublic2014-12-08 00:34
ReportersormiouAssigned Todregad 
PriorityhighSeveritymajorReproducibilityhave not tried
Status closedResolutionfixed 
PlatformWindows 2008 R2OSOS Version
Product Version1.2.15 
Target Version1.3.0-beta.1Fixed in Version1.3.0-beta.1 
Summary0016878: Install triggers varchar to datetime conversion error on sql server 2008
Description

the procedure for creating instalaltion based on SQL Server 2008 correctly.

There is an error when adding the adminitrateur mantis_user_table in the table.


BAD
INSERT INTO mantis_user_table(username, realname, email, password, date_created, last_visit, enabled, protected, access_level, login_count, lost_password_request_count, failed_login_count, cookie_string) VALUES ('administrator', '', 'root@localhost', '63a9f0ea7bb98050796b649e85481845', '2014-01-24 15:52:09', '2014-01-24 15:52:09', '1', '0', 90, 3, 0, 0, 'd887911e8f239ea5e5b85cc6c271cbcfd32eeb99f1c7a77f5dbe1fb0cbf12d09')
SQLState: 22007 Error Code: 242 Message: [Microsoft][SQL Server Native Client 11.0][SQL Server]La conversion d'un type de donn�es varchar en type de donn�es datetime a cr�� une valeur hors limites. SQLState: 01000 Error Code: 3621 Message: [Microsoft][SQL Server Native Client 11.0][SQL Server]L'instruction a �t� arr�t�e.

Additional Information

The occurence of this error likely depends on the DATEFORMAT setting.

TagsNo tags attached.

Activities

dregad

dregad

2014-01-24 11:39

developer   ~0039162

Would you be able to test the installation procedure using a nightly build from the master (1.3) branch ? Download from http://www.mantisbt.org/builds.php

sormiou

sormiou

2014-01-28 04:32

reporter  

Error Install mantisbt-1.3.0dev-master-a6a3a13.docx (105,666 bytes)
sormiou

sormiou

2014-01-28 04:33

reporter   ~0039207

Hi, With the latest "MantisBT-1.3.0dev-master-a6a3a13" version is the message obtained.

The base is created but contains only one table.

See the attached file!

thank you

grangeway

grangeway

2014-02-17 13:26

reporter   ~0039432

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.

Ruben Stefani

Ruben Stefani

2014-03-17 05:03

reporter   ~0039675

We are having the same problems reported by sormiou, both with the stable version and with the latest nightly build.

When is the new release - the one including the needed fixes to the db layer - expected to be ready?

dregad

dregad

2014-03-17 11:41

developer   ~0039687

This is a bit difficult for me to check, as I not only do not use nor have access to an MSSQL instance, but also have limited knowledge with this db.

I think the error is due to the fact that Mantis is using unix timestamps internally, which needs to be converted to a format usable by the RDBMS. The ADOdb library converts that to an ANSI SQL standard date format 'YYYY-MM-DD HH:MM:SS', which is apparently not recognized as a date by your DB server.

  1. Can you check what is the DATEFORMAT setting ? Please test if it works with if you change it to 'ymd'.

  2. Alternatively, can you also check if it works if you make the following change in library/adodb/drivers/adodb-mssql.inc.php, line 79
    • var $fmtTimeStamp = "'Y-m-d H:i:s'";
    • var $fmtTimeStamp = "'Y-m-dTH:i:s'";

Let me know how it goes.

Ruben Stefani

Ruben Stefani

2014-03-18 06:54

reporter   ~0039696

Last edited: 2014-03-18 07:15

View 2 revisions

OK, the issue was fixed, but the line had to be adjusted this way:

var $fmtTimeStamp = "'Y-m-d\TH:i:s'";

Thanks

dregad

dregad

2014-03-18 13:16

developer   ~0039700

Sorry, forgot the "\".

I'll get that fixed upstream in ADOdb.

dregad

dregad

2014-03-19 05:34

developer   ~0039704

Fix committed upstream [1], will be included in ADOdb 5.19 and fixed in Mantis 1.3

[1] https://github.com/ADOdb/ADOdb/commit/09dd1b56bb3c3b006a965460fdce9f659306c063

grangeway

grangeway

2014-03-27 19:12

reporter   ~0039749

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   ~0040336

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

atrol

atrol

2014-06-05 04:27

developer   ~0040746

Reminder sent to: dregad, grangeway

Not sure, maybe this issue should be moved back to project mantis as the fix is targetted to 1.3, there is a fix committed upstream and dregad is assigned.

If so, grangeway could make a copy of it in project "Track DBAL replacement"

dregad

dregad

2014-06-05 05:50

developer   ~0040747

Definitely should be moved, fix for this is covered in pending pull request https://github.com/mantisbt/mantisbt/pull/181

grangeway

grangeway

2014-06-08 05:36

reporter   ~0040769

Issue cloned back into Track DBAL replacement as requested.

My advice to end users is still to wait on upgrading to 1.3 for the new db layer which Victor has said we can do a release of within a month of 1.3

Paul

dregad

dregad

2014-07-10 03:42

developer   ~0040910

With ADOdb 5.19 now merged in master branch, this issue should be resolved.

Related Changesets

MantisBT: master a2b23b3b

2014-07-09 12:18:47

dregad

Details Diff
Update ADOdb to 5.19

- update the submodule
- back to ADODB_FETCH_ASSOC for oci8
- fix db_query_bound() $p_arr_parms null default issue

Fixes pull request https://github.com/mantisbt/mantisbt/pull/181
mod - core/constant_inc.php Diff File
mod - core/database_api.php Diff File
mod - core/project_hierarchy_api.php Diff File
mod - core/summary_api.php Diff File
mod - core/user_api.php Diff File
mod - library/README.libs Diff File
mod - library/adodb Diff File
mod - manage_user_page.php Diff File

Issue History

Date Modified Username Field Change
2014-01-24 10:19 sormiou New Issue
2014-01-24 11:12 atrol Category administration => db mssql
2014-01-24 11:39 dregad Note Added: 0039162
2014-01-24 11:39 dregad Status new => feedback
2014-01-28 04:32 sormiou File Added: Error Install mantisbt-1.3.0dev-master-a6a3a13.docx
2014-01-28 04:33 sormiou Note Added: 0039207
2014-01-28 04:33 sormiou Status feedback => new
2014-02-17 13:26 grangeway Note Added: 0039432
2014-03-17 05:03 Ruben Stefani Note Added: 0039675
2014-03-17 11:41 dregad Note Added: 0039687
2014-03-18 06:54 Ruben Stefani Note Added: 0039696
2014-03-18 07:15 Ruben Stefani Note Edited: 0039696 View Revisions
2014-03-18 13:16 dregad Note Added: 0039700
2014-03-18 13:17 dregad Assigned To => dregad
2014-03-18 13:17 dregad Status new => assigned
2014-03-18 13:17 dregad Target Version => 1.3.0-beta.1
2014-03-19 05:34 dregad Note Added: 0039704
2014-03-19 05:35 dregad Summary Error Installation MantisBug Database on sql server 2008 => Install triggers varchar to datetime conversion error on sql server 2008
2014-03-19 05:37 dregad Additional Information Updated View Revisions
2014-03-27 19:12 grangeway Note Added: 0039749
2014-03-27 19:12 grangeway Status assigned => resolved
2014-03-27 19:12 grangeway Resolution open => suspended
2014-03-28 04:19 atrol Status resolved => assigned
2014-03-28 04:19 atrol Resolution suspended => open
2014-05-16 15:00 grangeway Note Added: 0040336
2014-05-23 15:09 grangeway Project mantisbt => @24@
2014-06-05 04:27 atrol Note Added: 0040746
2014-06-05 05:50 dregad Note Added: 0040747
2014-06-05 05:54 dregad Project @24@ => mantisbt
2014-06-08 05:36 grangeway Issue cloned: 0017423
2014-06-08 05:36 grangeway Note Added: 0040769
2014-07-10 03:41 dregad Changeset attached => MantisBT master a2b23b3b
2014-07-10 03:42 dregad Note Added: 0040910
2014-07-10 03:42 dregad Status assigned => resolved
2014-07-10 03:42 dregad Fixed in Version => 1.3.0-beta.1
2014-07-10 03:42 dregad Resolution open => fixed
2014-12-08 00:34 vboctor Status resolved => closed