Skip to content

Commit

Permalink
MONDRIAN: Fix for NumberFormatException when running against MySQL 5.…
Browse files Browse the repository at this point in the history
…0 in German locale. Contributed by Markus Peters.

[git-p4: depot-paths = "//open/mondrian/": change = 8152]
  • Loading branch information
julianhyde committed Nov 15, 2006
1 parent 3976362 commit f0599de
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/mondrian/rolap/agg/Segment.java
Expand Up @@ -290,6 +290,11 @@ static void load(
// nothing to do
} else if (o instanceof Number) {
o = new Double(((Number) o).doubleValue());
} else if (o instanceof byte[]) {
// On MySQL 5.0 in German locale, values can come
// out as byte arrays. Don't know why. Bug 1594119.
double d = Double.parseDouble(new String((byte []) o));
o = new Double(d);
} else {
double d = Double.parseDouble(o.toString());
o = new Double(d);
Expand Down

0 comments on commit f0599de

Please sign in to comment.