Skip to content

Error when id/uuid contains non numeric characters? #3

Description

@Comsolvia

Hi!

I'm trying to use CDR-Pusher with CDRs from FusionPBX/Freeswitch, but I'm getting error ERRO[0000] Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'a38-11e6-9c90-d1471568cd91, 0007767a-7eb5-11e6-a26c-35ebe261f3d6, 00082d22-8ba3-' at line 1.

When (finally found and) enabled debug mode the SQL was:
UPDATE TABLE: UPDATE v_xml_cdr SET cdr_stats_imported=1 WHERE uuid IN (00057440-99d3-11e6-954b-e94c6a320930, 0007273e-5a38-11e6-9c90-d1471568cd91, 0007767a-7eb5-11e6-a26c-35ebe261f3d6)
Probably the ID's should be entered with '', like this:
UPDATE TABLE: UPDATE v_xml_cdr SET cdr_stats_imported=1 WHERE uuid IN ('00057440-99d3-11e6-954b-e94c6a320930', '0007273e-5a38-11e6-9c90-d1471568cd91', '0007767a-7eb5-11e6-a26c-35ebe261f3d6').

Maybe it's working when the ID's only contains numeric values?

I tried to change the code in database_fetcher.go without success, I'm not very familiar in coding Go...

Best regards - Tomas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions