Executing multi query will result in only last one saved in history table.
Execute:
START TRANSACTION;
DELETE from `xyz`;
rollback;
Check history table. Only rollback command gets saved.
All queries should be saved. Either in one entry or multiple.
The last sentence of @fliespl is interesting…
@williamdes @mauriciofauth @ibennetch , what do you think please? Should a "multi-queries" request be logged as one entry or should it be as many entries than the number of queries?
My opinion would be to have one entry with all queries because in some cases this is the whole pack which is relevant (for instance when you have some queries creating temporary table, starting a transaction, setting autocommit to 0, …).
Thank you for your feedback.
@Tithugues one entry seems like a good idea
Found another issue related to this.
If we execute multiple queries (in example we have table with 1 column with primary key):
insert into migration_versions values (1);
insert into migration_versions values (2);
insert into migration_versions values (1);
setHistory is never called even though first two queries executed correctly and only third one failed. Currently not sure what it should save. Maybe add two columns in history table? One for successful queries and second one for failed ones?
Another thing that might be worth thinking about is to provide ability, so that we can configure PMA to always execute multiple queries in transaction (either by default or configurable) with rollback if any error happens.