Bug 3633 - Problem with MySQL schema for RFT
: Problem with MySQL schema for RFT
: 4.0.1
: PC Linux
: P3 normal
: ---
Assigned To:
  Show dependency treegraph
Reported: 2005-08-11 03:50 by
Modified: 2005-08-22 10:03 (History)



You need to log in before you can comment on or make changes to this bug.

Description From 2005-08-11 03:50:09
MySQL version 3.23.58 was used. RFT database was set up with script:

First transfer wetn fine on client side. Following command reported no error:
$ globusrun-ws -F host.name -s -c /bin/hostname

On the server side container reported error:
error deleting a deleg resource
Deserialziation failed
. Caused by
org.xml.sax.SAXParseException: XML document structures must start and end within
the same entity.

After checking the database,  I found out that delegated_epr field is too small(
currently is set to varchar(200)). So the row in request table contained
incomplete EPR:
mysql> select delegated_epr from request;

After changing the field delegated_epr to type text and recreating the database
the message was gone.
------- Comment #1 From 2005-08-11 15:56:18 -------
Emir - Changing to text was probably the fastest and best workaround for you.  

Ravi - for the permanent fix please use VARCHAR(x).  TEXT is not a standard sql
datatype in sql-92, sql:99, or sql:2003 so it would not be as portable to other
DBMS's as VARCHAR.  Specifically the rft_schema_mysql.sql <almost> works with  
Apache Derby/ IBM Cloudscape.   Emir - to use VARCHAR(x) where x>255 you
probably need MySql 4.1.0 or greater.

Some of the following fields should also be increased:
grep varchar /opt/gt401f/share/globus_wsrf_rft/rft_schema_mysql.sql

    proxy_loc   varchar(200),
    username    varchar(200),
    delegated_epr   varchar(255),
    user_subject    varchar(200),
    source_url varchar(200) not null,
    dest_url varchar(200),
    user_name   varchar(100) default null,
    source_subject varchar(200),
    dest_subject varchar(200),
    fault varchar(255),
    marker  varchar(200)
------- Comment #2 From 2005-08-18 12:16:21 -------
Ok. I will increase the default field size to say 500 characters. I am not sure
what a good default should be 
and it is really stupid that the database would truncate data.
------- Comment #3 From 2005-08-21 12:03:36 -------
I am going to leave the default sizes as they are and add documentation for the
error you see. If I increase 
the default field size then RFT would'nt work with mySQL version < 4.1. What do
you guys think ?
------- Comment #4 From 2005-08-21 12:18:30 -------
I think it is better to set them to 500 otherwise RFT wont work for any MySQL
version. In documentation you could add that for MySQL < 4.1 users should use
text for these fields. Or you can even add additional schema file for MySQL <
4.1 to Globus distribution.
------- Comment #5 From 2005-08-21 12:35:15 -------
I think thats a good idea. Thanks
------- Comment #6 From 2005-08-22 10:03:32 -------
Fix comitted to branch.