FIX: Inconsistent Behavior During Arithmetic Overflow
  
PSS ID Number: Q105856
Article last modified on 12-02-1994
 
4.20
 
WINDOWS
 

----------------------------------------------------------------------
The information in this article applies to:
 
 - Microsoft SQL Server version 4.2
----------------------------------------------------------------------
 
BUG# NT: 527 (4.2)
 
SYMPTOMS
========
 
Inconsistent behavior is observed when an arithmetic overflow occurs
involving a tinyint or smallint.
 
If ARITHABORT is OFF, a batch of Transact-SQL commands will be
terminated if an arithmetic overflow occurs in which constant or
integer values are used to produce a result which overflows a smallint
or tinyint target variable. If two values of the same datatype as the
target variable are used to cause an arithmetic overflow, then no
error will be raised and the command batch will not be terminated.
 
For example, if the following triggers an overflow, the current batch
will be aborted if @var1 is a tinyint and @var2 and @var3 are
integers; however, it will continue if @var2 and @var3 are tinyints.
 
   @var1 = @var2 * @var3
 
If ARITHABORT is ON, the command batch will not be terminated.
 
STATUS
======
 
Microsoft has confirmed this to be a problem in Microsoft SQL Server
version 4.2. This problem was corrected in SQL Server version 4.21a. For
more information, contact your primary support provider.
 
Additional reference words: 4.20 transact-sql error handling
KBCategory: kbprg
KBSubcategory: SSrvWinNT
 
=============================================================================
 
Copyright Microsoft Corporation 1994.
