Skip to content

Conversation

@miracle2k
Copy link
Contributor

This is a though one and the fix requires a very recent version of SQLAlchemy, but checkout these links:

http://docs.sqlalchemy.org/en/latest/core/tutorial.html#updates-order-parameters
http://dev.mysql.com/doc/refman/5.7/en/update.html

The problem is that if a SET has multiple values in MySQL, column changes in the first clause affect the subsequent CASE statements.

In other words, if we first change left_field and right_field, and then subsequently want to set tree_depth via a CASE(), the evaluation of that CASE will be affected by the left/right changes.

The problem is that if a SET has multiple values in MySQL, column changes in the first clause affect the subsequent CASE statements.

In other words, if we first change left_field and right_field, and then subsequently want to set tree_depth via a CASE(), the evaluation of that CASE will be affected by the left/right changes.

As part of this change, I also fixed the ORM change detection for moves, which can now understand both the relationship and the id field changing.
@miracle2k
Copy link
Contributor Author

I found another code path were the same bug occurred.

This time around, the tests should also pass.

I also improved the "ORM change detection"; it can now understand either the relationship or the id field changing.

@coveralls
Copy link

coveralls commented Sep 30, 2016

Coverage Status

Coverage remained the same at ?% when pulling e7e7bf5 on miracle2k:mysql-subtree into 78430a7 on monetizeio:master.

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

Successfully merging this pull request may close these issues.

2 participants