The dark blue berries of Mahonia aquifolium 'Compacta' (compact Oregon grape) are not poisonous. They are edible, though very tart, and traditionally used for:
Leaves, stems, roots, and bark contain berberine and other alkaloids that are toxic in quantity. Do not consume foliage or woody parts. Berberine is used medicinally but requires controlled dosage.
Compact Oregon grape is prized for holly-like evergreen foliage, yellow spring flowers, and drought tolerance—great for shade gardens, not just fruit.