com.ibatis.common.jdbc.ScriptRunner class contains many bugs
------------------------------------------------------------
Key: IBATIS-59
URL: http://issues.apache.org/jira/browse/IBATIS-59
Project: iBatis for Java
Type: Bug
Versions: 2.0.9
Environment: mySQL DB, ScriptRunner version 1.4
Reporter: Siveton Vincent
[1] Comment styles for mySql are not fully supported
Ex:
# my comment
DROP TABLE account;
because the runScript method create the statement
# blabla DROP TABLE account;
thus ignored by mysql...
[2] Comments in a statement are not fully supported
Ex:
CREATE TABLE account (
id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
user_name CHAR(40) NOT NULL,
passwd CHAR(40) NOT NULL, # myComment
PRIMARY KEY(id)
)
TYPE=innoDB;
samething as [1] but we have an SQLException
[3] Many statements in a line are not supported
Ex:
DROP TABLE account; DROP TABLE contact;
Only DROP TABLE account is executed
[4] Depending the configuration, we can have an SQLException for the
connection.commit() or connection.rollback().
java.sql.SQLException: Can't call rollback when autocommit=true
Moreover the conn.rollback() in the finally clause is maybe wrong and dont
check autocommit value.
[5] It s not a bug but I dont like the idea to have a logWriter without the
possibilty to set what we want to log...
For example, if the statement is "DROP TABLE toto" and the table toto doesnt
exists, I dont want to see the SQLException because the next statement should
be "CREATE TABLE toto"...
But I want to see for instance this SQLException error "Can't call rollback
when autocommit=true"...
Why not using common logging?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira