Indices on computed fields are broken after restore (all keys are NULL) [CORE5118] #5402
Submitted by: CHENAVIER Gérald (gchenavier)
No problem in 2.5.2, it is regression :
The Select with order by computed col return 0 line.
CREATE TABLE T1 (IDT1 INTEGER, NOMT1 VARCHAR(10), PRENOMT1 VARCHAR(10) , NOMPRENOMT1 COMPUTED BY (NOMT1 || ' ' || PRENOMT1));
make Backup/restore in 2.5.5
select a.IDT1, a.NOMT1, a.NOMPRENOMT1 from T1 a order by 3
select a.IDT1, a.NOMT1, a.NOMPRENOMT1 from T1 a order by 2
The text was updated successfully, but these errors were encountered:
Commented by: @dyemanov
I've updated the ticket subject for the real problem. Computed fields are initially restored as regular ones (with missing values) and then altered to become computed. Index creation misses the new definition and deals with the older one, causing NULL keys to be stored in the index.
v2.5.2 is also affected, you just don't see it because the engine does not use the index: plan SORT is used instead of ORDER. It was a regression but it was fixed (in v2.5.4, I think). Now the restore issue becomes visible.
Modified by: @dyemanov
Version: 2.5.4 [ 10585 ]
Version: 2.5.3 Update 1 [ 10650 ]
Version: 2.5.3 [ 10461 ]
Version: 2.5.2 [ 10450 ]
Version: 2.5.1 [ 10333 ]
Version: 2.5.0 [ 10221 ]
assignee: Dmitry Yemanov [ dimitr ]
summary: regression : Bug INDEX on COMPUTED VALUE => Indices on computed fields are broken after restore (all keys are NULL)