ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stuart Friedberg (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Created: (IBATIS-240) Add support to generate either non-prepared statements or sequence of simple SQL statements
Date Sat, 31 Dec 2005 02:02:01 GMT
Add support to generate either non-prepared statements or sequence of simple SQL statements

         Key: IBATIS-240
         URL: http://issues.apache.org/jira/browse/IBATIS-240
     Project: iBatis for Java
        Type: New Feature
  Components: SQL Maps  
 Environment: mySQL server, Connector/J driver
    Reporter: Stuart Friedberg

I've discovered the hard way that iBATIS generates prepared statements.

mySQL server does not support multiple SQL statements (semicolon separated) within a prepared
statement.  Frequently, it will actually work.  Too often, it will return spurious SQL syntax
errors or cause Connector/J to die with array index out of bounds exceptions while decoding
messed up result sets.

I finally broke my neat single iBATIS maps with compound SQL statements into multiple iBATIS
maps, one for each individual SQL statement.

If iBATIS had an option to do the parameter substitution itself, producing an ordinary (non-prepared)
statement, I could use that to work around this server limitation.  It might also come in
handy to produce log entries that could be read more directly and easily.

As an alternative, iBATIS could take an option to break down compound SQL statements into
a sequence of prepared statements containing only a single SQL statement each, and automatically
issue the sequence of statements when the map is "invoked".  That would be a more direct means
of addressing the server limitation.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message