Bug with alter tables ?

Bug with alter tables ?

am 04.10.2004 16:56:09 von Bertrand Lanneau

------=_NextPart_000_092F_01C4AA33.0C16C790
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


Hi,

I think i've found a bug in MySQL. I use MySQL 4.1.4. I've not tested
with 4.1.5 but there is absolutely nothing in the change log about it.

I got strange results in a connection when the table is altered
in another connection.

The problem can be reproduced with the lines below :=20
# Create a test table
create table test (id integer primary key, col1 varchar(10));
insert into test values(1, 'a'), (2, 'b'), (3,'a');
start transaction;
# Checking the rows : ok, got 3 rows
select * from test; =20
# In ANOTHER CONNECTION, alter the table (alter table test add index =
(col1);)
# Checking the rows again (again in the first connection): got 0 rows ! =
This seems a bug to me
# Why should this connection see the table as empty ?
select * from test; =20

Is it a really bug or does i missed something ?

Thank you for your answer.

Bertrand Lanneau.
------=_NextPart_000_092F_01C4AA33.0C16C790--