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 upgrading from 2.2.8 to 3.0.3
Pages: [1]

Author Topic: DB: Syntax Error upgrading from 2.2.8 to 3.0.3  (Read 1110 times)

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
DB: Syntax Error upgrading from 2.2.8 to 3.0.3
January 15, 2010, 01:38:33 pm
I have read through various error reports, but none are quite what I am looking for.  However, I am far from a DB expert, so I could easily have missed something.

I am upgrading a DB from 2.2.8 to 3.0.3 (I tried 3.1.beta - got exact same error).  I also cleaned my Schema using the technique here (http://wiki.civicrm.org/confluence/display/CRMDOC/Ensuring+Schema+Integrity+on+Upgrades).  Same error both before and after clean.  Any help appreciated.

The Error:
Code: [Select]
Error Details:

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

    \[code\] => -2
    [message] => DB Error: syntax error
    [mode] => 16
    [debug_info] =>
                UPDATE civicrm_activity_target cat, civicrm_activity ca
                    SET cat.activity_id = 946  
                WHERE ca.source_record_id IS NOT NULL   AND
                      ca.activity_type_id = 20          AND
                      ca.id <> 946              AND
                      ca.source_record_id =  AND
                      ca.id = cat.activity_id [nativecode=1064 ** 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 'AND
                      ca.id = cat.activity_id' at line 6]
    [type] => DB_Error
    [user_info] =>
                UPDATE civicrm_activity_target cat, civicrm_activity ca
                    SET cat.activity_id = 946  
                WHERE ca.source_record_id IS NOT NULL   AND
                      ca.activity_type_id = 20          AND
                      ca.id <> 946              AND
                      ca.source_record_id =  AND
                      ca.id = cat.activity_id [nativecode=1064 ** 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 'AND
                      ca.id = cat.activity_id' at line 6]
    [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="
                UPDATE civicrm_activity_target cat, civicrm_activity ca
                    SET cat.activity_id = 946  
                WHERE ca.source_record_id IS NOT NULL   AND
                      ca.activity_type_id = 20          AND
                      ca.id <> 946              AND
                      ca.source_record_id =  AND
                      ca.id = cat.activity_id [nativecode=1064 ** 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 'AND
                      ca.id = cat.activity_id' at line 6]"]
)

« Last Edit: January 15, 2010, 01:40:51 pm by mariagwyn »

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Re: DB: Syntax Error upgrading from 2.2.8 to 3.0.3
January 15, 2010, 02:13:20 pm
I have also tried to use the DBTools to check the db, but I am getting "unrecognized arguments after database name" even though I have nothing after the db name in the command line.

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Re: DB: Syntax Error upgrading from 2.2.8 to 3.0.3
January 15, 2010, 02:54:35 pm
I took a closer look at the tables referred to in the error and realized that all the data was experimental.  I emptied the table, and it appears that all is well.  At least no errors on the upgrade.  YEa!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • DB: Syntax Error upgrading from 2.2.8 to 3.0.3

This forum was archived on 2017-11-26.