Subject Bug: Index on "Name" incorrectly indexes on "NAME"
Author Raymond Kennington
The index on "Name" incorrectly indexes on "NAME". This was noticed by
setting the index in a TwwKeyCombo with ShowAllIndexes = True, selecting
the index IDX_Customer_Name, and searching incrementally on for "Je",
which is not found and then, without changing the index, searching for
"jo" *is* found.

SET SQL DIALECT 3;

SET NAMES ASCII;

CREATE DOMAIN D_NAME_C AS
VARCHAR(50) CHARACTER SET ISO8859_1
NOT NULL
COLLATE EN_US;

CREATE TABLE "Customer" (
ID D_GENERATOR /* D_GENERATOR = INTEGER NOT NULL */,
"Name" D_NAME_C /* D_NAME_C = VARCHAR(50) NOT NULL */,
NAME D_NAME /* D_NAME = VARCHAR(50) NOT NULL */,
"Email" D_EMAIL /* D_EMAIL = VARCHAR(50) */
);

INSERT INTO "Customer" (ID, "Name", NAME, "Email") VALUES (1, 'Jahn 1',
'JAHN 1', NULL);
REINSERT (2, 'JaHn 2', 'JAHN 2', NULL);
REINSERT (3, 'James', 'JAMES', NULL);
REINSERT (4, 'Jemis', 'JOAMIS', NULL);

ALTER TABLE "Customer" ADD CONSTRAINT "PK_Customer" PRIMARY KEY (ID);

CREATE UNIQUE INDEX "IDX_Customer_Name" ON "Customer" ("Name");
CREATE UNIQUE INDEX "IDX_Customer_Name_Upper" ON "Customer" (NAME);

Raymond Kennington