Mailing List Archive



Back to the month index Back to the list index

Georg Horn (horn@uni-koblenz.de)
Tue, 13 Apr 1999 10:35:19 +0200 (CEST)


From: Georg Horn <horn@uni-koblenz.de>
Message-Id: <199904130835.KAA11775@flens.uni-koblenz.de>
Subject: Re: un-enforced "unique" indices
Date: Tue, 13 Apr 1999 10:35:19 +0200 (CEST)

You wrote:
> Here is a test example. The idea is that there are several "groups"
> defined. Each group can have several categories, but all categories
> within a group must be unique. This is enforced by the unique index on
> (groupID, category_name). This also allows two different groups to have
> categories by the same name.
>
> Here's the script to create the database:
>
> [...]
>
> ==========================================================
> Here's the msql example that breaks the database:
> ==========================================================
>
> mSQL > select * from categories\g
>
> Query OK. 3 row(s) modified or retrieved.
>
> +--------------------------------+------------+----------+
> | category_name | categoryID | groupID |
> +--------------------------------+------------+----------+
> | Test1 | 10 | 1 |
> | Test2 | 1 | 1 |
> | Test2 | 13 | 1 |
> +--------------------------------+------------+----------+

Hm, i can reproduce this behaviour on my Linux 2.0.37 box.
(msql 2.0.8)

Bye,
Georg