Here --help makes it seems that --delete is needed to actually delete.
But surprise surprise, it deletes even without --delete.
$ php deleteArchivedRevisions.php --help
Delete Archived Revisions
Deletes all archived revisions.
These revisions will no longer be restorable.
Usage: php deleteArchivedRevisions.php [--delete|--help]
delete : Performs the deletion
help : Show this usage information
$ mysqlshow --count taizhongbus|egrep 'T| archive'
Tables | Columns | Total Rows |
archive | 15 | 2206 |
$ php deleteArchivedRevisions.php
Delete Archived Revisions
Deleting archived revisions...done.
$ mysqlshow --count taizhongbus|egrep 'T| archive'
Tables | Columns | Total Rows |
archive | 15 | 0 |
The same thing happens if one does used --delete or not.
It seems --delete is ignored completely, and instead used here:
$delete = $dbw->affectedRows() != 0;
But looking at
/usr/share/doc/php-doc/html/function.mysql-affected-rows.html:
"Get the number of affected rows by the last INSERT, UPDATE, REPLACE or
DELETE query..."
Which does not include TRUNCATE.
So it seems that
if( $delete ) {
PurgeRedundantText( true );
}
will never fire at all.
So the archive table will get truncated every time, --delete or not.
But PurgeRedundantText() will never get run, --delete or not.
So the only table ever affected is the archive table.
The text table is never touched.
So it does damage even with the safety pin still in place, and even without, it never hits its real target.
Version: 1.15.x
Severity: normal