Using * in select is not the prefered way.
List all needed columns to make the use visible and to avoid issues when
new fields gets added with big data.
As each column name is unique there is no need to get the table name for
prefixing the columns
The following columns no longer selected:
- log_user_text -> not used due to use of ActorMigration class
- log_actor -> Add by ActorMigration class
- log_comment_id -> Added by CommentStore
- log_page -> Unused in the writer, the ns/title pair is used instead
Move the arrays out of the loop, because there are not depending on
values changing in the loop
Change-Id: I140641b7ed75bc2b8db2e7612020d668f1be663b
This introduces a way to construct a RevisionRecord based on a
known set of SlotRecords. To allow this to be used consistently
with the legacy revision schema, some tweaks had to be made
to getSlotsQueryInfo().
Bug: T220493
Change-Id: I5ea972bb07ca1cfb3a2ad8ef120aef77e460745c
Also drop ordering of revs within pages, since there is only one
revision being dumped
Bug: T207628
Change-Id: I5e4f0bea7b54506ca389818407c43152a290da6e
We don't alter the db query for this, but throw away the extraneous
rows before doing any processing on them whatsoever.
Use of the DumpNamespaceFilter comes too late to avoid processing
for each revision done in XmlDumpWriter::writeRevision.
Bug: T220940
Change-Id: I9cb30ce612d862d97d96720ac68ff2327409f485
...and not as numbers!! Also added strict compare for the namespaces
field while we're in here.
Bug: T220257
Change-Id: If68b79334188c2f3be5d254bea3c1e27d52c4a9f
This makes BackupDumper compatible with the new mechanism for accessing
revision content.
This requires some changes to the way database connections are re-used,
since RevisionStore/SqlBlobStore needs to be able to run queries against
the database while the overall result set is being streamed.
This change does not yet add handing for extra slots to BackupDumper.
That first needs a spec for how extra slots will be represented in the
XML schma (T174031).
NOTE: this changes the output of fetchText from using integer text_id
values to using content_address values (e.g. "tt:4567" for text row
with old_id 4567). It also changes fetchText to accept such addresses
as input, for forward-compatibility. XML stub dumps still use the
numeric format in the id attribute, pending T199121.
Bug: T198706
Change-Id: If4c31b7975b4d901afa8c194c10446c99e27eadf
htmlentities() can output entity references that are invalid in XML.
Use htmlspecialchars() instead.
Additionally, cast user-id to int for phan-taint-check
Bug: T216348
Change-Id: Idf781f5a3ffc3c6463969b3f5af63f0f08ae837c
T203424 replaced streaming mode with batched queries.
However, it did not properly handle some values of
the $wgExportMaxHistory config variable, and emitted
broken XML. This change fixes that issue.
Bug: T207974
Change-Id: Iade3fc603e513da51b7a970c16275516c02ede49
WikiExporter allows streaming mode, using unbuffered mode on
the database connection. We are moving away from this technique.
Instead, do multiple normal queries and retrieve the
information in batches.
Bug: T203424
Change-Id: I582240b67c91a8be993a68c23831c9d86617350e
This is a temporary fix that forces the dump code to continue to
use the old database schema, even when MCR is in
SCHEMA_COMPAT_READ_NEW mode. This will continue to function until
SCHEMA_COMPAT_WRITE_OLD mode is disabled.
Bug: T198561
Change-Id: Ic54ee703f47d1843f70fdb7185ac1b098f148680
Storing the user name or IP in every row in large tables like revision
and logging takes up space and makes operations on these tables slower.
This patch begins the process of moving those into one "actor" table
which other tables can reference with a single integer field.
A subsequent patch will remove the old columns.
Bug: T167246
Depends-On: I9293fd6e0f958d87e52965de925046f1bb8f8a50
Change-Id: I8d825eb02c69cc66d90bd41325133fd3f99f0226
This allows CommentStore to be added to MediaWikiServices
without the need of an aditional Factory.
This change includes a compatability layer to allow the behaviour
from 1.30 to continue to be used while deprecated.
CommentStore::newKey has been deprecated.
Keys are now passed into the public methods of CommentStore
where needed.
The following CommentStore methods have had their signatures changed
to introduced a $key parameter, but when used in conjunction with
CommentStore::newKey behaviour will remain unchanged:
* CommentStore::getFields
* CommentStore::getJoin
* CommentStore::getComment
* CommentStore::getCommentLegacy
* CommentStore::insert
* CommentStore::insertWithTemplate
Change-Id: I3abb62a5cfb0dcd456da9f4eb35583476ae41cfb
And auto-fix all errors.
The `<exclude-pattern>` stanzas are now included in the default ruleset
and don't need to be repeated.
Change-Id: I928af549dc88ac2c6cb82058f64c7c7f3111598a
I was bored. What? Don't look at me that way.
I mostly targetted mixed tabs and spaces, but others were not spared.
Note that some of the whitespace changes are inside HTML output,
extended regexps or SQL snippets.
Change-Id: Ie206cc946459f6befcfc2d520e35ad3ea3c0f1e0
tested for stubs, text, logging with and without start/end values,
with and without orderrevs, seems to work as expected, with the
appropriate changes to the query.
Bug: T29112
Change-Id: I94ca4a06235bdbed384bb997deb7432bb5aaa5b9
Moved classes in Export.php to seperate files in the new directory
includes/export/ and updated autoload.php to these new locations.
Bug: T122531
Change-Id: Idd3bba5a85d65c952f2ff503bea2ca76624c9b7f