Skip to content

Segmentation Fault #6

Closed
Closed
@no0p

Description

Hi -- Huge fan of this library. This may be a user error issue as I'm a little out of my element here.

I'm working on a quixotic addition to this lib that creates a function which automatically loads some basic schema info from the mysql. I setup a foreign server and credentials ok, and add a normal table which I can select against ok. Next...

create foreign table mysql_columns (table_name text, column_name text) server mysql_svr options (table 'information_schema.columns');

Then when I execute a select against mysql_columns a segfault occurs.

Here is the backtrace from gdb:

(gdb) backtrace
#0  0x00007fd7cb1567ab in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fd7c4fffe83 in atof (__nptr=<optimized out>)
    at /usr/include/stdlib.h:281
#2  mysqlPlanForeignScan (foreigntableid=<optimized out>, 
    root=<optimized out>, baserel=0x7fd7ce3b17d8) at mysql_fdw.c:466
#3  0x00007fd7cd304f7a in create_foreignscan_path ()
#4  0x00007fd7cd2dae07 in ?? ()
#5  0x00007fd7cd2db215 in make_one_rel ()
#6  0x00007fd7cd2f1633 in query_planner ()
#7  0x00007fd7cd2f2f31 in ?? ()
#8  0x00007fd7cd2f4b41 in subquery_planner ()
#9  0x00007fd7cd2f4e07 in standard_planner ()
#10 0x00007fd7cd355a70 in pg_plan_query ()
#11 0x00007fd7cd355b74 in pg_plan_queries ()
#12 0x00007fd7cd35658e in PostgresMain ()
#13 0x00007fd7cd318791 in ?? ()
#14 0x00007fd7cd3194d1 in PostmasterMain ()
#15 0x00007fd7cd16cdb9 in main ()

I'm continuing to investigate but am a bit of a novice in such matters. Thanks!

update: A one line hack to get this working is on my fork but I'm reluctant to suggest its an actual fix since I don't understand the problem fully.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions