Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007341opensim[GRID] Robust Serverpublic2014-10-06 23:112021-11-20 12:06
ReporterGavin Hird 
Assigned Totampa 
PlatformPostgreSQLOperating SystemOperating System Version
Product Versionmaster (dev code) 
Target VersionFixed in Versionmaster (dev code) 
Summary0007341: Truncation error storing asset data PGSQL - Robust
DescriptionI am getting spurious truncation errors on the Robust server when storing assets where it logs the following type errors:

2014-10-07 03:40:05,961 ERROR - OpenSim.Data.PGSQL.PGSQLAssetData [ASSET DB]: Error storing item :ERROR: 22001: value too long for type character varying(36) sql UPDATE assets set name = :name, description = :description, "assetType" = :assetType,
                         local = :local, temporary = :temporary, creatorid = :creatorid, data = :data
                    WHERE id=:id;

                  INSERT INTO assets
                    (id, name, description, "assetType" , local,
                     temporary, create_time, access_time, creatorid, asset_flags, data)
                  Select :id, :name, :description, :assetType, :local,
                         :temporary, :create_time, :access_time, :creatorid, :asset_flags, :data
                   Where not EXISTS(SELECT * FROM assets WHERE id=:id)

The Asset table was initialized by the simulator on first run, but there seems to be a quite big difference in the table definitions between the asset table created on MySQL and PostgreSQL. See the attached screenshots.

So perhaps the issue stems from this. I suppose the code that sets up the tables on first run needs a look over?
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (Multiple Regions per Sim)
Physics EngineODE
Script Engine
EnvironmentMono / OSX
Mono Version3.6
Attached Filespng file icon asset table def PostgreSQL.png [^] (63,198 bytes) 2014-10-06 23:11

png file icon asset table def MySQL.png [^] (48,888 bytes) 2014-10-06 23:12

- Relationships
related to 0007350new MySQL Data Base Schemas - Inconsistency in Name and Description Field Lengths 

-  Notes
Gavin Hird (reporter)
2014-10-06 23:15
edited on: 2014-10-06 23:16

It might actually be the creator ID field it is complaining about because this happened on hypergrid visitors. I'll update it manually to be 128 chars like in the MySQL base and see if it reappears.

aiaustin (developer)
2014-10-10 08:04
edited on: 2014-10-10 08:07

CreatorID in assets should be varchar(128)

According to JustinCC creatorID is an identifier and needs a long string potentially. OwnerID and LastOwnerID are UUIDs [^]

The data base table fields need a thorough check and need to be made consistent between things stored in world on creation,. when persisted to the data base (in all DB types) and when stored in inventory or there will be subtle errors, as noticed in some scripts that use the name and description fields but get truncated after seemingly running fine on creation (e.g. avatar trackers recording data in Google Docs using a long URL pasted into the description field).

tampa (reporter)
2021-11-19 05:37

Had a look in the migrations and it still seems to be 36 so is this still an issue?
aiaustin (developer)
2021-11-20 09:24

i am not a PGSQL DB user, but surely, as noted in my comment above, a check that we have the same field lengths on all Dbs is needed by someone who knows what the lengths should be.
UbitUmarov (administrator)
2021-11-20 11:35

added migration to change CreatorID to varchar(128), as it is on mysql, and ai told
tampa (reporter)
2021-11-20 12:05

Now both XAsset and Asset should both be correct... that is unless someone decides to :)

For further postgres issues please file a new ticket.

- Issue History
Date Modified Username Field Change
2014-10-06 23:11 Gavin Hird New Issue
2014-10-06 23:11 Gavin Hird File Added: asset table def PostgreSQL.png
2014-10-06 23:12 Gavin Hird File Added: asset table def MySQL.png
2014-10-06 23:15 Gavin Hird Note Added: 0026884
2014-10-06 23:16 Gavin Hird Note Edited: 0026884 View Revisions
2014-10-10 01:08 Gavin Hird Relationship added related to 0007350
2014-10-10 08:04 aiaustin Note Added: 0026897
2014-10-10 08:05 aiaustin Note Edited: 0026897 View Revisions
2014-10-10 08:07 aiaustin Note Edited: 0026897 View Revisions
2014-10-10 08:08 aiaustin Priority normal => urgent
2021-11-19 05:37 tampa Note Added: 0038241
2021-11-20 09:24 aiaustin Note Added: 0038247
2021-11-20 11:35 UbitUmarov Note Added: 0038248
2021-11-20 12:05 tampa Note Added: 0038249
2021-11-20 12:05 tampa Status new => resolved
2021-11-20 12:05 tampa Fixed in Version => master (dev code)
2021-11-20 12:05 tampa Resolution open => fixed
2021-11-20 12:05 tampa Assigned To => tampa

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker