From: Erik Bernhardson Date: Mon, 1 Apr 2019 16:05:08 +0000 (-0700) Subject: Change job table params from blob to mediumblob X-Git-Tag: 1.34.0-rc.0~2206^2 X-Git-Url: http://git.heureux-cyclage.org/?a=commitdiff_plain;h=c3c22e9ae8b21db6a708c1ebb4ddd984c6018f94;p=lhc%2Fweb%2Fwiklou.git Change job table params from blob to mediumblob The default blob type holds 65kB which is often enough, but some jobs push over this limit. When using mysql these are silently truncated to 65kB which only issues errors when the data is retrieved. Increase from blob to mediumblob which gives a max size of 16MB. There may be some valid use cases for jobs > 64kB, but there should be no use case for jobs > 16MB. Bug: T124196 Change-Id: I6df6634bd3a5b5fa27ce6f8ff20d251a9b5eba32 --- diff --git a/includes/installer/MysqlUpdater.php b/includes/installer/MysqlUpdater.php index 2e3fdba004..c33d3ddc3c 100644 --- a/includes/installer/MysqlUpdater.php +++ b/includes/installer/MysqlUpdater.php @@ -375,6 +375,7 @@ class MysqlUpdater extends DatabaseUpdater { [ 'dropTable', 'valid_tag' ], [ 'dropTable', 'tag_summary' ], [ 'dropField', 'protected_titles', 'pt_reason', 'patch-drop-comment-fields.sql' ], + [ 'modifyTable', 'job', 'patch-job-params-mediumblob.sql' ], ]; } diff --git a/maintenance/archives/patch-job-params-mediumblob.sql b/maintenance/archives/patch-job-params-mediumblob.sql new file mode 100644 index 0000000000..19fe0b6612 --- /dev/null +++ b/maintenance/archives/patch-job-params-mediumblob.sql @@ -0,0 +1,2 @@ +ALTER TABLE /*$wgDBprefix*/job +MODIFY COLUMN job_params mediumblob NOT NULL; diff --git a/maintenance/tables.sql b/maintenance/tables.sql index dac222ffcd..0739666a82 100644 --- a/maintenance/tables.sql +++ b/maintenance/tables.sql @@ -1683,7 +1683,7 @@ CREATE TABLE /*_*/job ( -- Any other parameters to the command -- Stored as a PHP serialized array, or an empty string if there are no parameters - job_params blob NOT NULL, + job_params mediumblob NOT NULL, -- Random, non-unique, number used for job acquisition (for lock concurrency) job_random integer unsigned NOT NULL default 0,