r57698 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57697‎ | r57698 | r57699 >
Date:04:28, 14 October 2009
Author:overlordq
Status:ok
Tags:
Comment:
Followup to r57102, use already existing sequence name so as to not break DB2 and PostgreSQL
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/Category.php (modified) (history)
  • /trunk/phase3/maintenance/ora/tables.sql (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/ora/tables.sql
@@ -163,7 +163,7 @@
164164 CREATE INDEX &mw_prefix.categorylinks_i01 ON &mw_prefix.categorylinks (cl_to,cl_sortkey,cl_from);
165165 CREATE INDEX &mw_prefix.categorylinks_i02 ON &mw_prefix.categorylinks (cl_to,cl_timestamp);
166166
167 -CREATE SEQUENCE category_cat_id_val;
 167+CREATE SEQUENCE category_id_seq;
168168 CREATE TABLE &mw_prefix.category (
169169 cat_id NUMBER NOT NULL,
170170 cat_title VARCHAR2(255) NOT NULL,
Index: trunk/phase3/includes/Article.php
@@ -4074,7 +4074,7 @@
40754075 }
40764076 $insertRows = array();
40774077 foreach( $insertCats as $cat ) {
4078 - $insertRows[] = array( 'cat_id' => $dbw->nextSequenceValue( 'category_cat_id_val' ),
 4078+ $insertRows[] = array( 'cat_id' => $dbw->nextSequenceValue( 'category_id_seq' ),
40794079 'cat_title' => $cat );
40804080 }
40814081 $dbw->insert( 'category', $insertRows, __METHOD__, 'IGNORE' );
Index: trunk/phase3/includes/Category.php
@@ -246,7 +246,7 @@
247247 } else {
248248 # Let's be sure that the row exists in the table. We don't need to
249249 # do this if we got the row from the table in initialization!
250 - $seqVal = $dbw->nextSequenceValue( 'category_cat_id_val' );
 250+ $seqVal = $dbw->nextSequenceValue( 'category_id_seq' );
251251 $dbw->insert(
252252 'category',
253253 array( 'cat_id' => $seqVal,

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r57102logging table added columns, fixed cat_id sequence generation in Article and ...freakolowsky13:38, 30 September 2009

Status & tagging log