Bugs: Browse | Submit New | Admin

[#10375] [sql_dep_graph] SQL Queries with JOINS are not supported

Date:
2007-04-26 04:58
Priority:
3
Submitted By:
Enrico Stahn (enrico)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
[sql_dep_graph] SQL Queries with JOINS are not supported

Detailed description
I had a problem running sql_dep_graph. I ever run into the following error message:

c:/Programme/ruby/lib/ruby/gems/1.8/gems/sql_dep_graph-1.0.0/lib/sql_dep_grapher.rb:94:in `log10': can't convert nil
into Float (TypeError)
        from c:/Programme/ruby/lib/ruby/gems/1.8/gems/sql_dep_graph-1.0.0/lib/sql_dep_grapher.rb:94:in `graph'
        from c:/Programme/ruby/lib/ruby/gems/1.8/gems/sql_dep_graph-1.0.0/lib/sql_dep_grapher.rb:43:in `build_graph'
        from c:/Programme/ruby/lib/ruby/gems/1.8/gems/sql_dep_graph-1.0.0/bin/sql_dep_graph:5
        from c:/Programme/ruby/bin/sql_dep_graph:18

After some debugging I solved my problem with the following solution in line 56 of lib/sql_dep_grapher.rb:

tables = $1.split(/,|JOIN/).reject { |t| t =~ /\(/ }

instead of

tables = $1.split(',').reject { |t| t =~ /\(/ }

Cheers
Enrico

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item