Bugs item #22018, was opened at 2008-09-19 17:00
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=7857&aid=22018&group_id=2014
Category: AR-JDBC
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Nigel Ramsay (nigelramsay)
Assigned to: Nobody (None)
Summary: db:test:clone_structure task sends illegal character to Oracle
Initial Comment:
When running "rake db:test:clone_structure", I get the following error:
ActiveRecord::ActiveRecordError: ORA-00911: invalid character:
INSERT INTO schema_migrations (version) VALUES ('20080915031553');
The illegal character that Oracle is complaining about is the trailing
semi-colon. The log file shows the preceding statements executing successfully.
Note there do not have a tailing semi-colon:
[...snip]
INSERT INTO schema_migrations (version) VALUES ('20080724033916')
INSERT INTO schema_migrations (version) VALUES ('20080901223816')
INSERT INTO schema_migrations (version) VALUES ('20080903231452')
INSERT INTO schema_migrations (version) VALUES ('20080909235955')
ActiveRecord::ActiveRecordError: ORA-00911: invalid character:
INSERT INTO schema_migrations (version) VALUES ('20080915031553');
The bug appears to originate in the "lib/jdbc_adapter/jdbc.rake" file. The
db:test:clone_structure task reads in the development_struture.sql file, and
performs a split(";\n\n"). This results in an array of statements, where each
statement does not have a trailing semi-colon - EXCEPT for the last statement.
So the last statement is executed, including the trailing semi-colon. And this
final statement is the cause of the "ORA-00911: invalid character" error.
This bug can be fixed by ensuring that the final semi-colon is removed before
"execute" is called.
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=7857&aid=22018&group_id=2014
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel