diff --git a/core/modules/field/modules/field_sql_storage/field_sql_storage.module b/core/modules/field/modules/field_sql_storage/field_sql_storage.module
index 92d244a..6cb3fb9 100644
--- a/core/modules/field/modules/field_sql_storage/field_sql_storage.module
+++ b/core/modules/field/modules/field_sql_storage/field_sql_storage.module
@@ -212,8 +212,31 @@ function _field_sql_storage_schema($field) {
  */
 function field_sql_storage_field_storage_create_field($field) {
   $schema = _field_sql_storage_schema($field);
+  if (Database::getConnection()->supportsTransactionalDDL()) {
+    // If the database supports transactional DDL, we can go ahead and rely
+    // on it. If not, we will have to rollback manually if something fails.
+    $transaction = db_transaction();
+  }
+  else {
+    $created_tables = array();
+  }
   foreach ($schema as $name => $table) {
-    db_create_table($name, $table);
+    try {
+      db_create_table($name, $table);
+      $created_tables[] = $name;
+    }
+    catch (Exception $e) {
+      // We have to remove already created tables.
+      if (Database::getConnection()->supportsTransactionalDDL()) {
+        $transaction->rollback();
+      }
+      else {
+        foreach ($created_tables as $name) {
+          db_drop_table($name);
+        }
+      }
+      throw $e;
+    }
   }
   drupal_get_schema(NULL, TRUE);
 }
diff --git a/core/modules/field_ui/field_ui.admin.inc b/core/modules/field_ui/field_ui.admin.inc
index 73b1492..3a4a0b8 100644
--- a/core/modules/field_ui/field_ui.admin.inc
+++ b/core/modules/field_ui/field_ui.admin.inc
@@ -863,7 +863,8 @@ function field_ui_field_overview_form_submit($form, &$form_state) {
     unset($_GET['destination']);
     $form_state['redirect'] = field_ui_get_destinations($destinations);
   }
-  else {
+  elseif (!isset($e)) {
+    // It is true only if there was no exceptions.
     drupal_set_message(t('Your settings have been saved.'));
   }
 }
diff --git a/core/modules/field_ui/field_ui.test b/core/modules/field_ui/field_ui.test
index 4bb7da9..38a359f 100644
--- a/core/modules/field_ui/field_ui.test
+++ b/core/modules/field_ui/field_ui.test
@@ -730,3 +730,71 @@ class FieldUIAlterTestCase extends DrupalWebTestCase {
     $this->assertText('Widget type: options_select', 'Widget type is not altered for pages in hook_field_widget_form_alter().');
   }
 }
+
+/**
+ * Field test for correct messaging and DB cleanup on field creation failure case.
+ *
+ * @see based on FieldUIManageFields class.
+ */
+class FieldUIManageFieldsFailTestCase extends DrupalWebTestCase {
+  public static function getInfo() {
+    return array(
+      'name' => 'Handle adding failure',
+      'description' => 'Test the system cleanup in case of DB failure while adding field.',
+      'group' => 'Field UI',
+    );
+  }
+
+  function setUp() {
+    parent::setUp();
+
+    $admin_user = $this->drupalCreateUser(array('access content', 'administer content types', 'administer users'));
+
+    $this->drupalLogin($admin_user);
+
+    // Create content type, with underscores.
+    $type_name = strtolower($this->randomName(8)) . '_test';
+    $type = $this->drupalCreateContentType(array('name' => $type_name, 'type' => $type_name));
+    $this->type = $type->type;
+
+    // Store a valid URL name, with hyphens instead of underscores.
+    $this->hyphen_type = str_replace('_', '-', $this->type);
+
+    $schema =  array(
+      'description' => 'Leftover sample table.',
+      'fields' => array(
+        'just_field' => array(
+          'type' => 'int',
+        ),
+      ),
+    );
+    $this->field_name_input = strtolower($this->randomName(5));
+    $this->table_name_data = 'field_data_field_'. $this->field_name_input;
+    $this->table_name_revision = 'field_revision_field_'. $this->field_name_input;
+    // Create table that is field revision table. It should break field creation.
+    db_create_table($this->table_name_revision, $schema);
+  }
+
+  /**
+   * Create a new field through the Field UI.
+   */
+  function testCreateFieldFailureCleanup() {
+    $initial_edit = array(
+      'fields[_add_new_field][label]' => $this->randomName(),
+      'fields[_add_new_field][field_name]' => $this->field_name_input,
+      'fields[_add_new_field][type]' => 'text',
+      'fields[_add_new_field][widget_type]' => 'text_textfield',
+    );
+    $label = $initial_edit['fields[_add_new_field][label]'];
+    $field_name = $initial_edit['fields[_add_new_field][field_name]'];
+
+    // Create field and assert it was not created.
+    $this->drupalPost('admin/structure/types/manage/' . $this->hyphen_type . '/fields',  $initial_edit, t('Save'));
+    $this->assertRaw(t('There was a problem creating field'), t('Message about field creation troubles was displayed.'));
+    $this->assertNoRaw(t('Your settings have been saved.'), t('No success message because there was an error.'));
+
+    // Check tables remain.
+    $this->assertFalse(db_table_exists($this->table_name_data), t('Field tables consistency check. No new tables on field creation failure expected.'));
+    $this->assert(db_table_exists($this->table_name_revision), t('Previously existed table in place.'));
+  }
+}
