Re: Kinda bug
Posted in 1996
gosport (gosport@pobox.oleane.net) wrote: : 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. Yes, this was a bug (20827) in the earlier version. The reason you get -408 on the first query is because it tries to use the index and chokes on the duplicated column. The second query works because it doesn't use the index. The fix to bug 20827 was to give you the error -542 when you try to create the index. June ---- June Tong Informix Software ---- ---- Senior Consultant (415) 926-6140 ---- ---- International Support junet@informix.com ---- ---- Location-du-jour: Miami ---- * * Standard disclaimers apply * - Please do not send me requests/questions by mail. When I have the knowledge - and time permits, I try to answer questions on comp.databases.informix, but - travel schedule, time, and volume make responding to personal requests - difficult and often slow. Please call your local Informix Technical Support - organization for assistance with technical issues.