View Issue Details

IDProjectCategoryView StatusLast Update
0021624mantisbtdb postgresqlpublic2019-09-04 03:08
Reporterdana Assigned Todregad  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version1.3.0 
Summary0021624: mantis_user_pref_table.redirect_delay should not be a boolean (broken Account Preferences)
Description

In My Account > Preferences, entering a Redirect Delay greater than 1 results in the following error:

<blockquote>
APPLICATION ERROR 0000401
Database query failed. Error received from database was #-1: ERROR: invalid input syntax for type boolean: "2" for the query: INSERT INTO mantis_user_pref_table
(user_id, project_id, default_profile, default_project, refresh_delay, redirect_delay, bugnote_order, email_on_new, email_on_assigned, email_on_feedback, email_on_resolved, email_on_closed, email_on_reopened, email_on_bugnote, email_on_status, email_on_priority, email_on_new_min_severity, email_on_assigned_min_severity, email_on_feedback_min_severity, email_on_resolved_min_severity, email_on_closed_min_severity, email_on_reopened_min_severity, email_on_bugnote_min_severity, email_on_status_min_severity, email_on_priority_min_severity, email_bugnote_limit, language, timezone) VALUES ( $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28).
</blockquote>

This appears to be because the <code>mantis_user_pref_table.redirect_delay</code> field in the database is type <code>boolean</code> instead of <code>integer</code>.

Steps To Reproduce
  1. Go to My Account
  2. Enter password if necessary
  3. Go to Preferences
  4. Enter a Redirect Delay greater than 1 second
  5. Click Update Prefs
Additional Information

Configuration info:

Ubuntu 14.04 Trusty
PHP 5.5.9
PostgreSQL 9.3.11
Mantis 1.3.0

We've been using the same Mantis installation since 2007 so it's gone through a lot of upgrades; not sure when the problem started.

TagsNo tags attached.

Relationships

related to 0026109 closeddregad check_pgsql_bool_columns: check wrongly suggests that the redirect_delay should be in boolean format 

Activities

dregad

dregad

2016-08-17 19:13

developer   ~0053838

Hello,

This column was initially (i.e. in pre 1.2 days) defined as type 'L' [1], which actually translates to Boolean under pgsql.

In 1.2.0a1 the type was changed to integer [2], so the installer should have updated the column as part of the upgrade process.

Have you always been running under PostgreSQL ? If so, did you manually create or update the schema at some point ?

In any case, I am not able to reproduce this behavior; a fresh pgsql install shows the column correctly defined as follows: <pre>redirect_delay integer NOT NULL DEFAULT 0</pre>.

I would suggest you compare your current schema with one from a fresh install, to identify any discrepancies.

[1] https://github.com/mantisbt/mantisbt/blob/release-1.3.0/admin/schema.php#L356
[2] https://github.com/mantisbt/mantisbt/blob/release-1.3.0/admin/schema.php#L500

dana

dana

2016-08-17 19:16

reporter   ~0053839

Hmm. It could be that one of my predecessors failed to upgrade it correctly. I'll update the schema manually, thank you.

dregad

dregad

2016-08-17 19:42

developer   ~0053840

Thanks for your feedback. I'm resolving this as no change required; feel free to reopen if you feel this was caused by a bug in Mantis.

Issue History

Date Modified Username Field Change
2016-08-17 13:18 dana New Issue
2016-08-17 19:13 dregad Status new => feedback
2016-08-17 19:13 dregad Note Added: 0053838
2016-08-17 19:16 dana Note Added: 0053839
2016-08-17 19:16 dana Status feedback => new
2016-08-17 19:42 dregad Assigned To => dregad
2016-08-17 19:42 dregad Status new => resolved
2016-08-17 19:42 dregad Resolution open => no change required
2016-08-17 19:42 dregad Note Added: 0053840
2016-08-28 01:18 vboctor Status resolved => closed
2019-09-04 03:08 dregad Relationship added related to 0026109