Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
DeleteTruncateTest test is failed with MemSQL database driver https://www.drupal.org/project/memsql due to reason that MemSQL returns results unsorted. MySQL returns results sorted by primary key in this test.
$pid_to_delete = $this->connection->query("SELECT * FROM {test_task} WHERE task = 'sleep'")->fetchField();
SELECT * FROM {test_task} WHERE task = 'sleep' returns 5, 2 in MemSQL and 2, 5 in MySQL, so
$pid_to_delete == 5 in MemSQL.
$pid_to_delete == 2 in MySQL.
SQL standard doesn't define and databases (even MySQL or PostgresQL) can not guarantee default sorting order, so such order has to be defined in the query if we need specific order.
Comment | File | Size | Author |
---|---|---|---|
#2 | drupal-delete_truncate_test-3119922-2-D8.patch | 878 bytes | sinn |
Comments
Comment #2
sinn CreditAttribution: sinn as a volunteer commentedPatch is attached.
Comment #3
sinn CreditAttribution: sinn as a volunteer commentedComment #4
daffie CreditAttribution: daffie commentedHi @sinn: I did not know that there was a database driver for MemSQL. Thank you for working on it.
I have reviewed the patch and I do not see any problems for any other database drivers. Also the test keeps on testing what it supposed to test. The testbot failures are not related to this patch. For me it is RTBC.
I would like to point out that we are working on #3120096: Support contrib database driver directories in a fixed location in a module. As a result of this issue the driver directory for your MemSQL database driver has no longer be copied to
DRUPAL_ROOT/drivers
directory by the site builder/owner. The issue has not landed so it can change.If you have an issue for core that is related to the database driver for MemSQL, then please add the tag "Contrib database driver". There are other people working on other contrib database driver and with this patch we see each others issues and we can help each other. If we work together all our database drivers will get better. See: https://www.drupal.org/project/issues/search?issue_tags=Contrib%20databa...
Would it be possible to add a bit more info about your database driver for MemSQL on its project page.
Again: thank you for working on the database driver for MemSQL.
Comment #5
sinn CreditAttribution: sinn as a volunteer commentedHi @daffie.
I know about https://www.drupal.org/project/drupal/issues/3120096 and I'm looking forward when it will be completed.
> If you have an issue for core that is related to the database driver for MemSQL, then please add the tag "Contrib database driver".
Thanks. I will do it.
Regarding MemSQL module, it is in alpha state. Need to resolve few issues. I'm going to release it for Drupal 9 when #312009 will be ready.
Meanwhile you can watch presentation about MemSQL https://www.enik.io/drupal/memsql/2020/03/31/memsql-presentation.html
Comment #9
catchCommitted d4a14f6 and pushed to 9.1.x, cherry-picked back to 8.9.x. Thanks!