flightaware / speedtables

Speed tables is a high-performance memory-resident database. The speed table compiler reads a table definition and generates a set of C access routines to create, manipulate and search tables containing millions of rows. Currently oriented towards Tcl.

Home Page:https://flightaware.github.io/speedtables/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stapi::refresh_ctable does not handle SQL generation errors

mutability opened this issue · comments

If gen_refresh_ctable_sql returns 0 to indicate an error, refresh_ctable does not handle this and tries to execute it as SQL, which fails:

03/17/2016 12:05:15 speedtable refresh of airline_fleets failed: ERROR:  syntax error at or near "0"
LINE 1: 0
        ^

I've got a fix for this in the stapi-fixes branch.

What was the root cause of gen_refresh_ctable_sql returning zero? I'm not seeing how that could happen without a problem elsewhere.

The cause was #53

Ah, OK. This should make that kind of failure easier to debug anyway.

I'll get started on #53 - that's not a use case I had ever considered.

I have rebased the stapi-fixes branch up to master. Can you please verify that it fixes this problems so I can merge it back?

Fixed in stapi-fixes.