jenkins-bot has submitted this change and it was merged.

Change subject: Increase size of the math_mathml in the mathlatexml table
......................................................................


Increase size of the math_mathml in the mathlatexml table

The type text allows text with maximum length of 64k only. Since the
MathML generated by LaTeXML is quite verbose this is too small for
some equations used at Wikipedia.

Bug: 73090
Change-Id: Id09ec6201f68efe63a439f6e85a53876d5c1e521
---
M Math.hooks.php
M db/mathlatexml.mysql.sql
A db/patches/mathlatexml.mathml-length-adjustment.mysql.sql
3 files changed, 6 insertions(+), 1 deletion(-)

Approvals:
  GWicke: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Math.hooks.php b/Math.hooks.php
index 6749a79..213ac8f 100644
--- a/Math.hooks.php
+++ b/Math.hooks.php
@@ -232,6 +232,10 @@
                                if ( in_array( $type, array( 'mysql', 'sqlite', 
'postgres' ) ) ) {
                                        $sql = dirname( __FILE__ ) . 
'/db/mathlatexml.' . $type . '.sql';
                                        $updater->addExtensionTable( 
'mathlatexml', $sql );
+                                       if ( $type == 'mysql' ){
+                                               $sql = dirname( __FILE__ ) . 
'/db/patches/mathlatexml.mathml-length-adjustment.mysql.sql';
+                                               $updater->modifyExtensionField( 
'mathlatexml', 'math_mathml', $sql );
+                                       }
                                } else {
                                        throw new MWException( "Math extension 
does not currently support $type database for LaTeXML." );
                                }
diff --git a/db/mathlatexml.mysql.sql b/db/mathlatexml.mysql.sql
index 89d8a6c..38ded24 100644
--- a/db/mathlatexml.mysql.sql
+++ b/db/mathlatexml.mysql.sql
@@ -10,7 +10,7 @@
   -- the validated tex
   math_tex text,
   -- MathML output LaTeXML
-  math_mathml text,
+  math_mathml mediumtext,
   -- SVG output mathoid
   math_svg text,
   -- MW_MATHSTYLE_(INLINE_DISPLAYSTYLE|DISPLAY|INLINE)
diff --git a/db/patches/mathlatexml.mathml-length-adjustment.mysql.sql 
b/db/patches/mathlatexml.mathml-length-adjustment.mysql.sql
new file mode 100644
index 0000000..8bbb86c
--- /dev/null
+++ b/db/patches/mathlatexml.mathml-length-adjustment.mysql.sql
@@ -0,0 +1 @@
+ALTER TABLE /*_*/mathlatexml MODIFY  math_mathml mediumtext;
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/171627
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id09ec6201f68efe63a439f6e85a53876d5c1e521
Gerrit-PatchSet: 9
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <[email protected]>
Gerrit-Reviewer: Frédéric Wang <[email protected]>
Gerrit-Reviewer: GWicke <[email protected]>
Gerrit-Reviewer: Greg Grossmeier <[email protected]>
Gerrit-Reviewer: Physikerwelt <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: Springle <[email protected]>
Gerrit-Reviewer: TheDJ <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to