Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: strange INSERT problem using strings with leading dashes, GET PARAMETER window coming up

From: Robert Klemme <shortcutter(at)googlemail.com>
Date: Tue Jul 17 2007 - 03:04:06 EDT


2007/7/16, aquarius14@freenet.de <aquarius14@freenet.de>:
> Hi folks,
> does anybody have a good explanation why an insertion of a string into a varchar field fails
> if one tries to insert a string with a line break (i.e. CRLF) followed by one or more dashes ?
> (a 'Get Parameter for ...' popup window is comming up, asking for a parameter
> for some variable coming next after the dashes,
> in the example below, it would ask for a parameter for 'test')
>
> Meaning something like this:
> (Prerequisite: you have a table mytest with an attribute term varchar, in my case varchar(7900). )
>
> insert into test (term)
> values('this is
> a
> ---
> test')
>
>
> Sure, this is a really short drosophila example for a more complex
> problem observed during data migration and subsequent trouble shooting.
> But I think it should be possible to insert some dashed line into some text which has CRLF-separated lines.
>
> Note: (a) as far as I have seen, there can be blanks before the dashes in order to create the same problem,
> an added leading dot in front of the dashes, however, makes the insertion possible.
> (b) I am testing on DB server 7.5.00.38 on Windows and SQL studio 7.6.00.27 (123692)
>
> Appreciating any feedback,
> (also links to manual pages where I can read good examples
> how parameter insertion really works (e.g. in SQL Studio)
> and also how that can be avoided in case you are just not interested in Parameter Insertron.)

The only thing that comes to mind is that two leading dashes start a line comment in SQL. Maybe you hit a bug in the parser that leads to this line being treated as comment.

Kind regards

robert

-- 
MaxDB Discussion Mailing List
For list archives: 
http://lists.mysql.com/maxdb
To unsubscribe:    
http://lists.mysql.com/maxdb?unsub=lists@pantek.com
Received on Tue Jul 17 03:04:28 2007

This archive was generated by hypermail 2.1.8 : Thu Aug 09 2007 - 19:30:26 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library