Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-21480

INTRA-rc regression 4.7.28-rc: updateContributionInvoiceNumber: fails on MariaDB 10.2 strict (default) mode: 'Truncated incorrect DOUBLE value'

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Critical
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.28
    • Fix Version/s: 4.7.28
    • Component/s: None
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Core Team Funds
    • Verified?:
      No

      Description

      Error when running MariaDB 10.2, which uses sql "strict" mode by default:

      UPDATE `civicrm_contribution` SET `invoice_number` = CONCAT('INV_', `id`)                                                               
      WHERE `id` BETWEEN (1 AND 5000) AND `invoice_number` IS NOT NULL  [nativecode=1292 ** Truncated incorrect DOUBLE value: '5f971d09007a44c27d86e02d11359e28']                      

      Backtrace to: #12 CRM/Upgrade/Incremental/php/FourSeven.php(632)

      How to reproduce:

      • Install MariaDB 10.2
      • Enable invoicing (Admin > CiviContribute > Component settings)
      • Run the upgrade from 4.7.27 to 4.7.28

      Workaround: Disable strict-mode in MariaDB:

      sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
      

      (but this is not a good fix)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mlutfy Mathieu Lutfy
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: