AnantLabs / xerial

Automatically exported from code.google.com/p/xerial
0 stars 0 forks source link

Problem in QueryTest.setFloatTest() method #46

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
QueryTest.setFloatTest() method fails when default locale is set to Polish.

String.format("insert into sample values(%f)", f) produces "insert into
sample values(3,141597)" and this leads to 
java.sql.SQLException: table sample has 1 columns but 2 values were supplied

To reproduce you can execute
String.format(new Locale("pl"), "insert into sample values(%f)", f)

I suggest changing to
conn.createStatement().execute(String.format(Locale.US, "insert into sample
values(%f)", f));
or
PreparedStatement insert =  conn.prepareStatement("insert into sample
values(?)");
insert.setFloat(1, f);
insert.executeUpdate();

What version of the product are you using? On what operating system?
sqlite-jdbc-3.6.17.3

Thanx
Lukasz

Original issue reported on code.google.com by luke.sko...@gmail.com on 23 Nov 2009 at 9:27

GoogleCodeExporter commented 9 years ago

Original comment by taroleo on 23 Nov 2009 at 11:34

GoogleCodeExporter commented 9 years ago
changed the milestone

Original comment by taroleo on 25 Nov 2009 at 11:50

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 664fb90216.

Original comment by taroleo on 8 Dec 2009 at 6:42