Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
klein0r opened this issue Feb 12, 2023 · 1 comment

Comments

@klein0r
Copy link

klein0r commented Feb 12, 2023

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
@Erwin40
Copy link

Erwin40 commented Oct 24, 2024

Das ist der gleiche wie bei #304
Bitte mit entspr. Verweis schließen :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants