From 0614acd8e8783606643f70c6e2034412bba4b675 Mon Sep 17 00:00:00 2001 From: Jure Kajzer Date: Mon, 9 Nov 2009 14:54:59 +0000 Subject: [PATCH] Fixed parserTests to only insert USER_ID 0 and 1 because it somhow breaks mysql. --- maintenance/parserTests.inc | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) 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( -- 2.20.1