Re: [firebird-support] embedded database with Chinese path

2017-10-04 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]

On 04/10/17 22:15, DougC d...@moosemail.net [firebird-support] wrote:

Hamish-

Windows short path names are decidedly NOT for apps that cannot handle 
Unicode. They were introduced far earlier than that and were intended 
for programs that could not handle anything but the short 8.3 limits 
for any given file or folder name. That they often help with avoiding 
unicode is a side effect.


Sound like your misunderstanding of this may be contributing to your 
frustration.


Doug,

I'm aware that short filenames are a work around for applications which 
can't support long filenames (which date from Windows 95). They also 
seem to nicely work around applications which are too dumb to support 
valid Windows 16-bit filenames, like Firebird. I don't agree that it's 
just a side effect that they avoid unicode, since I had unicode parts 
that fit in the 8.3 short filename format.


I realise that Firebird needs to use either long or short names 
consistently so as to avoid inadvertently opening the same file by 
different names (with locking issues and the like), but the solution is 
to use only short names or handle long names properly.


Hamish


[firebird-support] Using FB2.5 with NFS for Virtualbox VM

2017-10-04 Thread 'Daniel Miller' dmil...@amfes.com [firebird-support]
I have a single Linux host server with several Virtualbox guest VM's.  
I've been attempting to move everything possible from the host to one of 
the guests.


One of the last holdovers is Firebird.  The reason is I use NFS to mount 
host folders within the guest for critical data - and the .fdb certainly 
counts.  My goal is to have all critical data stored on a host partition 
or folder - not in guest virtual drives - which I (possibly mistakenly) 
believe improves performance and recoverability.


So for my use case - I have a single Firebird server instance.  There 
will never be more than one copy of Firebird running.  All write and 
99.99% read access to the .fdb would be through that single Firebird 
instance (except for automated remote backup operations running on the 
host).


Am I "safe", possibly even correct, in using RemoteFileOpenAbility in 
this use case?


--
Daniel

Re: [firebird-support] Service restore from stdin

2017-10-04 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
04.10.2017 18:28, Pavel Cisar pci...@ibphoenix.cz [firebird-support] wrote:
> Nope, without requesting isc_info_svc_line output you can't know when
> service actually finished, so you may close the service at will. If you
> close it *after* its finished then everything is ok, but if not, you
> will get broken database (unfinished restore). Note that after whole
> backup file is processed (and thus no more data are requested), then
> service recreates the index trees which may take a lot of time (depends
> on data size and number of indices) when you would get only text output.

   Fine.

   Another question: is there a way to abort restore process which would cause 
server to 
drop half-restored database? For example, if I have a problem of reading backup 
file.
   Or in this case I must connect to the database and drop it myself?

-- 
   WBR, SD.






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] Service restore from stdin

2017-10-04 Thread Pavel Cisar pci...@ibphoenix.cz [firebird-support]


Dne 4.10.2017 v 16:24 Dimitry Sibiryakov s...@ibphoenix.com 
[firebird-support] napsal(a):
> 04.10.2017 11:42, Pavel Cisar pci...@ibphoenix.cz [firebird-support] wrote:
>> Until stdin is fully transmited service may need another
>> chunk, but reply to application is blocked until stdout buffer (eof
>> request) is full, so everything gets stuck (service will not ask for
>> further input because there is not enough output to send the request).
> 
> Actually I see the contrary: output buffer is empty, but no request for 
> input is sent.
> Output from my test program which send { isc_info_svc_stdin, 
> isc_info_svc_line } looks
> like that:
> 
>> query piece 0
>> isc_info_svc_stdin 262144
>> isc_info_svc_line 0:
>> isc_info_data_not_ready
>> query piece 512
>> isc_info_svc_stdin 262144
>> isc_info_svc_line 0:
>> isc_info_data_not_ready

Actually it sent request for stdin data. When isc_info_svc_stdin returns 
0 then no data are needed. When it returns non-zero values then it means 
that service is ready to accept up to  bytes in next request 
(marked as isc_info_svc_stdin). isc_info_svc_line is non-zero only when 
service sends back some textual output.

> Notice that it always gets isc_info_data_not_ready.

Because there is no output - yet. Output may happen only in response to 
input.

> But if I change request to {isc_info_svc_stdin } (because I know that no 
> data is ever
> returned), I get this:
> 
>> query piece 0
>> isc_info_svc_stdin 0
>> isc_info_end
>  about 40 times the same ..
>> query piece 0
>> isc_info_svc_stdin 0
>> isc_info_end
>> query piece 0
>> isc_info_svc_stdin 262144
>> isc_info_end
>> query piece 512
>> isc_info_svc_stdin 262144
>> isc_info_end

First several rounds could return zero values for isc_info_svc_stdin 
because service is warming up. But once it returns non-zero value it 
always wants more until whole backup stream is sent. Then it returns 
zero for isc_info_svc_stdin and only isc_info_svc_line output (until 
finish).

> Now I forcefully disconnect after sending of whole backup and it seems to 
> work. But is
> it right way?

Nope, without requesting isc_info_svc_line output you can't know when 
service actually finished, so you may close the service at will. If you 
close it *after* its finished then everything is ok, but if not, you 
will get broken database (unfinished restore). Note that after whole 
backup file is processed (and thus no more data are requested), then 
service recreates the index trees which may take a lot of time (depends 
on data size and number of indices) when you would get only text output.

And yes, it's all convoluted and inconvenient.

best regards
Pavel Cisar
IBPhoenix






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] Service restore from stdin

2017-10-04 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
04.10.2017 16:24, Dimitry Sibiryakov wrote:
>    I.e. server just wasting network throughput requesting no data from client 
> as if 
> request timeout is by default set to zero instead of infinity.

   Oops, I was wrong: even explicitly set timeout don't make service to wait 
before 
sending input data request.

-- 
   WBR, SD.






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] Service restore from stdin

2017-10-04 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
04.10.2017 11:42, Pavel Cisar pci...@ibphoenix.cz [firebird-support] wrote:
> Until stdin is fully transmited service may need another 
> chunk, but reply to application is blocked until stdout buffer (eof 
> request) is full, so everything gets stuck (service will not ask for 
> further input because there is not enough output to send the request).

   Actually I see the contrary: output buffer is empty, but no request for 
input is sent.
Output from my test program which send { isc_info_svc_stdin, isc_info_svc_line 
} looks 
like that:

> query piece 0
> isc_info_svc_stdin 262144
> isc_info_svc_line 0:
> isc_info_data_not_ready
> query piece 512
> isc_info_svc_stdin 262144
> isc_info_svc_line 0:
> isc_info_data_not_ready

   Notice that it always gets isc_info_data_not_ready.
   But if I change request to {isc_info_svc_stdin } (because I know that no 
data is ever 
returned), I get this:

> query piece 0
> isc_info_svc_stdin 0
> isc_info_end
 about 40 times the same ..
> query piece 0
> isc_info_svc_stdin 0
> isc_info_end
> query piece 0
> isc_info_svc_stdin 262144
> isc_info_end
> query piece 512
> isc_info_svc_stdin 262144
> isc_info_end

   I.e. server just wasting network throughput requesting no data from client 
as if 
request timeout is by default set to zero instead of infinity.
   Is it intended behavior?

   Besides, my whole test backup size is 512 bytes, but server asks for more 
data even 
when got it all.
   What else must I send to it?
   Now I forcefully disconnect after sending of whole backup and it seems to 
work. But is 
it right way?

-- 
   WBR, SD.






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] embedded database with Chinese path

2017-10-04 Thread Richard Damon rich...@damon-family.org [firebird-support]
Short File names are to allow apps that can't support long file names 
(LFN) to access a file. Long filename support includes wchar encoding. 
If Firebird can't support  wchar filenames, then it should NOT convert a 
short filename to its LFN equivalent (unless there is some other very 
important reason it needs the LFN).


On 10/4/17 7:15 AM, DougC d...@moosemail.net [firebird-support] wrote:
> Hamish-
>
> Windows short path names are decidedly NOT for apps that cannot handle 
> Unicode. They were introduced far earlier than that and were intended 
> for programs that could not handle anything but the short 8.3 limits 
> for any given file or folder name. That they often help with avoiding 
> unicode is a side effect.
>
> Sound like your misunderstanding of this may be contributing to your 
> frustration.
>
> Doug C.
>
>
>  On Tue, 03 Oct 2017 23:25:23 -0400 *Hamish Moffatt 
> ham...@risingsoftware.com [firebird-support] 
> * wrote 
>
> On 03/10/17 19:59, Dimitry Sibiryakov s...@ibphoenix.com
> 
> [firebird-support] wrote:
> > 03.10.2017 2:25, Hamish Moffatt ham...@risingsoftware.com
>  [firebird-support] wrote:
> >> Any ideas?
> > Give up. Firebird does not support unicode characters in
> database name and path. Only ANSI.
> >
> >
>
> Thanks for confirming what I figured from the source. But this is
> exactly what the Windows short path names are for - if your
> application
> can't handle Unicode filenames, use the short names. I tried it
> and it
> fails. Firebird explicitly converts the short path name back to a
> long
> name it can't use?!
>
> It seems to mostly work with UTF-8 on linux, or at least I had it
> working a couple of years back.
>
>
> Hamish
>

-- 
Richard Damon



Re: [firebird-support] embedded database with Chinese path

2017-10-04 Thread DougC d...@moosemail.net [firebird-support]
Hamish-



Windows short path names are decidedly NOT for apps that cannot handle Unicode. 
They were introduced far earlier than that and were intended for programs that 
could not handle anything but the short 8.3 limits for any given file or folder 
name. That they often help with avoiding unicode is a side effect.



Sound like your misunderstanding of this may be contributing to your 
frustration.



Doug C.





 On Tue, 03 Oct 2017 23:25:23 -0400 Hamish Moffatt 
ham...@risingsoftware.com [firebird-support] 
firebird-support@yahoogroups.com wrote 




On 03/10/17 19:59, Dimitry Sibiryakov s...@ibphoenix.com 

[firebird-support] wrote: 

 03.10.2017 2:25, Hamish Moffatt ham...@risingsoftware.com 
[firebird-support] wrote: 

 Any ideas? 

 Give up. Firebird does not support unicode characters in database name and 
path. Only ANSI. 

 

 

 

Thanks for confirming what I figured from the source. But this is 

exactly what the Windows short path names are for - if your application 

can't handle Unicode filenames, use the short names. I tried it and it 

fails. Firebird explicitly converts the short path name back to a long 

name it can't use?! 

 

It seems to mostly work with UTF-8 on linux, or at least I had it 

working a couple of years back. 

 

 

Hamish 







Re: [firebird-support] Service restore from stdin

2017-10-04 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
04.10.2017 11:42, Pavel Cisar pci...@ibphoenix.cz [firebird-support] wrote:
> You can't use isc_info_svc_line for sending backup file to the service.

   But that's what fbsvcmgr does.

> The right token is isc_info_svc_stdin.

   No, it is only for getting buffer size from server. I have no idea why 
application must 
care about server buffer, but that how current implementation works.

> isc_info_svc_to_eof *may* work once whole backup stream is sent to the 
> service,

   I tried. My backup file was 512 bytes long, but it didn't work. That's why I 
started 
this thread.

-- 
   WBR, SD.






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] Service restore from stdin

2017-10-04 Thread Pavel Cisar pci...@ibphoenix.cz [firebird-support]
Hi,

You can't use isc_info_svc_line for sending backup file to the service. 
The right token is isc_info_svc_stdin. However, you have to send 
isc_info_svc_line request along with it to get output from service to 
detect that restore finished (value zero for reply to isc_info_svc_stdin 
is just a signal that no stdin input is needed right now).

The reason why isc_info_svc_to_eof doesn't works here is IMHO because 
this token returns after output buffer is full, not when any further 
output is available like isc_info_svc_line (because output is always 
produced in form of lines).

Restore via service using stdin is kind of a hack implementation that 
require client to mix up two parallel "conversations" in single message 
exchange loop: a) handling service request for stdin input b) service 
stdout output because it's the only way how client can detect that the 
restore finished (hence the need for isc_spb_verbose in restore 
request). Until stdin is fully transmited service may need another 
chunk, but reply to application is blocked until stdout buffer (eof 
request) is full, so everything gets stuck (service will not ask for 
further input because there is not enough output to send the request).

isc_info_svc_to_eof *may* work once whole backup stream is sent to the 
service, so only stdout output is is service's reply (stdin reply is 
zero), but there is no need to complicate the implementation at client 
side to handle both output methods.

You may take a look at local_restore() implementation in FDB driver v1.8.

best regards
Pavel Cisar
IBPhoenix

Dne 3.10.2017 v 16:30 Dimitry Sibiryakov s...@ibphoenix.com 
[firebird-support] napsal(a):
> Hello.
> 
> When I use isc_info_svc_line for sending a piece of backup to server, 
> everything works
> well. But when I use just replace isc_info_svc_line with isc_info_svc_to_eof, 
> no errors is
> produced, but database is not restored.
> Do I something wrong or it is a bug (incomplete implementation)?
> 






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/