From: Alessandro P. <pet...@in...> - 2004-02-12 08:44:02
|
I noticed that if you create a database using FbConnection.CreateDatabase it will overwrite your previous database!!! This is very very dangerous! Is it a bug in the provider or in the FB engine? Ciao, Alessandro Petrelli. |
From:
<car...@te...> - 2004-02-12 09:09:38
|
Hello: > I noticed that if you create a database using FbConnection.CreateDatabase it > will overwrite your previous database!!! Database creation is make using the Firebird API in first place the problem must be in the provider, i will try to review this before release the 1.5 final. > This is very very dangerous! Is it a bug in the provider or in the FB > engine? Huuummm just my opinion but database creation has a "restricted" use in applications and we can check for database existance trying to connect to it, for example. -- Best regards Carlos GuzmánÁlvarez Vigo-Spain |
From:
<car...@te...> - 2004-02-12 09:24:06
|
Hello: > Huuummm just my opinion but database creation has a "restricted" use in > applications and we can check for database existance trying to connect > to it, for example. I have sent a meessage to the firebird-devel for see if there are a better way, if no i will do this directly in the provider. -- Best regards Carlos GuzmánÁlvarez Vigo-Spain |
From: Alan M. <al...@me...> - 2004-02-12 09:38:36
|
> Hello: > > > I noticed that if you create a database using > FbConnection.CreateDatabase it > > will overwrite your previous database!!! > > Database creation is make using the Firebird API in first place the > problem must be in the provider, i will try to review this before > release the 1.5 final. > > > This is very very dangerous! Is it a bug in the provider or in the FB > > engine? > > Huuummm just my opinion but database creation has a "restricted" use in > applications and we can check for database existance trying to connect > to it, for example. > > > -- > Best regards > > Carlos GuzmánÁlvarez > Vigo-Spain In admin tools you have a check box to overwrite the existing database, which it will if there is no lock on the file being overwritten, otherwise an exception will be raised as it will now tieh the provider but since the other admin tools offer this as a switch, perhaps the switch needs to be offered in the provider too? Alan |
From: Alan M. <al...@me...> - 2004-02-12 09:46:12
|
> In admin tools you have a check box to overwrite the existing database, > which it will if there is no lock on the file being overwritten, otherwise > an exception will be raised as it will now tieh the provider but since the > other admin tools offer this as a switch, perhaps the switch needs to be > offered in the provider too? > Alan > > or maybe I'm thinking of restore Alan |
From: Alessandro P. <pet...@in...> - 2004-02-12 09:47:07
|
"Carlos Guzmán Álvarez" <car...@te...> ha scritto nel messaggio news:402...@te...... Carlos, > > This is very very dangerous! Is it a bug in the provider or in the FB > > engine? > > Huuummm just my opinion but database creation has a "restricted" use in > applications and we can check for database existance trying to connect > to it, for example. I agree with you but a client check would not prevent malicious attack and this issue is falling right into this. I'll follow the thread you started in the other list. Thank you! Ciao, Alessandro Petrelli. |
From:
<car...@te...> - 2004-02-12 10:05:54
|
Hello: > I agree with you but a client check would not prevent malicious attack and > this issue is falling right into this. I Agree :) -- Best regards Carlos Guzmán Álvarez Vigo-Spain |
From:
<car...@te...> - 2004-02-12 12:50:25
|
Hello: > I agree with you but a client check would not prevent malicious attack and > this issue is falling right into this. I have an initial implementation for this in my local tree (for both 1.5 and 1.6), it will be possible to tell if you want to overwrite an existing database using a Overwrite value in the hashtable, the CreateDatabase method will try to connect to the database if no overwrite is allowed and throw an exception if the connection was succeful. In any case i will wait for a response to my message to firebird-devel before commit it. -- Best regards Carlos Guzmán Álvarez Vigo-Spain |
From: Alessandro P. <pet...@in...> - 2004-02-12 13:30:11
|
"Carlos Guzmán Álvarez" <car...@te...> ha scritto nel messaggio news:402...@te...... > I have an initial implementation for this in my local tree (for both 1.5 > and 1.6), it will be possible to tell if you want to overwrite an > existing database using a Overwrite value in the hashtable, the > CreateDatabase method will try to connect to the database if no > overwrite is allowed and throw an exception if the connection was succeful. And what if the db has been shutdown due to maintenance? ;-) > In any case i will wait for a response to my message to firebird-devel > before commit it. I can't see your message.... Ciao, Alessandro Petrelli. |
From: Carlos G.A. <car...@te...> - 2004-02-12 14:59:03
|
Hello: > And what if the db has been shutdown due to maintenance? ;-) Huummm good point :) i will try to do a test and i will comment the result. > I can't see your message.... Maybe it's going to reach the list with delay, if tomorrow it's not in the list i will try to resend it. -- Best regards Carlos Guzm=C3=A1n =C3=81lvarez Vigo-Spain |
From:
<car...@te...> - 2004-02-14 09:13:56
|
Hello: > Huummm good point :) i will try to do a test and i will comment the > result. It seems to be working for me, i'm going to release the RC5 with te control done by trying to connect to the database. -- Best regards Carlos Guzmán Álvarez Vigo-Spain |