1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Changeset 11214

Show
Ignore:
Timestamp:
05/29/13 03:40:10 (11 months ago)
Author:
svn-sync
Message:

Synchronized with https://dev.naver.com/svn/cubrid/branches/RB-9.2.0
Source Revision: 8449, Author: clazzart, Msg:
[CUBRIDSUS-11328][CR] implemented sort_limit_max_count system parameter

Location:
cubrid/branches/RB-9.2.0/src
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • cubrid/branches/RB-9.2.0/src/base/system_parameter.c

    r11211 r11214  
    471471#define PRM_NAME_GENERIC_VOL_PREALLOC_SIZE "generic_vol_prealloc_size" 
    472472 
     473#define PRM_NAME_SORT_LIMIT_MAX_COUNT "sort_limit_max_count" 
     474 
    473475 
    474476/* 
     
    12611263static char *prm_intl_collation_default = NULL; 
    12621264 
     1265int PRM_SORT_LIMIT_MAX_COUNT = 1000; 
     1266static int prm_sort_limit_max_count_default = 1000; 
     1267static int prm_sort_limit_max_count_lower = 0;  /* disabled */ 
     1268static int prm_sort_limit_max_count_upper = INT_MAX; 
     1269 
    12631270typedef struct sysprm_param SYSPRM_PARAM; 
    12641271struct sysprm_param 
     
    26272634   (void *) &prm_generic_vol_prealloc_size_upper, 
    26282635   (void *) &prm_generic_vol_prealloc_size_lower, 
     2636   (char *) NULL}, 
     2637  {PRM_NAME_SORT_LIMIT_MAX_COUNT, 
     2638   (PRM_FOR_CLIENT | PRM_USER_CHANGE | PRM_FOR_SESSION | PRM_FOR_QRY_STRING), 
     2639   PRM_INTEGER, 
     2640   (void *) &prm_sort_limit_max_count_default, 
     2641   (void *) &PRM_SORT_LIMIT_MAX_COUNT, 
     2642   (void *) &prm_sort_limit_max_count_upper, 
     2643   (void *) &prm_sort_limit_max_count_lower, 
    26292644   (char *) NULL} 
    26302645}; 
  • cubrid/branches/RB-9.2.0/src/base/system_parameter.h

    r11211 r11214  
    287287  PRM_ID_INTL_COLLATION, 
    288288  PRM_ID_GENERIC_VOL_PREALLOC_SIZE, 
     289  PRM_ID_SORT_LIMIT_MAX_COUNT, 
    289290  /* change PRM_LAST_ID when adding new system parameters */ 
    290   PRM_LAST_ID = PRM_ID_GENERIC_VOL_PREALLOC_SIZE 
     291  PRM_LAST_ID = PRM_ID_SORT_LIMIT_MAX_COUNT 
    291292}; 
    292293 
  • cubrid/branches/RB-9.2.0/src/optimizer/query_graph.c

    r11213 r11214  
    85388538{ 
    85398539  PT_NODE *query, *orderby, *sort_col, *select_list, *col, *save_next; 
    8540   int i, pos_spec; 
     8540  int i, pos_spec, limit_max_count; 
    85418541  QO_NODE *node; 
    85428542  BITSET order_nodes, dep_nodes, expr_segs, tmp_bitset; 
     
    85728572    { 
    85738573      /* unusable limit */ 
     8574      goto abandon_stop_limit; 
     8575    } 
     8576  limit_max_count = prm_get_integer_value (PRM_ID_SORT_LIMIT_MAX_COUNT); 
     8577  if ((DB_BIGINT) limit_max_count < DB_GET_BIGINT (&QO_ENV_LIMIT_VALUE (env)) 
     8578      || limit_max_count == 0) 
     8579    { 
     8580      /* either disabled or limit too large to apply this optimization */ 
    85748581      goto abandon_stop_limit; 
    85758582    }