Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-21771

On PostgreSQL, a fatal error is raised if we use string attributes with 11 numbers

    Details

      Description

      Hi,
      In PostgreSQL, if i create an object that has a string attribute, and in that attribute we register a string with 11 numbers, we have a fatal error.

      To reproduce:

      • Create a class with a string attribute
      • Create an object of previous class, and in string attribute put the number 12345678901
      • Save for publishing

      When saving, we have the following error:

      Fatal error: A database transaction in eZ Publish failed.
      

      In debug, we have:

      Error: eZPostgreSQLDB 	Oct 17 2013 12:04:01
       
      Error: error executing query: INSERT INTO
                                 ezsearch_object_word_link
                                 ( word_id,
                                   contentobject_id,
                                   frequency,
                                   placement,
                                   next_word_id,
                                   prev_word_id,
                                   contentclass_id,
                                   contentclass_attribute_id,
                                   published,
                                   section_id,
                                   identifier,
                                   integer_value )
                                   VALUES  ( '994', '72', '0', '1', '0', '996', '16', '182', '1382004241', '1', 'string', '12345678901' ) : ERROR:  value "12345678901" is out of range for type integer
      LINE 15: ... '996', '16', '182', '1382004241', '1', 'string', '123456789...
                                                                    ^
       
      Error: eZDBInterface::commit TRANSID-ae0223081bf3ccf80eff38b822493e9f 	Oct 17 2013 12:04:01
       
      Transaction in progress failed due to DB error, transaction was rollbacked. Transaction ID is TRANSID-ae0223081bf3ccf80eff38b822493e9f.
      

      Note1: This error do not happen if we use a string with 11 characters instead of only numbers
      Note2: This error do not happen if we use a smaller string with less numbers (until 10 numbers)
      Note3: This issue only happens on PostgreSQL. Do not happen on Mysql.

        Activity

        Hide
        André Rømcke added a comment -

        Like #EZP-21798, please provide a integration test for this so we can move on with this issue.

        Show
        André Rømcke added a comment - Like # EZP-21798 , please provide a integration test for this so we can move on with this issue.
        Show
        Marcos Loureiro (Inactive) added a comment - Integration test: PR: https://github.com/ezsystems/ezpublish-kernel/pull/600
        Hide
        Petar Spanja (Inactive) added a comment -
        Show
        Petar Spanja (Inactive) added a comment - Integration test merged in ezpublish-kernel/master: https://github.com/ezsystems/ezpublish-kernel/commit/dccf5554d8c3d8f68002bc5ccbe158ee79a615af

          People

          • Assignee:
            Unassigned
            Reporter:
            Paulo Nunes (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 6 hours, 30 minutes
              6h 30m