View Issue Details

IDProjectCategoryView StatusLast Update
0008002mantisbtcustom fieldspublic2012-09-01 09:52
Reportere_corge Assigned Tograngeway  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.1.0a3 
Fixed in Version1.1.0a4 
Summary0008002: Unable to report issue. Error "data too long" on custom field name
Description

I've created a custom field with a name of 32 bytes long.

When creating an issue with this custom field, i get "APPLICATION ERROR 0000401" with the detail "Database query failed. Error received from database was #1406: Data too long for column 'field_name' at row 1 for the query: INSERT INTO mantis_bug_history_table ( user_id, bug_id, date_modified, field_name, old_value, new_value ) VALUES".

The issue is created but history is not updated.

Steps To Reproduce

Create a custom field with the name "Type de demande (Anomalie - Changement)" associated with a project.

Create an issue with a value on this custom field and submit.

Additional Information

Mantis 1.0.1 and 1.1.0a3
Windows 2003 Server SP 2
Apache 2.2.4
PHP 5.2.2
MySQL 5.0.41 & client 5.0.37

Bug is not reproduced with mysql 4.x

TagsNo tags attached.

Relationships

related to 0014650 closeddregad Improve comments for check custom field length in custom_field_delete_all_values() 

Activities

grangeway

grangeway

2007-07-16 14:07

reporter   ~0015054

A schema update to fix this issue has been commited to CVs for the 1.1.0a4 release.

Paul

grangeway

grangeway

2007-07-16 14:08

reporter   ~0015055

A schema update to fix this issue has been commited to CVs for the 1.1.0a4 release.

Paul

Related Changesets

MantisBT: master ce3450aa

2012-08-31 03:17

dregad


Details Diff
Add upgrade step to replace truncated custom field names in history

Function custom_field_get_id_from_name() contained code to check for
truncated custom fields names. This dates back to when the history
table's field_name column was only 32 chars long, whereas the custom
field's size is 64.

The history's field_name size has been increased to 64 since 1.1.0a4
(see issue 0008002), so the check has been removed from the code and
replaced by an upgrade step (calling new install helper function
install_update_history_long_custom_fields(), which converts legacy
history entries storing truncated custom field names by their expanded
full name.

Fixes 0014650
Affected Issues
0008002, 0014650
mod - admin/schema.php Diff File
mod - core/custom_field_api.php Diff File
mod - core/history_api.php Diff File
mod - core/install_helper_functions_api.php Diff File

MantisBT: master-1.2.x b5abce1f

2012-08-31 03:37

dregad


Details Diff
Improve comments for custom field length check

Function custom_field_get_id_from_name() contains code to check for
truncated custom fields names. This dates back to when the history
table's field_name column was only 32 chars long, whereas the custom
field's size is 64.

Even though the history's field_name size has been increased to 64 since
1.1.0a4 (see issue 0008002), the check must be maintained to ensure
compatibility with upgraded legacy systems.

The fix ce3450aaabbd9d9feceb03d77d4358f195e7d966 implemented in master
branch cannot be applied here as it contains a schema update. Instead,
comments have been reworded and obsolete reference to old schema
removed.

Fixes 0014650
Affected Issues
0008002, 0014650
mod - core/custom_field_api.php Diff File
mod - core/history_api.php Diff File