I've run across an odd error that seems to occur when using the UNICODE_CI collation:
Error 335544333: internal gds software consistency check (Invalid expression for evaluation (303), file: evl.cpp line: 820)
I've managed to reduce the problem down to this:
CREATE TABLE ATABLE (
AFIELD VARCHAR(50) CHARACTER SET UTF8 COLLATE UNICODE_CI);
CREATE DESCENDING INDEX ATABLE_BWD ON ATABLE (AFIELD);
COMMIT;
Then try this select (even with no data in the table):
SELECT FIRST 1 T.AFIELD FROM ATABLE T
WHERE T.AFIELD < 'X'
ORDER BY T.AFIELD DESC
and I get the above error. (Both from FlameRobin and from an internal library/app.) Note that after the error occurs the connection becomes useless and has to be dropped and reconnected. The server itself stays running.
Changing to collation UNICODE or using an ASCENDING index avoids the error. A reverse logic query:
SELECT FIRST 1 T.AFIELD FROM ATABLE T
WHERE T.AFIELD > 'X'
ORDER BY T.AFIELD ASC
does not get the error (even when the ascending index is present, as it is in the original problem).
Discussion on the devel list indicated the problem is not only with the UNICODE_CI, apparently it is a problem with collation flag
TEXTTYPE_SEPARATE_UNIQUE. Cross reference with tracker item
CORE-1997.
Thanks