Re: error message numbers change (was various other topics)
Posted in 1992
I rashly asserted, >> Purely a side issue, but this is in general not true. Error >> numbers are very stable. >> [...] >> But as long as the error cause is the same, the number is the same. > Oliver Okrongli calls me to account: >In I-SE 4.0 the error number for "statement not available" was -515. >This changed to -554 in I-SE 4.1 whithout any obvious reason. Since >our code is designed to work with I-SE and I-OnLine whithout >recompilation one of the first things in database initialization is: > > $set isolation to dirty read; > if (!db_stmt_not_available()) > db_error("set isolation to dirty read"); > >To work with both releases the definition of db_stmt_not_available had >to be changed: > > #define db_stmt_not_available() (db_code() == -515 || db_code() == -554) You are right, I was wrong, it is even worse than you say, and I have no good explanation. Previous to 4.0 there were three messages, -513 (statement not available with Informix-Turbo) and -515 (statement not available with non-Turbo). Clearly both were not needed. As of release 4.0 their texts were made the same: here are the actual entries from the .msg file: .-513 Statement not available with this database engine. ... .-515 Statement not available with this database engine. ... .-554 Syntax disallowed in this database engine. The distinction between them is not clear; however -513 and -515 presumably refer to statement verbs such as CREATE AUDIT or SET ISOLATION, while -554 refers to a single clause such as LOCK MODE {PAGE|ROW} within a statement that both engines otherwise support. In version 4.1, -515 was made redundant. From the 4.1 .msg file: # The following message numbers are not being used # and are commented out: ... # 515 - Statement not available with this database engine. ... .-513 Statement not available with this database engine. #.-515 #Statement not available with this database engine. In version 5.0, -513 apparently still exists and -515 has been reused for a constraint error (-554 is unchanged). From that .msg file: .-513 Statement not available with this database server. ... .-515 Constraint %s has already been dropped. ... .-554 Syntax disallowed in this database server. However, although -513 is still in the message file, the manual (Informix Error Messages, edition with "December 1991" on the cover) under error -513 says "this message is replaced by error -554 starting with software level 4.1." The only rationale I can imagine for this change is to release yet another number for future use. In your place I would also feel irked.