Changeset 2946c900f7646d680c632381e5ec97c70a76b752

Show
Ignore:
Timestamp:
10/23/09 20:30:53 (4 years ago)
Author:
Robert Treat <robert@omniti.com>
git-committer:
Robert Treat <robert@omniti.com> 1256329853 +0000
git-parent:

[611ad61723285f32e4c82a275193a0328d7ca4a2]

git-author:
Robert Treat <robert@omniti.com> 1256329853 +0000
Message:

more fixes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sql/sprocs/stratcon.rollup_metric_numeric.sql

    r611ad61 r2946c90  
    88    v_max_rollup    TIMESTAMPTZ; 
    99    v_whence        TIMESTAMPTZ; 
    10     v_taskid        INT
     10    v_taskid        INTEGER
    1111    v_locked        BOOLEAN; 
    1212    v_this_roll     TEXT; 
     
    1616    v_i             SMALLINT; 
    1717    v_temprec       RECORD; 
     18    v_count         INTEGER; 
    1819BEGIN 
    1920    -- Get rollup config based on given name, and fail if its wrong name. 
     
    8586 
    8687            EXECUTE v_sql INTO v_segment; 
    87             IF v_segment IS NOT NULL THEN 
     88            GET DIAGNOSTICS v_count = ROW_COUNT; 
     89            IF v_count = 0 THEN 
    8890                v_segment := stratcon.init_metric_numeric_rollup_segment( in_roll ); 
    8991                v_init := true; 
     
    107109                v_sql := v_sql || 'SET (count_rows,avg_value,counter_dev) = ('||v_rec.count_rows||','||v_rec.avg_value||','||v_rec.counter_dev||')'; 
    108110                v_sql := v_sql || 'WHERE rollup_time = '||v_stored_rollup||'  AND sid = '||v_info.sid||'  AND name = '||quote_literal(v_info.name); 
     111                EXECUTE v_sql;  
    109112            END IF; 
    110113