Bug Report

Bug Report

am 09.09.2002 12:44:32 von kulakov

Hello.
This is a little bug report concerning MySQL for Windows

Working with MySQL 4 for Windows I found that it's not adapted for the
operating system in the sense that commands dealing with tables as a whole
expect from Windows Unix-like file treatment. Under Unix one can get the
size of an open file just when the file is being changed, but under Windows
one has to first close the file, otherwise they will get the size the file
had before it was opened. The same concerns Update_time of a table - under
Windows this parameter only changes after the file is closed, while under
Unix it is changed immediately after the file is changed (this is about the
command Show Table Status). Commands Alter Table, Rename Table and probably
some other fail if the table they change is opened by previous commands. For
example, if the following two commands are executed:
How-To-Repeat:

1. You have a table like this:
Create Table Words(
id int primary key,
Word varchar(40) not null,
Index(Word)
)

2. And some data in it (actually it should have more data)

Insert Into Words Values (1, 'a'), (2, 'b'), (3, 'c')

3. Then you work with the table:

Select * From Words

4. And then you try to change it:

Rename Table Words To Words1

The last query will produce an error. In order to succeed, one has to first
perform Flush Tables that closes all open tables (by the way, the form Flush
Tables TableName1, TableName2 doesn't work under Windows either).

Conclusion: MySQL for Windows should close table files whenever it needs to
change them as a whole or get their parameters



______________________________________
Scanned and protected by Inflex



------------------------------------------------------------ ---------
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 bugs-thread12507@lists.mysql.com
To unsubscribe, e-mail

Re: Bug Report

am 09.09.2002 21:20:37 von miguel solorzano

At 14:44 9/9/2002 +0400, =3D?koi8-r?B?69XMwcvP1yDzxdLHxco=3D?=3D wrote:
Hi,

Thanks you for your bug report. I was be able to repeat also on
3.23.52.

>Hello.
>This is a little bug report concerning MySQL for Windows
>
>Working with MySQL 4 for Windows I found that it's not adapted for the
>operating system in the sense that commands dealing with tables as a whole
>expect from Windows Unix-like file treatment. Under Unix one can get the
>size of an open file just when the file is being changed, but under Windows
>one has to first close the file, otherwise they will get the size the file
>had before it was opened. The same concerns Update_time of a table - under
>Windows this parameter only changes after the file is closed, while under
>Unix it is changed immediately after the file is changed (this is about the
>command Show Table Status). Commands Alter Table, Rename Table and probably
>some other fail if the table they change is opened by previous commands.=
For
>example, if the following two commands are executed:
>How-To-Repeat:
>
>1. You have a table like this:
>Create Table Words(
> id int primary key,
> Word varchar(40) not null,
> Index(Word)
> )
>
>2. And some data in it (actually it should have more data)
>
>Insert Into Words Values (1, 'a'), (2, 'b'), (3, 'c')
>
>3. Then you work with the table:
>
>Select * From Words
>
>4. And then you try to change it:
>
>Rename Table Words To Words1
>
>The last query will produce an error. In order to succeed, one has to first
>perform Flush Tables that closes all open tables (by the way, the form=
Flush
>Tables TableName1, TableName2 doesn't work under Windows either).
>
>Conclusion: MySQL for Windows should close table files whenever it needs to
>change them as a whole or get their parameters

--=20
Regards,
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Miguel Angel Sol=F3rzano
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ S=E3o Paulo - Brazil
<___/ 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 bugs-thread12513@lists.mysql.com
To unsubscribe, e-mail

Bug Report

am 10.09.2002 22:52:11 von Michael Widenius

Hi!

>>>>> "kulakov" == kulakov writes:


Kulakov> Commands Alter Table, Rename Table and probably
kulakov> some other fail if the table they change is opened by previous commands. For
kulakov> example, if the following two commands are executed:
kulakov> How-To-Repeat:

kulakov> 1. You have a table like this:
kulakov> Create Table Words(
kulakov> id int primary key,
kulakov> Word varchar(40) not null,
kulakov> Index(Word)
kulakov> )

kulakov> 2. And some data in it (actually it should have more data)

kulakov> Insert Into Words Values (1, 'a'), (2, 'b'), (3, 'c')

kulakov> 3. Then you work with the table:

kulakov> Select * From Words

kulakov> 4. And then you try to change it:

kulakov> Rename Table Words To Words1

kulakov> The last query will produce an error. In order to succeed, one has to first
kulakov> perform Flush Tables that closes all open tables (by the way, the form Flush
kulakov> Tables TableName1, TableName2 doesn't work under Windows either).

kulakov> Conclusion: MySQL for Windows should close table files whenever it needs to
kulakov> change them as a whole or get their parameters

We actually have code in MySQL that closes all things on windows
before doing any of the above operations. It seams however that we
have some bug in this code: We will try to fix this ASAP.

Regards,
Monty

--
For technical support contracts, goto https://order.mysql.com/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Michael Widenius
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, CTO
/_/ /_/\_, /___/\___\_\___/ Helsinki, Finland
<___/ 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 bugs-thread12526@lists.mysql.com
To unsubscribe, e-mail

Re: Bug Report

am 10.09.2002 23:54:09 von miguel solorzano

At 23:52 10/9/2002 +0300, Michael Widenius wrote:
Hi,


>kulakov> change them as a whole or get their parameters
>
>We actually have code in MySQL that closes all things on windows
>before doing any of the above operations.

debugging yesterday I had noticed that the issue is when lower case
table names is true and when the command for to alter the table uses
upper case (like this example) the table isn't closed. If you change
the tables names in the command using lower case works well.

In another words the table was created with lower case and the
command using upper case, makes the server not to close the
tables because the routine that verify if the table is open has
returned false.

> It seams however that we
>have some bug in this code: We will try to fix this ASAP.
>
>Regards,
>Monty
>
>--
>For technical support contracts, goto https://order.mysql.com/
> __ ___ ___ ____ __
> / |/ /_ __/ __/ __ \/ / Mr. Michael Widenius
> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, CTO
>/_/ /_/\_, /___/\___\_\___/ Helsinki, Finland
> <___/ 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 bugs-thread12526@lists.mysql.com
>To unsubscribe, e-mail

--=20
Regards,
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Miguel Angel Sol=F3rzano
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ S=E3o Paulo - Brazil
<___/ 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 bugs-thread12528@lists.mysql.com
To unsubscribe, e-mail

Bug Report

am 15.09.2002 19:43:00 von Michael Widenius

Hi!

>>>>> "kulakov" == kulakov writes:

kulakov> Hello.
kulakov> This is a little bug report concerning MySQL for Windows

kulakov>> Commands Alter Table, Rename Table and probably
kulakov> some other fail if the table they change is opened by previous commands. For
kulakov> example, if the following two commands are executed:
kulakov> How-To-Repeat:



kulakov> 4. And then you try to change it:

kulakov> Rename Table Words To Words1

I have now fixed this in the 3.23.53 and 4.0.4 source trees.
Thanks!

Regards,
Monty

--
For technical support contracts, goto https://order.mysql.com/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Michael Widenius
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, CTO
/_/ /_/\_, /___/\___\_\___/ Helsinki, Finland
<___/ 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 bugs-thread12548@lists.mysql.com
To unsubscribe, e-mail