New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use correct column order for composite foreign keys #4978
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch, @AndreasA. Please see a few comments inline.
@morozov The threads should now be fixed or if not I added a comment why not. I have now also manually executed the two create table statements on another machine with MySQL 8.0 and the retrieve foreign key SQL for it and the result was the same regarding the foreign key columns order. without ORDINAL_POSITION it was different there as well, so I think it is not just an issue - due to some configuration - for my MySQL installation. In any case using ORDINAL_POSITION should always work. I have also checked and By now moving the test to be used for all platforms, I cannot be sure 100% if the issue is fixed for all of them. I have fixed it for the SQLSrv tests now because that workflow was automatically started. I just hope that all others are already retrieving the data in the correct order 😄 From a short glance they should do so but the tests should make sure. One other thing: I have created the PR for 3.x but should I actually create a PR for 2.x which can then be merged into 3.x? though I doubt it is an issue that occurs that often, otherwise I think it would have been addressed earlier. |
I approved the test run.
There's no need to backport the fix to |
@morozov I have now done the necessary adjustments. Can you re-check? Not sure if the test run is running against the lastest verison. |
You'll need to disable the test on SQLite (see #4978 (comment)). Its failure prevents other jobs from running. |
Ah yes. Missed that part and have added it now. Thanks for letting me know. |
Can you have a look at the test failures on Oracle and DB2? |
@derrabus I just did, apparantly the column names are always uppercase there but I specify them originally lowercase. I guess the easies solution would be to create them uppercase for now as I don't really care about the case just the order. Or I ignore the case during the assertion. Not sure which way to go |
Most tests create the columns in the lower case and use |
@AndreasA, the patch looks good to me. Please squash all commits, and we can merge it. |
@morozov Done. |
Thanks, @AndreasA! |
Fixes wrong foreign key order. For now just an integration test.