Description:
When pasting a script into a Query Browser script tab (eg as generated by a web page or whatever) that contains a series of INSERT statements, clicking "execute" or "continue" to run the script causes each row, except the first and the last, as long as the query is greater than three lines in length, to be INSERTed twice.
The script does not execute automatically upon being pasted in, so there is no apparent way to make it execute the script only once. Even stepping each line individually causes each line to be executed twice, although there is no way of telling this until you review the results afterwards.
Loading in a saved script (ie from a text or .sql file) does not produce the same problem.
How to repeat:
Paste any multi-line query (script) into a script tab of Query Browser that contains a series of insert statements:
INSERT INTO t1 VALUES ('a', 'b', 'c');
INSERT INTO t1 VALUES ('d', 'e', 'f');
INSERT INTO t1 VALUES ('g', 'h', 'i');
INSERT INTO t1 VALUES ('j', 'k', 'l');
INSERT INTO t1 VALUES ('m', 'n', 'o');
... etc
And choose "Execute", "Continue", or "Step" (to execute each line individually. Now look at the table (in this case `t1` and see that each row, except the first and the last, has been inserted twice). If the query is less than three lines long this effect cannot be observed.
Obviously this only works as long as duplicate keys are not violated - otherwise the query breaks when it encounters such a situation.
Description: When pasting a script into a Query Browser script tab (eg as generated by a web page or whatever) that contains a series of INSERT statements, clicking "execute" or "continue" to run the script causes each row, except the first and the last, as long as the query is greater than three lines in length, to be INSERTed twice. The script does not execute automatically upon being pasted in, so there is no apparent way to make it execute the script only once. Even stepping each line individually causes each line to be executed twice, although there is no way of telling this until you review the results afterwards. Loading in a saved script (ie from a text or .sql file) does not produce the same problem. How to repeat: Paste any multi-line query (script) into a script tab of Query Browser that contains a series of insert statements: INSERT INTO t1 VALUES ('a', 'b', 'c'); INSERT INTO t1 VALUES ('d', 'e', 'f'); INSERT INTO t1 VALUES ('g', 'h', 'i'); INSERT INTO t1 VALUES ('j', 'k', 'l'); INSERT INTO t1 VALUES ('m', 'n', 'o'); ... etc And choose "Execute", "Continue", or "Step" (to execute each line individually. Now look at the table (in this case `t1` and see that each row, except the first and the last, has been inserted twice). If the query is less than three lines long this effect cannot be observed. Obviously this only works as long as duplicate keys are not violated - otherwise the query breaks when it encounters such a situation.