[Bug 663481] [NEW] JDBC: statement.setBinaryStream fails iff mysql logging is disabled
Nhb-web
663481 at bugs.launchpad.net
Tue Oct 19 20:58:31 BST 2010
Public bug reported:
MySQL 5.1 fails with "Incorrect a rguments to mysq ld_stmt_execute" on the following prepared statement:
update rpzone set d ata=?, protocol_ version=33 where zone_id='int_se mos_tavern_0'
if and only if mysql logging is disabled.
The problem does not occur on Debian 5.0, Ubuntu 09.04, 09.10, 10.04.
Setting the following lines in /etc/mysql/my.conf makes the problem go away:
general_log_file = /var/log/mysql/mysql.log
general_log = 1
I tried it repeatedly and enabling logging really seems to make a
difference. This was confirmed by rodneymillerpca in
http://stendhalgame.org/chat/2010-10-19.html
I attached a network dump of both a good and a bad case. Note that the
data sent from the client to the mysql server is bit by bit identical in
both cases. The following java code is used to execute the statement:
public int execute(String sql, InputStream... inputStreams) throws SQLException, IOException {
String mySql = rewriteSql(sql);
int res = -2;
PreparedStatement statement = connection.prepareStatement(mySql);
try {
int i = 1; // yes, jdbc starts counting at 1.
for (InputStream inputStream : inputStreams) {
statement.setBinaryStream(i, inputStream, inputStream.available());
i++;
}
res = statement.executeUpdate();
} finally {
statement.close();
}
return res;
}
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: mysql-server-5.1 5.1.49-1ubuntu8
ProcVersionSignature: Ubuntu 2.6.35-22.34-generic 2.6.35.4
Uname: Linux 2.6.35-22-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Tue Oct 19 21:21:02 2010
ProcEnviron:
LANG=de_DE.utf8
SHELL=/bin/bash
SourcePackage: mysql-5.1
** Affects: mysql-5.1 (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug maverick
--
JDBC: statement.setBinaryStream fails iff mysql logging is disabled
https://bugs.launchpad.net/bugs/663481
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to mysql-5.1 in ubuntu.
More information about the Ubuntu-server-bugs
mailing list