jenkins-bot has submitted this change and it was merged.
Change subject: Fix Oracle installation SQL
......................................................................
Fix Oracle installation SQL
The starting and minimal values of sequences on Oracle are both '1' by
default. We want a user with id of 0 (used for anonymous edits), so
these were both set to '0' and the user was inserted with its id being
the next value in the sequence.
However, due to some low level caching settings you can miss the first
value in a sequence. It makes no difference to other sequences, but it
does with this one, as it must be 0 to maintain foreign key validity.
Therefore let's just set the sequence to default starting value of '1'
and insert the user with hardcoded id=0.
Bug: 38411
Change-Id: Ic9a17b92d6052fbdc24dd431726e4d82dbf48034
---
M maintenance/oracle/tables.sql
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Bartosz Dziewoński: Looks good to me, approved
jenkins-bot: Verified
diff --git a/maintenance/oracle/tables.sql b/maintenance/oracle/tables.sql
index acfabc3..607d7b9 100644
--- a/maintenance/oracle/tables.sql
+++ b/maintenance/oracle/tables.sql
@@ -2,7 +2,7 @@
define mw_prefix='{$wgDBprefix}';
-CREATE SEQUENCE user_user_id_seq MINVALUE 0 START WITH 0;
+CREATE SEQUENCE user_user_id_seq;
CREATE TABLE &mw_prefix.mwuser ( -- replace reserved word 'user'
user_id NUMBER NOT NULL,
user_name VARCHAR2(255) NOT NULL,
@@ -27,7 +27,7 @@
-- Create a dummy user to satisfy fk contraints especially with revisions
INSERT INTO &mw_prefix.mwuser
- VALUES
(user_user_id_seq.nextval,'Anonymous',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
'', current_timestamp, current_timestamp, 0);
+ VALUES (0,'Anonymous',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, '',
current_timestamp, current_timestamp, 0);
CREATE TABLE &mw_prefix.user_groups (
ug_user NUMBER DEFAULT 0 NOT NULL,
--
To view, visit https://gerrit.wikimedia.org/r/80538
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9a17b92d6052fbdc24dd431726e4d82dbf48034
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Petrb <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Freakolowsky <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits