Bug 29556 - System.Data.Odbc GetSchema(string, string[]) is an infinite recursive loop.
Summary: System.Data.Odbc GetSchema(string, string[]) is an infinite recursive loop.
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Data (show other bugs)
Version: 3.12.0
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-04-29 17:12 UTC by Ryan
Modified: 2015-06-04 17:09 UTC (History)
1 user (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Ryan 2015-04-29 17:12:20 UTC
The GetSchema(string) function calls GetSchema(string, string[]) which in turn checks if the connection is closed (in which case it throws an exception), but otherwise it simply calls itself with the same initial arguments.  Attempting to wait out the database timeout perhaps?  Or simply trying to blow up system memory?  In either case, it's horrible code and should be fixed.  If the function is incomplete, it should throw a NotImplemented exception instead of wasting system resources and relying on the VM to eventually detect it and kill it.  According to the mono class status page, it appears that System.Data.OdbcConnection.GetSchema is good to go! I suspect at least throwing an exception would potentially flag it correctly in those docs and save people like myself a lot of time.

I don't know how long this has been a problem, but I suspect a very long time.  I have tested with 3.10 and 3.12 with the same results.
Comment 1 Ryan 2015-06-04 17:09:43 UTC
This is still an issue in version 4.0.1 making any GetSchema calls to ODBC sources not only unusable, but catastrophic to the running program.  Does anyone look at these bugs?  Are more devs needed to address the open bugs?

Note You need to log in before you can comment on or make changes to this bug.