fix small bug in index.c

This commit is contained in:
markigail 2016-05-03 12:52:08 +02:00
parent 2ba9c11dd0
commit 1a4f369e2b

View File

@ -163,11 +163,12 @@ struct index_thread_data * thread_data, const char *structuredoutputfile)
{ {
if (interpolation) if (interpolation)
{ {
iResult = PQsendQueryPrepared(conn, "index_sector_places", 2, paramValues, paramLengths, paramFormats, 1); iResult = PQsendQueryPrepared(conn, "index_sector_places_osmline", 1, paramValues, paramLengths, paramFormats, 1);
} }
else else
{ {
iResult = PQsendQueryPrepared(conn, "index_sector_places_osmline", 1, paramValues, paramLengths, paramFormats, 1); iResult = PQsendQueryPrepared(conn, "index_sector_places", 2, paramValues, paramLengths, paramFormats, 1);
} }
} }
if (!iResult) if (!iResult)
@ -244,8 +245,6 @@ struct index_thread_data * thread_data, const char *structuredoutputfile)
fprintf(stderr, "\r Done %i in %i @ %f per second - FINISHED\n\n", rankCountTuples, (int)(difftime(time(0), rankStartTime)), rankPerSecond); fprintf(stderr, "\r Done %i in %i @ %f per second - FINISHED\n\n", rankCountTuples, (int)(difftime(time(0), rankStartTime)), rankPerSecond);
PQclear(resSectors); PQclear(resSectors);
} }
void nominatim_index(int rank_min, int rank_max, int num_threads, const char *conninfo, const char *structuredoutputfile) void nominatim_index(int rank_min, int rank_max, int num_threads, const char *conninfo, const char *structuredoutputfile)
@ -404,10 +403,6 @@ void nominatim_index(int rank_min, int rank_max, int num_threads, const char *co
} }
run_indexing(rank, 0, conn, num_threads, thread_data, structuredoutputfile); run_indexing(rank, 0, conn, num_threads, thread_data, structuredoutputfile);
} }
if (rank == 30)
{
// Close all connections // Close all connections
for (i = 0; i < num_threads; i++) for (i = 0; i < num_threads; i++)
{ {
@ -415,7 +410,6 @@ void nominatim_index(int rank_min, int rank_max, int num_threads, const char *co
} }
PQfinish(conn); PQfinish(conn);
} }
}
void *nominatim_indexThread(void * thread_data_in) void *nominatim_indexThread(void * thread_data_in)
{ {