[CONJ-60] Java Client's MySQLPreparedStatement.toString() does not print SQL statement, like Connector/J's class does Created: 2013-08-05 Updated: 2013-09-10 Resolved: 2013-09-05 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | None |
| Affects Version/s: | 1.1.3 |
| Fix Version/s: | 1.1.4 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Daniel Kessel | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
MySQL Connector/J's PreparedStatement class outputs the generated SQL Statement when toString() is called. This is used for logging in applications. Example of the output:
As one can see, it is trivially to parse the SQL statement from the output of toString() - just get the string after the substring ": ". Or even more simple, just logging the output of toString() might suffice for some logs. I have an application which is originally written with Connector/J in mind. If I use Connector/J, I get useful log output - it even outputs the statement with the parameter values set. It would generally reduce cost for application developers if the MariaDB Java Client would output the statement that way, too - for example, the returned String could look like this:
|
| Comments |
| Comment by Vladislav Vaintroub [ 2013-09-05 ] |
|
Hi Daniel. |
| Comment by Daniel Kessel [ 2013-09-10 ] |
|
Vladislav, thank you very much for solving this issue that fast! |