diff options
author | Antoine Musso <hashar@users.mediawiki.org> | 2012-01-11 09:46:21 +0000 |
---|---|---|
committer | Antoine Musso <hashar@users.mediawiki.org> | 2012-01-11 09:46:21 +0000 |
commit | f5f1b6d0bb47521a5941740c52c439194cbdfddc (patch) | |
tree | 6fece2c2c421d45e57ada4226aa4046f72aadaa5 /tests/phpunit/includes/db/DatabaseTest.php | |
parent | 44b06f908ec6e013e5dc3c20418269199ab7e246 (diff) | |
download | mediawikicore-f5f1b6d0bb47521a5941740c52c439194cbdfddc.tar.gz mediawikicore-f5f1b6d0bb47521a5941740c52c439194cbdfddc.zip |
Reverts MySQL stored procedure support
This is reverting the work done by MaxSem to support stored procedures
and stored function in MySQL. The reasons are:
- it is not needed yet
- tests are not functionals
- alter the stable include/db/Database.php and drop support for ';;'
So please create a branch to work on it and merge it back in trunk
once we have branched 1.19 :-)
I have opened bug 33654 to track this enhancement request.
Reverts r107376, r107994.
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108603
Diffstat (limited to 'tests/phpunit/includes/db/DatabaseTest.php')
-rw-r--r-- | tests/phpunit/includes/db/DatabaseTest.php | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/tests/phpunit/includes/db/DatabaseTest.php b/tests/phpunit/includes/db/DatabaseTest.php index 672e6645b8ce..d480ac6e0095 100644 --- a/tests/phpunit/includes/db/DatabaseTest.php +++ b/tests/phpunit/includes/db/DatabaseTest.php @@ -2,20 +2,12 @@ /** * @group Database - * @group DatabaseBase */ class DatabaseTest extends MediaWikiTestCase { - var $db, $functionTest = false; + var $db; function setUp() { - $this->db = wfGetDB( DB_MASTER ); - } - - function tearDown() { - if ( $this->functionTest ) { - $this->dropFunctions(); - $this->functionTest = false; - } + $this->db = wfGetDB( DB_SLAVE ); } function testAddQuotesNull() { @@ -98,26 +90,6 @@ class DatabaseTest extends MediaWikiTestCase { $sql ); } - /** - * @group Broken - */ - function testStoredFunctions() { - if ( !in_array( wfGetDB( DB_MASTER )->getType(), array( 'mysql', 'postgres' ) ) ) { - $this->markTestSkipped( 'MySQL or Postgres required' ); - } - global $IP; - $this->dropFunctions(); - $this->functionTest = true; - $this->assertTrue( $this->db->sourceFile( "$IP/tests/phpunit/data/db/{$this->db->getType()}/functions.sql" ) ); - $res = $this->db->query( 'SELECT mw_test_function() AS test', __METHOD__ ); - $this->assertEquals( 42, $res->fetchObject()->test ); - } - - private function dropFunctions() { - $this->db->query( 'DROP FUNCTION IF EXISTS mw_test_function' - . ( $this->db->getType() == 'postgres' ? '()' : '' ) - ); - } } |