CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • DB Syntax Error: Upgrade from 2.2.5 => 3.3.1
Pages: [1]

Author Topic: DB Syntax Error: Upgrade from 2.2.5 => 3.3.1  (Read 694 times)

jett

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
DB Syntax Error: Upgrade from 2.2.5 => 3.3.1
December 16, 2010, 06:24:01 pm
This is the error I'm getting.  The SQL itself runs fine when I attempt it using a mysql client, so I'm at a loss regarding what the syntax error might be.

Any help/guidance would be appreciated.

Code: [Select]
Database Error Code: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; INSERT INTO civicrm_acl (name, deny, entity_table, entity_id, operatio' at line 1, 1064
Additional Details:

Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -2
    [message] => DB Error: syntax error
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_component (name, namespace) VALUES ('CiviReport', 'CRM_Report' );

INSERT INTO civicrm_acl
    (name, deny, entity_table, entity_id, operation, object_table, object_id, acl_table, acl_id, is_active)
VALUES
    ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviReport',      NULL, NULL, NULL, 1),
    ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access Report Criteria', NULL, NULL, NULL, 1),
    ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'administer Reports',     NULL, NULL, NULL, 1);

[/code]

jett

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
Re: DB Syntax Error: Upgrade from 2.2.5 => 3.3.1
December 18, 2010, 08:16:19 am
I should point out that I get this message when running the upgrade script.  The script correctly identifies my version (2.2.5) and makes an update to the civicrm_domain.version field as expected, but after a few seconds of running the upgrade, issues the unrecoverable error I've listed in the previous post.

I wanted to try upgrading in steps, moving first from 2.2.5 to 3.0, but I can't find a copy of anything other than 3.3.1.  Where are the archived versions of previous releases?

jett

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
Re: DB Syntax Error: Upgrade from 2.2.5 => 3.3.1
December 18, 2010, 09:42:08 am
Digging under the covers, I understand that the upgrade script takes the DB through all the intermediate upgrade steps as part of its procedure.  I've learned the location where the upgrade is failing by matching the SQL listed with the various SQL templates and found that the problem occurs during the upgrade to 2.2.7. 

From this, I learned that there's a long set of SQL that is being executed (~90 lines worth) so I picked this out from the error message and executed it from mysql client.  It runs fine from there.

Will search to see who may have had specific problems with that portion of the upgrade.

jett

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
Re: DB Syntax Error: Upgrade from 2.2.5 => 3.3.1
December 18, 2010, 10:23:36 am
SOLVED:

The 2.2.7 script worked when I converted the file format from DOS to UNIX.

My PHP/Drupal site is served off a Windows/DOS machine, but my db server (MySQL) runs on a UNIX machine.  Apparently a script with DOS newlines isn't handled well by the CiviCRM code when it passes it over to a UNIX-based instance of MySQL.

Now to convert all the php files from DOS to UNIX.


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • DB Syntax Error: Upgrade from 2.2.5 => 3.3.1

This forum was archived on 2017-11-26.