https://bugzilla.wikimedia.org/show_bug.cgi?id=51740

Bartosz Dziewoński <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
          Component|Editing Tools               |TemplateData
           Assignee|[email protected]         |[email protected].
                   |                            |org
            Product|VisualEditor                |MediaWiki extensions
            Summary|TemplateData has buffer     |TemplateData uses
                   |length limit                |page_props, which limits
                   |                            |value length to 65535 bytes
                   |                            |(MySQL 'blob' field)

--- Comment #6 from Bartosz Dziewoński <[email protected]> ---
http://www.sadtrombone.com/ …nice catch.

TemplateData is using the page_props table, whose pp_value field is a
'blob', which is limited to 65535 bytes [1]. Of course MySQL, being
MySQL, doesn't complain and just silently truncates the data on
insert.

I see three ways to do something about this:
* If over 65535 bytes, show a big fat red error to the user instead of
  silently failing.
* Store compressed data. JSON compresses well due to the redundancy in
  object keys and due to being mostly text in this case. This would
  probably raise the effective maximal length a few times and should
  be easy to implement.
* If over 65535 bytes, chunk the data in multiple properties
  'templatedata1', 'templatedata2' etc., with some marker stored in
  regular 'templatedata'. Handle this transparently in the API. Nasty,
  but would work.

Adjusting bug summary and component accordingly.

[1] https://www.mediawiki.org/wiki/Manual:Page_props_table

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to