replace from msql2mysql and filedates

replace from msql2mysql and filedates

am 02.08.2003 03:23:46 von Florian Rittmeier

--====_378350998368740_====_
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi!
I was using the tool 'replace', which is shipped with msql2mysql, to
replace some words in a group of files.

It was embarrassing to see, that 'replace' does not only replace the
contents of the files.
It first unlinks the files and then recreates them.

Through this, the filecreationtime is set to the current time/date.
IMHO 'replace' should only rewrite the file, without unlinking it
first.

If a file is changed, the filechangetime should be set to the current
time, not the filecreationtime.

Thanks a lot
Florian Rittmeier

--====_378350998368740_====_--

Re: replace from msql2mysql and filedates

am 02.08.2003 13:02:22 von Sinisa Milivojevic

Florian Rittmeier writes:
> Hi!
> I was using the tool 'replace', which is shipped with msql2mysql, to
> replace some words in a group of files.
>
> It was embarrassing to see, that 'replace' does not only replace the
> contents of the files.
> It first unlinks the files and then recreates them.
>
> Through this, the filecreationtime is set to the current time/date.
> IMHO 'replace' should only rewrite the file, without unlinking it
> first.
>
> If a file is changed, the filechangetime should be set to the current
> time, not the filecreationtime.
>
> Thanks a lot
> Florian Rittmeier

Hi!

Current version of replace is 1.3.

Please check your version.

Also, replace supports from_file to_file, so you can use that option too.

--

Regards,

--
For technical support contracts, go to https://order.mysql.com/?ref=msmi
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB
/_/ /_/\_, /___/\___\_\___/ Fulltime Developer and Support Coordinator
<___/ www.mysql.com Larnaca, Cyprus


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

Re: replace from msql2mysql and filedates

am 05.08.2003 14:30:59 von Sergei Golubchik

Hi!

On Aug 02, Florian Rittmeier wrote:
> Hi!
> I was using the tool 'replace', which is shipped with msql2mysql, to
> replace some words in a group of files.
>
> It was embarrassing to see, that 'replace' does not only replace the
> contents of the files.
> It first unlinks the files and then recreates them.

No, it first creates a temporary file, and after replacing is done,
moves it over target file (deleting old one if exists).

> Through this, the filecreationtime is set to the current time/date.
> IMHO 'replace' should only rewrite the file, without unlinking it
> first.

It's a feature - the way it's done now old "target file" will be
untouched if something will go wrong, that is it can never have a
partially replaced contents.

Regards,
Sergei

--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Senior Software Developer
/_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany
<___/ www.mysql.com

--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org