Query causes PSQL 10.30.017 engine to crash

Last post 07-13-2010 7:29 AM by BtrieveBill. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-12-2010 11:16 PM

    Query causes PSQL 10.30.017 engine to crash

     The query below causes Pervasive SQL 10.30.017 to crash. We've already discovered that using DISTINCT in cross-database queries cause the database engine to crash. In this instance, it looks like using CASE statements in a cross-database query causes the engine to crash as well.

    SELECT c.name, m.last_name, m.first_name, m.addr1, m.city, m.state, m.zip,
    m.hire_date, m.ss_alpha, m.sex, m.birth_date,  
    Case m.eeo_class
    when 1 then 'Officials and Managers'
    when 11 then 'Executive'
    when 12 then 'Manager'
    when 2 then 'Professionals'
    when 3 then 'Technician'
    when 4 then 'Sales'
    when 5 then 'Administrative Support'
    when 6 then 'Craft Workers'
    when 7 then 'Operatives'
    when 8 then 'Laborers'
    when 9 then 'Service Workers'
    end as EEO_Class,
    m.hourly, m.freq,
    CASE m.empl_status
    when 1 then 'Regular FT'
    when 2 then 'Regular PT With Benefits'
    when 3 then 'Regular PT Without Benefits'
    when 4 then 'Temp FT'
    when 5 then 'Temp PT'
    when 6 then 'Leave of Absense'
    when 7 then 'On Call'
    END AS FT_Status,
    m.base_rate as Base_Rate, m.gross_yr
    FROM APEX132010.PR_MAST m inner join
    APEX132010.CL_MAST C ON M.LOC_NO = C.LOC_NO
    WHERE c.loc_no in (2919,3071,3373,3375,3467,2918,2983,2920,3393,3374,3401,3320,3092,2956)
    and active_stat = 'A'
    UNION
    SELECT c.name,m.last_name, m.first_name, m.addr1, m.city,m.state,m.zip,
    m.hire_date, m.ss_alpha, m.sex, m.birth_date,  
    Case m.eeo_class
    when 1 then 'Officials and Managers'
    when 11 then 'Executive'
    when 12 then 'Manager'
    when 2 then 'Professionals'
    when 3 then 'Technician'
    when 4 then 'Sales'
    when 5 then 'Administrative Support'
    when 6 then 'Craft Workers'
    when 7 then 'Operatives'
    when 8 then 'Laborers'
    when 9 then 'Service Workers'
    end as EEO_Class,
    m.hourly, m.freq,
    CASE m.empl_status
    when 1 then 'Regular FT'
    when 2 then 'Regular PT With Benefits'
    when 3 then 'Regular PT Without Benefits'
    when 4 then 'Temp FT'
    when 5 then 'Temp PT'
    when 6 then 'Leave of Absense'
    when 7 then 'On Call'
    END AS FT_Status,
    m.base_rate as Base_Rate, m.gross_yr
    FROM APEX152010.PR_MAST m inner join
    APEX152010.CL_MAST C ON M.LOC_NO = C.LOC_NO
    WHERE c.loc_no = 2014
    AND active_stat = 'A'
    ORDER BY c.name, m.last_name, m.first_name;

    I don't think this query is malformed in any way. Even if it were, why would the database crash because of it?

  • 07-12-2010 11:31 PM In reply to

    Re: Query cause PSQL 10.30.017 engine to crash

    We installed the 10.31.014 patch last week.

  • 07-13-2010 7:29 AM In reply to

    Re: Query cause PSQL 10.30.017 engine to crash

    If you have a query that cases the engine to crash, then this is a bug in the engine itself.  You should package up a copy of the DDF's and Database files along with the query, and submit it to Pervasive.  For fastest response, you should open a ticket with them by calling 800-BTRIEVE.  For low-priority issues that you just want to report and eventually get fixed, you can use the free "Report a Defect" page here:
        http://ww1.pervasive.com/support/submit_defect.asp

    Bill Bach
    Goldstar Software Inc.
    www.goldstarsoftware.com
Page 1 of 1 (3 items)