[BioPython] BioSQL documentation for Biopython
Hilmar Lapp
hlapp at gmx.net
Sat Feb 23 02:41:52 UTC 2008
Interesting. Apparently MySQL needs a space after the double-dash
comment prefix:
<quote>In MySQL, the “-- ” (double-dash) comment style requires the
second dash to be followed by at least one whitespace or control
character (such as a space, tab, newline, and so on). This syntax
differs slightly from standard SQL comment syntax [...].</quote><sigh/>
If you add that space, i.e., change the line:
--CREATE INDEX ontrel_subjectid ON term_relationship(subject_term_id);
to
-- CREATE INDEX ontrel_subjectid ON term_relationship(subject_term_id);
and do the same for all other lines where this occurs, does it work
then?
I've also updated the MySQL schema on svn:
http://code.open-bio.org/svnweb/index.cgi/biosql/view/biosql-schema/
trunk/sql/biosqldb-mysql.sql
BTW the reason this hasn't come up before is that most everyone uses
the mysql command line client to instantiate the schema, which
ignores lines starting with '--'.
-hilmar
On Feb 22, 2008, at 6:45 PM, Sebastian Bassi wrote:
> On Fri, Feb 22, 2008 at 1:21 AM, Hilmar Lapp <hlapp at gmx.net> wrote:
>> Could some Biopythonist check this material whether or not it still
>> has any relevance, and whether there are any errors?
>
> I've tried to import the schema (biosqldb-mysql.sql) into my MySQL
> server (5.0.45-Debian_1ubuntu3-log) and got this:
>
> Error
> SQL query:
> -- CONFIG: you may want to add this for mysql because MySQL often
> is broken
> -- with respect to using the composite index for the initial keys
> - - CREATE INDEX ontrel_subjectid ON term_relationship(
> subject_term_id
> );
>
> MySQL said:
> #1064 - 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 '--CREATE INDEX ontrel_subjectid ON
> term_relationship(subject_term_id)' at line 1
>
> So I tried with "compatibility with SQL323" (option in the
> phpmyadmin), but got the same result.
>
>
> --
> Curso Biologia Molecular para programadores: http://tinyurl.com/2vv8w6
> Bioinformatics news: http://www.bioinformatica.info
> Tutorial libre de Python: http://tinyurl.com/2az5d5
> _______________________________________________
> BioPython mailing list - BioPython at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython
--
===========================================================
: Hilmar Lapp -:- Durham, NC -:- hlapp at gmx dot net :
===========================================================
More information about the Biopython
mailing list