<?xml version="1.0" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugzilla.globus.org/bugzilla/bugzilla.dtd">

<bugzilla version="3.2.3"
          urlbase="http://bugzilla.globus.org/bugzilla/"
          maintainer="bacon@mcs.anl.gov"
>

    <bug>
          <bug_id>3633</bug_id>
          
          <creation_ts>2005-08-11 03:50</creation_ts>
          <short_desc>Problem with MySQL schema for RFT</short_desc>
          <delta_ts>2005-08-22 10:03:32</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>RFT</product>
          <component>RFT</component>
          <version>4.0.1</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Emir Imamagic">eimamagi@srce.hr</reporter>
          <assigned_to name="Ravi Madduri">madduri@mcs.anl.gov</assigned_to>
          <cc>ogsa-bugs@globus.org</cc>

      

      
          <long_desc isprivate="0">
            <who name="Emir Imamagic">eimamagi@srce.hr</who>
            <bug_when>2005-08-11 03:50:09</bug_when>
            <thetext>MySQL version 3.23.58 was used. RFT database was set up with script:
$GLOBUS_LOCATION/share/globus_wsrf_rft/rft_schema_mysql.sql 

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&gt; select delegated_epr from request;
&quot;&lt;DelegatedEPR&gt;&lt;ns1:Address
xmlns:ns1=&quot;http://schemas.xmlsoap.org/ws/2004/03/addressing&quot;&gt;https://161.53.133.30:8443/wsrf/services/DelegationService&lt;/n
s1:Address&gt;&lt;ns2:ReferenceProperties
xmlns:ns2=&quot;http://schemas.xmlsoap.org/ws/2004/03/addressing&quot;&gt;&lt;ns1:Dele&quot;

After changing the field delegated_epr to type text and recreating the database
the message was gone.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Tom Seelbach">seelbach@us.ibm.com</who>
            <bug_when>2005-08-11 15:56:18</bug_when>
            <thetext>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&apos;s as VARCHAR.  Specifically the rft_schema_mysql.sql &lt;almost&gt; works with  
Apache Derby/ IBM Cloudscape.   Emir - to use VARCHAR(x) where x&gt;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)
     </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Ravi Madduri">madduri@mcs.anl.gov</who>
            <bug_when>2005-08-18 12:16:21</bug_when>
            <thetext>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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Ravi Madduri">madduri@mcs.anl.gov</who>
            <bug_when>2005-08-21 12:03:36</bug_when>
            <thetext>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&apos;nt work with mySQL version &lt; 4.1. What do you guys think ?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Emir Imamagic">eimamagi@srce.hr</who>
            <bug_when>2005-08-21 12:18:30</bug_when>
            <thetext>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 &lt; 4.1 users should use
text for these fields. Or you can even add additional schema file for MySQL &lt;
4.1 to Globus distribution.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Ravi Madduri">madduri@mcs.anl.gov</who>
            <bug_when>2005-08-21 12:35:15</bug_when>
            <thetext>I think thats a good idea. Thanks</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Ravi Madduri">madduri@mcs.anl.gov</who>
            <bug_when>2005-08-22 10:03:32</bug_when>
            <thetext>Fix comitted to branch.</thetext>
          </long_desc>
      
      

    </bug>

</bugzilla>