distal-attribute
distal-attribute
distal-attribute
distal-attribute

Multiple SQL statements against different table each get output tab and export files using the first table name only

harmod posted 1 year ago in General

I think I am experiencing a consistent bug on v9.3.0.5051. I have seen this bug on previous versions, also, so it is not only about v9.3.0.5051.

If I create and run a multiple statement query like this: select from A; select from B; select * from C;

then, all 3 output tabs get only the first table name (A) and their data all export to files as SQL Inserts using the first table name only, like this: INSERT INTO "A" (A columns...) VALUES (A values...); INSERT INTO "A" (B columns...) VALUES (B values...); INSERT INTO "A" (C columns...) VALUES (C values...);

What should happen is the 3 tabs each have their proper, corresponding table, and the exports to files look like this: INSERT INTO "A" (A columns...) VALUES (A values...); INSERT INTO "B" (B columns...) VALUES (B values...); INSERT INTO "C" (C columns...) VALUES (C values...);

I am using a MS SQL Server database in this instance. Not sure if same problem exists with MySQL database.

VID posted 1 year ago

This is what happens with 5057 on a MariaDB database, exports all seem ok.

1 attachment(s):
  • multi_select
ansgar posted 1 year ago

MySQL and MariaDB report their table name via C API, which is quite nice. MSSQL does not do that, so HeidiSQL has to find the table name with much effort somewhere within the SQL query. This failed yet when you executed multiple queries in a batch. r5058 fixes that. But it still fails to detect the right query when you have activated "Send batch in one go". Please update and test if that also works for you in "Send queries one by one" mode.

ansgar posted 1 year ago

r5059 now should fix the wrong table for the other mode as well (Send batch in one go).

harmod posted 1 year ago

I am confirming that the software update fixed the problem. I am amazed because I posted the problem late at night and then 4 hours later I was informed that the problem has been fixed. Really, you guys are fantastic beyond words.

Please login to leave a reply, or register at first.