jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • JRuby
  • JRUBY-2027

Problems with the H2 jdbc adapter, schema metadata behavior

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: JRuby 1.0.3
  • Fix Version/s: None
  • Component/s: JRuby-extras
  • Labels:
    None
  • Environment:
    gem: jdbch2-adapter-0.7.1

Description

There's a couple of problems with this adapter:

1. Is it supposed to be aliasing the hsqldb adapter or the generic base class jdbc adpater? I suspect it should be the former, but I couldn't actually see where it does this...sorry ruby newbie.

2. The adapter needs to filter out stuff from the database metadata (tables and columns), in the same way as the postgresjdbc adapter does, otherwise it pulls in h2 internal system tables when it shouln't.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
mctozzy added a comment - 23/Jan/08 6:23 PM

I should have mentioned I found this problem while trying to get redmine going under jruby. Redmine ended up getting erroneous attributes leaking into its users and roles classes, caused by pulling in this extra data from metadata. The adapter should restrict itself to tables of type TABLE, and - by default if no schema name is specified - in the PUBLIC schema .

Perhaps it would be appropriate to make a proper separate adapter for h2?

Show
mctozzy added a comment - 23/Jan/08 6:23 PM I should have mentioned I found this problem while trying to get redmine going under jruby. Redmine ended up getting erroneous attributes leaking into its users and roles classes, caused by pulling in this extra data from metadata. The adapter should restrict itself to tables of type TABLE, and - by default if no schema name is specified - in the PUBLIC schema . Perhaps it would be appropriate to make a proper separate adapter for h2?
Hide
Permalink
Charles Oliver Nutter added a comment - 26/Jan/08 3:16 AM

It probably would be appropriate. Can you figure out what all it would need to do that it doesn't right now?

Show
Charles Oliver Nutter added a comment - 26/Jan/08 3:16 AM It probably would be appropriate. Can you figure out what all it would need to do that it doesn't right now?
Hide
Permalink
mctozzy added a comment - 26/Jan/08 9:03 PM

I'm fairly sure the only thing it needs (and the implementation of the HSQLDB driver is similar because the relevant code in that adapter is not very good) is to copy the two methods from the postgresjdbc adapter (tables and columns) that fetch all the metadata. The metadata search specs to jdbc should be selective so as to exclude system tables. Likewise, columns need to also do the same thing.

Show
mctozzy added a comment - 26/Jan/08 9:03 PM I'm fairly sure the only thing it needs (and the implementation of the HSQLDB driver is similar because the relevant code in that adapter is not very good) is to copy the two methods from the postgresjdbc adapter (tables and columns) that fetch all the metadata. The metadata search specs to jdbc should be selective so as to exclude system tables. Likewise, columns need to also do the same thing.
Hide
Permalink
Charles Oliver Nutter added a comment - 12/May/08 6:04 PM

I think this is actually a dupe of another bug where it's pulling in metadata it should not. Can you do some research in the bug repo and see if there's been a fix proposed for it?

Show
Charles Oliver Nutter added a comment - 12/May/08 6:04 PM I think this is actually a dupe of another bug where it's pulling in metadata it should not. Can you do some research in the bug repo and see if there's been a fix proposed for it?
Hide
Permalink
Thomas E Enebo added a comment - 04/Feb/09 1:06 PM

This appears to be a duplicate of JRUBY-1642. Follow that for leaking of metadata.

Show
Thomas E Enebo added a comment - 04/Feb/09 1:06 PM This appears to be a duplicate of JRUBY-1642. Follow that for leaking of metadata.

People

  • Assignee:
    Thomas E Enebo
    Reporter:
    mctozzy
Vote (0)
Watch (2)

Dates

  • Created:
    23/Jan/08 6:18 PM
    Updated:
    25/Aug/09 11:32 AM
    Resolved:
    04/Feb/09 1:06 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.