GError **error)
{
gint i;
- gboolean success;
+ gboolean success = TRUE;
gchar *stmt, *tmp;
GString *string;
gboolean already_exists = FALSE;
if (!success)
return FALSE;
+ /* Introspect the summary if the table already exists */
+ if (already_exists) {
+ success = introspect_summary (ebsdb, folderid, error);
+
+ if (!success)
+ return FALSE;
+ }
+
string = g_string_new (
"CREATE TABLE IF NOT EXISTS %Q ( uid TEXT PRIMARY KEY, ");
g_free (tmp);
}
- /* Dont introspect the summary if the table did not yet exist */
- if (success && already_exists)
- success = introspect_summary (ebsdb, folderid, error);
-
/* Create indexes on the summary fields configured for indexing */
for (i = 0; success && i < ebsdb->priv->n_summary_fields; i++) {
if ((ebsdb->priv->summary_fields[i].index & INDEX_PREFIX) != 0 &&