Bug 4953

Summary: Incorrect sql to create RFT indices for MySQL
Product: RFT Reporter: Alain Roy <roy@cs.wisc.edu>
Component: RFTAssignee: Ravi Madduri <madduri@mcs.anl.gov>
Status: RESOLVED FIXED    
Severity: normal CC: rft-dev@globus.org
Priority: P3    
Version: 4.0.3   
Target Milestone: ---   
Hardware: All   
OS: Windows XP   

Description From 2007-01-11 17:02:53
Hi,

The VDT team got a bug report today that is a problem in RFT when using MySQL.
You can see the complete bug report we received here:

http://vdt.cs.wisc.edu/rt/index.html?user=guest&pass=guest&q=2348

The key problem is that we set up the MySQL schema with
globus/share/globus_wsrf_rft/rft_schema_mysql.sql, and MySQL complains:

ERROR 1064 (42000) at line 68: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the
right syntax to use near 'using btree' at line 1

The problematic lines are these:

create index transfer_tindex on transfer(request_id, attempts) using btree ;
create index request_tindex on request(id) using btree;
create index restart_tindex on restart(transfer_id) using btree;

You can see them in CVS here:
http://viewcvs.globus.org/viewcvs.cgi/ws-transfer/reliable/service/java/source/share/rft_schema_mysql.sql?revision=1.1.2.3&view=markup&pathrev=globus_4_0_branch

The problem is the syntax of the lines: "using btree" is supposed to come
before "on transfer". You can see this in the MySQL manual:
http://dev.mysql.com/doc/refman/4.1/en/create-index.html

Our solution was actually to drop the "using btree" clause altogether since
btree is the only allowed value for MyISAM tables (and the default). Of course,
if you prefer to be explicit, you can do so. 

Tim Cartwright of the VDT was instrumental in the details of this bug report. 

We have a workaround the VDT, so this isn't a high priority bug fix for us. 

-alain
------- Comment #1 From 2007-01-18 09:38:11 -------
Removed the btree clause and committed the schema to repo.