Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-2339

Cannot import large attachments

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.5 M2
    • 1.4 M1
    • Storage
    • None

    Description

      For example yesterday Jerome tried to import a 12MB XAR file (with history) and it failed with:

      java.sql.BatchUpdateException: Data truncation: Data too long for column 'XWA_ARCHIVE' at row 1
      2008-04-25 00:02:36,754 [http://praline.myxwiki.org/xwiki/bin/upload/XWiki/Import] [TP-Processor8] WARN  web.XWikiAction                - Uncaught exception: Error number 3232 in 3: Exception while saving attachment praline.xar of document XWiki.Import
      

      The pb is that in the HBM file we have:

              <property name="archive" type="binary">
                  <column name="XWA_ARCHIVE" length="4000000" />
              </property>
      

      and this is mapped to a mediumblob in MySQL, see http://www.ispirer.com/doc/sqlways38/Output/SQLWays-1-195.html

      4MB doesn't seem enough and we should increase the size so that the DB uses a longblob instead.

      Attachments

        Activity

          People

            sdumitriu Sergiu Dumitriu
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: