Hi folks,

I have a problem with BDB tables. Please look at this short mysql session:

mysql> create table sample (
    id1 int(8) not null,
    id2 int(8) not null,
    primary key (id1,id2))
    type=BDB;
Query OK, 0 rows affected (0.67 sec)

mysql> insert into sample values (1, 2);
Query OK, 1 row affected (0.07 sec)

mysql> select id2 from sample where id1=1;
+-----+
| id2 |
+-----+
|   2 |
+-----+
1 row in set (0.00 sec)

mysql> select min(id2) from sample where id1=1;
+----------+
| min(id2) |
+----------+
|        2 |
+----------+
1 row in set (0.00 sec)

mysql> select max(id2) from sample where id1=1;
+----------+
| max(id2) |
+----------+
|     NULL |
+----------+
1 row in set (0.00 sec)

Is this a bug in mySQL?
Why does MIN() return the correct result, while MAX() does not?
Is it a severe bug which possibly can cause data inconsistency
within the table data or does there exist a "good" workaround for
this problem with only modifying the query?

Thanks
Günther Pewny


---------------------------------------------------------------------
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