Changeset 14427

Show
Ignore:
Timestamp:
05/10/08 12:05:48 (2 months ago)
Author:
mloskot
Message:

Ported fix for segmentation fault in swq_select_finish_summarize when SQL query issued on layer without any attributes like empty shapefile (Ticket #2358).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.5/gdal/ogr/swq.c

    r12831 r14427  
    21542154{ 
    21552155    int (FORCE_CDECL *compare_func)(const void *, const void*); 
    2156     int count
    2157     char **distinct_list
     2156    int count = 0
     2157    char **distinct_list = NULL
    21582158 
    21592159    if( select_info->query_mode != SWQM_DISTINCT_LIST  
     
    21672167        select_info->column_defs[0].field_index ) 
    21682168        return "Only selected DISTINCT field can be used for ORDER BY."; 
     2169 
     2170    if( select_info->column_summary == NULL ) 
     2171        return NULL; 
    21692172 
    21702173    if( select_info->column_defs[0].field_type == SWQ_INTEGER )