Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

mysql tagDatabase operation problem

$
0
0
Good morning,

I wrote on the past on the subject but with unfortunately with no answer. I'm currently testing your product with mysql and I have a problem the tagging process ( I did not test it but faily sure that the problem exist for other rdbms).

I'm opening this topic with the same idea behind the following post  :

You stated that the issue should be fixed on 2.0.2 and I' currently using the version 3.1 and I still have problem of changeset's tags information beeing written were it shouldn't have.

Note, from what I see the problem is with how the tag is set and the sql command that is sent. The fact is that you are using the dataexecuted to manage what record should be tagged and in the databasechangelog table the dateexecuted, datetime field precision is the second therefore multiple statement can be run within that seconds.

Below is the the actual sql command the following sample code end up updating multiple rows and written to possibly to some other changeset.
UPDATE `DATABASECHANGELOG` SET `TAG` = 'tag-test' WHERE DATEEXECUTED = (SELECT MAX(DATEEXECUTED) FROM (SELECT DATEEXECUTED FROM `DATABASECHANGELOG`) AS X);
I have also joined in this post a changelog including the changesets to reproduce the situation. to sumarrize I have onle changeset indicating the tagdatabase but at the end i got 3 changeset having the actual tag.

I have some possible track of solution, for instance not to use the DATEEXECUTED but rather the ORDEREXECUTED for instance but at the end you will be a lot better to find the correct fix not only for mysql but for other RDBMS.

Could you please assist me. Is there some configuration that I can change ? or some other way to get it to work smoothly with mysql ?
Thanks you in advance.
Ricardo Fonseca http://www.lapresse.ca/

Viewing all articles
Browse latest Browse all 2993

Trending Articles