Skip to content

Code smell comparing BIGINT to INT #427

@nmummau

Description

@nmummau

SQL Server procedure read_stream_sub has variable @from_position BIGINT

  • StreamPosition is an INT
  • @from_position is a BIGINT

The WHERE clause is comparing these two value: StreamPosition >= @from_position

This is generating a code smell when I build this project with static code analysis enabled:

SqlServer.Rules : Data types on both sides of an equality check should be the same in the where clause. (Sargable) (https://github.com/ErikEJ/SqlServer.Rules/blob/master/docs/Performance/SRP0016.md)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions