From: Jure Kajzer Date: Mon, 9 Nov 2009 14:54:59 +0000 (+0000) Subject: Fixed parserTests to only insert USER_ID 0 and 1 because it somhow breaks mysql. X-Git-Tag: 1.31.0-rc.0~38865 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=0614acd8e8783606643f70c6e2034412bba4b675;p=lhc%2Fweb%2Fwiklou.git Fixed parserTests to only insert USER_ID 0 and 1 because it somhow breaks mysql. --- diff --git a/maintenance/parserTests.inc b/maintenance/parserTests.inc index 7d5ba6488a..b59e3f5a2f 100644 --- a/maintenance/parserTests.inc +++ b/maintenance/parserTests.inc @@ -785,15 +785,19 @@ class ParserTest { ) ); - #Anonymous user - $db->insert( 'user', array( - 'user_id' => 0, - 'user_name' => 'Anonymous') ); - - # Hack-on-Hack: Insert a test user to be able to insert an image - $db->insert( 'user', array( - 'user_id' => 1, - 'user_name' => 'Tester') ); + if ($wgDBtype == 'oracle') { + # Insert 0 and 1 user_ids to prevent FK violations + + #Anonymous user + $db->insert( 'user', array( + 'user_id' => 0, + 'user_name' => 'Anonymous') ); + + # Hack-on-Hack: Insert a test user to be able to insert an image + $db->insert( 'user', array( + 'user_id' => 1, + 'user_name' => 'Tester') ); + } # Hack: Insert an image to work with $db->insert( 'image', array(