Re: comment error in sql
Posted in 1993
}From: warlok!kysilk.sherwood.com!jerry@uunet.UU.NET (jerry) }Subject: Re: comment error in sql }Date: Fri, 17 Sep 1993 18:40:06 -0700 (MST) }X-Informix-List-Id: <list.2829> } }---- original message from Bryan Klopfenstein ---- }* Bob Baskett writes: }* } >can anyone explain why i cant execute the following sql without getting }* } >an error: }* } >-- this should work! }* } >unload to "/tmp/somefile" }* } >select * }* } >from systables; }* } >I get the following error: }* } >809: SQL Syntax error has occurred. }* } >it works fine when i change the comment to : }* } >{ this should work } }* Bob Beaulieu replies: }* } -- and {} work just fine on out system: MIPS RISC4.0 INFORMIX 4.00.UED1 }* Hmmmm... I reproduce Mr. Baskett's results on both of our platforms: }* 1. IBM RS/6000 520, AIX 3.2, ISQL 4.10.UE2 with OnLine/I-Star 5.00.UC3 }* 2. HP 9000/800 F20, HPUX 9.0, ISQL 4.11.UC1 with OnLine 5.01.UD1 }* {} works on both, -- failed on both. }* I even tried both methods with and without the "!" character. }I tried "-- this should work" and here are the results: }Motorola 88K ISQL 4.10.UC4 with OnLine/I-Star 4.10.UC2 works }Motorola 88K ISQL 4.00.UE2 with SE/I-Net 4.10.UC4 works }SCO ODT 2.0 ISQL 4.00.UE2 with OnLine/I-Star 4.10.UD2 works }CTIX 68040 ISQL 4.00.UE2 with OnLine 4.00.UE2 works }Motorola 68K ISQL 2.10.03K with SE 2.10.03F fails I don't think 2.10.03 ever understood "--" comments, so I'd expect that to fail. What is more puzzling is that any of the 4.xx versions work; I can find no trace of the fix in the SCCS files that are supposed to record such matters. I think it is significant that all the working versions are .UXn where n > 1; these are patch ports which are handled outside the main R&D organisation, and the fix has clearly been applied in many but not all of these versions, but not all. The problem is related to the fact that UNLOAD, LOAD, OUTPUT, CHECK, REPAIR and INFO are handled specially by the ISQL interpreter code rather than the Engine. The parsing code for these statements does not use Yacc grammars, and the "--" comment handling is somewhat ad hoc. The Engine version does not affect the error report -- the statement does not get to the engine when the 809 error is produced. I am just trying to work out what the proper fix is, so that it makes its way into the 4.12 version. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>