lol.. Daniel used to work for me, and he's the one who created the views for an 
extension he wrote on our wiki!  I'll take a look at the patch.

On Dec 30, 2013, at 5:19 PM, Antoine Musso wrote:

> Le 31/12/13 00:06, Jim Hu a écrit :
>> We have an extension that has modified the schema with a view.  Using MW 
>> 1.19 and mySQL 5.6, I'm trying to learn unit testing to do some code 
>> archaeology and refactoring. When I run tests/phpunit/phpunit.php I get:
>> 
>> $ php phpunit.php 
>> PHPUnit 3.7.28 by Sebastian Bergmann.
>> 
>> Configuration read from 
>> /Library/WebServer/Documents/GO/wiki/tests/phpunit/suite.xml
>> 
>> A database error has occurred.  Did you forget to run maintenance/update.php 
>> after upgrading?  See: 
>> https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script
>> Query: CREATE TEMPORARY  TABLE `unittest_cacao_open_challenges_view` (LIKE 
>> `cacao_open_challenges_view`)
>> Function: DatabaseMysql::duplicateTableStructure
>> Error: 1347 'go_wikidb.cacao_open_challenges_view' is not BASE TABLE 
>> (localhost)
>> 
>> Since the schema change is there regardless of whether the extension is 
>> active or not, the test crashes either way.  The wiki works.  
>> 
>> As I understand it, this is because mySQL doesn't allow temporary tables to 
>> be created from views.  So... I am guessing that I somehow need to tell 
>> phpunit to skip this view when testing the database.
> 
> Hello,
> 
> Seems like it is the proper guess. Some people reported the issue
> previously on bug https://bugzilla.wikimedia.org/43571
> 
> Daniel Renfro, from VistaPrint, has been kind enough to babysit that
> issue and got a patch merged: https://gerrit.wikimedia.org/r/#/c/65301/
> 
> I have backported it in 1.22 so 1.22.0 should properly detects views and
> skip them when running unit tests.
> 
> The patch might probably be applied on 1.19 as is.
> 
> cheers,
> 
> -- 
> Antoine "hashar" Musso
> 
> 
> _______________________________________________
> MediaWiki-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

=====================================
Jim Hu
Professor
Dept. of Biochemistry and Biophysics
2128 TAMU
Texas A&M Univ.
College Station, TX 77843-2128
979-862-4054


_______________________________________________
MediaWiki-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to