Skip to content

Adapter adds two insert statements to the same request (leads to an error) #294

Description

@klein0r

Describe the bug

In some cases, the adapter generates a statement with two separate inserts. e.g.

INSERT INTO `iobroker`.ts_counter (id, ts, val) VALUES (5, 1676135872618, 53.32),(5, 1676138387812, 53),(5, 1676138387812, 53),(5, 1676138670902, 52.95);INSERT INTO `iobroker`.ts_number (id, ts, val, ack, _from, q) VALUES (5, 1676138387812, 53, 1, 2, 0),(5, 1676138670902, 52.95, 1, 2, 0);
Cannot insert INSERT INTO `iobroker`.ts_counter (id, ts, val) VALUES (5, 1676135872618, 53.32),(5, 1676138387812, 53),(5, 1676138387812, 53),(5, 1676138670902, 52.95);INSERT INTO `iobroker`.ts_number (id, ts, val, ack, _from, q) VALUES (5, 1676138387812, 53, 1, 2, 0),(5, 1676138670902, 52.95, 1, 2, 0);: Error: 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 'INSERT INTO `iobroker`.ts_number (id, ts, val, ack, _from, q) VALUES (5, 1676...' at line 1 (id: LUFTFEUCHTE@William_Martin)

See https://forum.iobroker.net/topic/62640/sql-adpter-insert-befehle-innerhalb-von-40ms

1676198865950-iolog

Versions:

  • Adapter version: 1.16.1 and 2.2.0

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

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