Last modified: 2012-05-28 19:50:44 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T36759, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34759 - Improve SQLite detection, to be able to execute SQLite tests
Improve SQLite detection, to be able to execute SQLite tests
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Maintenance scripts (Other open bugs)
1.20.x
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-27 20:15 UTC by christian
Modified: 2012-05-28 19:50 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Adding SQLite detection on modern PHPs (873 bytes, patch)
2012-02-27 20:15 UTC, christian
Details

Description christian 2012-02-27 20:15:19 UTC
Created attachment 10119 [details]
Adding SQLite detection on modern PHPs

When running the PHPUnit tests on recent PHP (with sqlite support enabled), the SQLite tests are skipped, as the SQLite detection does not detect SQLite support.


Example system:
  Gentoo Linux 3.2.1-gentoo-r2
  PHP 5.3.9-pl0-gentoo (with configure options '--enable-pdo' '--with-sqlite=/usr' '--enable-sqlite-utf8' '--with-sqlite3=/usr')

The system's phpinfo yields:
  [...]
  PDO

  PDO support => enabled
  PDO drivers => mysql, pgsql, sqlite, sqlite2
  [...]
  pdo_sqlite

  PDO Driver for SQLite 3.x => enabled
  SQLite Library => 3.7.9
  [...]

The attached patch allows to detect pdo_sqlite support using get_loaded_extensions, and uses the old detection method as fallback.
Comment 1 Sumana Harihareswara 2012-02-27 20:46:39 UTC
Thanks for the patch.
Comment 2 Max Semenik 2012-02-28 18:18:44 UTC
Is SQLite visible in installer for you?
Comment 3 christian 2012-02-29 11:05:01 UTC
(In reply to comment #2)
> Is SQLite visible in installer for you?

Yes.
It is visible without the patch.
It is still visible after the patch.

But just to avoid confusion, I do not want to actually /use/ SQLite as backend.
I only want to /run the SQLite tests/, even when I use the MySQL backend. This is to assure that changing something in one (seemingly unrelated) part of MW does not accidently break SQLite support.
Comment 4 Sumana Harihareswara 2012-05-25 02:39:42 UTC
Christian, thanks again for the patch.  Are you interested in using developer access to directly suggest it into our Git source control system?

https://www.mediawiki.org/wiki/Developer_access

https://www.mediawiki.org/wiki/Git/Workflow#How_to_submit_a_patch
Comment 5 christian 2012-05-28 19:50:44 UTC
I cannot reproduce the original problem any longer -> Resolved/Worksforme.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links