2 messages in com.mysql.lists.plusplusSV: SV: Using "LOAD DATA LOCAL INFILE...
FromSent OnAttachments
Steffen Schumacher26 Apr 2004 00:24 
Steffen Schumacher26 Apr 2004 05:56 
Subject:SV: SV: Using "LOAD DATA LOCAL INFILE....." statement with mysql++
From:Steffen Schumacher (STE@tdc.dk)
Date:04/26/2004 05:56:31 AM
List:com.mysql.lists.plusplus

Succes!!!

After a reinstall of mysql++, where I had added the two lines: char enable_load_infile = 1; mysql_options(&mysql,MYSQL_OPT_LOCAL_INFILE, (const char
*)&(enable_load_infile));

in line 50 of connection.cc and connection.cc.orig (just in case) just before
the line: mysql_options(&mysql, MYSQL_READ_DEFAULT_FILE, "my");

This WORKS!! Now there may be other ways to enable this statement in mysql++,
but sofar, I found this one to be the simpler one. So I can only conclude, that using mysql++ (from the ports collection of FreeBSD
with no extra options anyways) doesn't allow me to use the LOAD INFILE
statement, unless I feed it some weird parameter I haven't been able to find
yet. But furthermore, I can conclude that it is possible for mysql++ to support
it, with a few minor supplements to the code. In my short and brief analysis of
the problem, I think that adding a single public method and insertion of a call
to that member in real_connect method, would do the trick.

This workaround solution is very ugly, and I would like to know who I have to
flatter in order to set this option, using an official mysql++ release, rather
then my own tampered one. I might even be willing to do some of the
implementation myself, if it were to come to that. However, these two lines
shouldn't be added permanently, as enabling this feature, opens up a security
risk. In short, when allowing third parties to query the a database using
mysql++, it enables reading of various files on the machine on which mysql++
runs.. But the bottom line is, that it should be optional, if you wan't to use
it or not, and default should be not.

So the basic reality of the problem is, put simply: mysql++ doesn't have support
for setting various mysql options. Who do I contact in order to add this?

Kind regards Steffen Schumacher Systemkonsulent, NSCB (Backbone) TDC Totalløsninger A/S

PS. if you know which parameter I have to feed make in the FreeBSD ports
collection, to skip this process of altering mysql++ distribution, it would be
much appreciated!!

-----Oprindelig meddelelse----- Fra: Sinisa Milivojevic [mailto:sin@mysql.com] Sendt: 24. april 2004 13:46 Til: Steffen Schumacher Cc: plus@lists.mysql.com Emne: Re: SV: Using "LOAD DATA LOCAL INFILE....." statement with mysql++

Steffen Schumacher wrote:

right.. I'll fix that, but the exception I'm getting says this: "The used command is not allowed with this MySQL version".

This would mean that even if I were to use the exec() method, then I would still
be getting this error right?

The above error message means that LOAD DATA options is not built in the client or server or both or that it is not enabled on either or neither of the sides.

It has got nothing to do with MySQL++.

Sincerely,