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

Cannot create surveys: DB Error: can not create table

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.1.0
    • Fix Version/s: 4.1.3
    • Component/s: CiviCampaign
    • Labels:
      None

      Description

      We cannot create surveys. It appears that CiviCRM is trying to create a temporary table with foreign key constraint, but this is not allowed: "Foreign key relationships involve a parent table that holds the central data values, and a child table with identical values pointing back to its parent. The FOREIGN KEY clause is specified in the child table. The parent and child tables must both be InnoDB tables. They must not be TEMPORARY tables."
      http://dev.mysql.com/doc/refman/5.5/en/innodb-foreign-key-constraints.html

      Sorry. A non-recoverable error has occurred.
      DB Error: can not create
      Error Details
      Database Error Code: Can't create table 'civicrm.civicrm_survey_respondent_temp_08e632e278db9a194fa377300a3a6da4' (errno: 150), 1005
      Additional Details:

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

      [code] => -15
      [message] => DB Error: can not create
      [mode] => 16
      [debug_info] =>
      CREATE TEMPORARY TABLE civicrm_survey_respondent_temp_08e632e278db9a194fa377300a3a6da4 (
      id int unsigned NOT NULL AUTO_INCREMENT,
      survey_contact_id int unsigned NOT NULL,
      PRIMARY KEY ( id ),
      CONSTRAINT FK_civicrm_survey_respondent FOREIGN KEY (survey_contact_id) REFERENCES civicrm_contact(id) ON DELETE CASCADE ) [nativecode=1005 ** Can't create table 'civicrm.civicrm_survey_respondent_temp_08e632e278db9a194fa377300a3a6da4' (errno: 150)]
      [type] => DB_Error
      [user_info] =>
      CREATE TEMPORARY TABLE civicrm_survey_respondent_temp_08e632e278db9a194fa377300a3a6da4 (
      id int unsigned NOT NULL AUTO_INCREMENT,
      survey_contact_id int unsigned NOT NULL,
      PRIMARY KEY ( id ),
      CONSTRAINT FK_civicrm_survey_respondent FOREIGN KEY (survey_contact_id) REFERENCES civicrm_contact(id) ON DELETE CASCADE ) [nativecode=1005 ** Can't create table 'civicrm.civicrm_survey_respondent_temp_08e632e278db9a194fa377300a3a6da4' (errno: 150)]
      [to_string] => [db_error: message="DB Error: can not create" code=-15 mode=callback callback=CRM_Core_Error::handle prefix="" info="
      CREATE TEMPORARY TABLE civicrm_survey_respondent_temp_08e632e278db9a194fa377300a3a6da4 (
      id int unsigned NOT NULL AUTO_INCREMENT,
      survey_contact_id int unsigned NOT NULL,
      PRIMARY KEY ( id ),
      CONSTRAINT FK_civicrm_survey_respondent FOREIGN KEY (survey_contact_id) REFERENCES civicrm_contact(id) ON DELETE CASCADE ) [nativecode=1005 ** Can't create table 'civicrm.civicrm_survey_respondent_temp_08e632e278db9a194fa377300a3a6da4' (errno: 150)]"]
      )

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              mfb Mark Burdett
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: