, srid);     ret = sqlite0_exec (handle, sql, NULL, NULL, NULL);     sqlite0_free (sql);     if (ret != SQLITE_OK)       {    spatialite_e ("ADD GEOMETRY %s error: %s\n", pattern,    sqlite0_errmsg (handle));    return 0;       }     sql =  sqlite0_mprintf ("SELECT CreateSpatialIndex(%Q, 'geometry')", pattern);     ret = sqlite0_exec (handle, sql, NULL, NULL, NULL);     sqlite0_free (sql);     if (ret != SQLITE_OK)       {    spatialite_e ("CREATE SPATIAL INDEX %s error: %s\n",    