Hi Malte,
I knew about the request logging, but it did not bring the results I'm
looking for.
For example:
19:27:37,086 hcmd_C S 5045 0 SELECT
processes.PID,processes.parentPID,processes.UnixPID,processes.status,processes.statephase,processes.stateline,processes.tag,
processes.host,processes.lastHeartbeat,processes.type,processes.targethost,proce
sses.startTimestamp FROM processes WHERE ((status in ("R", "M", "M0",
"N","Q")) or (lastheartbeat > ?)) AND type not in ("EXTERNAL",
"PROTECTED","SIGSRV") ORDE
R BY pid/<!%B|MTIyMzQ4NjY1Nw==|!%>
You see one part in clear text and another one in bytecode or someting
like this. I think the bytecode are the parameters.
When you use a PreparedStatement instead of a Statement, we log the
PreparedStatement template with the ? for parameter placeholders and we
end the template by a trailing '/'. Then we append all parameters as you
have called setByte,setString,setXXX in your code. Each parameter is
encoded as follows <!%type|value|!%>. You can find a list of all types
encoding in the javadoc of
org.continuent.sequoia.common.protocol.PreparedStatementSerialization.
For example, B means bytes (so you called setBytes on that
PreparedStaement in the application). Bytes are a specific type that is
encoded using the RFC 2045 Base64 encoding (the same as used in MIME for
emails), this is why it looks cryptic.
If you use plain statements the text will appear clear without any
parameter encoding. Encoded prepared statements is what we will replay
on the database driver but we don't know exactly what the database
driver is going to do with it or how it will encode it for the database.
I'll try the logging on the Mysql side, but I'm not sure, if all the
requests really get there.
Yes, sometimes it is hard to get all queries with MySQL, I heard that in
recent versions there is a setting that allows you dump all queries
(with a significant overhead though).
Hope this helps,
Emmanuel
Hi Malte,
If you activate the Request logger in log4j.properties, it will log all
requests that are received by the controller in a separate log file. If
you want to do everything from the MySQL side, you can try to use the
MySQL slow query log to dump the requests.
Hope this helps,
Emmanuel
at the moment I try to change the database of an big application from a
real mysql to sequoia trough myosotis. There are a few problems, which
might be caused by the used sql statements. Now I need a way to log the
sql statements used. The problem is, that the prepared Statements with
"mysql_server_prepare=1" are logged in bytecode or something else, not
in
clear text. Is there a possibility to log the statements in cleartext?
Best regards,
Malte
_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia
--
Emmanuel Cecchet
FTO @ Frog Thinker
Open Source Development & Consulting
--
Web: http://www.frogthinker.org
email: [EMAIL PROTECTED]
Skype: emmanuel_cecchet
_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia
_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia
--
Emmanuel Cecchet
FTO @ Frog Thinker
Open Source Development & Consulting
--
Web: http://www.frogthinker.org
email: [EMAIL PROTECTED]
Skype: emmanuel_cecchet
_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia