jwakely,
Wednesday, September 18, 2002, 5:46:19 PM, you wrote:

jamdc> The output of DESCRIBE tbl_name shows unique keys to be "MUL" for columns
jamdc> defined as NULL.

jamdc> The SQL shown is a minimal test case that creates a new database and two
jamdc> tables, both with a unique key on the column "uni"

jamdc> The first table is fine.
jamdc> The second table "bug" shows the wrong output for "EXPLAIN bug",
jamdc> the index on the second column is shown to be non-unique.

jamdc> The only difference between the tables is whether the second column
jamdc> is defined to be NULL or NOT NULL.

jamdc> The result is exactly the same if the column type is VARCHAR, not INT.

jamdc> Version 3.23.32 shows UNI in both cases, as I expect to see.
jamdc> Version 3.23.49 shows the wrong output, as described in this bug report.

jamdc> If this is actually the correct output, because a NULL column with a
jamdc> UNIQUE key can contain multiple NULL values, then ignore this bug.
jamdc> Instead the manual needs to be fixed to explain the output of this command.
jamdc> Currently the manual contains circular references for "EXPLAIN tbl_name",
jamdc> "DESCRIBE tbl_name" and "SHOW COLUMNS FROM tbl_name", none of the relevant
jamdc> sections explain the output, they just refer you to one of the other
jamdc> sections (I'll be raising this as a separate issue anyway).

It's a correct output, bacause "MUL" means that column can contain
same value(s) multiple times (in your case it's a NULL value).


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com





---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to