https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292008-06-08T16:45:06ZRedmineRedmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=32202008-06-08T16:45:06ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>The patch please !!! :-)</p> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=32252008-06-08T18:37:48ZThomas Lecavelier
<ul><li><strong>File</strong> <a href="/attachments/617">D1071_enlarge_wiki_content.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/617/D1071_enlarge_wiki_content.patch">D1071_enlarge_wiki_content.patch</a> added</li></ul> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=32262008-06-08T18:39:15ZThomas Lecavelier
<ul></ul><p>I'm quite dumb... But I think I found a problem: uploaded file is missed when you meet an error just before the successful push (in my case: I forgot the subject when I create this patch issue).</p>
<p>Hoping this patch is interesting.</p> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=32282008-06-08T20:15:38ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>Thanks for your patch Thomas.</p>
<p>But the migration fails with Postgresql (tested with 8.3).<br />I found this ticket on Rails Trac: <a class="external" href="http://dev.rubyonrails.org/ticket/3818">http://dev.rubyonrails.org/ticket/3818</a>.</p>
<pre>
== 95 ChangeWikiContentsTextLimit: migrating ==================================
-- change_column(:wiki_contents, :text, :text, {:limit=>131072})
rake aborted!
RuntimeError: ERROR C42601 Mtype modifier is not allowed for type "text"
P52 F.\src\backend\parser\parse_type.c L273 RtypenameTypeMod: ALTER
TABLE wiki_contents ADD COLUMN "text_ar_tmp" text(131072)
</pre>
<p>Maybe we could test the database type and do change for MySQL only.</p> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=32292008-06-08T21:38:33ZThomas Lecavelier
<ul><li><strong>% Done</strong> changed from <i>100</i> to <i>80</i></li></ul><p>It would be far better to stay database agnostic... I'll do some research tomorrow. Thank you for pointing the problem.</p> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=32492008-06-09T15:03:41ZThomas Lecavelier
<ul></ul><p>After some searches, it appears that postgresql has no limit to its text type. But the error when migrating a :text with :limit => x on a postgresql database appear like an authentic bug.</p>
My first thought is to do two different patches:
<ol>
<li>Check on creation that the wiki content is not too long for its database</li>
<li>Provide a migration to raise wiki content page size to 128KB or 256KB (even I think 64KB is a good limit) with a monkey patch about this postgresql problem</li>
</ol>
<p>But postgresql is a problem, now:</p>
<ul>
<li>How to write a test that can fail when content is too big, knowing that postgresql text columns have no limits?</li>
</ul>
<p>As I don't want to provide a patch without matching test cases, I'm listening to every brillant mind which could help me to find a good and reliable testcase... :-/</p> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=43102008-08-12T19:38:10ZThomas Lecavelier
<ul><li><strong>File</strong> <a href="/attachments/864">D1071_enlarge_wiki_content_take2.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/864/D1071_enlarge_wiki_content_take2.patch">D1071_enlarge_wiki_content_take2.patch</a> added</li></ul><p>It seems that the pgsql bug doesn't exist anymore. Here the updated patch, against trunk@r1736. Hoping it solve the problem.</p> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=49202008-09-24T00:12:58ZMischa The Evil
<ul></ul><p>Thomas Lecavelier wrote:</p>
<blockquote>
<p>Here the updated patch, against trunk@r1736. Hoping it solve the problem.</p>
</blockquote>
<p>I've just applied this patch on clean <a class="changeset" title="Truncate comments on changeset list." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/1900">r1900</a> using MySQL 4.1.20 to prevent the silent-truncating of wikipages bigger than 64K. Though when testing it by creating a new wikipage containing 65485 characters (without counting LF's) I don't get any error-message. Instead it still silently truncates the wikipage content to 64K.</p>
<p>Is this due to this patch (ifso: how could it be solved?) or is it to blame my older MySQL-version?</p> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=49232008-09-24T09:50:26ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>The db migration is missing in the updated patch. I'll have a look at it.</p> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=49392008-09-24T19:23:00ZThomas Lecavelier
<ul><li><strong>File</strong> <a href="/attachments/982">D1071_enlarge_wiki_content_take3.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/982/D1071_enlarge_wiki_content_take3.patch">D1071_enlarge_wiki_content_take3.patch</a> added</li></ul><p>Erf... Migration come back... Here the corrected patch, against trunk@1905<br />Hoping this patch is the one... -_-</p> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=49422008-09-25T00:06:19ZMischa The Evil
<ul></ul><p>Thomas Lecavelier wrote:</p>
<blockquote>
<p>Here the corrected patch, against trunk@1905</p>
</blockquote>
<p>Ok, now the DB-migration (which modifies the DB-table type to <code>MEDIUMTEXT</code>/<code>MEDIUMBLOB</code> which can store 16 million characters) is included in the patch.<br />The above change will provide some more space (upto 16 million characters) for wikipages, though the patch isn't fully functional imho.</p>
<p><strong>Expected behaviour</strong><br />The changes in the <code>wiki_controller.rb</code> are imo intended to create a flashnotice and prevent saving (thus truncating) the contents to the DB when the size of wikipage is too big.</p>
<p><strong>Actual behaviour</strong><br />If I try to create a (new) wikipage longer than 64K characters, without having the DB-migration applied (otherwise I should test this with over 16 million characters in a page), I don't receive the flashmessage showing the language string value of <code>text_wiki_content_too_large</code>. Also the content of the page is still truncated and saved to the DB.</p>
<p>HTH...</p> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=52212008-10-21T07:31:57Zaruna sarikonda
<ul><li><strong>% Done</strong> changed from <i>80</i> to <i>90</i></li></ul> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=52222008-10-21T07:32:23Zaruna sarikonda
<ul><li><strong>% Done</strong> changed from <i>90</i> to <i>80</i></li></ul> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=52232008-10-21T07:33:04Zaruna sarikonda
<ul><li><strong>% Done</strong> changed from <i>80</i> to <i>30</i></li></ul> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=52242008-10-21T07:33:21Zaruna sarikonda
<ul><li><strong>% Done</strong> changed from <i>30</i> to <i>80</i></li></ul> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=52252008-10-21T07:38:33Zaruna sarikonda
<ul><li><strong>% Done</strong> changed from <i>80</i> to <i>50</i></li></ul> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=52262008-10-21T07:38:53Zaruna sarikonda
<ul><li><strong>% Done</strong> changed from <i>50</i> to <i>80</i></li></ul> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=83182009-03-29T23:20:08ZMischa The Evil
<ul></ul><p>Are there any updates on this issue?</p> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=118842009-11-08T22:14:04ZEric Gallimore
<ul></ul><p>I just encountered this behavior while importing a Trac database. I had a problem with two fields, and did this to resolve them:</p>
<p>Edit wiki_contents table to make column "text" type LONGTEXT (type TEXT is too short).<br />Edit wiki_content_versions table to make column "data" type LONGBLOB (type BLOB is too small).</p>
<p>Having done this, it seems that everything imported properly.</p> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=129952009-12-16T07:35:47ZThomas Lecavelier
<ul></ul><p>Oh… It looks like urgent, now. I'll propose a new patch for the end of week.</p> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=130952009-12-18T22:53:46ZThomas Lecavelier
<ul><li><strong>File</strong> <a href="/attachments/2924">raise_wiki_content_size.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2924/raise_wiki_content_size.patch">raise_wiki_content_size.patch</a> added</li></ul><p>Rewritten patch (see comment in <a class="issue tracker-1 status-5 priority-6 priority-highest closed" title="Defect: Wiki/News/Documents truncate contents to 64K in MYSQL (Closed)" href="https://www.redmine.org/issues/1071">#1071</a>) => raise wiki content to 16MB.</p> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=131132009-12-19T12:06:27ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>Trying to migrate with a Postgres 8.3 database gives the following error:</p>
<pre>
== EnlargeWikiContents: migrating ============================================
-- change_column(:wiki_contents, :text, :text, {:limit=>16777216})
rake aborted!
An error has occurred, this and all later migrations canceled:
RuntimeError: ERROR C42601 Mtype modifier is not allowed for type "text"
F.\src\backend\parser\parse_type.c L273 RtypenameTypeMod: ALTER TABLE "w
iki_contents" ALTER COLUMN "text" TYPE text(16777216)
</pre> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=131652009-12-21T11:29:51ZThomas Lecavelier
<ul></ul><p>Thank you for reviewing my patch, jp. Since that page,</p>
<p><a class="external" href="http://www.postgresql.org/docs/7.4/interactive/datatype-character.html">http://www.postgresql.org/docs/7.4/interactive/datatype-character.html</a></p>
<p>It appears that postgres / rails adaptor should ignore limit silently. I'll find or create a bug in Rails about it. I'll try to modify the patch with that two points:</p>
<ol>
<li>Don't submit :limit key when ARAdaptor is postgres</li>
<li>Detect capacity overflow in wiki to warn potential data loss</li>
</ol>
<p>I'll update that patch in a while, since my first child is born this saturday ;) Have an happy Xmas</p> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=132992009-12-27T12:01:40ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li></ul><p>See <a class="issue tracker-1 status-5 priority-6 priority-highest closed" title="Defect: Wiki/News/Documents truncate contents to 64K in MYSQL (Closed)" href="https://www.redmine.org/issues/1071">#1071</a>.</p> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=214152010-10-14T21:17:57ZGerry Gerry
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>Reopened</i></li></ul> Redmine - Patch #1404: Raise wiki content page sizehttps://www.redmine.org/issues/1404?journal_id=214212010-10-15T00:34:37ZMischa The Evil
<ul><li><strong>Status</strong> changed from <i>Reopened</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>80</i> to <i>100</i></li><li><strong>Estimated time</strong> deleted (<del><i>1.00 h</i></del>)</li></ul>