BUG: Inconsistent Behavior During Arithmetic Overflow

Last reviewed: April 29, 1997
Article ID: Q116411

The information in this article applies to:

  - Microsoft SQL Server version 4.2 for OS/2
BUG# OS/2: 1793 (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 SQL Server version 4.2 for OS/2. We are researching this problem and will post new information here as it becomes available.


Additional query words: transact-sql error handling
Keywords : kbbug4.20 kbother SSrvServer
Version : 4.2
Platform : OS/2


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 29, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.