Hi,
Consider the following table and index :
CREATE TABLE thetable(
a CHAR(1),
b CHAR(1),
c CHAR(1) );
CREATE INDEX i_thetable ON thetable(a,b,b,c);
The index is invalid, because the column 'b' is duplicated.
In 5.07 and 7.12 (and maybe some other versions), you get the error message
-542 (column cannot appear more than once...).
Inn 5.02 and 5.05 (the only other ones I checked), you CAN create this
vicious index.
Consider now the following query (1) :
SELECT * FROM thetable
WHERE a="A"
AND b="B"
AND c="C"
What you get is a -408 error (invalid message type received...), and
your process aborts abnormally (reported in the log file).
This query (2) :
SELECT * FROM thetable
WHERE b="B"
AND c="C"works fine !
If you select all the fields in the index which precede the duplicated column,
including the 'bad' column, the query fails.
Funny, isn't it ???
Valery Fouques - SYSADM / GOSPORT - FRANCE