Skip to content
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

MariaDB unit test failure - complex hierarchical CTE with aliased columns #11046

Closed
emteknetnz opened this issue Nov 9, 2023 · 2 comments
Closed

Comments

@emteknetnz
Copy link
Member

emteknetnz commented Nov 9, 2023

Failing in MariaDB but not MySQL

https://github.com/silverstripe/silverstripe-framework/actions/runs/6785846946/job/18445062586

1) SilverStripe\ORM\Tests\SQLSelectTest::testWith with data set "complex hierarchical CTE with aliased columns" ('hierarchy', SilverStripe\ORM\Queries\SQLSelect Object (...), array(), true, array('"SQLSelectTestCteRecursive"."Title"'), '"SQLSelectTestCteRecursive"', array(array('hierarchy', '"SQLSelectTestCteRecursive"."...nt_id"')), array(array('child1'), array('parent'), array('grandparent')))
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     0 => Array (
-        'Title' => 'child1'
+        'Title' => 'grandparent'
     )
     1 => Array (...)
     2 => Array (
-        'Title' => 'grandparent'
+        'Title' => 'child1'
     )
 )

PRs

@GuySartorelli
Copy link
Member

I suspect this is similar to issues we used to have with unit tests failing postgres because we didn't apply a sort order - so the sort order was undefined.

@sabina-talipova
Copy link
Contributor

PR merged. Issue was solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants