Previously, whenever we blocked a user, its IP address would be
autoblocked whenever he tries to edit a page. Thus when later unblocking
the username, he would be automatically blocked again if we forgot to
clean up is IP.
This patch introduces a the ipb_parent_block_id column in ipblocks table
to track which block triggered the autoblock command. Thus, when deleting
the original block we can easily remove all subsequentautoblocks.
Schema updaters for MySQL, SQLite and postgres have been added to the
patch but not for the other database types such as ibm_db2, mssql and
Oracle.
Change-Id: I4aa820ae9bbd962a12d0b48b6c638a1b6ff4efc9
PostgresUpdater fails on PostgreSQL 8.3.14:
> Changing 'image.img_metadata' default value
> A database query syntax error has occurred.
> The last attempted database query was:
> "ALTER TABLE image ALTER img_metadata SET DEFAULT '\x'::bytea"
> from within function "".
> Database returned error "22P02: ERROR: invalid input syntax for type
> bytea"
Patchset 2:
> Database returned error "42883: ERROR: function
> generate_subscripts(int2vector, integer) does not exist
> LINE 7: (SELECT generate_subscripts(isub.indkey, 1) AS g
> ^
> HINT: No function matches the given name and argument types. You
> might need to add explicit type casts.
> "
Change-Id: I6e1811ded0eedad9c0eb0df715698c45aaf8e3f0
Changeset 1 of https://gerrit.wikimedia.org/r/#change,3365:
763b57f9f2af131a2d8e65f520a23c00109be0e1
got mis-merged in changeset 2:
f752cf8042
And introduced into master wth
0a792a1dcb
Also, marking all new functions as @since 1.19
since we want to have them there later.
Patchset 2: whitespace fixes
Patchset 3: Fix <?php
Patchset 4: rebase to current master
Change-Id: Ic7d940dfec8890de20197128505962375fac4f06
* PostgresField now reports column default value
* DatabasePostgres::indexAttributes reports index
details
* Perform schema update in one transaction
With this change we can sucessfully update
MediaWiki 1.7.3 schema to trunk^Wmaster
Patch set 2: Rebased against master. PLEASE check carefully
to make sure I got those conflicted files right.
Conflicts:
includes/db/DatabasePostgres.php
includes/installer/PostgresUpdater.php
Change-Id: Iebb6855e8f6f44470bbb1dc5ab9ac1abb513adfe
This commit is supposed to fix bug 31236.
Refactored getCSS to load files more generically.
Applied CSSJanus transform to all CSS files.
Updated release notes.
Change-Id: I4418a0dcb40fe181dc62a14a9f65b658e3c0d473
Upgrade to 1.19 on Postgres fails due to incomplete query when trying to
defer foreign key for externallinks
* FieldInfo::conname() should return NULL not "" when constraint
is not present
* Re-create missing constraint on schema update
Change-Id: I7ca351e07d228afdf4a5c3bef365f42a27c9ac45
Follow-up to r15791.
You can lie to me, but not to your installer.
Make DatabasePostgres::tableExists to check for real table names, not
faked ones.
DatabasePostgres is currently lying to the rest of the MediaWiki that
"mwuser" table is actually called "user" and that "pagecontents" is
called "text". While MediaWiki does not care, the installer (and updater
do).
This allows us to overcome first hurdle in getting MediaWiki 1.7.3 to
update to trunk on PostgreSQL and uncover further bugs.
For this commit to actually do something, we rename those tables when
upgrading to match what we have in maintenance/postgres/tables.sql
And by the way, tell installer not to check for "user" table, since most
PostgreSQL users will have "mwuser" instead. Picking "archive" instead.
Patchset2: wrapped commit message at 72 chars
Change-Id: Ic874e92bb1adda3430d3292423d4f3617c25456c
- MWCryptRand: A new api for generating cryptographic randomness for security tokens. Uses whatever cryptographic source is available and if not falls back to using random state and clock drift.
- wfRandomString - A simple non-cryptographic pesudo-random string generation function to replace wfGenerateToken which was written pretending to be secure when it's really not.
- Core updates to use MWCryptRand in various places:
-- user_token generation (to do this we stop generating user_token implicitly and only generate it when needed to avoid depleting the system's entropy pool by reading random data we'll never use)
-- email confirmation token generation
-- password salt generation
-- temporary password generation
-- Generation of the automatic watchlist token
-- login and create user tokens
-- session ids when php's entropy sources are not set
-- the installer when generating wgSecretKey and the upgrade key
You can lie to me, but not to your installer.
Make DatabasePostgres::tableExists to check
for real table names, not faked ones.
DatabasePostgres is currently lying to the rest
of the MediaWiki that "mwuser" table is actually
called "user" and that "pagecontents" is called
"text". While MediaWiki does not care, the
installer (and updater do).
This allows us to overcome first hurdle
in getting MediaWiki 1.7.3 to update to trunk
on PostgreSQL and uncover further bugs.
For this commit to actually do something,
we rename those tables when upgrading to match
what we have in maintenance/postgres/tables.sql
And by the way, tell installer not to check
for "user" table, since most PostgreSQL users
will have "mwuser" instead. Picking "archive"
instead.
* Introduce $wgDebugDBTransactions facility to help
figure out what's going on with transactions.
Currently PostgreSQL only.
PostgresTransactionState can be easily be made more general
to trace all sorts of state machinery.
* Improve r113408: we don't need to full reconnect on error,
rollback is enough.
Rolling back breaks search_path, as PostgreSQL
can manage sessions settings under transaction therefore
we need to improve schema sniffing introduced in r82674
* Introduce few schema handling functions. This could
probably be generalized for other databases like DB2 and Oracle.
* Fix bug 15816 - Add a switch for SETting the search_path
We try to avoid touching search_path at all unless
really necessary. Even in this case we append MediaWiki
core schema to the front of the list.
* No longer add $wgDBmwschema to PostgreSQL role search_path
in the installer. This is no longer necessary as
setting schema on connect should ReallyWorkNow(tm).
* Get rid as much as possible of $wgDBmwschema and
bring us one step closer to fix bug 16794 (wgSharedDB
support).
All references to core MediaWiki schema in PostgreSQL
specific code should now use Database::getCoreSchema()
unless we know what we are doing.
Followup-To: r113408 r82674