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.
This is a follow up from #669794: Use savepoints for nested transactions
Most linux distros except ubuntu 9.10 ships with a old build-in version of sqlite 3.5.XX
As Crell proposed at http://drupal.org/node/669794#comment-2766184
sqlite needs own implementation of savepoints if version lower 3.6.8
Comment | File | Size | Author |
---|---|---|---|
#10 | 754192-sqlite-savepoint.patch | 5.79 KB | Damien Tournoud |
#4 | 754192-sqlite-savepoint-d7.patch | 5.66 KB | andypost |
#3 | 754192-sqlite-savepoint-d7.patch | 5.5 KB | andypost |
Comments
Comment #1
mfer CreditAttribution: mfer commentedSubscribe.
This issue blocks sqlite testing. Once testing in sqlite comes back up there will be MANY follow-up issues. Drupal 7 fails A LOT of tests in sqlite at the moment.
Comment #2
andypost@mfer the first thing is really needed to detect actual sqlite version, I found no better approach then parse phpinfo()
EDIT:
SELECT sqlite_version();
worksTesting server could use ubuntu for #543582: Meta issue: fix the remaining SQLite bugs
Also there's http://qa.drupal.org/incombatibility
Comment #3
andypostI got it working on debian lenny (pdo_sqlite 3.3.7)
Comment #4
andypostA bit commented and $this->willRollback should mark whole stack as needed total rollback
Comment #5
Dries CreditAttribution: Dries commentedI reviewed the code and this looks good. I haven't tested the code though, but I'm going to mark this RTBC. I'll commit this unless someone else raises some issues with it.
Comment #6
Damien Tournoud CreditAttribution: Damien Tournoud commentedPlease give me a few hours to properly review and test this.
Comment #7
andypostTransaction tests are broken, suppose we need a conditional tests for old and new libs
EDIT: also "invalid data" test broken but this another issue
Comment #8
Damien Tournoud CreditAttribution: Damien Tournoud commentedThe transaction test is probably failing because we fail to rollback a transaction at the correct point. SQLite supports transactional DDL statements, so the following will result in the table not being removed:
Comment #9
andypost@Damien transactional DDL means that DDL statements works in transaction (does not roll back transaction)?
Comment #10
Damien Tournoud CreditAttribution: Damien Tournoud commentedHm. Actually the issue we have here is that the willRollback flag is never cleared. This works pretty well for me.
Comment #11
andypostThis passes a transaction test!
Comment #12
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD.
Comment #13
mfer CreditAttribution: mfer commentedLooking at http://drupalcode.org/viewvc/drupal/drupal/includes/database/sqlite/data... I don't see this committed, yet.
Comment #14
Dries CreditAttribution: Dries commentedOops. Committed now! Thanks.