From noreply at rubyforge.org Tue Jan 12 14:34:48 2010 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 12 Jan 2010 14:34:48 -0500 (EST) Subject: [Jruby-extras-devel] [ jruby-extras-Bugs-22018 ] db:test:clone_structure task sends illegal character to Oracle Message-ID: <20100112193448.565E91D788BA@rubyforge.org> Bugs item #22018, was opened at 2008-09-18 22: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: Closed 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. ---------------------------------------------------------------------- Comment By: Kurt Werle (kwerle) Date: 2010-01-12 11:34 Message: It looks to me like this same problem now exists in the standard databases.rake file for Oracle: when "oci", "oracle" ActiveRecord::Base.establish_connection(:test) IO.readlines("#{RAILS_ROOT}/db/#{RAILS_ENV}_structure.sql").join.split(";\n\n").each do |ddl| ActiveRecord::Base.connection.execute(ddl) end (rails 2.3.5) ---------------------------------------------------------------------- Comment By: Nick Sieger (nicksieger) Date: 2008-09-19 05:34 Message: Thanks for the report, fixed in trunk. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=7857&aid=22018&group_id=2014 From nobody at rubyforge.org Sun Jan 31 12:06:48 2010 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Sun, 31 Jan 2010 12:06:48 -0500 (EST) Subject: [Jruby-extras-devel] [1151] trunk/dbd-jdbc/PROJECT_HAS_MOVED: Kenai I hardly knew ye Message-ID: <20100131170648.95D4718582F9@rubyforge.org> An HTML attachment was scrubbed... URL: