Created
February 9, 2009 18:54
-
-
Save jrun/60914 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/src/java/jdbc_adapter/RubyJdbcConnection.java | |
+++ b/src/java/jdbc_adapter/RubyJdbcConnection.java | |
@@ -804,7 +804,7 @@ public class RubyJdbcConnection extends RubyObject { | |
rs = metadata.getTables(catalog, realschema, realtablepat, types); | |
List arr = new ArrayList(); | |
while (rs.next()) { | |
- String name = rs.getString(3).toLowerCase(); | |
+ String name = caseConvertIdentifierForJdbc(metadata, rs.getString(3)); | |
// Handle stupid Oracle 10g RecycleBin feature | |
if (!isOracle || !name.startsWith("bin$")) { | |
arr.add(RubyString.newUnicodeString(runtime, name)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/lib/active_record/connection_adapters/jdbc_adapter.rb | |
+++ b/lib/active_record/connection_adapters/jdbc_adapter.rb | |
@@ -349,7 +349,7 @@ module ActiveRecord | |
# We are working on a new index | |
if current_index != index_name | |
current_index = index_name | |
- table_name = resultset.get_string(Jdbc::IndexMetaData::TABLE_NAME).downcase | |
+ table_name = resultset.get_string(Jdbc::IndexMetaData::TABLE_NAME) | |
non_unique = resultset.get_boolean(Jdbc::IndexMetaData::NON_UNIQUE) | |
# empty list for column names, we'll add to that in just a bit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/jtburks/usr/local/jruby-1.1.6/bin/jruby -Ilib:drivers/derby/lib:test -rjdbc/derby "/home/jtburks/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb" "test/derby_simple_test.rb" "test/derby_multibyte_test.rb" "test/activerecord/connection_adapters/type_conversion_test.rb" | |
Using activerecord version 2.2.2 | |
Specify version with AR_VERSION=={version} or RUBYLIB={path} | |
Loaded suite /home/jtburks/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader | |
Started | |
............F....F............ | |
Finished in 6.162979 seconds. | |
1) Failure: | |
test_dumping_schema(DerbySimpleTest) | |
[./test/simple.rb:218:in `test_dumping_schema' | |
./test/simple.rb:216:in `open' | |
./test/simple.rb:216:in `test_dumping_schema']: | |
<"# This file is auto-generated from the current state of the database. Instead of editing this file, \n# please use the migrations feature of Active Record to incrementally modify your database, and\n# then regenerate this schema definition.\n#\n# Note that this schema.rb definition is the authoritative source for your database schema. If you need\n# to create the application database on another system, you should be using db:schema:load, not running\n# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations\n# you'll amass, the slower it'll run and the greater likelihood for issues).\n#\n# It's strongly recommended to check this file into your version control system.\n\nActiveRecord::Schema.define(:version => 0) do\n\n create_table \"AUTO_IDS\", :force => true do |t|\n t.integer \"value\"\n end\n\n create_table \"DB_TYPES\", :force => true do |t|\n t.timestamp \"sample_timestamp\"\n t.timestamp \"sample_datetime\"\n t.date \"sample_date\"\n t.time \"sample_time\"\n t.integer \"sample_decimal\", :scale => 0\n t.decimal \"sample_small_decimal\", :precision => 3, :scale => 2\n t.binary \"sample_binary\"\n t.boolean \"sample_boolean\"\n t.string \"sample_string\", :default => \"\"\n end\n\n create_table \"ENTRIES\", :force => true do |t|\n t.string \"title\", :limit => 100\n t.timestamp \"updated_on\"\n t.text \"content\"\n t.decimal \"rating\", :precision => 10, :scale => 2\n end\n\n add_index \"ENTRIES\", [\"title\"], :name => \"index_entries_on_title\"\n\nend\n"> expected to be =~ | |
</add_index "entries",/>. | |
2) Failure: | |
test_indexes(DerbySimpleTest) [./test/simple.rb:206]: | |
<"entries"> expected but was | |
<"ENTRIES">. | |
30 tests, 42 assertions, 2 failures, 0 errors |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment