[firebird-support] new Google groups

2020-04-30 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
The firebirdsql.org site lists new Google groups to replace the yahoo 
firebird-support and firebird-general lists, but the links don't work - 
I get permission denied errors trying to visit them.

Are these new lists set up and ready to go?


Hamish



[firebird-support] gbak via server or not

2020-03-05 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
We are backing up our databases regularly using gbak, running it on the 
same linux host as the Firebird server (2.5).

I've just noticed that we are referring to the database file using the 
local path alone, rather than using localhost:/pathname. I see that gbak 
is indeed reading the file directly rather than accessing it through the 
server (confirmed with strace).

The Firebird server may well have these databases open at the same time. 
This doesn't seem to be affecting things, and indeed the gbak seems to 
run quicker than when I run it via the server.

What's the impact of doing this? What's the preferred way? It's more 
important to minimise the impact of the backup job on the system load 
than it is to finish the backup quickly.



thanks,

Hamish




Re: [firebird-support] How to "remap" the count datatype from BIGINT to INTEGER in firebird 3

2020-03-04 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 4/3/20 4:23 am, Mark Rotteveel m...@lawinegevaar.nl 
[firebird-support] wrote:


On 02-03-2020 18:24, 'm...@spectrumpacsold.com' m...@spectrumpacs.com
[firebird-support] wrote:
>
>
> Hello,  why do we keep getting so many copies of this email?   Thanks.

Looking at the headers of the emails, Yahoo Groups is repeatedly sending
the emails. According to the headers, it was sent only once to Yahoo,
but servers inside Yahoo are repeatedly sending that email.



Is there a plan to move to a new service? Yahoo Groups is being 
continuously downgraded as Yahoo tries to discontinue it.



Hamish



Re: [firebird-support] firebird x86

2019-10-16 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 17/10/19 6:55 am, 'moj.mail.qmail' moj.mail.qm...@gmail.com 
[firebird-support] wrote:



W dniu 16.10.2019 o 01:05, Hamish Moffatt ham...@risingsoftware.com 
[firebird-support] pisze:

file /opt/firebird/bin/gsec


/opt/firebird/bin/gsec: ELF 32-bit LSB executable, Intel 80386, 
version 1 (SYSV), dynamically linked, interpreter /lib/ld-, for 
GNU/Linux 2.0.0, stripped




ldd /opt/firebird/bin/gsec


    not a dynamic executable



Hmm the "interpreter /lib/ld-" part is wrong, which is why you can't run 
the binary. It should say ld-linux.so.2.


I downloaded the tarball from firebirdsql.org and it looked OK so I 
don't know what happened.





I have built a package of Firebird 2.5.8 for Debian 9/10. I prefer to 
run from packages than installing software directly like this.



Can I use it?



I don't have a public repository but I can share it privately if you 
email me off-list.



Hamish



Re: [firebird-support] firebird x86

2019-10-15 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 16/10/19 6:37 am, 'moj.mail.qmail' moj.mail.qm...@gmail.com 
[firebird-support] wrote:


I'm trying install firebird 2.5.x x86 on debian 10/ubuntu 18. When run 
install, I got


/Extracting install data
Please enter new password for SYSDBA user: masterkey
./scripts/postinstall.sh: 114: ./scripts/postinstall.sh: 
/opt/firebird/bin/gsec: not found/


/ls -la  /opt/firebird/bin/gsec//
//-rwxr-xr-x 1 root root 297716 lut 14  2017 /opt/firebird/bin/gsec/

What can I do to fix it?



"Not found" can mean some of the libraries it needs are missing. What do 
you get from the commands:


file /opt/firebird/bin/gsec

ldd /opt/firebird/bin/gsec



I have built a package of Firebird 2.5.8 for Debian 9/10. I prefer to 
run from packages than installing software directly like this.



Hamish



Re: [firebird-support] Re: Off-Topic: Firebird future

2019-10-15 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 11/10/19 10:52 am, Daniel Miller dmil...@amfes.com [firebird-support] 
wrote:



There are a few (Windows-only) applications that are quite powerful -
but honestly the primary tool I've used has been FirebirdWebAdmin
(formerly IBWebAdmin). I'm generally working from a remote site and



Thanks for the tip, I didn't know about this tool. It hasn't had a 
release in a few years though. Does it work with current PHP (7.x)?



Hamish




Re: [firebird-support] Re: Off-Topic: Firebird future

2019-10-14 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 14/10/19 5:17 am, pablo sanchez pab...@adinet.com.uy 
[firebird-support] wrote:


I prefer to connect over vpn/ssh to remote sites and run Flamerobin
from my pc. I have all customer connections together, which is very
convenient for me .



It's convenient, but Firebird (2.5 at least) is *very* slow over links 
with even modest latency. If I have something simple to do it's quicker 
to use ssh + isql than to connect with IBExpert or FlameRobin over the 
internet.



Hamish



Re: [firebird-support] Re: Automating Firebird maintenance on Linux

2019-04-17 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]

On 17/4/19 11:12 pm, my...@techsol.org [firebird-support] wrote:


Thanks Steve.  That's interesting.  I forgot about stopping xinetd.  
So if I understand you right, you are suggesting the following:



1.  Review all FB processes (ps -ax | grep fbserver) and kill -9 on those



Yikes. You shouldn't kill -9 anything as a matter of course. Only as a 
last resort.


It doesn't give the program any chance to shut down cleanly, so there's 
every chance it will corrupt your database.



Hamish



Re: [firebird-support] how to resolve this deadlock

2018-09-11 Thread 'Hamish Moffatt' ham...@risingsoftware.com [firebird-support]
On 10/09/18 22:52, Hugo Eyng hugoe...@msn.com [firebird-support] wrote:
>
> Hi Hamish.
>
> I am not sure if I understood clearly your problem. If I did, you 
> probably should use "WITH LOCK" clause.

Thanks Hugo, that might work. But as the row might not exist yet, I 
would have to lock the whole table, else the two inserts could still run 
simultaneously and conflict.


Hamish


Re: [firebird-support] how to resolve this deadlock

2018-09-11 Thread 'Hamish Moffatt' ham...@risingsoftware.com [firebird-support]
On 11/09/18 00:48, Svein Erling Tysvær setys...@gmail.com 
[firebird-support] wrote:
> Hi Hamish!
>
> What exactly do you mean by "The queries kind of don't 
> actually conflict"? If they're trying to MERGE into the same row 
> simultaneously, then they do actually conflict, even if they contain 
> the same values. Strictly speaking, I think you have a 'lock conflict' 
> and not a 'deadlock' (a proper deadlock would be more if transaction A 
> has updated record a and waits to update record b, when transaction B 
> has updated record b and waits to update record a).
>
> One way to solve lock conflicts can sometimes be to insert into a 
> separate table (never update) and then have a separate batch process 
> that goes through this table and updates the real tables monthly, 
> daily or every hour. But I've no idea whether this is of any help in 
> your situation.

Hi Set,

I mean that at high level they don't conflict because they write the 
same values. From Firebird's point of view obviously they do conflict. I 
say a deadlock because that is what is being reported by Firebird in the 
error message;

SQLCODE: -913
- deadlock
- update conflicts with concurrent update
- concurrent transaction number is 22464


Unfortunately your journal / batch update solution doesn't help in my 
case. Thanks for the suggestion though.

Hamish


[firebird-support] how to resolve this deadlock

2018-09-10 Thread 'Hamish Moffatt' ham...@risingsoftware.com [firebird-support]
I have a bunch of users logging in to my system at the same time, which 
causes a simple query like this to run:

UPDATE OR INSERT INTO G_CLASS (CLASS_NUM, CLASS_NAME, USER_NUM, 
SYLLABUS_NUM)
VALUES (1, 'Foo', 1001, 43)

The field values are identical for each - it's exactly the same query. 
There's multiple threads running.

I'm getting a deadlock. The transaction mode is read committed with 
wait; when one transaction finishes the next one unblocks, but fails 
with a deadlock error.


The real query during login is actually a MERGE INTO which achieves the 
same thing except it doesn't update all the fields. This might be 
another level of complexity again.


Where do I start on resolving this? The queries kind of don't actually 
conflict... Is there a different isolation mode that makes it work, or 
do I need a different approach, or to retry?


Hamish




Re: [firebird-support] How to store a string in Firebird which includes #0's in it?

2018-08-07 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 04/08/18 23:06, 'River~~' river14ap...@gmail.com [firebird-support] 
wrote:


To say an octet is in hex is no more wrong than to say some number is 
stored as a float. It's all just a bucket of bits. Hex or float or 
Integer are always presentation


Float or integer is definitely not a matter of presentation but of 
encoding. Floats are stored encoded as sign, mantissa, and exponent.

https://softwareengineering.stackexchange.com/questions/215065/can-anyone-explain-representation-of-float-in-memory

Integer versus fixed point is a matter of presentation perhaps, but not 
floating point.


Hamish


Re: [firebird-support] Suddenly, Firebird stop accepting remote connections.

2018-07-18 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]



On 17/7/18 12:13 am, Marcelo Guimaraes mfguimar...@gmail.com 
[firebird-support] wrote:
Affected versions identified: 2.5.8, 2.5.7 and 2.5.5 all as 
SuperClassic running on dedicated server with Debian distribution.



I'm going through a situation where applications can not connect to 
Firebird. At a certain point, suddenly, Firebird does not accept 
remote connections.
Connecting locally, via isql, it is possible to access Firebird and 
perform queries normally, but not remote. No error messages are 
identified in the Firebird log or operating system logs. As a 
workaround, we only restart Firebird and it works normally, receiving 
local and remote connections. We  bserve that if we return Firebird to 
version 2.5.0 these issue stop happening.
I have enabled the audit to try to identify what is happening at the 
time of the freeze,  however in each freeze I observe a different set 
of sql commands, there is not indicating what can
 be causing the issue and also there are no error or warning messages 
on audit log.


Has anyone gone through this or have any suggestions on how can I 
identify what might be causing this freeze?


I saw similar behaviour in 2.5.8 on Linux. It is reported as bug 
CORE-5757 
(http://tracker.firebirdsql.org/browse/CORE-5757?subTaskView=unresolved) 
and is fixed for 2.5.9.


For me it seemed to be related to using database events, but the 
comments on the bug from the developers suggest it is not related.


I have patched 2.5.8 packages for Debian stretch which you could try.

Hamish


Re: [firebird-support] running Firebird without fbintl

2018-07-09 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 10/07/18 10:00, Hamish Moffatt ham...@risingsoftware.com 
[firebird-support] wrote:
> On 06/07/18 18:59, Dimitry Sibiryakov s...@ibphoenix.com
> [firebird-support] wrote:
>> 06.07.2018 10:45, 'Paul Beach' pbe...@mail.ibphoenix.com [firebird-support] 
>> wrote:
>>>>   With GCC "-fvisibility=internal" can be used to suppress exporting 
>>>> of all symbols.
>>> We currently use -fvisibility-inlines-hidden and -fvisibility=hidden for 
>>> clang...
>>  But still framework somehow calls internal delete. Did you check 
>> exported symbols with
>> nm (or whatever utility on MacOS can show public symbols of a library)?
> Right, it looks like fbintl is exporting operator delete() and operator
> delete[](), while libfbembed.dylib is not.
>

The darwin makefile failed to pass the exported symbols list to the 
linker for fbintl. It was correct for the other libraries, and it looks 
like this was already fixed in v3.

I rebuilt locally with that fixed and my problem is solved.

I reported it as CORE-5868.




Hamish






++

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] running Firebird without fbintl

2018-07-09 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 06/07/18 18:59, Dimitry Sibiryakov s...@ibphoenix.com 
[firebird-support] wrote:
> 06.07.2018 10:45, 'Paul Beach' pbe...@mail.ibphoenix.com [firebird-support] 
> wrote:
>>>  With GCC "-fvisibility=internal" can be used to suppress exporting of 
>>> all symbols.
>> We currently use -fvisibility-inlines-hidden and -fvisibility=hidden for 
>> clang...
> But still framework somehow calls internal delete. Did you check exported 
> symbols with
> nm (or whatever utility on MacOS can show public symbols of a library)?

Right, it looks like fbintl is exporting operator delete() and operator 
delete[](), while libfbembed.dylib is not.

macOS has nm but it doesn't demangle. They have their own utility 
symbols(1).

Here's the whole list of symbols exported (flags including "EXT") from 
fbintl:

$ symbols Versions/A/fbintl| grep " EXT"
     0x16c0 (   0x130) LD_lookup_charset [FUNC, 
EXT, NameNList, MangledNameNList, Merged, NList, FunctionStarts]
     0x1840 (   0x340) LD_lookup_texttype [FUNC, 
EXT, NameNList, MangledNameNList, Merged, NList, FunctionStarts]
     0x1b80 (   0x2a0) LD_setup_attributes 
[FUNC, EXT, NameNList, MangledNameNList, Merged, NList, FunctionStarts]
     0x1ef0 (    0x40) LD_version [FUNC, EXT, 
NameNList, MangledNameNList, Merged, NList, FunctionStarts]
     0x00037b90 (    0x40) operator new(unsigned 
long) [FUNC, EXT, NameNList, MangledNameNList, Merged, NList, 
FunctionStarts]
     0x00037c20 (    0x40) operator new[](unsigned 
long) [FUNC, EXT, NameNList, MangledNameNList, Merged, NList, 
FunctionStarts]
     0x00037c60 (    0x40) operator delete(void*) 
[FUNC, EXT, NameNList, MangledNameNList, Merged, NList, FunctionStarts]
     0x00037cf0 (    0x40) operator delete[](void*) 
[FUNC, EXT, NameNList, MangledNameNList, Merged, NList, FunctionStarts]

ie new, new[], delete and delete[] are exported.

Meanwhile libfbembed.dylib (ie the main Firebird binary) has these 
marked as PEXT = private-external.

$ symbols libfbembed.dylib | grep delete
.
     0x30451b70 (    0x40) operator delete(void*) 
[FUNC, PEXT, NameNList, MangledNameNList, Merged, NList, FunctionStarts]
     0x30451bb0 (    0x40) operator delete[](void*) 
[FUNC, PEXT, NameNList, MangledNameNList, Merged, NList, FunctionStarts]


Now to work out how to fix it.


Hamish






++

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] running Firebird without fbintl

2018-07-06 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 06/07/18 20:15, Hamish Moffatt ham...@risingsoftware.com 
[firebird-support] wrote:


On 06/07/18 18:50, Hamish Moffatt ham...@risingsoftware.com 
[firebird-support] wrote:


On 06/07/18 18:20, 'Paul Beach' pbe...@mail.ibphoenix.com 
[firebird-support] wrote:



<using during the build?

32bit or 64bit Firebird?
64-bit. I have not changed any optimisation flags so it looks like 
it's being compiled with -O1 (from builds/posix/prefix.darwin_x86_64)>>


2.5.8 64bit Firebird now compiles with -O0 because of a problem with 
optimisation in fbintl that caused

Firebird to crash...



I have not seen any crashes with Firebird, but I will compile up 
2.5.8 and see if it helps.


Same problem with 2.5.8 - delete in fbintl crashed, called from macOS 
thread. I am using the 2.5.8 binaries from firebirdsql.org (not 
compiling my own).



Thread 29 Crashed:: Dispatch queue: NSTextCheckingOperationQueue (QOS: 
USER_INTERACTIVE)


0   libsystem_kernel.dylib        0x7fff5fa30b6e __pthread_kill + 10

1   libsystem_pthread.dylib       0x7fff5fbfb080 pthread_kill + 333

2   libsystem_c.dylib     0x7fff5f98c1ae abort + 127

3   libc++abi.dylib       0x7fff5d88af8f abort_message + 245

4   libc++abi.dylib       0x7fff5d88b12b 
default_terminate_handler() + 265


5   libobjc.A.dylib       0x7fff5eccba4f 
_objc_terminate() + 105


6   libc++abi.dylib       0x7fff5d8a67c9 
std::__terminate(void (*)()) + 8


7   libc++abi.dylib       0x7fff5d8a6843 
std::terminate() + 51


8   libc++abi.dylib       0x7fff5d8a6794 
std::__unexpected(void (*)()) + 6


9   libc++abi.dylib       0x7fff5d8a6fd7 
__cxa_call_unexpected + 137


10  fbintl        0x000117dc5c92 operator 
delete(void*) + 50


11  com.apple.CoreNLP     0x7fff4b0307a3 
CoreNLP::ICUTextBreakWithCustomizedRules::ICUTextBreakWithCustomizedRules(CoreNLP::TaggerContext 
const&, __CFURL const*, bool, bool, void (CFRange, bool&, void 
(NLToken*, bool*) block_pointer) block_pointer) + 323


12  com.apple.CoreNLP     0x7fff4b026f54 
CoreNLP::DefaultSubWordTagger::DefaultSubWordTagger(CoreNLP::TaggerContext 
const&, CoreNLP::StringBuffer const&, unsigned long, __CFURL const*) + 282


13  com.apple.CoreNLP     0x7fff4aff0b7e 
CoreNLP::WordDispatchTagger::WordDispatchTagger(CoreNLP::TaggerContext&, 
__CFURL const*) + 220


14  com.apple.CoreNLP     0x7fff4b03182d 
CoreNLP::WordTagger::createWordTagger(CoreNLP::TaggerContext&) + 41


15  com.apple.CoreNLP     0x7fff4b003b24 
NLTokenizerCreate + 100


16  com.apple.CoreNLP     0x7fff4aff5e50 
NLStringTokenizerCreate + 388


17  com.apple.CoreFoundation      0x7fff37a8e6d2 
CFStringTokenizerCreate + 146


18  com.apple.AppKit      0x7fff359adb6a scoreParagraph 
+ 185


19  com.apple.AppKit      0x7fff3516f680 
NSSpellCheckerCheckString + 3952


20  com.apple.AppKit      0x7fff3525e52d 
-[NSTextCheckingOperation main] + 151


21  com.apple.Foundation      0x7fff39b6a8ee 
-[__NSOperationInternal _start:] + 778


22  com.apple.Foundation      0x7fff39b66917 
__NSOQSchedule_f + 369


23  libdispatch.dylib     0x7fff5f8a6db8 
_dispatch_client_callout + 8


24  libdispatch.dylib     0x7fff5f8b9e81 
_dispatch_continuation_pop + 472


25  libdispatch.dylib     0x7fff5f8b1733 
_dispatch_async_redirect_invoke + 703


26  libdispatch.dylib     0x7fff5f8a89a9 
_dispatch_root_queue_drain + 515


27  libdispatch.dylib     0x7fff5f8a8755 
_dispatch_worker_thread3 + 101


28  libsystem_pthread.dylib       0x7fff5fbf8169 
_pthread_wqthread + 1387


29  libsystem_pthread.dylib       0x7fff5fbf7be9 start_wqthread + 13



Hamish


Re: [firebird-support] running Firebird without fbintl

2018-07-06 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 06/07/18 18:50, Hamish Moffatt ham...@risingsoftware.com 
[firebird-support] wrote:


On 06/07/18 18:20, 'Paul Beach' pbe...@mail.ibphoenix.com 
[firebird-support] wrote:



<using during the build?

32bit or 64bit Firebird?
64-bit. I have not changed any optimisation flags so it looks like 
it's being compiled with -O1 (from builds/posix/prefix.darwin_x86_64)>>


2.5.8 64bit Firebird now compiles with -O0 because of a problem with 
optimisation in fbintl that caused

Firebird to crash...



I have not seen any crashes with Firebird, but I will compile up 2.5.8 
and see if it helps.


Same problem with 2.5.8 - delete in fbintl crashed, called from macOS 
thread. I am using the 2.5.8 binaries from firebirdsql.org (not 
compiling my own).



Hamish


Re: [firebird-support] running Firebird without fbintl

2018-07-06 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 06/07/18 18:20, 'Paul Beach' pbe...@mail.ibphoenix.com 
[firebird-support] wrote:



>


2.5.8 64bit Firebird now compiles with -O0 because of a problem with 
optimisation in fbintl that caused

Firebird to crash...



I have not seen any crashes with Firebird, but I will compile up 2.5.8 
and see if it helps.


Thanks,
Hamish


Re: [firebird-support] running Firebird without fbintl

2018-07-05 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 06/07/18 10:34, Hamish Moffatt ham...@risingsoftware.com 
[firebird-support] wrote:


We are using Firebird via Qt. Qt dynamically loads its Firebird driver 
(libqsqlibase.dylib) which is linked against the Firebird framework 
which is dynamically loading fbintl.


Actually, this isn't the whole story. We are also statically linking 
IBPP and linking the Firebird framework directly for that. As well it is 
loaded by the Qt driver.



Hamish


Re: [firebird-support] running Firebird without fbintl

2018-07-05 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 05/07/18 22:52, 'Paul Beach' pbe...@mail.ibphoenix.com 
[firebird-support] wrote:


And a couple of final questions, what optimisation level are you using 
during the build?

32bit or 64bit Firebird?



64-bit. I have not changed any optimisation flags so it looks like it's 
being compiled with -O1 (from builds/posix/prefix.darwin_x86_64).



Hamish


Re: [firebird-support] running Firebird without fbintl

2018-07-05 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 05/07/18 22:47, 'Paul Beach' pbe...@mail.ibphoenix.com 
[firebird-support] wrote:



<>

MacOS does not use a full icu implementation, so I doubt you are linking
against the system icu lib (/usr/lib/libicucore.dylib) unless of course
you are specifically requesting it.

To be honest I doubt you could build Firebird if you hadn't installed
a proper copy of icu from elsewhere.

Personally I expect the problem is elsewhere...
Does it crash on 10.13 or on earlier versions of the OS?
Have you analysed a crash dump?
What happens if you use isql on your embedded version of Firebird?
What version of Firebird are you using?



It only crashes on 10.13, not earlier versions. (I haven't tried the 
10.14 beta yet.)


I'm using Firebird 2.5.7. Looking at the traces again icu is probably 
not relevant at all actually. (The Firebird sources includes icu 30 in 
extern, so I did not have to install my own.)


Firebird works fine, but invoking the Mac file open dialog causes the 
application to crash, and the back trace always references fbintl.


We are using Firebird via Qt. Qt dynamically loads its Firebird driver 
(libqsqlibase.dylib) which is linked against the Firebird framework 
which is dynamically loading fbintl.


It looks like the custom memory allocator that fbintl is using is 
involved. Perhaps it didn't get initialized properly because of the 
dynamic loading of the Firebird framework etc?



Here are a couple of example traces.  As you can see neither of these 
involve our application code, they are pure macOS framework threads, 
except that fbintl is in the trace.



Thread 6 Crashed:: Dispatch queue: quicklook.pluginload
0   libsystem_pthread.dylib       0x7fff69cd73d5 
pthread_mutex_lock + 0
1   fbintl        0x000115339889 
Firebird::Mutex::enter() + 9
2   fbintl        0x000115341c9e 
Firebird::MemoryPool::deallocate(void*) + 62
3   fbintl        0x000115342279 operator 
delete(void*) + 9
4   com.apple.security.csparser       0x00011b698de9 
Security::CodeSigning::Requirement const* 
Security::CodeSigning::parsestd::__1::basic_string, 
std::__1::allocator >, 
Security::CodeSigning::Requirement>(std::__1::basic_stringstd::__1::char_traits, std::__1::allocator >, 
Security::CodeSigning::Requirement* 
(Security_CodeSigning::RequirementParser::*)(), 
std::__1::basic_string, 
std::__1::allocator >&) + 258
5   com.apple.security.csparser       0x00011b698166 
Security::CodeSigning::stringRequirement(std::__1::basic_stringstd::__1::char_traits, std::__1::allocator >, 
std::__1::basic_string, 
std::__1::allocator >&) + 52
6   com.apple.security        0x7fff4de32dd8 
Security::CodeSigning::Requirement const* 
Security::CodeSigning::parsestd::__1::basic_string, 
std::__1::allocator > >(std::__1::basic_stringstd::__1::char_traits, std::__1::allocator >, 
Security::CodeSigning::Requirement const* (* 
Security::CodeSigning::AntlrPlugin::*)(std::__1::basic_stringstd::__1::char_traits, std::__1::allocator >, 
std::__1::basic_string, 
std::__1::allocator >&)) + 74
7   com.apple.security        0x7fff4de32d58 
Security::CodeSigning::RequirementParser::operator()(std::__1::basic_stringstd::__1::char_traits, std::__1::allocator > const&) + 34
8   com.apple.security        0x7fff4de06234 
SecRequirementCreateWithStringAndErrors + 70
9   com.apple.QuickLookFramework      0x7fff4d4dc76d 
QLCheckAppleSignature + 69
10  com.apple.QuickLookFramework      0x7fff4d4a7fc4 
_QLLoadPluginAtURL + 1267
11  com.apple.QuickLookFramework      0x7fff4d4a74ec 
___QLLaunchUpdatingThread_block_invoke + 1543
12  libdispatch.dylib     0x7fff69a1c591 
_dispatch_call_block_and_release + 12
13  libdispatch.dylib     0x7fff69a14d50 
_dispatch_client_callout + 8
14  libdispatch.dylib     0x7fff69a2920c 
_dispatch_queue_serial_drain + 635
15  libdispatch.dylib     0x7fff69a1c0fd 
_dispatch_queue_invoke + 373
16  libdispatch.dylib     0x7fff69a29f02 
_dispatch_root_queue_drain_deferred_wlh + 332
17  libdispatch.dylib     0x7fff69a2dd16 
_dispatch_workloop_worker_thread + 880
18  libsystem_pthread.dylib       0x7fff69cd9033 
_pthread_wqthread + 980

19  libsystem_pthread.dylib       0x7fff69cd8c4d start_wqthread + 13



Thread 1 Crashed:: Dispatch queue: NSTextCheckingOperationQueue (QOS: 
USER_INTERACTIVE)
0   fbintl        0x00010f3ebcd8 
Firebird::MemoryPool::deallocate(void*) + 120
1   fbintl        0x00010f3ec279 operator 
delete(void*) + 9
2   com.apple.CoreNLP     0x7fff3d446b03 
CoreNLP::ICUTextBreakWithCustomizedRules::ICUTextBreakWithCustomizedRules(CoreNLP::TaggerContext 
const&, __CFURL const*, bool, bool, void (CFRange, bool&, void 
(NLToken*, bool*) block_pointer) block_pointer) + 323
3   com.apple.CoreNLP     

Re: [firebird-support] running Firebird without fbintl

2018-07-05 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 05/07/18 21:06, Mark Rotteveel m...@lawinegevaar.nl 
[firebird-support] wrote:


On 5-7-2018 09:28, Hamish Moffatt ham...@risingsoftware.com
[firebird-support] wrote:

> So, what is the impact of removing fbintl? What functionality do I lose?

You lose almost all character set support, including UTF-8.



Right. Meaning ORDER BY character fields as well as functions like 
substring(), char_length()?


In the absence of fbintl does Firebird interpret those fields just as 
pure ASCII/Latin1 then?


Hamish


[firebird-support] running Firebird without fbintl

2018-07-05 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
We're linking embedded Firebird in to our application on macOS. Ever 
since macOS 10.13, we are getting crashes whenever our application 
invokes a file open dialog.

We have tracked this down to some sort of conflict with fbintl. If we 
remove fbintl from our application, everything works.

I suspect it is some sort of conflict between libicu linked into fbintl 
and libicu used in the macOS system frameworks (and I suspect a change 
to icu in macOS is why this only started with 10.13). I tried to rebuild 
Firebird with a later version but didn't get very far.


So, what is the impact of removing fbintl? What functionality do I lose?



Hamish



Re: [firebird-support] isql 2.5 with server 3

2018-05-01 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 27/04/18 12:16, Hamish Moffatt ham...@risingsoftware.com 
[firebird-support] wrote:


I have a linux server with a local Firebird 2.5.8 server and utilities
and the Firebird 3.0.1 client library. I need to connect to a remote
Firebird 3 server as well as the local 2.5 server.

isql can't connect to the 3 server. I always get

$ isql-fb fb3server:db -user 123 -password 456
Statement failed, SQLSTATE = 08004
connection rejected by remote interface
Use CONNECT or CREATE DATABASE to specify a database

Is this expected?



I guess this is because isql is linked to libfbembed which is version 
2.5. I'm not sure how to fix this on my Debian install.



Hamish


[firebird-support] isql 2.5 with server 3

2018-04-30 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
I have a linux server with a local Firebird 2.5.8 server and utilities 
and the Firebird 3.0.1 client library. I need to connect to a remote 
Firebird 3 server as well as the local 2.5 server.

isql can't connect to the 3 server. I always get

$ isql-fb fb3server:db -user 123 -password 456
Statement failed, SQLSTATE = 08004
connection rejected by remote interface
Use CONNECT or CREATE DATABASE to specify a database

Is this expected?


I can connect from Python (fdb) ok so the client library is definitely 
working.


Hamish



[firebird-support] gbak of encrypted database

2018-04-30 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
If a db is encrypted with Firebird 3 encryption, is a backup made with 
gbak also encrypted?

https://www.firebirdsql.org/file/community/conference-2016/encrypting-firebird-databases.pdf
 
implies you need to encrypt your backup afterwards so that means no.


Will a restored db from that backup be encrypted automatically or would 
you have to run 'ALTER DATABASE ENCRYPT ...' on the new db afterwards if 
you want it encrypted also?



thanks

Hamish



[firebird-support] update or insert from in-line query

2018-03-19 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
Hi,

Is UPDATE OR INSERT INTO table-name  SELECT ...

not supported? I'm using Firebird 2.5.8.


thanks

Hamish



Re: [firebird-support] Re: server 2.5.8 deadlocked

2018-02-22 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]

On 22/02/18 20:17, hv...@users.sourceforge.net [firebird-support] wrote:


---In firebird-support@yahoogroups.com,  wrote :


On 13/02/18 17:55, Dmitry Yemanov dimitr@... 
[firebird-support] wrote:

> 13.02.2018 05:07, Hamish Moffatt wrote:
>
>> I attached gdb and dumped the state of all threads, which shows
every
>> one of them is waiting on a mutex or futex, ie it's dead
locked. I've
>> attached the trace.
> You need to download the debug symbols (Firebird-debuginfo-*
package)
> and copy them into your FB installation directory. Then take the
> backtrace again.
>

> It locked again. 2.5.8 super server on 32-bit linux.

Super Server, really ? Why ?
Well, it is not bad just strange choce.
But why, why, why 32 bit ???


It also happens on 64-bit linux and with superclassic. I opened 
CORE-5757. The back trace and a test program are attached there.




Regards

Hamish


Re: [firebird-support] Re: server 2.5.8 deadlocked

2018-02-21 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 22/02/18 10:10, Hamish Moffatt ham...@risingsoftware.com 
[firebird-support] wrote:
> On 13/02/18 17:55, Dmitry Yemanov dim...@users.sourceforge.net
> [firebird-support] wrote:
>> 13.02.2018 05:07, Hamish Moffatt wrote:
>>
>>> I attached gdb and dumped the state of all threads, which shows every
>>> one of them is waiting on a mutex or futex, ie it's dead locked. I've
>>> attached the trace.
>> You need to download the debug symbols (Firebird-debuginfo-* package)
>> and copy them into your FB installation directory. Then take the
>> backtrace again.
>>
> It locked again. 2.5.8 super server on 32-bit linux.
>

Note that we are using the event listener mechanism, and we think our 
deadlock issues may have started when we started using events, about 12 
months ago.

I see this issue in the tracker which looks familiar: 
http://tracker.firebirdsql.org/browse/CORE-4680 . However it's meant to 
be fixed in 2.5.5.



Hamish








++

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] server 2.5.8 deadlocked

2018-02-12 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 13/02/18 13:07, Hamish Moffatt ham...@risingsoftware.com 
[firebird-support] wrote:


I'm getting the Firebird 2.5 superclassic server on Linux deadlocking
regularly at the moment. Twice in one day last week, and again today
after uptime of less than 6 hours.

I just upgraded to 2.5.8 today, from 2.5.6. Our workload isn't huge, but
we do have a lot of small databases and maybe up to 100 client
connections at once.



For what it's worth, I have occasional remote connections over the 
Internet with latency of about 160ms (US east coast to Australia).


This is very slow with Firebird 2.5 but we only need to fetch one row 
from a db so it's acceptable to us.


Twice I think the deadlock condition has coincided such with a remote 
request.


Could this be a factor?

Hamish


[firebird-support] server 2.5.8 deadlocked

2018-02-12 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
I'm getting the Firebird 2.5 superclassic server on Linux deadlocking 
regularly at the moment. Twice in one day last week, and again today 
after uptime of less than 6 hours.

I just upgraded to 2.5.8 today, from 2.5.6. Our workload isn't huge, but 
we do have a lot of small databases and maybe up to 100 client 
connections at once.


I attached gdb and dumped the state of all threads, which shows every 
one of them is waiting on a mutex or futex, ie it's dead locked. I've 
attached the trace.

How can I debug this?

Would I be better off with superserver?


I can't connect with isql when it's in this state (it hangs).


Hamish


  --

Thread 54 (Thread 0x9342bb40 (LWP 31639)):
#0  0xb7fccd81 in __kernel_vsyscall ()
#1  0xb782fb9b in pthread_cond_wait@@GLIBC_2.3.2 () at 
../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xb7beab97 in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#3  0xb7d98653 in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#4  0xb7d9dc9d in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#5  0xb7a64835 in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#6  0xb782a27a in start_thread (arg=0x9342bb40) at pthread_create.c:333
#7  0xb7753b56 in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:110

Thread 53 (Thread 0x8f7adb40 (LWP 31616)):
#0  0xb7fccd81 in __kernel_vsyscall ()
#1  0xb782fb9b in pthread_cond_wait@@GLIBC_2.3.2 () at 
../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xb7beab97 in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#3  0xb7d98653 in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#4  0xb7d9dc9d in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#5  0xb7a64835 in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#6  0xb782a27a in start_thread (arg=0x8f7adb40) at pthread_create.c:333
#7  0xb7753b56 in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:110

Thread 52 (Thread 0x8ffaeb40 (LWP 31603)):
#0  0xb7fccd81 in __kernel_vsyscall ()
#1  0xb782fb9b in pthread_cond_wait@@GLIBC_2.3.2 () at 
../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xb7beab97 in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#3  0xb7d98653 in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#4  0xb7d9dc9d in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#5  0xb7a64835 in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#6  0xb782a27a in start_thread (arg=0x8ffaeb40) at pthread_create.c:333
#7  0xb7753b56 in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:110

Thread 51 (Thread 0x94c2eb40 (LWP 30369)):
#0  0xb7fccd81 in __kernel_vsyscall ()
#1  0xb782fb9b in pthread_cond_wait@@GLIBC_2.3.2 () at 
../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xb7beab97 in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#3  0xb7b94bc8 in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#4  0xb7b95e3d in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#5  0xb7a64835 in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#6  0xb782a27a in start_thread (arg=0x94c2eb40) at pthread_create.c:333
#7  0xb7753b56 in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:110

Thread 50 (Thread 0x9a439b40 (LWP 30333)):
#0  0xb7fccd81 in __kernel_vsyscall ()
#1  0xb782fb9b in pthread_cond_wait@@GLIBC_2.3.2 () at 
../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xb7beab97 in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#3  0xb7d98653 in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#4  0xb7d9dc9d in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#5  0xb7a64835 in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#6  0xb782a27a in start_thread (arg=0x9a439b40) at pthread_create.c:333
#7  0xb7753b56 in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:110

Thread 49 (Thread 0x9542fb40 (LWP 28376)):
#0  0xb7fccd81 in __kernel_vsyscall ()
#1  0xb782fb9b in pthread_cond_wait@@GLIBC_2.3.2 () at 
../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xb7beab97 in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#3  0xb7b94bc8 in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#4  0xb7b95e3d in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#5  0xb7a64835 in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#6  0xb782a27a in start_thread (arg=0x9542fb40) at pthread_create.c:333
#7  0xb7753b56 in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:110

Thread 48 (Thread 0x917b1b40 (LWP 28374)):
#0  0xb7fccd81 in __kernel_vsyscall ()
#1  0xb782fb9b in pthread_cond_wait@@GLIBC_2.3.2 () at 
../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xb7beab97 in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#3  0xb7d98653 in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#4  0xb7d9dc9d in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#5  0xb7a64835 in ?? () from /usr/lib/i386-linux-gnu/libfbembed.so.2.5
#6  0xb782a27a in start_thread (arg=0x917b1b40) at pthread_create.c:333
#7  0xb7753b56 in clone () at 

Re: [firebird-support] Strange behaviour on Linux

2017-12-07 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]

On 08/12/17 04:48, dam...@wxs.nl [firebird-support] wrote:


Hello,

When I have the following directory structure on a Linux server:

/a/b/c

and I want to create a database /a/b/c/test.fdb with gbak, the access 
rights of directory "c" must be rwx (readable, writeable, executable). 
Also the access rights to directory "a" and "b" must be r_x (readable, 
executable). The same with use of isql.

My question is why?
There might be some (unknown to me) reason that directory "c" must be 
executable, but why also directory "a" and "b"?


Can somebody explain this to me? I don't understand it.



That is normal UNIX directory permission behaviour. You must have 
execute permission to make any access to the directory. You generally 
don't need read access (which is only required to list the files, not to 
access them).


It is not specific to Linux or Firebird. Try it with less and a text file...

Hamish


Re: [firebird-support] Firebird stopped after 190 connections

2017-11-07 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]

On 02/11/17 20:26, mirc...@gmail.com [firebird-support] wrote:


Hi.
Today I had this situation - on CentOS 7 server, while Firebird 
Superserver was working, suddenly it stopped receiving new 
connections. First I thought that the server was crashed and not 
started automatically from the guardian. But ps -aux | greb fb showed 
that there are 2 firebird processes running - fbguard and fbserver.


So I stopped it manually with systemctl stop firebird-superserver. 
Then in the log I saw a message that server is shutting down with 190 
connections to 19 databases indicating that there were working 
connections.


Is there a limitations for the number of connections in Superserver or 
this is a limitation of the OS?

Because the number 190 is strange.



Did it actually refuse new connections, or did new connections attempts 
just hang indefinitely?


I have problems with new connections to Firebird just hanging. If you 
have a connection then you can delete the others (delete from 
MON$ATTACHMENTS) and everything will be good, otherwise you have to 
disconnect ALL your clients or just restart the server to get it working 
again. This was supposedly fixed in one of the 2.5 point releases but it 
is still happening in 2.5.6 for me.



Hamish


[firebird-support] detect if database has changed

2017-10-08 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
Is there an official way to detect if a database has changed?

I have some expensive reports and backups to run, but if I know that the 
database has not changed since I last ran them I can skip those.

fbstat (gstat) shows the next transaction number, but that changes even 
when only read-only transactions have run.

Currently I am looking at the timestamp of the .fdb file, which also 
changes when only read-only transactions run.

I would like to know if the data or schema actually changed, not just a 
transaction has run that didn't change anything.


Thanks

Hamish



[firebird-support] select column if it exists

2017-10-08 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
Is there a way to include a column in a SELECT but substitute a value if 
it doesn't? I need my code to work with different versions of my db schema.

eg I want to SELECT A, B, C, ... but C might not exist.

SELECT * would work of course, except it will fetch a bunch of columns I 
don't need.


thanks

Hamish



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


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

2017-10-03 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
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







++

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-03 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 03/10/17 18:20, Hamish Moffatt ham...@risingsoftware.com 
[firebird-support] wrote:



But I can't figure out why the Windows short filename doesn't work - 
it seems Firebird is converting it back somewhere, and then failing on 
that?


isc_file.cpp converts the short filename back to a long filename.

So, it looks like a filename containing >8-bit characters is simply not 
going to work on Windows with Firebird. UTF-8 gets converted back to 
8-bit ANSI, and short filenames get converted back to long filenames in 
an 8-bit string also.


I'm just trying to store a db in the user's home directory, which may 
contain Chinese characters if their login name does. Windows allows this.



Hamish


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

2017-10-03 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 03/10/17 11:25, Hamish Moffatt ham...@risingsoftware.com 
[firebird-support] wrote:


I'm trying to connect to a database with a filename containing Chinese
characters.



I tried passing a UTF-8 encoded filename, with the isc_dpb_utf8_filename 
flag set. However, this is failing with a "transliteration error" 
because ISC_utf8ToSystem() is trying to convert the UTF-8 to wchar (ok) 
and then to ANSI, which is not ok because of the Chinese filename. It 
looks like the Chinese filename will just not work using encoded filenames.


But I can't figure out why the Windows short filename doesn't work - it 
seems Firebird is converting it back somewhere, and then failing on that?


Hamish


[firebird-support] embedded database with Chinese path

2017-10-02 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
I'm trying to connect to a database with a filename containing Chinese 
characters.

The full path to my file is: C:\Users\汉密斯\AppData\Local\Rising 
Software\data5cloud\rising5.fdb

I'm not able to connect to this filename - I'm always told that the path 
name is wrong. I've tried using the full name as above, and also 
converting it to Windows short filename syntax which is 
C:\Users\F1DC~1\AppData\Local\RISING~1\DATA5C~1\rising5.fdb, but neither 
work. It doesn't matter if I use the embedded server (Windows) or network.


If I use the proper name:

C:\>dir "C:\Users\汉密斯\AppData\Local\Rising 
Software\data5cloud\rising5.fdb"
  Volume in drive C has no label.
  Volume Serial Number is 5837-4B6E

  Directory of C:\Users\汉密斯\AppData\Local\Rising Software\data5cloud

10/03/2017  10:08 AM58,019,840 rising5.fdb
1 File(s) 58,019,840 bytes
0 Dir(s)  46,259,064,832 bytes free

C:\>isql "C:\Users\汉密斯\AppData\Local\Rising 
Software\data5cloud\rising5.fdb"
Statement failed, SQLSTATE = 08001
I/O error during "CreateFile (open)" operation for file 
"C:\USERS\???\APPDATA\LOCAL\RISING SOFTWARE\DATA5CLOUD\RISING5.FDB"
-Error while trying to open file
-The filename, directory name, or volume label syntax is incorrect.
Use CONNECT or CREATE DATABASE to specify a database


If I use the short name:

C:\>dir C:\Users\F1DC~1\AppData\Local\RISING~1\DATA5C~1\rising5.fdb
  Volume in drive C has no label.
  Volume Serial Number is 5837-4B6E

  Directory of C:\Users\F1DC~1\AppData\Local\RISING~1\DATA5C~1

10/03/2017  10:08 AM58,019,840 rising5.fdb
1 File(s) 58,019,840 bytes
0 Dir(s)  46,259,068,928 bytes free

C:\>isql C:\Users\F1DC~1\AppData\Local\RISING~1\DATA5C~1\rising5.fdb
Statement failed, SQLSTATE = 08001
I/O error during "CreateFile (open)" operation for file 
"C:\Users\F1DC~1\AppData\Local\RISING~1\DATA5C~1\rising5.fdb"
-Error while trying to open file
-The filename, directory name, or volume label syntax is incorrect.
Use CONNECT or CREATE DATABASE to specify a database


Ultimately I'm trying to connect from a Qt application, but I've tried 
the above with isql just to rule out errors with the db driver.

Any ideas?



Thanks

Hamish


Re: [firebird-support] "Unable to determine field precison from system tables"

2017-06-07 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 08/06/17 14:43, Hamish Moffatt ham...@risingsoftware.com 
[firebird-support] wrote:



I've just upgraded my Debian Linux system to the new release (stretch/9)
and now I'm getting the following error when accessing a db from Python,
using either fdb (1.6.1) or the old kinterbasdb (3.3.0).



False alarm, my script was still using kinterbasdb. When I switch to fdb 
it works fine.


Sorry for the noise,

Hamish


[firebird-support] "Unable to determine field precison from system tables"

2017-06-07 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]

I've just upgraded my Debian Linux system to the new release (stretch/9) 
and now I'm getting the following error when accessing a db from Python, 
using either fdb (1.6.1) or the old kinterbasdb (3.3.0).

Unable to determine field precison from system tables:

Dynamic SQL Error

SQL error code = -303

Implementation of text subtype 114 not located.

The query is simply "select version_num from g_version" and the column 
in question is an int. I can run this query in isql just fine.

My Firebird server is 2.5, but with the system upgrade I got the new 
client library version 3.0.1 (Debian's full version number for it is 
3.0.1.32609.ds4-14).

If I downgrade the libfbclient2 package back to 2.5.6, the query succeeds.

The subtype number is sometimes 114 and sometimes 132.

Do I need to stick with the old fbclient library, or is there some I 
can/need to do to make this work? I have no plans to upgrade my server 
to Firebird 3 yet.

Thanks

Hamish



Re: [firebird-support] stale statements in MON$STATEMENTS

2016-12-02 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 03/12/16 12:50, Hamish Moffatt ham...@risingsoftware.com 
[firebird-support] wrote:
>
> I'm also seeing idle transactions in MON$TRANSACTIONS sometimes. That 
> is presumably the cause of my big issue, which is that I am reading 
> back old data from the db.

OK, here's where I'm confused. The last statement executed by each 
connection seems to stay listed, idle, in MON$STATEMENTS.

For each statement I execute, the database driver is doing

- isc_start_transaction
- isc_allocate_statement
- isc_prepare_statement
- isc_dsql_execute
- isc_commit_transaction
- isc_dsql_free_statement with DSQL_drop

Now I've enabled the fbtracemgr and what I see is that the FREE 
STATEMENT does not happen until the next transaction is started. The 
free_statement call causes a CLOSE_CURSOR event in the trace but the 
FREE_STATEMENT does not come until the next transaction starts.

I've attached from two executes of "SELECT 1 FROM RDB$DATABASE". You can 
hopefully see from the timestamps that the FREE_STATEMENT never starts 
until just before the next START_TRANSACTION.

Anyway, is this all as expected? Maybe it's not even important.

What I am seeing is that a thread is getting old data from a SELECT, 
suggesting that there's an active transaction/statement somewhere 
keeping it pinned to old data. I should not have any such lingering 
transactions/statements though.



thanks,


Hamish



  --

2016-12-03T16:30:40.9030 (12132:0279A674) TRACE_INIT
SESSION_4


2016-12-03T16:30:40.9040 (12132:0279A674) START_TRANSACTION
C:\DEV\WEBAPP_DEV\PROJECTS\SERVER\WEBAPP-SERVER\RISING5.FDB (ATT_886, 
SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)

C:\dev\webapp_dev\projects\server\webapp-server\debug\webapp_server.exe:23260
(TRA_72718, CONCURRENCY | WAIT | READ_WRITE)

2016-12-03T16:30:51.8920 (12132:0279A674) PREPARE_STATEMENT
C:\DEV\WEBAPP_DEV\PROJECTS\SERVER\WEBAPP-SERVER\RISING5.FDB (ATT_886, 
SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)

C:\dev\webapp_dev\projects\server\webapp-server\debug\webapp_server.exe:23260
(TRA_72718, CONCURRENCY | WAIT | READ_WRITE)

Statement 1130:
---
SELECT 1 FROM RDB$DATABASE
  0 ms

2016-12-03T16:30:51.8930 (12132:0279A674) EXECUTE_STATEMENT_START
C:\DEV\WEBAPP_DEV\PROJECTS\SERVER\WEBAPP-SERVER\RISING5.FDB (ATT_886, 
SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)

C:\dev\webapp_dev\projects\server\webapp-server\debug\webapp_server.exe:23260
(TRA_72718, CONCURRENCY | WAIT | READ_WRITE)

Statement 1130:
---
SELECT 1 FROM RDB$DATABASE

2016-12-03T16:30:51.8940 (12132:0279A674) COMMIT_TRANSACTION
C:\DEV\WEBAPP_DEV\PROJECTS\SERVER\WEBAPP-SERVER\RISING5.FDB (ATT_886, 
SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)

C:\dev\webapp_dev\projects\server\webapp-server\debug\webapp_server.exe:23260
(TRA_72718, CONCURRENCY | WAIT | READ_WRITE)
  1 ms, 1 write(s), 1 fetch(es), 1 mark(s)

2016-12-03T16:30:51.8940 (12132:0279A674) CLOSE_CURSOR
C:\DEV\WEBAPP_DEV\PROJECTS\SERVER\WEBAPP-SERVER\RISING5.FDB (ATT_886, 
SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)

C:\dev\webapp_dev\projects\server\webapp-server\debug\webapp_server.exe:23260

Statement 1130:
---
SELECT 1 FROM RDB$DATABASE

2016-12-03T16:32:01.7590 (12132:0279A674) FREE_STATEMENT
C:\DEV\WEBAPP_DEV\PROJECTS\SERVER\WEBAPP-SERVER\RISING5.FDB (ATT_886, 
SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)

C:\dev\webapp_dev\projects\server\webapp-server\debug\webapp_server.exe:23260

Statement 1130:
---
SELECT 1 FROM RDB$DATABASE

2016-12-03T16:32:01.7600 (12132:0279A674) START_TRANSACTION
C:\DEV\WEBAPP_DEV\PROJECTS\SERVER\WEBAPP-SERVER\RISING5.FDB (ATT_886, 
SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)

C:\dev\webapp_dev\projects\server\webapp-server\debug\webapp_server.exe:23260
(TRA_72719, CONCURRENCY | WAIT | READ_WRITE)

2016-12-03T16:32:16.7560 (12132:0279A674) PREPARE_STATEMENT
C:\DEV\WEBAPP_DEV\PROJECTS\SERVER\WEBAPP-SERVER\RISING5.FDB (ATT_886, 
SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)

C:\dev\webapp_dev\projects\server\webapp-server\debug\webapp_server.exe:23260
(TRA_72719, CONCURRENCY | WAIT | READ_WRITE)

Statement 1131:
---
SELECT 1 FROM RDB$DATABASE
  0 ms

2016-12-03T16:32:16.7560 (12132:0279A674) EXECUTE_STATEMENT_START
C:\DEV\WEBAPP_DEV\PROJECTS\SERVER\WEBAPP-SERVER\RISING5.FDB (ATT_886, 
SYSDBA:NONE, UTF8, TCPv4:127.0.0.1)

C:\dev\webapp_dev\projects\server\webapp-server\debug\webapp_server.exe:23260
(TRA_72719, CONCURRENCY | WAIT | READ_

Re: [firebird-support] stale statements in MON$STATEMENTS

2016-12-02 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 03/12/16 00:59, 'Thomas Steinmaurer' t...@iblogmanager.com 
[firebird-support] wrote:


> I also see a ton of connections on MON$ATTACHMENTS from the same thread
> in my application (MON$REMOTE_PID, MON$REMOTE_ADDRESS both the same)
> which also makes no sense.

Closing a connection implicitly will free the underlaying statements, 
thus due to your explanations, it seems you are leaking (not closing) 
connections.




It looks like all the connections in MON$ATTACHMENTS have the 
MON$REMOTE_PID set to the PID of my main thread, so this was a false 
alarm. I (intend to) have one connection per thread, but I could have 
100 threads.


I see mostly 1 idle statement per connections in MON$STATEMENTS, 
occasionally 2. This must be a Qt driver thing, by design or by flaw I'm 
not sure. I suppose it's harmless if they are idle and they are replaced 
by the next statement, and destroyed when the connection is closed.


I'm also seeing idle transactions in MON$TRANSACTIONS sometimes. That is 
presumably the cause of my big issue, which is that I am reading back 
old data from the db.


Thanks, I keep digging.. and sorry this thread isn't making much sense.


Hamish


Re: [firebird-support] stale statements in MON$STATEMENTS

2016-12-02 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 02/12/16 20:59, Dimitry Sibiryakov s...@ibphoenix.com 
[firebird-support] wrote:
> 02.12.2016 8:56, Hamish Moffatt ham...@risingsoftware.com [firebird-support] 
> wrote:
>> I understand that the idle statement
>> means they have been prepared but not executed, but this shouldn't be
>> possible in my application source (prepare has never failed, and I
>> always execute).
> Yes, but after execution they are idle again until unprepared or freed.
>
>

OK, thanks. I'm doing all my Firebird interaction with Qt and its IBASE 
driver, so this should all be managed for me. It should free the 
statements when they go out of scope.

It's a bit suspicious that 100 of these statements were the same one, 
"merge into...", so I'll have to follow that up.

I also see a ton of connections on MON$ATTACHMENTS from the same thread 
in my application (MON$REMOTE_PID, MON$REMOTE_ADDRESS both the same) 
which also makes no sense.


Hamish







++

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/



[firebird-support] stale statements in MON$STATEMENTS

2016-12-01 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
Hi,

I'm trying to debug a concurrency issue I'm having with an application 
of mine, connecting to Firebird 2.5.6, so I'm trying to understand the 
various monitor tables. I have dozens of threads all making their own 
connections to Firebird (superserver).

After running for a while my MON$STATEMENTS table shows over 100 
statements with in state 0 (idle) with no transaction ID. They are 
mostly "merge into ..." statements. I understand that the idle statement 
means they have been prepared but not executed, but this shouldn't be 
possible in my application source (prepare has never failed, and I 
always execute).

Is there something else I must be doing wrong to cause these to hang around?

I also have a couple of plain selects in that table.




thanks,


Hamish



[firebird-support] embedded firebird on Mac/posix without read-write security database

2014-10-28 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
We're embedding Firebird in our application on Mac OSX (both 2.1.x and 
2.5.x at different times). But we have trouble with needing write 
permission on the security2.fdb security database.

We ship the embedded Firebird, including security2.fdb, inside our 
application bundle. We've been able to give all of the application users 
read/write access to the included security2.fdb in the past, but this is 
increasingly tough with the OSX sandbox, stricter signing of application 
resources etc.

If we connect without a username at all, we can manipulate data in our 
application database but can't use any DDL; it fails with permission 
errors like

SQL drop table g_class;
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-ERASE RDB$RELATION_CONSTRAINTS failed
-no permission for control access to TABLE G_CLASS
-Missing arg #1 - possibly status vector overflow


What is the best solution for this?

In the archives of this list I found mention of the compile-time 
EMBEDDED define which nobbles the security database, but this is meant 
to be for the Windows embedded build rather than posix. I didn't try 
compiling with this yet.

I could make a read-write copy of security2.fdb somewhere. The security 
database location is configurable at compile time, but in the OSX 
sandbox environment you don't have any known writable location which 
could be hardcoded. So I'd have to hack the embedded server to make that 
location configurable at runtime.

Since it's embedded and only used by our application, I absolutely do 
not care about database security. So disabling it seems the best bet 
rather than having to some how make a writable security database.


Thanks,

Hamish