PDA

View Full Version : Build test fails - mysql



jackho
07-30-2002, 04:47 AM
C:\mondrian-0.2>set CLASSPATH=C:\mondrian-0.2\/classes;C:\mondrian-0.2\/lib/java
cup.jar;c:\jakarta-tomcat-4.0.4/common/lib/xerces.jar;C:\mondrian-0.2\/lib/boot.
jar;c:\lib\mm.mysql-2.0.14-bin.jar
Buildfile: build.xml
test:
[java] Error in test 'non empty 1(mondrian.test.Main$2)': mondrian.resource
.Error: Internal error: while counting members of level '[Store].[Store Country]
'; sql=[select count(*) from (select distinct `store_country` as `c0` from `stor
e` `Store`)]
[java] Syntax error or access violation: You have an error in your SQL synt
ax near 'select distinct `store_country` as `c0` from `store` `Store`)' at line
1
I am appreciated if anyone can tell me how to solve the problem.
Thanks
Jack

nadsinoz
07-30-2002, 11:15 PM
I had the same error message also.
When i tried running the sql: 'select count(*) from (select distinct store_country as c0 from store as Store)' directly from the mysql command prompt, that failed also.
My mysql version: 3.23.51-nt
I will now try postgres...

jhyde
08-20-2002, 10:23 AM
Mondrian has a few issues with running on MySQL. I've fixed some of them, but the main problem is that MySQL doesn't support SELECT-in-the-FROM-clause (aka inline views, aka dynamic tables), which we use quite heavily. I heard that MySQL 4.1 will support this syntax, but I'm working on an implementation which avoids this syntax.
Simple schemas should work OK, but the problem is with hierarchies which use a <Query>. FoodMart's "customers" dimension is a join of two tables (a "snow-flake dimension"), and currently a <Query> element is the only way to source from a multi-table dimension.
I am adding a <Join> operator which will allow you to create snow-flake dimensions. It will probably take a week or so. I will update this forum when the fix is checked-in.
Meantime I suggest people use either Oracle or Access. (Yes, much-maligned Access has more advanced SQL syntax than MySQL. Go figure.)

jhyde
08-21-2002, 01:08 PM
I've fixed these issues as of change 115 -- download mondrian-0.3.115-src.zip.

ho_jack
08-23-2002, 06:07 AM
Hi,
Have downloaded mondrian-0.3.115 and the data comes from mondrian-0.2-data. Please give me any suggestion of solving the problem.
test-mysql:
test-dbms:
[java] ..................................E.......
[java] .........................................
[java] ..............E...........................
[java] .
[java] Time: 205.836
[java] There were 2 errors:
[java] 1) mondrian.olap.fun.BuiltinFunTable$15.testClosingPeriodMember(mond
rian.olap.fun.FunUtil$MethodCallTestCase)
[java] java.lang.reflect.InvocationTargetException: junit.framework.Asserti
onFailedError: expected:<WA> but was:<OR>
[java] at mondrian.olap.fun.BuiltinFunTable$15.testClosingPeriodMember(
BuiltinFunTable.java:782)
[java] at mondrian.olap.fun.FunUtil$MethodCallTestCase.runTest(FunUtil.
java:498)
[java] at mondrian.test.Main.run(Main.java:61)
[java] at mondrian.test.Main.runSafe(Main.java:41)
[java] at mondrian.test.Main.main(Main.java:32)
[java] 2) mondrian.olap.fun.BuiltinFunTable$46.testToggleDrillState2(mondri
an.olap.fun.FunUtil$MethodCallTestCase)
[java] java.lang.reflect.InvocationTargetException: junit.framework.Asserti
onFailedError: expected:<foo> but was:<[Product].[All Products].[Food].[Produce]
, [Product].[All Products].[Food].[Seafood], [Product].[All Products].[Food].[Ca
nned Products], [Product].[All Products].[Food].[Baking Goods], [Product].[All P
roducts].[Food].[Starchy Foods], [Product].[All Products].[Food].[Dairy], [Produ
ct].[All Products].[Food].[Deli], [Product].[All Products].[Food].[Frozen Foods]
, [Product].[All Products].[Food].[Snack Foods], [Product].[All Products].[Food]
.[Snack Foods].[Snack Foods], [Product].[All Products].[Non-Consumable].[Househo
ld], [Product].[All Products].[Drink].[Beverages], [Product].[All Products].[Foo
d].[Baked Goods], [Product].[All Products].[Food].[Breakfast Foods], [Product].[
All Products].[Food].[Snacks], [Product].[All Products].[Non-Consumable].[Health
and Hygiene], [Product].[All Products].[Drink].[Alcoholic Beverages], [Product]
.[All Products].[Food].[Canned Foods], [Product].[All Products].[Food].[Meat], [
Product].[All Products].[Food].[Eggs], [Product].[All Products].[Drink].[Dairy],
[Product].[All Products].[Non-Consumable].[Carousel], [Product].[All Products].
[Non-Consumable].[Checkout], [Product].[All Products].[Non-Consumable].[Periodic
als]>
[java] at mondrian.olap.fun.BuiltinFunTable$46.testToggleDrillState2(Bu
iltinFunTable.java:1665)
[java] at mondrian.olap.fun.FunUtil$MethodCallTestCase.runTest(FunUtil.
java:498)
[java] at mondrian.test.Main.run(Main.java:61)
[java] at mondrian.test.Main.runSafe(Main.java:41)
[java] at mondrian.test.Main.main(Main.java:32)
[java]
[java] FAILURES!!!
[java] Tests run: 124, Failures: 0, Errors: 2
[java]

jhyde
08-23-2002, 06:15 AM
Thanks for the feedback. I know about those 2 junit test errors. I've fixed testToggleDrillState2, and am working on testClosingPeriodMember. But they are both fairly minor: you should be able to use mondrian on MySQL just fine.