|
Hi Malte, >From the perl point of view, you can definitely use prepared statement. You will find examples in myosotis/src/test/perl/mysql/ (35prepare.t and 40blobs.t are good candidates) There is not much of a choice for myosotis to convert statements into strings: myosotis is java and calls jdbc functions, which takes Strings as argument. We don't do conversions when it's not necessary, but for simple queries, I'm afraid it is. Also, I think that parsing SQL and finding blobs would require some table information and would be pretty expensive in terms of performance. Cheers, Gilles. [EMAIL PROTECTED] wrote: Hi Gilles, i see we have different problems here, let's fix them step by step. The First one is a perl modul, used to upload files into a database. I think the problem is, that this modul uses mysqlquery to insert into the database and myosotis converts the query into a string.Could this be fixed by using a preparedStatement in the perl modul? (Is Apache2 mod_perl supporting preparedStatements, if, do anybody know the syntax) Or could this be fixed inside myosotis? Maybe converting a statement into a String is not always the best way of doing it. I think this can often lead to an error. Is there a way to test if the query will insert a blob and then just execute the query without converting and interpreting it? Best regards, MalteHi Malte, How are you inserting the blobs? using prepared statements? You can try the following out: 1/ edit myosotis.sh and add the following option to java: -Dfile.encoding=utf8. Command will look like: java -server -Dfile.encoding=utf8 $MONITOR $JPDA_OPTS -Dmyosotis.logger=conf/log4j.properties -jar lib/[EMAIL PROTECTED]@.jar conf/myosotis*.properties (this might be enough, but just in case your backend aren't all-utf8 configured:) 2/ force utf8 connection to your backends, using the backend url options characterEncoding=utf8. You might also need useServerPrepStmts=true: <DatabaseBackend name="c1b1" url=""> Hope these help, Gilles. [EMAIL PROTECTED] wrote:Hi @all, we try to insert data trough myosotis from perl into a sequoia cluster. We got into trouble, because the data is somehow changed while inserting. When we read it again, the data is corrupted. The easiest example is to insert one of the following chars: 'ä' 'ü'. The charset was set to utf8, so it should work, but it didn't. I'm not really sure if the problem is caused by myosotis or sequoia. Did someone had problems like this before? Or can anyone help me? Best regards, Malte _______________________________________________ Myosotis mailing list [EMAIL PROTECTED] https://forge.continuent.org/mailman/listinfo/myosotis_______________________________________________ Sequoia mailing list [email protected] https://forge.continuent.org/mailman/listinfo/sequoia_______________________________________________ Myosotis mailing list [EMAIL PROTECTED] https://forge.continuent.org/mailman/listinfo/myosotis . |
_______________________________________________ Sequoia mailing list [email protected] https://forge.continuent.org/mailman/listinfo/sequoia
