Project

General

Profile

Actions

Bug #5302

closed

module_dependencies column defined too short

Added by Derik Barseghian over 13 years ago. Updated almost 13 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
provenance
Target version:
Start date:
02/10/2011
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
5302

Description

The v8 schema has the module_dependencies varchar column defined at 255 characters, but this is too small. This isn't an issue for hsql, but for other db's like mysql. One user reports needing to change it to be 1000; the module dependency list could of course technically be arbitrarily long

Actions #1

Updated by ben leinfelder about 13 years ago

I'd recommend not specifying the length for the VARCHAR - then it will use the maximum. Just omit the (500) or (1000) since, as you say, the dependency list is arbitrarily long and we might as well exhaust the capability of the DB before erring out.

http://www.hsqldb.org/doc/guide/ch09.html

Actions #2

Updated by Matt Jones about 13 years ago

some dbms support an unlimited length, indexed type for strings (such as 'text' type in postgres) that is a lot more flexible than using varchar. Have you considered using 'text' for databases that support it?

http://developer.postgresql.org/pgdocs/postgres/datatype-character.html

Actions #3

Updated by Derik Barseghian about 13 years ago

I've found another 255-char limit truncation issue, but this issue does affect our default hsql provenance dbs: parameter's value column gets chopped off at 255. This is far too small for e.g. a String Constant with value set to a large block of text. Apparently hsql is enforcing varchar length for this column -- the only difference I notice between it and a varchar(255) column with length not being enforced is that it has Nullable set to true instead of false.

For reference I did find text confirming hsql doesn't necessarily enforce column size:
-------
HSQLDB databases are initially created in a legacy mode that does not enforce column size and precision. You can set the property: sql.enforce_strict_size=true to enable this feature. When this property has been set, Any supplied column size and precision for numeric and character types (CHARACTER and VARCHAR) are enforced. Use the command, SET PROPERTY "sql.enforce_strict_size" TRUE once before defining the tables.
http://www.hsqldb.org/doc/guide/ch09.html#create_table-section
-------

Actions #4

Updated by Daniel Crawl almost 13 years ago

Now using "text" type where supported.

Actions #5

Updated by Redmine Admin about 11 years ago

Original Bugzilla ID was 5302

Actions

Also available in: Atom PDF