FIX: Query Issued Against Two Instances of the Same Table May Cause an Access Violation (302421)



The information in this article applies to:

  • Microsoft SQL Server 2000 (all editions)

This article was previously published under Q302421
BUG #: 352230 (SHILOH_BUGS)

SYMPTOMS

If a table has two computed columns, and a query is issued against two instances of that same table (for example, a self-join), and each instance references only one of the computed columns, the following error message may occur:
ODBC: Msg 0, Level 19, State 1
SqlDumpExceptionHandler: Process 52 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.

RESOLUTION

To resolve this problem, obtain the latest service pack for SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack

STATUS

Microsoft has confirmed that this is a problem in SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.

MORE INFORMATION

The following short stack dump is present in the SQL Server error log:
-------------------------------------------------------------------------------
Short Stack Dump
0058E28B Module(sqlservr+0018E28B) (CGenIndexStrategy::FColCovered(short,class CSet *)+0000003C)
00577F39 Module(sqlservr+00177F39) (CGenIndexStrategy::AssembleIndexJoin(int *,unsigned long,class COptExpr * *,class COptExpr * *,int *,enum JOINTYPE,class CCardVector *,class OptTypeVRSetArray * *,unsigned long *)+000005EE)
0056F615 Module(sqlservr+0016F615) (CGenIndexStrategy::FBuildNextSolution(class COptExpr * *,class COptExpr * *,int *,enum JOINTYPE,class CCardVector *,class OptTypeVRSetArray * *,unsigned long *)+0000054D)
0048BF1B Module(sqlservr+0008BF1B) (CImpRuleBaseJoinToIdxLookup::BuildSubstitutes(class COptExpr *,class CRuleContext *,class CRuleReturn *)+00000352)
00589104 Module(sqlservr+00189104) (CTask_ApplyRule::Perform(int)+00000268)
0058C939 Module(sqlservr+0018C939) (CMemo::ExecuteTasks(class COptTask *,int,int)+0000014D)
0058CF2D Module(sqlservr+0018CF2D) (CMemo::OptimizeQuery(class CQuery *,class COptExpr *,double *,int,int,struct s_OptimPlans *)+0000051A)
0058CADF Module(sqlservr+0018CADF) (COptContext::PexprSearchPlan(class COptExpr *)+00000155)
0055E100 Module(sqlservr+0015E100) (COptContext::PcxteOptimizeQuery(class COptExpr *,class DRgCId *)+00000B7A)
0055FFBB Module(sqlservr+0015FFBB) (CQuery::Optimize(void)+00000416)
0055FD54 Module(sqlservr+0015FD54) (CQuery::Optimize(unsigned long)+00000030)
005642C6 Module(sqlservr+001642C6) (CCvtTree::PqryFromTree(class TREE *,class IMemObj *,class CRangeCollection *,unsigned long,class CCompPlan *)+000002C4)
00564019 Module(sqlservr+00164019) (BuildQueryFromTree(class TREE *,class IMemObj *,class IMemObj *,class IQueryObj * *,class CRangeCollection *,unsigned long,class CCompPlan *)+00000046)
00563F78 Module(sqlservr+00163F78) (CStmtQuery::InitQuery(class CAlgStmt *,class CCompPlan *,unsigned long)+0000014B)
0049DA48 Module(sqlservr+0009DA48) (CStmtSelect::Init(class CAlgStmt *,class CCompPlan *,class IBrowseMode *)+00000091)
00447078 Module(sqlservr+00047078) (CCompPlan::FCompileStep(class CAlgStmt *,class CStatement * *)+00000AE7)
004510FE Module(sqlservr+000510FE) (CProchdr::FCompile(class CCompPlan *,class CParamExchange *)+00000D15)
00415080 Module(sqlservr+00015080) (CSQLSource::FTransform(class CParamExchange *)+0000037C)
004592CE Module(sqlservr+000592CE) (CSQLStrings::FTransform(class CParamExchange *)+000001A8)
0041534F Module(sqlservr+0001534F) (CSQLSource::Execute(class CParamExchange *)+00000176)
00459A54 Module(sqlservr+00059A54) (language_exec(struct srv_proc *)+000003C8)
004175D8 Module(sqlservr+000175D8) (process_commands(struct srv_proc *)+000000E0)
410735D0 Module(UMS+000035D0) (ProcessWorkRequests(class UmsWorkQueue *)+00000264)
4107382C Module(UMS+0000382C) (ThreadStartRoutine(void *)+000000BC)
7800BEA1 Module(MSVCRT+0000BEA1) (_beginthread+000000CE)
77E92CA8 Module(KERNEL32+00012CA8) (CreateFileA+0000011B)
-------------------------------------------------------------------------------
				

Modification Type:MajorLast Reviewed:10/3/2003
Keywords:kbBug kbfix kbSQLServ2000sp1fix KB302421