Skip to content

Sqlite buildDataType drops the column size when decimalDigits is null (unreachable dead branch) #2167

Description

@Aias00

Chat2DB Edition

Chat2DB Community

Chat2DB Version

5.3.0

Deployment

Web

Operating System

macOS

Operating System Version

12

Database and Version

SQLite

Problem Summary

SqliteColumnTypeEnum.buildDataType guards with if (columnSize == null || decimalDigits == null) return columnType. The || decimalDigits == null causes an early return for sized columns without scale (VARCHAR(255), INTEGER(10)) — the size is lost. The size-only branch at line 152 is unreachable dead code because line 149 already returned. Every sibling guards on columnSize == null only.

Expected Behavior

Guard on columnSize == null only, making the size-only branch reachable.

Actual Behavior

SqliteColumnTypeEnum.java:149 — if (columnSize == null || decimalDigits == null) return columnType.

Impact

Limited or cosmetic impact

Workaround

N/A

Submission Checklist

  • I reproduced this on the selected Chat2DB edition.
  • I searched existing issues for duplicates.
  • I removed credentials and private data.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions