001    /*
002    // $Id: //open/mondrian/src/main/mondrian/util/Bug.java#22 $
003    // This software is subject to the terms of the Common Public License
004    // Agreement, available at the following URL:
005    // http://www.opensource.org/licenses/cpl.html.
006    // Copyright (C) 2006-2008 Julian Hyde
007    // All Rights Reserved.
008    // You must accept the terms of that agreement to use this software.
009    */
010    package mondrian.util;
011    
012    import mondrian.rolap.sql.SqlQuery;
013    import mondrian.olap.MondrianProperties;
014    /**
015     * Holder for constants which indicate whether particular issues have been
016     * fixed. Reference one of those constants in your code, and it is clear which
017     * code can be enabled when the bug is fixed. Generally a constant is removed
018     * when its bug is fixed.
019     *
020     * @author jhyde
021     * @version $Id: //open/mondrian/src/main/mondrian/util/Bug.java#22 $
022     * @since Oct 11, 2006
023     */
024    public class Bug {
025        /**
026         * Whether
027         * <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=1574942&group_id=35302&atid=414613">bug 1574942, "NON EMPTY when hierarchy's default member is not 'all'"</a>
028         * is fixed.
029         */
030        public static final boolean Bug1574942Fixed = false;
031    
032        // Properties relating to checkin 7641.
033        // This is part of the junit test Checkin_7641 that
034        // shows that there is a difference when the default
035        // member is not the one used in an axis.
036        // When Checkin 7641 is resolved, then this System property access and
037        // boolean should go away.
038        // (What's the bug associated with this??)
039    
040        public static final boolean Checkin7641UseOptimizer = false;
041    
042        /**
043         * Whether
044         * <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=1530543&group_id=35302&atid=414613">bug 1530543, "IS EMPTY and IS NULL"</a>
045         * is fixed.
046         */
047        public static final boolean Bug1530543Fixed = false;
048    
049        /**
050         * Whether
051         * <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=1767775&group_id=35302&atid=414613">bug 1767775, "Predicate references RolapStar.Column when used in AggStar"</a>
052         * is fixed.
053         */
054        public static final boolean Bug1767775Fixed = false;
055    
056        /**
057         * Whether
058         * <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=1767779&group_id=35302&atid=414613">bug 1767779, "Predicate sometimes has null RolapStar.Column"</a>
059         * is fixed.
060         */
061        public static final boolean Bug1767779Fixed = false;
062    
063        /**
064         * Whether
065         * <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=1791609&group_id=35302&atid=414613">bug 1791609, "CrossJoin no empty optimizer eliminates calculated member"</a>
066         * is fixed.
067         */
068        public static final boolean Bug1791609Fixed = false;
069    
070        /**
071         * Whether
072         * <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=1867953&group_id=35302&atid=414613">bug 1867953, "Aggregate Tables not working with Shared Dimensions"</a>
073         * is fixed.
074         *
075         */
076        public static final boolean Bug1867953Fixed = false;
077    
078        /**
079         * Whether
080         * <a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1888821&group_id=35302&atid=414613">bug 1888821, "Non Empty Crossjoin fails to enforce role access"</a>
081         * is fixed.
082         */
083        public static final boolean Bug1888821Fixed = false;
084    
085    
086        /**
087         * Returns whether to avoid a test because the memory monitor may cause it
088         * to fail.
089         *
090         * <p>Some tests fail if memory monitor is switched on, and Access and
091         * Derby tend to use a lot of memory because they are embedded.
092         *
093         * @param dialect Dialect
094         * @return Whether to avoid a test
095         */
096        public static boolean avoidMemoryOverflow(SqlQuery.Dialect dialect) {
097            return dialect.isAccess() &&
098                MondrianProperties.instance().MemoryMonitor.get();
099        }
100    }
101    
102    // End Bug.java