r90586 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90585‎ | r90586 | r90587 >
Date:14:34, 22 June 2011
Author:freakolowsky
Status:ok (Comments)
Tags:
Comment:
* MFT r90585 (i know it's late ... ready for 1.17.1 :D)
* *this* is why i need testing pplz on oracle
Modified paths:
  • /branches/REL1_17/phase3/includes/installer/OracleUpdater.php (modified) (history)
  • /branches/REL1_17/phase3/maintenance/oracle/archives/patch_remove_not_null_empty_defs.sql (added) (history)
  • /branches/REL1_17/phase3/maintenance/oracle/tables.sql (modified) (history)

Diff [purge]

Index: branches/REL1_17/phase3/maintenance/oracle/archives/patch_remove_not_null_empty_defs.sql
@@ -0,0 +1,9 @@
 2+define mw_prefix='{$wgDBprefix}';
 3+
 4+ALTER TABLE &mw_prefix.categorylinks MODIFY cl_sortkey_prefix DEFAULT NULL NULL;
 5+ALTER TABLE &mw_prefix.categorylinks MODIFY cl_collation DEFAULT NULL NULL;
 6+ALTER TABLE &mw_prefix.iwlinks MODIFY iwl_prefix DEFAULT NULL NULL;
 7+ALTER TABLE &mw_prefix.iwlinks MODIFY iwl_title DEFAULT NULL NULL;
 8+ALTER TABLE &mw_prefix.searchindex MODIFY si_title DEFAULT NULL NULL;
 9+ALTER TABLE &mw_prefix.querycachetwo MODIFY qcc_title DEFAULT NULL NULL;
 10+ALTER TABLE &mw_prefix.querycachetwo MODIFY qcc_titletwo DEFAULT NULL NULL;
Property changes on: branches/REL1_17/phase3/maintenance/oracle/archives/patch_remove_not_null_empty_defs.sql
___________________________________________________________________
Added: svn:eol-style
111 + native
Index: branches/REL1_17/phase3/maintenance/oracle/tables.sql
@@ -26,7 +26,7 @@
2727
2828 -- Create a dummy user to satisfy fk contraints especially with revisions
2929 INSERT INTO &mw_prefix.mwuser
30 - VALUES (user_user_id_seq.nextval,'Anonymous','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, '', current_timestamp, current_timestamp, 0);
 30+ VALUES (user_user_id_seq.nextval,'Anonymous',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, '', current_timestamp, current_timestamp, 0);
3131
3232 CREATE TABLE &mw_prefix.user_groups (
3333 ug_user NUMBER DEFAULT 0 NOT NULL,
@@ -168,9 +168,9 @@
169169 cl_from NUMBER NOT NULL,
170170 cl_to VARCHAR2(255) NOT NULL,
171171 cl_sortkey VARCHAR2(230),
172 - cl_sortkey_prefix VARCHAR2(255) DEFAULT '' NOT NULL,
 172+ cl_sortkey_prefix VARCHAR2(255),
173173 cl_timestamp TIMESTAMP(6) WITH TIME ZONE NOT NULL,
174 - cl_collation VARCHAR2(32) DEFAULT '' NOT NULL,
 174+ cl_collation VARCHAR2(32),
175175 cl_type VARCHAR2(6) DEFAULT 'page' NOT NULL
176176 );
177177 ALTER TABLE &mw_prefix.categorylinks ADD CONSTRAINT &mw_prefix.categorylinks_fk1 FOREIGN KEY (cl_from) REFERENCES &mw_prefix.page(page_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
@@ -220,8 +220,8 @@
221221
222222 CREATE TABLE &mw_prefix.iwlinks (
223223 iwl_from NUMBER DEFAULT 0 NOT NULL,
224 - iwl_prefix VARCHAR2(20) DEFAULT '' NOT NULL,
225 - iwl_title VARCHAR2(255) DEFAULT '' NOT NULL
 224+ iwl_prefix VARCHAR2(20),
 225+ iwl_title VARCHAR2(255)
226226 );
227227 CREATE UNIQUE INDEX &mw_prefix.iwlinks_ui01 ON &mw_prefix.iwlinks (iwl_from, iwl_prefix, iwl_title);
228228 CREATE UNIQUE INDEX &mw_prefix.iwlinks_ui02 ON &mw_prefix.iwlinks (iwl_prefix, iwl_title, iwl_from);
@@ -416,7 +416,7 @@
417417
418418 CREATE TABLE &mw_prefix.searchindex (
419419 si_page NUMBER NOT NULL,
420 - si_title VARCHAR2(255) DEFAULT '' NOT NULL,
 420+ si_title VARCHAR2(255),
421421 si_text CLOB NOT NULL
422422 );
423423 CREATE UNIQUE INDEX &mw_prefix.searchindex_u01 ON &mw_prefix.searchindex (si_page);
@@ -528,9 +528,9 @@
529529 qcc_type VARCHAR2(32) NOT NULL,
530530 qcc_value NUMBER DEFAULT 0 NOT NULL,
531531 qcc_namespace NUMBER DEFAULT 0 NOT NULL,
532 - qcc_title VARCHAR2(255) DEFAULT '' NOT NULL,
 532+ qcc_title VARCHAR2(255),
533533 qcc_namespacetwo NUMBER DEFAULT 0 NOT NULL,
534 - qcc_titletwo VARCHAR2(255) DEFAULT '' NOT NULL
 534+ qcc_titletwo VARCHAR2(255)
535535 );
536536 CREATE INDEX &mw_prefix.querycachetwo_i01 ON &mw_prefix.querycachetwo (qcc_type,qcc_value);
537537 CREATE INDEX &mw_prefix.querycachetwo_i02 ON &mw_prefix.querycachetwo (qcc_type,qcc_namespace,qcc_title);
Index: branches/REL1_17/phase3/includes/installer/OracleUpdater.php
@@ -21,6 +21,7 @@
2222 array( 'doFunctions17' ),
2323 array( 'doSchemaUpgrade17' ),
2424 array( 'doInsertPage0' ),
 25+ array( 'doRemoveNotNullEmptyDefaults' ),
2526 );
2627 }
2728
@@ -103,6 +104,21 @@
104105 }
105106
106107 /**
 108+ * Remove DEFAULT '' NOT NULL constraints from fields as '' is internally
 109+ * converted to NULL in Oracle
 110+ */
 111+ protected function doRemoveNotNullEmptyDefaults() {
 112+ $this->output( "Removing not null empty constraints ... " );
 113+ $meta = $this->db->fieldInfo( 'categorylinks' , 'cl_sortkey_prefix' );
 114+ if ( $meta->isNullable() ) {
 115+ $this->output( "constraints seem to be removed\n" );
 116+ return;
 117+ }
 118+ $this->applyPatch( 'patch_remove_not_null_empty_defs.sql', false );
 119+ $this->output( "ok\n" );
 120+ }
 121+
 122+ /**
107123 * Overload: after this action field info table has to be rebuilt
108124 */
109125 public function doUpdates( $what = array( 'core', 'extensions', 'purge' ) ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r91533* RELEASE-NOTES for r90586.freakolowsky08:06, 6 July 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r90585* removed DEFAULT '' NOT NULL constraints as '' is internaly converted to NUL...freakolowsky14:10, 22 June 2011

Comments

#Comment by Krinkle (talk | contribs)   20:18, 26 June 2011

The revision in trunk isn't reviewed yet. Please wait for review next time before MFT'ing.

#Comment by Tim Starling (talk | contribs)   03:29, 6 July 2011

Missing release notes.

Status & tagging log