List:MySQL and Java« Previous MessageNext Message »
From:mrezaei Date:March 13 2003 10:53pm
Subject:bug in PreparedStatement.setNull
View as plain text  
I have a table that has a NOT NULL column. Using command line sql, the
following statement will generate an error:

update TableNulls set descNotNull=NULL

If I write this as a prepared statement:
"update TableNulls set descNotNull=?"

and then:
statement.setNull(1, java.sql.Types.VARCHAR);
stm.executeUpdate();

The statement executes with no errors. I would expect to get an exception
in this case (other drivers/rdbms' behave that way).

MySql 4.1 nightly, InnoDb tables
JDBC driver: 3.0.6

Thanks
Mohammad Rezaei
Starpoint Solutions


Thread
bug in PreparedStatement.setNullmrezaei13 Mar
  • Re: bug in PreparedStatement.setNullMark Matthews14 Mar