Skip to content

Display bug whith JOIN of tables that have fields differing by their case #5398

@ysalmon

Description

@ysalmon

Consider the following database :

PRAGMA foreign_keys = off;
BEGIN TRANSACTION;

-- Table: ta
CREATE TABLE ta (field);
INSERT INTO ta (field) VALUES (1);
INSERT INTO ta (field) VALUES (2);

-- Table: tb
CREATE TABLE tb (FIELD);
INSERT INTO tb (FIELD) VALUES ('a');
INSERT INTO tb (FIELD) VALUES ('b');

-- View: join
CREATE VIEW "join" AS SELECT * FROM ta JOIN tb;

COMMIT TRANSACTION;
PRAGMA foreign_keys = on;

While showing the data view (or the result of the same SQL query in an SQL editor), SQLiteStudio will display

field FIELD
1 1
1 1
2 2
2 2

If the field is renamed to eg. field_, the display is correct. If it is renamed to FIELD, this is also correct and SQLiteStudio will append a :1 to the second one.

It seems the code doing this is comparing field names case-sensitively, when it should not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions