Something is wrong with the ARSwiki site at the moment. I won't be
able to look at it until tonight. Here are the details of the bug:
*** Background Facts
- When you create a new form, there are always columns created in the Hxxx
table to account for 5 status values, regardless of the number of status
history values on the form.
- When you remove a status history value from a status field (fieldid 7), the
corresponding columns in the Hxxx tables are not removed
- When you run the upgrade installer to upgrade from 6.x to 7.x, the upgrade
installer only performs an ALTER TABLE to modify the column size of the db
columns (Hxx.Uyy) for status history values that are accounted for in the
remedy data dictionary tables (arschema, field, field_enum, field_enum_values).
*** Result
When you perform an upgrade from 6.x to 7.x, there are lingering columns in the
H tables for status history values that do not exist. I will use schemaid 1 as
an example:
SQL> select name from arschema where schemaid = 1;
NAME
-----------------------------------------------------
AR System Message Catalog
ad-u15> select maxenum from field_enum where schemaid = 1 and fieldid = 7;
MAXENUM
----------
1
ad-u15> desc H1
Name Null? Type
--------------- -------- -------------
ENTRYID NOT NULL VARCHAR2(15)
T0 NUMBER(15)
U0 VARCHAR2(254)
T1 NUMBER(15)
U1 VARCHAR2(254)
T2 NUMBER(15)
U2 VARCHAR2(30)
T3 NUMBER(15)
U3 VARCHAR2(30)
T4 NUMBER(15)
U4 VARCHAR2(30)
To summarize, the MAXENUM states that there are values 0 and 1 as possible
options. When the schema was originally created (on a 5.x or 6.x server), the
U columns were 30 characters in length. The upgrade installer for ARS 7.x did
not update the U columns for status history enum values that do not exist.
*** Ramifications
When you add an additional enum value to the status history of this form, the U
column that is 30 characters in length is re-used. This will lead to
"ORA-01401: inserted value too large for column" errors (on Oracle) if using
login names greater than 30 characters in length.
*** Expected behavior
- The ARCreateSchema, ARImport, ARSetField, ARCreateField api calls should
trigger the server to clean up the unneeded columns in the status history
tables.
- A script/update program (binary) should be released that performs the
following actions:
- clean up all Hx.Uy unneeded columns
- correct the size of all the remaining Hx.Uy columns
Axton Grams
On 4/16/07, Axton <[EMAIL PROTECTED]> wrote:
Just ran into this. Rather interesting. Will lead to Oracle/SQL
errors if using login names in excess of 30 characters. Will post the
bug id when I get it.
http://arswiki.org/bugs/show_bug.cgi?id=46
Axton Grams
_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the Answers
Are"