View Issue Details

IDProjectCategoryView StatusLast Update
0022551mantisbtdb postgresqlpublic2017-03-20 19:04
ReportercepinoAssigned To 
PriorityhighSeveritycrashReproducibilityalways
Status newResolutionopen 
PlatformPostgreSQL 9.6.2, PHP 7.1.3OSSUSE Linux, IIS10OS Version
Product Version2.2.1 
Target VersionFixed in Version 
Summary0022551: ERROR: date/time field value out of range
Description

What datestyle Mantis required for the proper functioning of PostgreSQL? Queries working with a column of type timestamp forwarded number. PostgreSQL does not automatically cast to timestamp without time zone.

Steps To Reproduce

1) Create clean database
CREATE DATABASE mantisbt_test
WITH OWNER = postgres
ENCODING = 'UTF8'
TABLESPACE = pg_default
LC_COLLATE = 'en_US.UTF-8'
LC_CTYPE = 'en_US.UTF-8'
CONNECTION LIMIT = -1;
2) Create role and grants default privileges to tables, views, ...
3) Run MantisBT CREATE script (copy text from install.php to pgAdmin query console and run script)
4) Login to MantisBT in UI

Additional Information

Full error report:

APPLICATION ERROR 0000401

DB Query error. Error from DB #-1: ERROR: date/time field value out of range: "1490025497"
HINT: Perhaps you need a different "datestyle" setting. pro dotaz DELETE FROM mantis_tokens_table WHERE $1 > expiry.

Full path: D:\Inetpub\wwwroot\ExternalSite\mantisbt_new\core\database_api.php
Line: 398
Variable Value Type
p_query DELETE FROM mantis_tokens_table WHERE $1 > expiry string
p_limit -1 integer
p_offset -1 integer
p_pop_param 1 boolean
g_db_log_queries boolean
t_db_type pgsql string
s_check_params 1 boolean
t_start 1490025497.7152 double
t_params 1 integer
i 1 integer
sprefix mantis string
s_suffix _table string
t_result boolean
t_elapsed 0.0005 string
t_query_text string

p_arr_parms
Variable Value Type
0 1490025497 integer

g_queries_array
Variable Value Type

1
Variable Value Type
0 string
1 0.0010 string

2
Variable Value Type
0 string
1 0.0008 string

3
Variable Value Type
0 string
1 0.0006 string

4
Variable Value Type
0 string
1 0.0005 string

Filename Line Function Args
D:\Inetpub\wwwroot\ExternalSite\mantisbt_new\core\database_api.php 398 - - trigger_error ( <string>'401', <integer>256 )
D:\Inetpub\wwwroot\ExternalSite\mantisbt_new\core\tokens_api.php 254 - - db_query ( <string>'DELETE FROM mantis_tokens_table WHERE $1 > expiry', <array> { [0] => 1490025497 } )
D:\Inetpub\wwwroot\ExternalSite\mantisbt_new\core\tokens_api.php 269 - - token_purge_expired -
D:\Inetpub\wwwroot\ExternalSite\mantisbt_new\core\tokens_api.php 78 - - token_purge_expired_once -
D:\Inetpub\wwwroot\ExternalSite\mantisbt_new\core\tokens_api.php 102 - - token_get ( <integer>5, <NULL>NULL )
D:\Inetpub\wwwroot\ExternalSite\mantisbt_new\core\collapse_api.php 195 - - token_get_value ( <integer>5 )
D:\Inetpub\wwwroot\ExternalSite\mantisbt_new\core.php 265 - - collapse_cache_token -
D:\Inetpub\wwwroot\ExternalSite\mantisbt_new\my_view_page.php 41 - - require_once ( <string>'D:\Inetpub\wwwroot\ExternalSite\mantisbt_new\core.php' )

TagsNo tags attached.

Activities

atrol

atrol

2017-03-20 15:30

developer   ~0056132

3) Run MantisBT CREATE script (copy text from install.php to pgAdmin query console and run script)

I don't expect that this would work as not all statements in installation process are logged.

Does running the installation script without enabling the check box to print SQL-statements work?

cepino

cepino

2017-03-20 19:04

reporter   ~0056134

The attached script was run. Attached file was created using copy of SQL commands from a browser and comment the invalid commands. I tested directly create a database by running the install.php. The result is a fully functional. Thank you for the advice. Note of the incomplete listing of SQL commands would be a good supplement to the manual.



mantisbt_2.2.1.sql.zip (4,173 bytes)

Issue History

Date Modified Username Field Change
2017-03-20 12:16 cepino New Issue
2017-03-20 15:30 atrol Status new => feedback
2017-03-20 15:30 atrol Note Added: 0056132
2017-03-20 19:04 cepino File Added: mantisbt_2.2.1.sql.zip
2017-03-20 19:04 cepino Note Added: 0056134
2017-03-20 19:04 cepino Status feedback => new