Last modified: 2014-10-28 07:23:25 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T73563, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71563 - *_minor_mime are varbinary(32) on WMF sites, out of sync with varbinary(100) in MW core
*_minor_mime are varbinary(32) on WMF sites, out of sync with varbinary(100) ...
Status: NEW
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Sean Pringle
: schema-change
Depends on:
Blocks: 49188
  Show dependency treegraph
 
Reported: 2014-10-02 17:51 UTC by Bawolff (Brian Wolff)
Modified: 2014-10-28 07:23 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bawolff (Brian Wolff) 2014-10-02 17:51:20 UTC
looking at [[foundation:Special:MediaStatistics]]

Mime types like application/vnd.oasis.opendocument.spreadsheet get cut off to application/vnd.oasis.opendocument.spreadshe because img_minor_mime field isn't long enough.
Comment 1 Umherirrender 2014-10-02 19:04:34 UTC
tables.sql says:
  img_minor_mime varbinary(100) NOT NULL default "unknown",

Seems that wmf wikis (or just foundationwiki) missing the sql patch: patch-mime_minor_length.sql
Comment 2 Sam Reed (reedy) 2014-10-03 12:54:16 UTC
ALTER TABLE /*_*/filearchive
  MODIFY COLUMN fa_minor_mime varbinary(100) default "unknown";

ALTER TABLE /*_*/image
  MODIFY COLUMN img_minor_mime varbinary(100) NOT NULL default "unknown";

ALTER TABLE /*_*/oldimage
  MODIFY COLUMN oi_minor_mime varbinary(100) NOT NULL default "unknown";



All 3 are still 32, on foundationwiki at least...
Comment 3 Sam Reed (reedy) 2014-10-03 12:55:10 UTC
Checked enwiki and commons too. I guess it's all "older" sites that haven't been updated
Comment 4 Sam Reed (reedy) 2014-10-03 13:11:59 UTC
I just did foundationwiki... How do we get the minor_mimie fields to update?
Comment 5 Bawolff (Brian Wolff) 2014-10-03 14:33:34 UTC
They update next time someone purges the image description page. Suppose we could write a mantinance script, although issue is not exactly causing big problems.
Comment 6 Umherirrender 2014-10-03 18:55:38 UTC
Purge does not rewrite these values, a reupload would do it, but than oldimage table contains that broken value.

Some one has to run an update:
application/vnd.oasis.opendocument.presentat -> application/vnd.oasis.opendocument.presentation

application/vnd.oasis.opendocument.spreadshe -> application/vnd.oasis.opendocument.spreadsheet

https://wikimediafoundation.org/wiki/Special:MIMESearch/application/vnd.oasis.opendocument.spreadshe contains a file with .odf, which should be 'application/vnd.oasis.opendocument.formula'?

When the image table is updated [[foundation:Special:MediaStatistics]] gets updated with in the next 3 days.
Comment 7 Bawolff (Brian Wolff) 2014-10-03 21:43:01 UTC
(In reply to Umherirrender from comment #6)
> Purge does not rewrite these values, a reupload would do it, but than
> oldimage table contains that broken value.

Purge definitely should (calls LocalFile::upgradeRow, which calls LocalFile::reloadFromFile, which should in fact redetermine what the MIME type is)

> Some one has to run an update:
> application/vnd.oasis.opendocument.presentat ->
> application/vnd.oasis.opendocument.presentation
> 
> application/vnd.oasis.opendocument.spreadshe ->
> application/vnd.oasis.opendocument.spreadsheet
> 
> https://wikimediafoundation.org/wiki/Special:MIMESearch/application/vnd.
> oasis.opendocument.spreadshe contains a file with .odf, which should be
> 'application/vnd.oasis.opendocument.formula'?

Probably uploaded before we had good mime checking. So its probably an ods file with wrong extension.



(In reply to Sam Reed (reedy) from comment #4)
> I just did foundationwiki... How do we get the minor_mimie fields to update?

Note, on tool labs, img_minor_mime is still VARBINARY(32) (but oi_minor_mime and fa_minor_mime are VARBINARY(100)). I'm not sure if it just takes a while for changes to reflect in tool labs DESCRIBE.
Comment 8 Umherirrender 2014-10-04 10:38:23 UTC
(In reply to Bawolff (Brian Wolff) from comment #7)
> (In reply to Umherirrender from comment #6)
> > Purge does not rewrite these values, a reupload would do it, but than
> > oldimage table contains that broken value.
> 
> Purge definitely should (calls LocalFile::upgradeRow, which calls
> LocalFile::reloadFromFile, which should in fact redetermine what the MIME
> type is)
> 
> > Some one has to run an update:
> > application/vnd.oasis.opendocument.presentat ->
> > application/vnd.oasis.opendocument.presentation
> > 
> > application/vnd.oasis.opendocument.spreadshe ->
> > application/vnd.oasis.opendocument.spreadsheet
> > 
> > https://wikimediafoundation.org/wiki/Special:MIMESearch/application/vnd.
> > oasis.opendocument.spreadshe contains a file with .odf, which should be
> > 'application/vnd.oasis.opendocument.formula'?
> 
> Probably uploaded before we had good mime checking. So its probably an ods
> file with wrong extension.
> 
> 
> 
> (In reply to Sam Reed (reedy) from comment #4)
> > I just did foundationwiki... How do we get the minor_mimie fields to update?
> 
> Note, on tool labs, img_minor_mime is still VARBINARY(32) (but oi_minor_mime
> and fa_minor_mime are VARBINARY(100)). I'm not sure if it just takes a while
> for changes to reflect in tool labs DESCRIBE.

It works on my local wiki (for jpegs), but a anon purge on wikimediafoundation.org does not have the effect for the 10 files. The schema change is not done or there is a problem for slave/master or some other issue? No idea.
Comment 9 Sam Reed (reedy) 2014-10-04 16:52:53 UTC
(In reply to Bawolff (Brian Wolff) from comment #7)
> (In reply to Sam Reed (reedy) from comment #4)
> > I just did foundationwiki... How do we get the minor_mimie fields to update?
> 
> Note, on tool labs, img_minor_mime is still VARBINARY(32) (but oi_minor_mime
> and fa_minor_mime are VARBINARY(100)). I'm not sure if it just takes a while
> for changes to reflect in tool labs DESCRIBE.

Strange. I wonder what happened. The other 2 were still there. Just re-did it. I wonder if purge will work correctly now? :)

Yup

https://wikimediafoundation.org/wiki/File:GARDNER_WIKIMANIA_2012.odp

GARDNER_WIKIMANIA_2012.odp ‎(file size: 15.9 MB, MIME type: application/vnd.oasis.opendocument.presentation)
Comment 10 Sean Pringle 2014-10-06 14:35:30 UTC
The patch has gone out to s2, s3, s5, s6, and s7 wikis today. Tomorrow will likely see s1 (enwiki) done, but s4 (commonswiki) will be slower because oldimage has no primary key for an online schema change, and is large enough for that to matter on the master. Probably why the patch wasn't previously applied.
Comment 11 Sean Pringle 2014-10-06 14:39:17 UTC
(In reply to Bawolff (Brian Wolff) from comment #7)

> Note, on tool labs, img_minor_mime is still VARBINARY(32) (but oi_minor_mime
> and fa_minor_mime are VARBINARY(100)). I'm not sure if it just takes a while
> for changes to reflect in tool labs DESCRIBE.

The labsdb VIEWs will need to be refreshed.
Comment 12 Sean Pringle 2014-10-07 11:33:09 UTC
S1 done.
Comment 13 Andre Klapper 2014-10-16 13:09:18 UTC
So only s4 is missing?
Comment 14 Sean Pringle 2014-10-28 07:23:25 UTC
Correct.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links