Firebird News

Thursday, August 06, 2015

Let's go back to the c , Firebird embedded backup service works

I have used an c based example for services api and seems that it works without a need for auth user

gcc backup_service.c -lfbembed

./a.out employee.fdb employee.fbk

Attach succeed

Start succeed

gbak:readied database employee.fdb for backup gbak:creating file employee.fbk


gbak:writing SQL roles gbak:writing names mapping gbak:closing file, committing, and finishing. 74752 bytes written

I will split the backup service function in two one for backup and one for restore then i will compare with my service example , maybe is a buffer truncation issue

Wednesday, July 15, 2015

Update firebird to version 2.5.4 is applied into LibreOffice master

There was a small issue with tinderbox and was reverted and then re-applied to master.

Rebuilding of indexes function is now removed from master (Using firebird backup format for .odb there is no need for rebuild indexes).

Thursday, July 02, 2015

JDK issues on OSX , ran the tests without Java

To run all the dbaccess tests On OSX I had to install jre 6 then jdk/jre 8 but still
dbaccess tests wouldn't run java popup still appeared even if the java -version showed
the proper 8 version , so for the moment i have disabled the java tests

./ --without-java


Tests are finished and Firebird 2.5.4 update patch on gerrit is up for review

Tested on OSX 10.10.4 , Win 10 , Ubuntu 14.04

Wednesday, July 01, 2015

Debugging with ddd : crashes in rtl_ImplGetFastUTF8UnicodeLen

Found it where it crashes at line 645 in Connection.cxx
OUString aData(pResults + 3,
                           isc_vax_integer(pResults, 2),
and here is the backtrace at line 634 in ustring.cxx
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b7aebd in rtl_ImplGetFastUTF8UnicodeLen (pStr=0x7ffffffff000 , nLen=11582, ascii=0x7fffffffc4b8) at /home/mariuz/work/libo/sal/rtl/ustring.cxx:634
(gdb) frame 4
#4  0x00007fff96c9bce2 in connectivity::firebird::Connection::runBackupService (this=0x7fffac0a1400, nAction=1) at /home/mariuz/work/libo/connectivity/source/drivers/firebird/Connection.cxx:645
(gdb) frame 24
#24 0x00007ffff195e906 in SalFrame::CallCallback (this=0x10a7680, nEvent=22, pEvent=0x15fd5d0) at /home/mariuz/work/libo/vcl/inc/salframe.hxx:246
(gdb) frame 23
#23 0x00007ffff1586e00 in ImplWindowFrameProc (_pWindow=0x10a6ce0, nEvent=22, pEvent=0x15fd5d0) at /home/mariuz/work/libo/vcl/source/window/winproc.cxx:2578
(gdb) frame 5
#5  0x00007fff96c9c99c in connectivity::firebird::Connection::documentEventOccured (this=0x7fffac0a1400, _Event=...) at /home/mariuz/work/libo/connectivity/source/drivers/firebird/Connection.cxx:814
(gdb) frame 4
#4  0x00007fff96c9bce2 in connectivity::firebird::Connection::runBackupService (this=0x7fffac0a1400, nAction=1) at /home/mariuz/work/libo/connectivity/source/drivers/firebird/Connection.cxx:645

Tuesday, June 30, 2015

Backup file firebird.fbk file inside odb is 0 length

That could be the reason gerrit wasn't merged Connection::runBackupService didn't quite worked:
(Currently doesn't actually work, the backup service fails with gbak:Exiting before completion due to errors and no further error messages).
I need to debug the isc_action_svc_backup error

On odb save event now saves fbk instead of fdb

XDocumentEventListener documentEventOccured was registered for when save button is pressed

It was done on this line in Connection.cxx :

The issue was on this part of the code 
xInputStream = OStorageHelper::GetInputStreamFromURL(m_sFirebirdURL, xContext);
Now replaced with
xInputStream = OStorageHelper::GetInputStreamFromURL(m_sFBKPath, xContext);

m_sFirebirdURL is the original fdb path 

m_sFirebirdURL = m_pDatabaseFileDir->GetFileName() + "/firebird.fdb";
m_sFBKPath = m_pDatabaseFileDir->GetFileName() + "/firebird.fbk";

Friday, June 26, 2015

Semi good news : New Database.odb contains firebird.fbk

The semi good news is that New Database.odb contains fbk file saved when a table is created and saved from Base
Here is the unziped New Database.odb

The bad news is the firebird.fbk is in fact firebird.fdb file , so the saved file is the database file instead of backup file (i renamed the fbk to fdb and can be open in flamerobin)

When i loaded the New Database.odb i got this backtrace

rogram received signal SIGSEGV, Segmentation fault.
0x00007ffff7b7b99d in rtl_ImplGetFastUTF8UnicodeLen (pStr=0x7ffffffff000 , nLen=18238, ascii=0x7fffffffb658) at /home/mariuz/work/libo/sal/rtl/ustring.cxx:610
610             unsigned char c = (unsigned char)*pStr;

So i need to work on the save fbk to odb part

Thursday, June 25, 2015

The good news

The good news is firebird_empty.odb simple test is is ok (fdb file is created in tmp area and queries work) as seen in the trace
info:connectivity.firebird:3385:1:connectivity/source/drivers/firebird/Driver.cxx:54: FirebirdDriver_CreateInstance()
info:connectivity.firebird:3385:1:connectivity/source/drivers/firebird/Driver.cxx:166: connect(), URL: sdbc:embedded:firebird
info:connectivity.firebird:3385:1:connectivity/source/drivers/firebird/Connection.cxx:173: Temporary .fdb location:  /tmp/lu3385bwxulf.tmp/firebird.fdb
info:connectivity.firebird:3385:1:connectivity/source/drivers/firebird/DatabaseMetaData.cxx:851: getTypeInfo()
info:connectivity.firebird:3385:1:connectivity/source/drivers/firebird/Connection.cxx:883: buildTypeInfo(). Type info built.
info:connectivity.firebird:3385:1:connectivity/source/drivers/firebird/Connection.cxx:891: buildTypeInfo(). Closed.
info:connectivity.firebird:3385:1:connectivity/source/drivers/firebird/Statement.cxx:111: executeQuery(SELECT DISTINCT indices.RDB$INDEX_NAME FROM RDB$INDICES indices JOIN RDB$INDEX_SEGMENTS index_segments ON (indices.RDB$INDEX_NAME = index_segments.RDB$INDEX_NAME) JOIN RDB$RELATION_FIELDS relation_fields ON (index_segments.RDB$FIELD_NAME = relation_fields.RDB$FIELD_NAME) JOIN RDB$FIELDS fields ON (relation_fields.RDB$FIELD_SOURCE = fields.RDB$FIELD_NAME) WHERE (indices.RDB$SYSTEM_FLAG = 0) AND ((fields.RDB$FIELD_TYPE = 14)      OR (fields.RDB$FIELD_TYPE = 37)) AND (indices.RDB$INDEX_INACTIVE IS NULL OR indices.RDB$INDEX_INACTIVE = 0) )
info:connectivity.firebird:3385:1:connectivity/source/drivers/firebird/ResultSet.cxx:79: OResultSet().
info:connectivity.firebird:3385:1:connectivity/source/drivers/firebird/StatementCommonBase.cxx:111: close
info:connectivity.firebird:3385:1:connectivity/source/drivers/firebird/StatementCommonBase.cxx:111: close
We need to modify the file firebird_integer_x64le.odb used in the qa tests (dbaccess/qa/unit/firebird.cxx) to include a fbk instead of fdb

Tuesday, June 23, 2015

Debugging #72987 libreoffice patch

I started debugging the gerrit at the end of #72987
export CPPUNITTRACE="gdb --args"
export VALGRIND=memcheck
make CppunitTest_dbaccess_firebird_test
make -j 4 -rs -f /home/mariuz/work/libo/Makefile.gbuild CppunitTest_dbaccess_firebird_test
Seems that gdb debugging is locked
Update: I needed to export only one of the bash env variables not all of them
export CPPUNITTRACE="gdb --args"
Here is a more readable backtrace

Monday, June 15, 2015

New small patch from libo for El Capitan

We need to apply the same patch upstream in 2.5 tree so I have asked Paul why the flag was needed and if it can be removed. So it can be safely removed also upstream.

Update : patch applied both in trunk and firebird 2.5.x release branch. gds_relay target was removed from darwin makefile comments (target was removed many years ago by Alex)

It should be removed from all makefiles in 2.5.x branch (seems to be removed in trunk)

Tuesday, June 09, 2015

osx fixed , redoing the gerrit patch

Yesterday i had an exam so i slowed down my pace for the moment

Saturday i have the last exam on this year (Advanced Methods in Data Analysis)

the osx issue is that bash firebird configure script detects host/target as i386-darwin on x86-64 osx
so we have to use the 2.5.2 trick and force the build for darwin_x86_64


I will redo the gerrit and send it again after i make shure that it builds on all machines

and remove the old one

Sunday, June 07, 2015

testing make qtcreator-ide-integration more patches are now upstream . osx architecture linked issue

in libo git folder you can now create qtcreator files

make qtcreator-ide-integration
cd sw

parsing/indexing the project took a few seconds . I'm more used to qtcreator than to kdevelop

On the firebird side , one more fix is now upstream .

I saw that we have an issue with osx patch

ld: warning: ignoring file ../temp/boot/jrd/dsc.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (i386): ../temp/boot/jrd/dsc.o,Platform=MacOSX/consoleText

I will review what changed in the configure/makefile that triggered the issue

Saturday, June 06, 2015

Timo-T game modifications : environment effects, real time illumination, we've changed the lasers

A few modifications made these past few weeks, hope You like'em So we've played a little with the environment effects, real time illumination, we've changed the lasers, as You can see they look a lot different than they did before and we've optimized the shader to get some better reflections. Still need to implement a few minor things and solve a few bugs, but we are very excited with what we have so far. Hope You like it Leave us a comment with what Your thoughts are on this matter. Any feedback would be appreciated.

Better view in the HD images area

Friday, June 05, 2015

#gsoc2015 for libreoffice update no #3 : patch has it's own brain (osx vs linux)

I worked on the finishing firebird 2.5.4 cygwin.msvc patch and i did also the up streaming (as much as i could from it)
I had an issue with patch created on linux didn't apply very well on osx (hunk issue)

I have prepared the gerrit for firebird 2.5.4 upgrade here

I solved the following rejects yesterday , i did my builds on all windows/osx/linux machines

2 out of 10 hunks FAILED -- saving rejects to file
1 out of 2 hunks FAILED -- saving rejects to file src/jrd/gds.cpp.rej
1 out of 1 hunk FAILED -- saving rejects to file src/jrd/os/win32/mod_loader.cpp.rej

It was easier if patches where done for each file separated or as pull requests on github for easy cherry picking :)
Firebirdsql accepts now pull requests on github

Also i up-streamed some of the patches 
ps: i started importing the libo in kdevelop for easy debugging and it will take a while to import 

also started reviewing firebird endian issue and previous gerrit

Wednesday, May 27, 2015

#gsoc2015 for libreoffice update #2 - update firebird to 2.5.4 , osx builds ok

I have updated firebird 2.5.4 patch also with osx patches refactored (now is building ok on osx)

I still need to clean the cygwin msvc patch (work in progress)

it fais on cygwin on these lines

2 out of 10 hunks FAILED -- saving rejects to file

[build CHK] cppu

1 out of 2 hunks FAILED -- saving rejects to file src/jrd/gds.cpp.rej

1 out of 1 hunk FAILED -- saving rejects to file src/jrd/os/win32/mod_loader.cpp.rej

[build CHK] cppuhelper

Patch FAILED: C:/sources/libo-core/external/firebird/firebird-cygwin-msvc.patch.1

C:/sources/libo-core/solenv/gbuild/ recipe for target 'C:/sources/libo-core/workdir/UnpackedTarball/firebird.done' failed

Tuesday, May 26, 2015

#gsoc2015 for libreoffice update #1 - update firebird to 2.5.4

Jenkins tells us libo master fails to build on MacOS and MS Windows, in the firebird compilation.
These two will be merged into one request:
Patch is applied upstream

Also external/firebird/firebird-icu.patch is already applied upstream in 2.5.4 (it's an examples makefile  firebird/builds/posix/

On On MacOS X, the error after update seems to be that the Firebird build system uses a compiler switch that is not recognised by clang compiler. (needs to be removed also contributed upstream in 2.5..x tree)

Tuesday, May 19, 2015

Timo T gameplay video no #2

We have worked some more on our game, still have some work to do, but we do hope that we'll have a demo in a week or 2 (fingers crossed)... Until then enjoy the new video... We will gladly reply to each of you that comes with Feedback, questions and suggestions. Who knows maybe You'll give us some great ideas!

Sunday, May 17, 2015

Firebird PHP Web Admin with Bootstrap 3.x

Here is one screenshot with new Firebird Web Admin interface

Compare with previous version

Saturday, May 16, 2015

Gibbous - A Cthulhu Adventure (Pre-Alpha Demo Footage)

Gibbous is a classic 2d point and click adventure, and yes it’s a Lucas Arts-like game. It also is, as the subtitle so unsubtle-y gives it away, a loving spoof of everything Lovecraftian, and then some.

Pre-Alpha demo footage

Wednesday, May 13, 2015

Timo-T puzzle game [WIP]

The Gameplay is relatively easy: You are a robot that has to press some buttons in a certain sequence in order to get to the next level (the buttons are just a sketch they are not final). Every level is time elapsing from 3-5 min per level. All the levels are basically on the same platform, the only difference is that the platforms are moving up and down and as U advance in the game it will be harder and harder because the higher levels will have certain paths which U must go on the and rest will be lava. There will be lasers as shown in the teaser and plasma bullets shot from the ceiling. The robot will have 2 special abilities with a cooldown meter and there will be power-ups like walk on lava for a few seconds and restore health. And of course the facility is built inside of a volcano.



Thursday, May 07, 2015

Installing Firebird Ruby driver on Windows 10 x64

Install firebird 2.5.4 x64 with fbclient copy to system dir (checked).
Install rubyinstaller 2.x x64
Download Devkit for ruby 2.x (x64 – 64bits only)
unzip it in C:\rubydevkit
open cmd.exe in start->run
cd rubydevkit
run ruby dk.rb init and ruby dk.rb install to bind it to ruby installations in your path.

Then gem install fb will go without issues after compilation.
After that you can install rails 4.2.x and ActiveRecord Firebird Adapter.

Tuesday, May 05, 2015

Firebird 2.5.4 Final for Ubuntu LTS releases is uploaded into Firebird stable ppa

Here you can find the latest stable release Firebird 2.5.4 for LTS supported Ubuntu releases.
Follow the Firebird 2.5.x guide for usage and installation.

ps:Also package for latest supported Ubuntu:15.04 is uploaded

Tuesday, April 28, 2015

Saturday, April 25, 2015

Ubuntu 15.04 allows systemd removal

One way to boot your ubuntu 15.04 faster is to switch to upstart and remove systemd

sudo apt-get install upstart-sysv

Wednesday, February 18, 2015

CodeIgniter 3 (php framework) includes support for Firebird

The Userguide of Codeigniter 3 (still Release Candidate) mentions that now has support for Firebird:
Added Interbase / Firebird database support via the ibase driver.
This means that the installation package CI 3 includes it, although you could previously use Firebird in CodeiIgniter 2 by the driver developed by Carlos GarcĂ­a ( ) .

 We are very happy that CodeIgniter 3 integrates support for Firebird,  In fact CodeIgniter is a stable platform where I (albringas)'ve done developments and with very good results.

To see the rest of the new features of CodeIgniter 3 these are the addresses:

I also put the direction of an article I wrote about using Firebird with CodeIgniter 2, in my blog: 

Monday, February 16, 2015

Building Firebird 3.0 Client / Embedded for Android

Download and install ndk  unzip in your home
install firebird build dependencies
sudo apt-get build-dep firebird2.5
sudo apt-get install libtommath-dev

export NDK=$HOME/android-ndk-r10e
echo $NDK

get the Firebird 3.0 source code

git clone
cd core 
./  --with-cross-build=android.arm --without-editline --enable-binreloc
There was a libedit.a linking error so i had to copy it manually
cp extern/editline/src/libedit.a gen/Release/firebird/lib/libedit.a
after that the is created for arm

file  gen/buildroot/opt/firebird/lib/ 
gen/buildroot/opt/firebird/lib/ ELF 64-bit LSB  shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=b6cb7db07fcad2475aa79352fb515cbe3ac44eea, stripped

Soon i will add a download link

ps: in 3.0 can be used as embedded