<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8986782557879316238</id><updated>2012-02-16T03:38:10.202-08:00</updated><category term='Patio Set Covers'/><category term='Bosmere Products'/><title type='text'>Paul Beach's Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>69</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-464377749167940179</id><published>2011-07-26T02:04:00.000-07:00</published><updated>2011-09-28T06:33:31.601-07:00</updated><title type='text'>Firebird 2.5 SuperServer and MacOSX 10.7 (Lion)</title><content type='html'>There is a small problem with Firebird 2.5 SuperServer and MacOSX 10.7 (Lion)...&lt;br /&gt;SuperServer will not start, and produces a crash report header similar to this&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Update &lt;/span&gt;26th August 2011 &lt;br /&gt;Its not just 2.5 SuperServer, reports have come in that SuperServer for Firebird 2.1.4 will not start, also the same problem exists for Firebird 2.5 SuperClassic.&lt;br /&gt;&lt;br /&gt;Process:         fbserver [706]&lt;br /&gt;Path:            /Library/Frameworks/firebird.framework/Versions/A/Resources/bin/fbserver&lt;br /&gt;Identifier:      fbserver&lt;br /&gt;Version:         ??? (???)&lt;br /&gt;Code Type:       X86 (Native)&lt;br /&gt;Parent Process:  fbguard [166]&lt;br /&gt;&lt;br /&gt;Date/Time:       2011-06-10 07:59:42.374 -0400&lt;br /&gt;OS Version:      Mac OS X 10.7 (11A480b)&lt;br /&gt;Report Version:  9&lt;br /&gt;&lt;br /&gt;Anonymous UUID:                      B7EDF790-CE72-4B21-A982-B9EA4F4E2088&lt;br /&gt;&lt;br /&gt;Crashed Thread:  1  Dispatch queue: com.apple.libdispatch-manager&lt;br /&gt;&lt;br /&gt;Exception Type:  EXC_BAD_INSTRUCTION (SIGILL)&lt;br /&gt;Exception Codes: 0x0000000000000001, 0x0000000000000000&lt;br /&gt;&lt;br /&gt;Application Specific Information:&lt;br /&gt;BUG IN CLIENT OF LIBDISPATCH: Do not close random Unix descriptors&lt;br /&gt;&lt;br /&gt;The bug is fixed in Firebird 2.5.1 but Firebird 2.5.1 is not available yet. So I have fixed the problem also in the Firebird 2.5 code and produced 32bit and 64bit builds that work properly. &lt;br /&gt;&lt;br /&gt;I have had new builds uploaded to Sourceforge to fix the problem with Firebird &lt;br /&gt;2.1.4 SuperServer, you can distinguish the new builds from the old by the build no. &lt;br /&gt;Old = 18393, New = 18393. Because we have some issues with 2.5.1 that are currently being investigated, I plan to update the 2.5 builds on Sourceforge soon.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Update &lt;/span&gt;28th Sep 2011&lt;br /&gt;The Firebird 2.5 builds have also been replaced on Sourceforge, so you just need to download the latest build. However Firebird 2.5 will be replaced by Firebird 2.5.1 very shortly, builds are now taking place and will be QA'd and released shortly. &lt;br /&gt;&lt;br /&gt;Any problems - please let me know.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-464377749167940179?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/464377749167940179/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=464377749167940179' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/464377749167940179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/464377749167940179'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2011/07/firebird-25-superserver-and-macosx-107.html' title='Firebird 2.5 SuperServer and MacOSX 10.7 (Lion)'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-8374843347636212951</id><published>2011-07-04T06:51:00.000-07:00</published><updated>2011-07-04T06:55:28.451-07:00</updated><title type='text'>Firebird V2.1 Error: value exceeds the range for valid dates</title><content type='html'>You are restoring a backup of a Firebird 1.5 or 2.0 database to Firebird 2.1 and you see an error similar to this:&lt;br /&gt;&lt;br /&gt;gbak: writing data for table xyz&lt;br /&gt;gbak:20000 records written&lt;br /&gt;gbak:  Error: value exceeds the range for valid dates&lt;br /&gt;gbak:  Error: gds_$receive failed&lt;br /&gt;gbak:Exiting before completion due to errors&lt;br /&gt;&lt;br /&gt;How do you go about solving the problem?&lt;br /&gt;Well first of all a quick visit to the Firebird bug tracker reveals &lt;br /&gt;http://tracker.firebirdsql.org/browse/CORE-1714 and a couple of comments from Dimitry Yemanov.&lt;br /&gt;&lt;br /&gt;“The error means to say that some column has an invalid date value (outside the supported range). Prior to V2.1, it was possible to store such invalid values in the database, but now it's prohibited. A verbose output should point you to a problematic table.” Also “The current behavior is intended and is unlikely to be changed.”&lt;br /&gt;&lt;br /&gt;1. Firstly use the –v (verbose option of gbak) to find out the table that is causing the problem.&lt;br /&gt;2. Check the table xyz for date columns&lt;br /&gt;3. Perform the following SQL operation on all the date columns you found in 2. &lt;br /&gt;&lt;br /&gt;isql&gt; update XYZ set MY_DATE_COLUMN = MY_DATE_COLUMN;&lt;br /&gt;&lt;br /&gt;At some point during the process you will see the same error that gbak produced, but now you will know which column is causing the problem.&lt;br /&gt;&lt;br /&gt;4. Install Firebird 1.5 or 2.0, by going back to the version of Firebird that allows for invalid dates, you will be at least able to correct the invalid date to something more appropriate.&lt;br /&gt;&lt;br /&gt;5. Now lets check for dates that are outside of their proper range (01 Jan 0001 - 31 Dec 9999)&lt;br /&gt;&lt;br /&gt;Below date zero:&lt;br /&gt;&lt;br /&gt;isql&gt; select PRIMARY_KEY from XYZ where MY_DATE_COLUMN &lt; '0001-01-01'&lt;br /&gt;&lt;br /&gt;if an error occurs correct the date to something more appropriate and meaningful&lt;br /&gt;&lt;br /&gt;Maximum date&lt;br /&gt;&lt;br /&gt;isql&gt; select PRIMARY_KEY from XYZ where MY_DATE_COLUMN &gt; '9999-12-31'&lt;br /&gt;&lt;br /&gt;if an error occurs correct the date to something more appropriate and meaningful&lt;br /&gt;&lt;br /&gt;6. You can now backup the database using Firebird 1.5 or 2.1 and successfully restore under 2.1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-8374843347636212951?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/8374843347636212951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=8374843347636212951' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/8374843347636212951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/8374843347636212951'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2011/07/firebird-v21-error-value-exceeds-range.html' title='Firebird V2.1 Error: value exceeds the range for valid dates'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-4037932351614890138</id><published>2011-05-10T00:47:00.000-07:00</published><updated>2011-05-11T01:18:33.239-07:00</updated><title type='text'>Firebird 3.0 - Shared Page Cache</title><content type='html'>Posted by Vlad on the Firebird Development List.&lt;br /&gt;&lt;br /&gt;After more than a year of development, testing, switching on another tasks and returning back I'm ready to commit shared page cache implementation into trunk.&lt;br /&gt;&lt;br /&gt;I consider it stable enough to be committed into SVN. It runs some stability tests more than 10 hours for longest run and many shorter runs at different configurations.&lt;br /&gt;&lt;br /&gt;Here I want to do overview of changes, what was tested, what was not, and what is work in progress.&lt;br /&gt;&lt;br /&gt;Page cache was re-implemented looking at both Vulcan code (thanks to Jim) and our code base. It is not a blind copy of Vulcan code, every decision was thinking on and adjusted when needed with my understanding and expirience with existing code.&lt;br /&gt;&lt;br /&gt;The cache is syncronized at different levels. There is a few BufferControl (BCB) level sync's used to syncronize access to the common structures such as LRU queue, Precedence graph, Dirty page list and so one. These common sync's should be locked at as short as possible period of time as this is kind of global locks. Also there is a two syncs for every BufferDesc (BDB) - one for guard contents of page buffer  tself and second one is to prevent partial writes of page wich edition is not completed and to prevent simultaneous write of the same page by different threads.&lt;br /&gt;&lt;br /&gt;I don't explain cache algoritms here, if someone have a question I'll be happy to answer it. And I not going to said that page cache implementation is frozen - if necessary we will change it of course (there is still space for impovements and bugs fixing).&lt;br /&gt;&lt;br /&gt;You know I already committed SyncObject class (and related classes) ported from Vulcan. I removed some unused code and restored fairness of locking : initially it was fair in Vulcan too (i.e. all lock requests was put in waiting queue and granted in first-in-first-out, or fair, order), but later Jim found some (unknown to me)  ssue with this and made preference for SHARED locks. I found no performance issues with fair locking so I decided to revert that and restore original behavior. Of course it could be changed when necessary.&lt;br /&gt;&lt;br /&gt;Shared page cache is not an isolated change. It affects many parts of engine and our syncronization model changed significantly again. There was agreement that we will not implement shared metadata cache in v3 as this is risky and we could not deliver  V3 in reasonable time frame. &lt;br /&gt;&lt;br /&gt;In shared cache mode we have single Database instance and many attachment instances linked to it (this is not new). &lt;br /&gt;&lt;br /&gt;All metadata objects moved into Attachment. Metadata syncronization is guarded by attachment's mutex now. Database::SyncGuard and company are replaced by corresponding Attachment::XXX classes. &lt;br /&gt;&lt;br /&gt;To make AST's work we need to release attachment mutex sometimes. This is very  important change after v2.5 : in v2.5 attachment mutex is locked during whole  duration of API call and no other API call (except of asyncronous fb_cancel_operation) could work with "busy" attacment. In V3 this rule is not worked anymore. So, now we could run more that one API call on the same attachment (of course not really simultaneously). I'm not sure it is safe but not disabled it so far. &lt;br /&gt;&lt;br /&gt;To make asyncronous detach safe I introduced att_use_count counter which is incremented each time when API call is entered and decremented on exit. detach now marks attachment as shutdown and waits for att_use_count == 0 before processing.&lt;br /&gt;&lt;br /&gt;Parallel access to the attachment could be easy disabled making every API call wait for att_use_count == 0 on enter or even introducing one more mutex to avoid spin wait. &lt;br /&gt;&lt;br /&gt;Also it seems this counter make obsolete att_in_use member as detach call should wait for att_use_count == 0 and drop call should return "object is in use" if att_use_count != 0.&lt;br /&gt;&lt;br /&gt;All AST's related to attachment-level objects should take attachment mutex before access attachment internals. This is implemented but not tested!&lt;br /&gt;&lt;br /&gt;Transaction inventory pages cache (TIP cache) was reworked and is shared by all attachments.&lt;br /&gt;&lt;br /&gt;To avoid contention on common dbb_pool its usage was replaced by att_pool when possible. To make this task slightly easy there was introduced jrd_rel::rel_pool which points currently to the attachment's pool. All relation's "sub-objects" (such as formats, fields, etc) is allocated using rel_pool (it was dbb_pool before). When we'll return metadata objects back to the Database it will be easy to redirect rel_pool to dbb_pool at one place in code instead of makeing tens of small changes again.&lt;br /&gt;&lt;br /&gt;About stability testing of different parts of the engine:&lt;br /&gt;- page cache - tested and worked&lt;br /&gt;- nbackup - tested and worked&lt;br /&gt;- monitoring - tested (less) and seems worked&lt;br /&gt;- server stop\database shutdown - somewhat tested, no crash observed, client reaction is not perfect (mostly network write errors)&lt;br /&gt;- shadow - not tested&lt;br /&gt;- metadata changes in concurrent environment - not tested&lt;br /&gt;- garbage collection thread - not tested, needs review and rework of some &lt;br /&gt;&lt;br /&gt;implementation details&lt;br /&gt;- cache writer thread - not tested, needs review and rework &lt;br /&gt;- external connections - not tested&lt;br /&gt;- external engines - not tested&lt;br /&gt;&lt;br /&gt;In configuration file there are two new settings :&lt;br /&gt;a) SharedCache - boolean value which rules the page cache mode&lt;br /&gt;b) SharedDatabase - boolean value which which rules the database file open mode.&lt;br /&gt;&lt;br /&gt;Currently they are common (as whole configuration) but soon it will be per-database settings. Below is few examples of how it could be used :&lt;br /&gt;&lt;br /&gt;- SharedCache = true, SharedDatabase = false (default mode)&lt;br /&gt;this is traditional SuperServer mode when all attachments share page cache and database file is opens in exclusive mode (only one server process could work with database)&lt;br /&gt;&lt;br /&gt;- SharedCache = false, SharedDatabase = true&lt;br /&gt;this is Classic mode when each attachment have its own page cache and many server processes could work with the same database.&lt;br /&gt;&lt;br /&gt;To run SuperClassic you should use switch -m in command line of firebird.exe (on Windows) or run fb_smp_server (on Posix, here i'm not sure and Alex will correct me)&lt;br /&gt;&lt;br /&gt;Else ClassicServer will run.&lt;br /&gt;&lt;br /&gt;- SharedCache = true, SharedDatabase = true&lt;br /&gt;this is completely new mode in which database file could be opened by many server processes and each process could handle many attachments which will share page cache (i.e. per-process page cache).&lt;br /&gt;&lt;br /&gt;It could be used to run few SS processes, for example, or to run "main" SS process and have ability to attach using embedded to make some special tasks.&lt;br /&gt;&lt;br /&gt;Must note that our lock manager is not ready to work in this mode, so we can't use it right now.&lt;br /&gt;&lt;br /&gt;Also there is unknown how performance will be affected when few SS with big cache will work with the same database.&lt;br /&gt;&lt;br /&gt;- SharedCache = false, SharedDatabase = false&lt;br /&gt;Looks like single process with single attachment will be allowed to work with  database with such settings. Probably you can find an applications for it ;)&lt;br /&gt;&lt;br /&gt;One more change in configuration is that CpuAffinityMask setting changed its default value and it is 0 now. It allows new SS to use all available CPU's\cores by default.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-4037932351614890138?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/4037932351614890138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=4037932351614890138' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4037932351614890138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4037932351614890138'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2011/05/firebird-30-shared-page-cache.html' title='Firebird 3.0 - Shared Page Cache'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-8851696661333113484</id><published>2011-03-31T07:19:00.000-07:00</published><updated>2011-03-31T07:21:10.804-07:00</updated><title type='text'>OAT and MON$</title><content type='html'>Just as a "for your information", should anybody be interested. &lt;br /&gt;The following query on Firebird V2.x gets the attachment that holds the oldest active transaction via the monitoring tables. &lt;br /&gt;&lt;br /&gt;SELECT *&lt;br /&gt;FROM MON$ATTACHMENTS&lt;br /&gt;where MON$ATTACHMENT_ID =&lt;br /&gt; (select MON$ATTACHMENT_ID FROM MON$TRANSACTIONS&lt;br /&gt;  where MON$TRANSACTION_ID =&lt;br /&gt;  (SELECT min(MON$TRANSACTION_ID) FROM MON$TRANSACTIONS))&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-8851696661333113484?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/8851696661333113484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=8851696661333113484' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/8851696661333113484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/8851696661333113484'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2011/03/oat-and-mon.html' title='OAT and MON$'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-3794952777232947011</id><published>2011-03-31T02:12:00.000-07:00</published><updated>2011-03-31T02:45:28.780-07:00</updated><title type='text'>HPUX Oracle and Itanium</title><content type='html'>The &lt;a href="http://www.oracle.com/us/corporate/press/346696"&gt;announcement&lt;/a&gt; by Oracle last week that it will stop developing software for the Itanium processor will affect users of Oracle on HPUX Integrity servers. No surprise then that we see the following blog post - &lt;a href="http://blogs.enterprisedb.com/2011/03/28/oracle-abandoning-hp-ux/"&gt;Oracle is abandoning HP-UX customers…Fight back!&lt;/a&gt; from Ed Boyajian the CEO of EnterpriseDB suggesting that users should consider migrating to their version of PostgreSQL, even though as he admits PostgreSQL has not supported the HP-UX platform very well, but that is now going to change.&lt;br /&gt;&lt;br /&gt;For those who are curious, Firebird V2.5 builds just fine on Itanium HPUX (IA-64). See prefix.hpux_aCC and prefix.hpux_ia64 in the builds/posix directory. The only issue we have in providing such builds, is access to the relevant hardware/operating system to do a build, and bringing upto date the HPUX installer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-3794952777232947011?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/3794952777232947011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=3794952777232947011' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/3794952777232947011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/3794952777232947011'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2011/03/hpux-oracle-and-itanium.html' title='HPUX Oracle and Itanium'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-4278564987549648426</id><published>2011-02-09T02:57:00.000-08:00</published><updated>2011-02-09T03:05:47.491-08:00</updated><title type='text'>Forced Writes?</title><content type='html'>Forced Writes are turned ON by default on Windows since the release of Firebird V1.0.&lt;br /&gt;&lt;br /&gt;See the following item on the tracker: &lt;a href="http://tracker.firebirdsql.org/browse/CORE-591"&gt;CORE-591&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;But Forced Writes were OFF on Linux even if they were turned ON, until an issue with Linux (Posix) was resolved in Firebird V2.1 Beta 2 and this fix has now also ben backported to Firebird V2.0.4.&lt;br /&gt;&lt;br /&gt;See the following item on the tracker: &lt;a href="http://tracker.firebirdsql.org/browse/CORE-1476"&gt;CORE-1476&lt;/a&gt;  &lt;br /&gt;&lt;br /&gt;There was some discussion amongst the Firebird developers about the change (either to OFF on Win or to ON on Linux so we would have consistent defaults), but so far there has not been a final resolution since Windows and Linux handle I/O differently, and its perfectly valid to have different default settings. Before the fix in Firebird V2.1 Linux never did forced writes even when asked to, and pretty much everybody got used to the performance with Forced Writes off, when we turned them back on correctly the performance decrement was definitely going to be a problem. &lt;br /&gt;&lt;br /&gt;Basically, Linux writes pages out of the page cache as often as possible, so the file on disk stays pretty much current, whilst Windows writes to disk only when it must, so the difference between the disk and cache pre Firebird V1.5 could be enormous - hours or days of changes if the database file was not closed correctly.  So, although it may be preferable that all systems should run with forced writes on, for Firebird on Windows it was pretty critical. &lt;br /&gt;&lt;br /&gt;Within Firebird V1.5 we attempted to make sure that the issue of Windows cache, the Firebird cache and what was on disk could not be vastly different even if Forced Writes were turn off by introducing the following two parameters in the Firebird configuration file. However the new parameters do not guarentee complete consistency between the cache and disk, for that you do need Forced Writes turned on.&lt;br /&gt; &lt;br /&gt;The parameters: &lt;br /&gt;&lt;br /&gt;# ----------------------------&lt;br /&gt;#&lt;br /&gt;# How often the pages are flushed on disk&lt;br /&gt;# (for databases with ForcedWrites=Off only)&lt;br /&gt;#&lt;br /&gt;# Number of unflushed writes which will accumulate before they are&lt;br /&gt;# flushed, at the next transaction commit.  For non-Win32 ports,&lt;br /&gt;# the default value is -1 (Disabled)&lt;br /&gt;#&lt;br /&gt;# Type: integer&lt;br /&gt;#&lt;br /&gt;#MaxUnflushedWrites = 100&lt;br /&gt;&lt;br /&gt;#&lt;br /&gt;# Number of seconds during which unflushed writes will accumulate&lt;br /&gt;# before they are flushed, at the next transaction commit. For non-Win32&lt;br /&gt;# ports, the default value is -1 (Disabled)&lt;br /&gt;#&lt;br /&gt;# Type: integer&lt;br /&gt;#&lt;br /&gt;#MaxUnflushedWriteTime = 5&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-4278564987549648426?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/4278564987549648426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=4278564987549648426' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4278564987549648426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4278564987549648426'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2011/02/forced-writes.html' title='Forced Writes?'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-7693317643363926303</id><published>2011-02-09T02:06:00.000-08:00</published><updated>2011-02-09T02:32:27.513-08:00</updated><title type='text'>Colissimo - What a joke.</title><content type='html'>If you want to send a package to anywhere in France, La Poste insist that you send it by Colissimo. Colissimo is more "expensive" than normal post, but it has insurance just in case its delivered late, goes missing or whatever you are sending gets broken.&lt;br /&gt;&lt;br /&gt;Recently I sent a couple of Firebird mugs via Colissimo to a customer/Firebird user in France. After receipt and opening of the carefully packed box, the customer found that one of the mugs was cracked. After a brief email exchange he agreed to send me the damaged mug and I would send him a new one. &lt;br /&gt;&lt;br /&gt;Once I had the broken mug, I asked the local post office for the basic repayment for the damaged mug from Colissimo. Their response was to hand me a form to fill in, and suggest I post the completed form direct to Colissimo. OK - job done - now I sit back and wait for them to send me the money for something they had managed to break.&lt;br /&gt;&lt;br /&gt;After a couple of weeks a letter arrives telling me that they are looking into it, two weeks later another letter arrives, this one apologises, and says we cannot pay you the insurance because the reciever of the damaged goods should have filled in the complaint form and not the sender. &lt;br /&gt;&lt;br /&gt;WTF? When you receive damaged goods from someone, what is the first thing you do? &lt;br /&gt;Well, I would have thought, you contact the sender, ask if they want it back and ask for a replacement.... Its then the senders problem to deal with the people he used to send it. &lt;br /&gt;&lt;br /&gt;Not in France it seems. By now we have paid for three lots of Colissimo (send original, send it back, send another) and wasted a whole lot of time. The result - huge profits for Colissimo, zero service for the customer. I now give up and throw the whole lot in the bin. Life is just too short to start aguing with a "fonctionnaire".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-7693317643363926303?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/7693317643363926303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=7693317643363926303' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/7693317643363926303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/7693317643363926303'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2011/02/colissimo-what-joke.html' title='Colissimo - What a joke.'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-1998119611665294252</id><published>2011-02-09T00:58:00.001-08:00</published><updated>2011-02-09T01:07:14.850-08:00</updated><title type='text'>DEC founder Ken Olsen is dead  - Silence at the Mill</title><content type='html'>The Register today contained an &lt;a href="http://www.channelregister.co.uk/2011/02/08/dec_founder_olsen_dead/page2.html"&gt;obituary&lt;/a&gt; to Ken Olsen, the man who created DEC. Reading the article brings back many memories for me. The first computer I worked with in the mid 1980s was a VAX 11/750, along with Dec Professionals. We implemented a distributed accounting system (MAS-M from Hoskyns) for BRS Northern. I then moved to BRS Group where we started writing a more advanced system using the latest DEC software at the time. ACMS, TDMS, RDB etc, I was the DBA responsible for designing and implementing the corporate database. Great times, great memories. I will raise a glass in your memory tonight.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-1998119611665294252?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/1998119611665294252/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=1998119611665294252' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/1998119611665294252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/1998119611665294252'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2011/02/dec-founder-ken-olsen-is-dead-silence.html' title='DEC founder Ken Olsen is dead  - Silence at the Mill'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-4148094904506483564</id><published>2011-01-21T02:53:00.000-08:00</published><updated>2011-01-21T04:51:25.783-08:00</updated><title type='text'>A Quick Start Guide to Index Optimisation</title><content type='html'>Below a Quick Start Guide to index optimisation, courtesy of Pavel Cisar.&lt;br /&gt;&lt;br /&gt;1. Always define ALL integrity constraints: primary, foreign and unique constraints. As this will automatically cover join optimisations.&lt;br /&gt;&lt;br /&gt;2. Define a separate index on EACH column you will use for additional constraints in your queries (eg. WHERE clause filter conditions) that are not covered by point 1.&lt;br /&gt;&lt;br /&gt;3. Update your index statistics regularly as you add/change/delete data in your database. A good general rule is to update statistics as part of your regular database maintenance routine (when you do a backup, sweep etc.), and/or whenever you add/change a quarter of all the rows, once the table is bigger than 10,000 rows.&lt;br /&gt;&lt;br /&gt;4. Once you have a representative sample of real world data in your database, you can then evaluate the usability of the indices to eliminate those that will not help your queries (a worthless index will only slow down your inserts and updates!) and add new composite or expression indices that speed up specific queries.&lt;br /&gt;&lt;br /&gt;5. Useless indices are typically those with low selectivity (few distinct values). Run some queries with filter condition on bad cardinality columns and check whether the optimizer uses the index or not. If the low selectivity index is always/often used with other conditions, you can improve it's selectivity and thus usability by&lt;br /&gt;creating a composite index on columns that are used together for filter conditions instead of independent indices on these columns.&lt;br /&gt;&lt;br /&gt;6. If you always/frequently use a group of columns for filter conditions, a composite index on these columns can boost the query performance, but do it only if you're not satisfied with performance that individual column indices provide.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-4148094904506483564?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/4148094904506483564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=4148094904506483564' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4148094904506483564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4148094904506483564'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2011/01/quick-start-guide-to-index-optimisation.html' title='A Quick Start Guide to Index Optimisation'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-8124470608251314081</id><published>2010-09-06T04:54:00.000-07:00</published><updated>2010-09-06T05:12:47.100-07:00</updated><title type='text'>Promenade - Chezelles - 2010</title><content type='html'>Every first sunday afternoon at 2.00pm in September (except for the year it was cancelled due to a clash with an agricultural show), there is a "promenade gastronomique" (a walk where you taste local produce) at &lt;a href="http://maps.google.co.uk/maps?hl=en&amp;q=chezelles&amp;um=1&amp;ie=UTF-8&amp;sa=N&amp;tab=wl"&gt;Chezelles&lt;/a&gt;. The walk this Sunday was 9km (thankfully because the thermometer was showing 29 degress centigrade in the shade). &lt;br /&gt;&lt;br /&gt;On the walk, we tasted local wines, goats cheese, jams, honey products and beer, and had a great time. &lt;br /&gt;&lt;br /&gt;I have never seen this "walk" advertised, but its very popular. If you are in the area next year at the same time, then it might be worth having a go.&lt;br /&gt;&lt;br /&gt;Cost this year was 4 Euros per person.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-8124470608251314081?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/8124470608251314081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=8124470608251314081' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/8124470608251314081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/8124470608251314081'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2010/09/promenade-chezelles-2010.html' title='Promenade - Chezelles - 2010'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-907136498613956990</id><published>2010-09-02T06:35:00.000-07:00</published><updated>2010-09-02T23:32:34.303-07:00</updated><title type='text'>Stirling EH924 25th/26th July 1943 Essen</title><content type='html'>Its been a while since I posted anything to blog. There are no major reasons as to why I haven't posted, just haven't had anything major or interesting to say. &lt;br /&gt;&lt;br /&gt;However while doing research about my Grandfather's RAF career I came across this comment in the 51 Squadron Operations Record book for the night of the 25th/26th July 1943.&lt;br /&gt;&lt;br /&gt;Details of Sortie on Flight&lt;br /&gt;.... "An aircraft flying immediately behind this Halifax was shot down in the Goch area. Halifax itself however returned to base without incident."&lt;br /&gt;&lt;br /&gt;I was curious as to which aircraft was shot down, and a web search revealed the following on lostbombers.co.uk. The data on that site being taken from William Chorley's &lt;a href="http://www.rafinfo.org.uk/BCWW2Losses/default.htm"&gt;excellent books&lt;/a&gt; about RAF Bomber Command's losses during the Second World War. Note the information on lostbomers.co.uk is out of date and was compiled from William Chorley's books without permission from William or his publishers. &lt;br /&gt;&lt;br /&gt;Stirling EH924 Information&lt;br /&gt;Type    Stirling&lt;br /&gt;Serial Number   EH924&lt;br /&gt;Squadron        620&lt;br /&gt;X1D     QS-B&lt;br /&gt;Operation       Essen&lt;br /&gt;Date 1  25th July 1943&lt;br /&gt;Date 2  26th July 1943&lt;br /&gt;&lt;br /&gt;Further Information&lt;br /&gt;&lt;br /&gt;"Serial Range EH921 - EH961. 41 Stirling Mk.111. Part of a batch of 120 Short S.29 Stirling Mk.111. EH875-EH909; EH921-EH961;&lt;br /&gt;&lt;br /&gt;EH977-EH996; EJ104-EJ127 Mk.111, of which EH897, EH950 and EJ106 were converted to Mk.1V. Delivered by Austin Motors Ltd between Jun43 and Sep43. &lt;br /&gt;Contract No.B982939/39. Delivered to No.32MU 30Jun43, to No.620 Sqdn 11Jul43. &lt;br /&gt;EH924 was one of three No.620 Sqdn Stirlings lost on this operation. See: BF511; EE906. &lt;br /&gt;Airborne 2226 25Jul43 from Chedburgh. Cause of loss not established. Crashed at&lt;br /&gt;Asperden, 3 km from Goch. Those killed were taken for burial in the Stadtfriedhof at Monchengladbach. They have been subsequently re-interred in the Rheinberg War Cemetery. Sgt J.D.Rathbone KIA Sgt J.H.Wallace KIA Sgt R.Wild KIA F/O J.F.Shepherd KIA Sgt J.F.Wells KIA Sgt A.Simons KIA Sgt D.H.Castling RCAF Inj Sgt D.H.Castling was confined to Hospital due injuries. No PoW No.&lt;br /&gt;&lt;br /&gt;No other bomber lost that night crashed anywhere near Goch. So it looks as if EH924 was shot down by a German night-fighter. I hope somebody out there finds this information useful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-907136498613956990?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/907136498613956990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=907136498613956990' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/907136498613956990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/907136498613956990'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2010/09/stirling-eh924-25th26th-july-1943-essen.html' title='Stirling EH924 25th/26th July 1943 Essen'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-2885197375598679013</id><published>2010-04-29T03:48:00.001-07:00</published><updated>2010-04-29T03:48:44.934-07:00</updated><title type='text'>Dell Latitude D800</title><content type='html'>I have an "oldish" laptop, a Dell Latitude D800 to be precise which I have had for a few years. I use it when on the road, and my wife uses it at home. Recently I have had problems turning it on. This morning it refused to start compeletely, some extensive googling for a possible solution, turned up this nugget of information posted by PaxRiverWino on TechRepublic.&lt;br /&gt;&lt;br /&gt;I have copied the information below - just in case it ever goes missing.&lt;br /&gt;&lt;br /&gt;THIS FIXES IT. Dell Latitude 800 no power, no light, does not boot&lt;br /&gt;&lt;br /&gt;Take out the battery and unplug from the AC adapter. Open your computer so you are facing the screen. There is a grey strip behind the keyboard that is about 1 inch on the left and a half inch on the right. It will say LATITUDE|D800 on it. Pry it open on both ends. On the right you will see a plug in device. Remove it from being seated and then reseat it. Replace the strip. I'll bet you that is all it takes.&lt;br /&gt;&lt;br /&gt;PaxRiverWino - too right - This did indeed fix it!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-2885197375598679013?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/2885197375598679013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=2885197375598679013' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/2885197375598679013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/2885197375598679013'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2010/04/dell-latitude-d800_29.html' title='Dell Latitude D800'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-148406208019072414</id><published>2010-02-12T00:45:00.000-08:00</published><updated>2010-02-12T00:47:07.396-08:00</updated><title type='text'>More detailed query plans, part 2 (textual output)</title><content type='html'>Posted by Dimitry to the Firebird Developer List&lt;br /&gt;&lt;br /&gt;Getting back to this subject, I'd like to discuss possible textual formats for the structured query plans.&lt;br /&gt;&lt;br /&gt;Below is a sample query used to demonstrate the idea (taken from the TPC-R suite):&lt;br /&gt;&lt;br /&gt;select first 10&lt;br /&gt;   l_orderkey,&lt;br /&gt;   sum(l_extendedprice * (1 - l_discount)) as revenue,&lt;br /&gt;   o_orderdate,&lt;br /&gt;   o_shippriority&lt;br /&gt;from&lt;br /&gt;   customer,&lt;br /&gt;   orders,&lt;br /&gt;   lineitem&lt;br /&gt;where&lt;br /&gt;   c_mktsegment = 'BUILDING'&lt;br /&gt;   and c_custkey = o_custkey&lt;br /&gt;   and l_orderkey = o_orderkey&lt;br /&gt;   and o_orderdate &lt; date '1995-03-15'&lt;br /&gt;   and l_shipdate &gt; date '1995-03-15'&lt;br /&gt;group by&lt;br /&gt;   l_orderkey,&lt;br /&gt;   o_orderdate,&lt;br /&gt;   o_shippriority&lt;br /&gt;order by&lt;br /&gt;   2 desc,&lt;br /&gt;   o_orderdate;&lt;br /&gt;&lt;br /&gt;This is a detailed plan output that could be shown for this query. It's based on the current binary access path format:&lt;br /&gt;&lt;br /&gt;SELECT&lt;br /&gt;   -&gt; FIRST N&lt;br /&gt;     -&gt; SORT&lt;br /&gt;       -&gt; AGGREGATE&lt;br /&gt;         -&gt; SORT&lt;br /&gt;           -&gt; LOOP JOIN (INNER)&lt;br /&gt;             -&gt; FILTER&lt;br /&gt;               -&gt; TABLE [ORDERS] ACCESS BY DBKEY&lt;br /&gt;                 -&gt; BITMAP&lt;br /&gt;                   -&gt; INDEX [ORDERS_ORDERDATE] SCAN&lt;br /&gt;             -&gt; FILTER&lt;br /&gt;               -&gt; TABLE [CUSTOMER] ACCESS BY DBKEY&lt;br /&gt;                 -&gt; BITMAP&lt;br /&gt;                   -&gt; INDEX [CUSTOMER_PK] SCAN&lt;br /&gt;             -&gt; FILTER&lt;br /&gt;               -&gt; TABLE [LINEITEM] ACCESS BY DBKEY&lt;br /&gt;                 -&gt; BITMAP&lt;br /&gt;                   -&gt; INDEX [LINEITEM_PK] SCAN&lt;br /&gt;&lt;br /&gt;In fact, it's the real output which works in my private tree for a couple of months already, but I don't insist on the representation (inspired by Oracle and PGSQL), so feel free to criticize.&lt;br /&gt;&lt;br /&gt;As soon as we have the new binary access path format (discussed in part 1) implemented, the output could look like this (just an example):&lt;br /&gt;&lt;br /&gt;SELECT&lt;br /&gt;[cost: 360000, rows: 10]&lt;br /&gt;   -&gt; FIRST N (100)&lt;br /&gt;      [cost: 360000, rows: 10]&lt;br /&gt;     -&gt; SORT (&lt;expr&gt; DESC, o_orderdate ASC)&lt;br /&gt;        [cost: 360000, rows: 100]&lt;br /&gt;       -&gt; AGGREGATE (SUM)&lt;br /&gt;          [cost: 350000, rows: 100]&lt;br /&gt;         -&gt; SORT (l_orderkey ASC, o_orderdate ASC, o_shippriority ASC)&lt;br /&gt;            [cost: 300000, rows: 75000]&lt;br /&gt;           -&gt; LOOP JOIN (INNER)&lt;br /&gt;              [cost: 150100, rows: 75000]&lt;br /&gt;             -&gt; FILTER (o_orderdate &lt; date '1995-03-15')&lt;br /&gt;                [cost: 75050, rows: 75000]&lt;br /&gt;               -&gt; TABLE [ORDERS] ACCESS BY DBKEY&lt;br /&gt;                  [cost: 75050, rows: 75000]&lt;br /&gt;                 -&gt; BITMAP&lt;br /&gt;                    [cost: 50]&lt;br /&gt;                   -&gt; INDEX [ORDERS_ORDERDATE] RANGE SCAN&lt;br /&gt;                      [cost: 50, used segments: 1]&lt;br /&gt;     etc&lt;br /&gt;&lt;br /&gt;Another question I'd like to raise is the API to get the textual plan representation. fb_info_sql_access_path is expected to return the binary access path. We could have another tag e.g. fb_info_sql_access_path_as_text which works similar the current isc_info_sql_plan, i.e. performs the transformation on the server.&lt;br /&gt;&lt;br /&gt;Another option could be to follow the fb_interpret() way and offer a client-side (actually, Y-valve) API call which would perform the binary-to-text conversion. The latter approach may look unreliable in the case of client/server version mismatch, but the worst possible thing for the client would be to get a reduced plan with unknown items printed as e.g. &lt;UNKNOWN ACCESS METHOD&gt;.&lt;br /&gt;&lt;br /&gt;Comments?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-148406208019072414?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/148406208019072414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=148406208019072414' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/148406208019072414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/148406208019072414'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2010/02/more-detailed-query-plans-part-2.html' title='More detailed query plans, part 2 (textual output)'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-8887478779749979684</id><published>2010-02-12T00:38:00.000-08:00</published><updated>2010-02-12T00:42:04.850-08:00</updated><title type='text'>RFC: Concept of the stored table/index statistics</title><content type='html'>Dimitry posted the following for discussion to the Firebird developers list.&lt;br /&gt;&lt;br /&gt;Currently, the only stored statistical information is the index selectivity (per segment since ODS11). Number of records (aka cardinality) in tables is estimated using the number of data pages and table format size (aka table width). This information is far not enough to allow the optimizer making good decisions.&lt;br /&gt;&lt;br /&gt;From another side, we have GSTAT which returns much more information which is very useful by itself (to DBA or developer) but which could also be used by the optimizer. And v3.0 is already offering even more details in the GSTAT output.&lt;br /&gt;&lt;br /&gt;I was thinking about combining these two approaches together.&lt;br /&gt;&lt;br /&gt;In the proposed new world, statistics would be stored inside the database in a binary form (read: as a blob) along with its header which includes: format version number, timestamp of its collection and probably some other fields. We could offer a built-in blob filter which translates the binary data into the textual form (e.g. looking like the GSTAT output).&lt;br /&gt;&lt;br /&gt;It would contain all the data that GSTAT is currently able to report and even more, surely extensible in the future. It would consist of two parts: table statistics (complete -- including fields statistics, or reduced -- without fields) and index statistics (perhaps also in complete and reduced form, where complete one would contain e.g. value distribution histograms). I'd store them in RDB$RELATIONS.RDB$STATISTICS and RDB$INDICES.RDB$STATISTICS but the latter name is already in use. RDB$STAT_INFO? A separate table?&lt;br /&gt;&lt;br /&gt;The optimizer would use that stored statistics to find better execution plans. If the statistics is considered being invalid/outdated, it could default to some simpler calculations, like the ones used currently, or it could still use the outdated statistics. There may be different rules for such a consideration, e.g. number of records in the stats vs the quick estimation based on data pages, or too old timestamp, or too big mismatch between the estimated cost and the real one calculated at runtime, etc. Threshold values could be configurable per database. An &lt;br /&gt;invalid/outdated statistics would also trigger its re-calculation in the &lt;br /&gt;background.&lt;br /&gt;&lt;br /&gt;GSTAT gets new switches that would be used to:&lt;br /&gt;&lt;br /&gt;(a) re-collect the statistics from disk and show it (as it works now)&lt;br /&gt;(b) re-collect the statistics from disk and store it in the database&lt;br /&gt;(c) show the statistics stored currently&lt;br /&gt;(d) invalidate the stored statistics thus forcing a delayed re-scan&lt;br /&gt;&lt;br /&gt;I'm not sure whether the default behaviour should be legacy (a) or (c).&lt;br /&gt;&lt;br /&gt;It also gets sub-options that could control the level of details we need: only table level, including columns, including histograms, etc.&lt;br /&gt;&lt;br /&gt;We could also add appropriate SQL commands to the engine, e.g.:&lt;br /&gt;&lt;br /&gt;SET STATISTICS [FOR] {TABLE | INDEX} &lt;name&gt; [options]&lt;br /&gt;DROP STATISTICS [FOR] {TABLE | INDEX} &lt;name&gt; [options]&lt;br /&gt;&lt;br /&gt;or:&lt;br /&gt;&lt;br /&gt;ALTER TABLE {SET | DROP} STATISTICS [options]&lt;br /&gt;ALTER INDEX {SET | DROP} STATISTICS [options]&lt;br /&gt;ALTER DATABASE {SET | DROP} STATISTICS [options]&lt;br /&gt;&lt;br /&gt;or whatever. The current SET STATISTICS INDEX &lt;index name&gt; could be kept intact for backward compatibility or adapted to the new semantics.&lt;br /&gt;&lt;br /&gt;Only table owners and DBA would be allowed to update/reset the stored statistics.&lt;br /&gt;&lt;br /&gt;As you can see, there are many details that deserve discussions. I've intentionally omitted kinds of statistical values that might be stored and how they could be used.&lt;br /&gt;&lt;br /&gt;But before going into the details, I'd like to have a basic feedback whether it's considered being a good concept or not.&lt;br /&gt;&lt;br /&gt;I don't pretend to have the entire work completed any time soon, but I'd do my best in setting up the core infrastructure (which could later evolve into something wider) in v3.0.&lt;br /&gt;&lt;br /&gt;Comments please.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-8887478779749979684?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/8887478779749979684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=8887478779749979684' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/8887478779749979684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/8887478779749979684'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2010/02/rfc-concept-of-stored-tableindex.html' title='RFC: Concept of the stored table/index statistics'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-4403784353557764194</id><published>2010-02-08T00:39:00.000-08:00</published><updated>2010-02-08T00:49:14.892-08:00</updated><title type='text'>Type 7 database pages and Firebird 2.x</title><content type='html'>Norman Dunbar posted the following on the Firebird Development list:&lt;br /&gt;&lt;br /&gt;"I'm documenting the internal page formats of a database for the Doc project. I've checked in (to cvs) the document so far, but obviously a half finished document is no good in real life. To this end, I have a couple of questions on the internal formats of the type 7 database pages for Firebird 2.x, if you don't mind:&lt;br /&gt;&lt;br /&gt;As before I have read Ann's (1.5?) documentation over at IBPhoenix/R&amp;D, however, Firebird 2 seems to have changed things (slightly).&lt;br /&gt;&lt;br /&gt;What compression is used in the page/btree_nod entries? I've got a database with a couple of known entries and I cannot decode the btree_nods sensibly. Happy to be pointed at the appropriate code file in the source.&lt;br /&gt;&lt;br /&gt;Is there a difference in the page layout at all if the page I'm examining is not a leaf page?  (btr_level  != 0)"&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Dimitry Yemanov replied.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;"This isn't going to be easy to answer, as the page layout is much different between ODS10 and ODS11.&lt;br /&gt;&lt;br /&gt;In all ODS incarnations, prefix compression is used for index keys. It means that the first key is stored "as is" and subsequent keys are stored as "deltas" represented by three values: &lt;br /&gt;(1) length of the data that should be taken from the prior key (aka prefix), &lt;br /&gt;(2) length of the data that is stored in our key (aka suffix), and &lt;br /&gt;(3) the suffix itself which length is described by (2).&lt;br /&gt;&lt;br /&gt;In ODS11, key internals (prefix length, suffix length, page number, record number) are also kinda compressed to store only the significant part of an appropriate integer value.&lt;br /&gt;&lt;br /&gt;In ODS10, you'll see them of the fixed size:&lt;br /&gt;&lt;br /&gt;struct btree_nod&lt;br /&gt;{&lt;br /&gt; UCHAR btn_prefix; --&gt; prefix length&lt;br /&gt; UCHAR btn_length; --&gt; suffix length&lt;br /&gt; UCHAR btn_number[4]; --&gt; page or record number&lt;br /&gt; UCHAR btn_data[1]; --&gt; suffix data of btn_length bytes&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;Also, ODS11 has some special flags in the first byte of the index entry which allows to avoid storing prefix/suffix values at all in some cases.&lt;br /&gt;&lt;br /&gt;Relevant source code: jrd/btr.cpp and jrd/btn.cpp.&lt;br /&gt;&lt;br /&gt;&gt; Is there a difference in the page layout at all if the page I'm examining is not a &gt; leaf page?  (btr_level  != 0)&lt;br /&gt;&lt;br /&gt;They're nearly identical. IIRC keys on non-leaf pages contain both page numbers and record numbers.&lt;br /&gt;&lt;br /&gt;Also beware about the jump nodes introduced in ODS11. It's a sparse lookup table (key -&gt; offset) which is stored on the page along with the keys themselves."&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Ann Harrison also replied.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&gt; They're nearly identical. IIRC keys on non-leaf pages contain both page numbers &lt;br /&gt;&gt; and record numbers.&lt;br /&gt;&lt;br /&gt;That's right.  Leaf pages contain nodes that have a header, data - possibly compressed, and the record number of the record that corresponds to the data.  Upper level pages in ODS11 contain nodes that have a header, data, record number that contains that data, and the page number of the lower level page that starts with that&lt;br /&gt;data value.  The reason for "promoting" the record number to the upper level is not to give faster access to the record during a normal search, it's to avoid a garbage collection problem with indexes with lots of duplicates.&lt;br /&gt;&lt;br /&gt;In ODS-10 and earlier, the algorithm for storing duplicates put the newest record first.  So if you stored 100,000 records with the same key value and a generated primary key, the records would be stored in primary key order (more or less) and the index entries would be stored in inverse primary key order.  When you delete&lt;br /&gt;those records, you delete the lowest primary key value first. Unfortunately, the index entry for the key with duplicates will be at the end of the chain of duplicates, so you have to read 99,999 entries before you find the one you want.  &lt;br /&gt;&lt;br /&gt;Then you delete the second record and read 99,998 entries, etc.  It's called&lt;br /&gt;thrashing the cache.&lt;br /&gt;&lt;br /&gt;In ODS-11 and higher, the record number becomes part of the key. Duplicates are stored in record number order.  In effect, every key is unique.&lt;br /&gt;&lt;br /&gt;&gt; Also beware about the jump nodes introduced in ODS11. It's a sparse lookup table &lt;br /&gt;&gt; (key -&gt; offset) which is stored on the page along with the keys themselves.&lt;br /&gt;&lt;br /&gt;Jump nodes are like an index into an index page.  Doesn't seem to make sense, but with pages larger than about 4K, Firebird was spending an inordinate amount of time reading across index pages - reading on average 1/2 the page size at each level.  Jump nodes reduce the average read to about 500 bytes. As it turns out, the optimal size for an index page is different from the optimal size for data and jump nodes are a way of getting the best performance for both.&lt;br /&gt;&lt;br /&gt;Note that systems that don't compress keys can use a binary search on an index page, so the size of an index page doesn't matter as much.  On the other hand, they pay for that binary search in I/O.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-4403784353557764194?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/4403784353557764194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=4403784353557764194' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4403784353557764194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4403784353557764194'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2010/02/type-7-database-pages-and-firebird-2x.html' title='Type 7 database pages and Firebird 2.x'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-8293201188992273377</id><published>2010-02-05T01:46:00.000-08:00</published><updated>2010-02-05T02:01:50.006-08:00</updated><title type='text'>Solaris, Firebird and Robust Mutexes</title><content type='html'>We have a large Firebird user on Solaris who noticed the following problem with the cuurent Solaris build (pre 2.1.4)&lt;br /&gt;&lt;br /&gt;"If there are a bunch of fb_inet_servers running (or any other app like isql, Gpre type apps etc), then it is possible to kill one or more of these processes and hang up all the rest.&lt;br /&gt;&lt;br /&gt;I suspect (hunch only) that some mutex or other has been created, and the killed processes can't release it...&lt;br /&gt;&lt;br /&gt;The easiest way to get the problem to appear is to create 100 or so busy processes, and to start killing them until the problem appears.&lt;br /&gt;&lt;br /&gt;Be nice if you had an idea of how to sort this.."&lt;br /&gt;&lt;br /&gt;Cue conversation with Alex about the issue.&lt;br /&gt;&lt;br /&gt;"This is known issue, though we have never been able to reproduce it, except using a debugger to stop in particular place and then kill the process. If some process locks a global mutex in the lock (or event) manager, and for some reason (e.g kill) the process dies when the mutex is still locked, then the mutex remains locked&lt;br /&gt;forever. Non SolarisMT ports (like Linux or HPUX) do not have this problem. &lt;br /&gt;&lt;br /&gt;The problem is solved in Firebird V2.5 and I think we can backport it to older versions, because it's well localized (related to mutex initialization), and it also seems it requires Solaris 10, but I am not sure whether the required system calls are present in the base release or whether an upgrade is required." &lt;br /&gt;&lt;br /&gt;For reference - this is the code in Firebird 2.5, that fixes the issue:&lt;br /&gt;&lt;br /&gt;#ifdef HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL&lt;br /&gt;        int protocolRc = pthread_mutexattr_setprotocol(&amp;mattr,&lt;br /&gt;      PTHREAD_PRIO_INHERIT);&lt;br /&gt;        if (protocolRc &amp;&amp; (protocolRc != ENOTSUP))&lt;br /&gt;        {&lt;br /&gt;            iscLogStatus("Pthread Error", (Arg::Gds(isc_sys_request) &lt;&lt;&lt;br /&gt;                "pthread_mutexattr_setprotocol" &lt;&lt;&lt;br /&gt;    Arg::Unix(protocolRc)).value());&lt;br /&gt;        }&lt;br /&gt;#endif&lt;br /&gt;#ifdef USE_ROBUST_MUTEX&lt;br /&gt;        LOG_PTHREAD_ERROR(pthread_mutexattr_setrobust_np(&amp;mattr,&lt;br /&gt;      PTHREAD_MUTEX_ROBUST_NP));&lt;br /&gt;#endif&lt;br /&gt;(this is mutex init code) and&lt;br /&gt;&lt;br /&gt;#ifdef USE_ROBUST_MUTEX&lt;br /&gt;    if (state == EOWNERDEAD)&lt;br /&gt;    {&lt;br /&gt;        // We always perform check for dead process&lt;br /&gt;        // Therefore may safely mark mutex as recovered&lt;br /&gt;        LOG_PTHREAD_ERROR(pthread_mutex_consistent_np(mutex-&gt;mtx_mutex));&lt;br /&gt;        state = 0;&lt;br /&gt;    }&lt;br /&gt;#endif&lt;br /&gt;&lt;br /&gt;(this is checked if the mutex lock returns an error)&lt;br /&gt;&lt;br /&gt;To make sure we can use this code Solaris must support the PTHREAD_MUTEX_ROBUST_NP attribute.&lt;br /&gt;&lt;br /&gt;The answer to this is yes - Solaris &lt;a href="http://docs.sun.com/app/docs/doc/816-5137/sync-103?a=view"&gt;does support it&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;So we backported the relevant code and started the build only to find the following compile error&lt;br /&gt;&lt;br /&gt;../src/jrd/isc_sync.cpp: In function 'int ISC_mutex_init(mtx*, SLONG)':&lt;br /&gt;../src/jrd/isc_sync.cpp:3026: error: 'LOCK_ROBUST' was not declared in this &lt;br /&gt;scope&lt;br /&gt;../src/jrd/isc_sync.cpp: In function 'int ISC_mutex_lock(mtx*)':&lt;br /&gt;../src/jrd/isc_sync.cpp:3049: error: 'mutex_consistent' was not declared in &lt;br /&gt;this scope&lt;br /&gt;&lt;br /&gt;To fix this you need to upgrade to libc version SUNW_1.23 as this was implemented in 2008 sometime.. see this &lt;a href=" http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6697344"&gt;link&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-8293201188992273377?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/8293201188992273377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=8293201188992273377' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/8293201188992273377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/8293201188992273377'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2010/02/solaris-and-robust-mutexes.html' title='Solaris, Firebird and Robust Mutexes'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-1717913606731057474</id><published>2010-01-19T02:04:00.001-08:00</published><updated>2010-01-19T02:18:26.346-08:00</updated><title type='text'>Stoves</title><content type='html'>Thats both a cooker and a maker of them. Follow this &lt;a href="http://www.stoves.co.uk/"&gt;link&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I bought a Stoves 700DFD0 cooker, gas hob, grill, double oven in December 2003, and paid quite a chunk of money for it. seven years on, I would like my money back. Never will I purchase anything from Stoves again.&lt;br /&gt;&lt;br /&gt;The top oven/grill of my Stoves freestanding double oven has now broken down / stopped working for the third time in four years, each time the same problem and the replacement of the same part, the thermostat. On previous occasions we have a, got a repair company to fix it, b ordered the part ourself, and got a friend to fix it, and finally this time after it failed after nine monthes we got our electrician/repair man, who is a good friend, to speak directly to them and try and find what was going on. It seems that this part has now been replaced by a new design, not because it keeps breaking down, just because ...it has.&lt;br /&gt;&lt;br /&gt;So we ordered the new part directly from Stoves and he came round to repair the cooker. The new part we had been sent is also faulty. As is the replacement part (new thermostat) for the main oven (which currently has the endearing, if somewhat dangerous habit, of turning itself on when it feels like it).&lt;br /&gt;&lt;br /&gt;Other issues, besides the fact it breaks down on a regular basis. The stainless steel hob gets stained by any burnt food and is uncleanable. Gas Burners which don't sit properly and hence won't light. Wire cooking racks which no longer fit into &lt;br /&gt;their supports. An oven temperature 20 degrees higher than it should be AFTER allowing for the fan and which is hotter at the back than the front. &lt;br /&gt;&lt;br /&gt;So if you want a new cooker, think hard about buying a "Stoves".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-1717913606731057474?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/1717913606731057474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=1717913606731057474' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/1717913606731057474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/1717913606731057474'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2010/01/stoves.html' title='Stoves'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-652717742939271258</id><published>2009-10-26T01:57:00.000-07:00</published><updated>2009-10-26T02:02:01.144-07:00</updated><title type='text'>Physical ODS Changes for ODS 12</title><content type='html'>Posted to the Firebird Development list by Dimitry Yeamanov:&lt;br /&gt;&lt;br /&gt;Below is the initial proposal (to be corrected/extended by others) that &lt;br /&gt;describes the physical ODS changes we'd like to see in ODS 12.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Header page&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;* rework implementation ID to simplify the porting split into endianness and swap_double flags?)&lt;br /&gt;&lt;br /&gt;* deprecate page buffers and sweep interval (in favor of the per-database values defined in .conf)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Pointer page / data page&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;* add "swept" flag&lt;br /&gt;(allows to skip pages that have no dead or backversions, thus improving the GC / sweep performance)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Page inventory page&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;* use its own field instead of common "pag::reserved" (related to the misuse by PAG_allocate() happened in ODS 11.1)&lt;br /&gt;&lt;br /&gt;New page type (bitmap?) to link SCNs to page numbers.&lt;br /&gt;This may noticeably improve the incremental NBackup performance, avoiding reading pages not changed since the last backup.&lt;br /&gt;&lt;br /&gt;Switch from SLONG to ULONG for transaction numbers and page numbers.&lt;br /&gt;&lt;br /&gt;Extend blob length field from ULONG to UINT64 (and maybe allow blob levels higher than 2?).&lt;br /&gt;&lt;br /&gt;Consider better alternative (instead of SQZ) for record compression.&lt;br /&gt;Tests are required. &lt;br /&gt;If not found, extend SQZ for sequences longer than 127 bytes.&lt;br /&gt;&lt;br /&gt;Consider better packing of index key data (record numbers) and compound index keys (described by Jim in fb-architect). &lt;br /&gt;Tests are required.&lt;br /&gt;Extend the ACL format to cover new permission types and objects.&lt;br /&gt;&lt;br /&gt;Additions are welcome, as well as questions/comments re. the &lt;br /&gt;aforementioned items.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-652717742939271258?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/652717742939271258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=652717742939271258' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/652717742939271258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/652717742939271258'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2009/10/physical-ods-changes-for-ods-12.html' title='Physical ODS Changes for ODS 12'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-1104651733527455296</id><published>2009-10-26T01:25:00.001-07:00</published><updated>2009-10-26T02:02:24.371-07:00</updated><title type='text'>System Catalog Additions for ODS 12</title><content type='html'>The following appeared in the Firebird Development List from Dimitry Yemanov:&lt;br /&gt;&lt;br /&gt;Here I'd like to have the possible additions to the system tables &lt;br /&gt;discussed and agreed on. Physical ODS changes will be discussed in a &lt;br /&gt;separate thread. As you understand, the sooner we have it resolved, the &lt;br /&gt;easier it would be to set up the time frame for the v3.0 Alpha release.&lt;br /&gt;&lt;br /&gt;I'll start with my own proposals, expecting others to follow up with &lt;br /&gt;both comments/critique and their own suggestions. The changes already &lt;br /&gt;done by Adriano are not included here.&lt;br /&gt;&lt;br /&gt;RDB$FIELDS&lt;br /&gt;   + RDB$SECURITY_CLASS (standard USAGE privilege for domains)&lt;br /&gt;   + RDB$OWNER_NAME (prohibits altering/dropping domains by non-owners)&lt;br /&gt;&lt;br /&gt;RDB$RELATIONS&lt;br /&gt;   + RDB$STATISTICS (blob with binary statistics for the optimizer)&lt;br /&gt;&lt;br /&gt;RDB$FUNCTIONS&lt;br /&gt;   + RDB$FUNCTION_ID (allows metadata versioning for PSQL functions)&lt;br /&gt;   + RDB$FUNCTION_BLR (BLR of a PSQL function)&lt;br /&gt;   + RDB$VALID_BLR (BLR validation flag)&lt;br /&gt;   + RDB$DEBUG_INFO (debug information)&lt;br /&gt;   + RDB$LEGACY_FLAG (flag indicating whether this function is legacy &lt;br /&gt;UDF style or new style)&lt;br /&gt;   + RDB$SECURITY_CLASS (standard EXECUTE permission for functions)&lt;br /&gt;   + RDB$OWNER_NAME (prohibits altering/dropping functions by non-owners)&lt;br /&gt;&lt;br /&gt;RDB$FUNCTION_ARGUMENTS&lt;br /&gt;   + RDB$ARGUMENT_NAME (input argument name)&lt;br /&gt;   + RDB$FIELD_SOURCE (reference to a domain describing argument)&lt;br /&gt;   + RDB$DEFAULT_SOURCE (default value for argument)&lt;br /&gt;   + RDB$DEFAULT_BLR (default value BLR for argument)&lt;br /&gt;   + RDB$COLLATION_ID (collation ID override for argument)&lt;br /&gt;   + RDB$NULL_FLAG (null flag override for argument)&lt;br /&gt;   + RDB$ARGUMENT_MECHANISM (full domain or TYPE OF)&lt;br /&gt;   + RDB$FIELD_NAME (field name for TYPE OF)&lt;br /&gt;   + RDB$RELATION_NAME (relation name for TYPE OF)&lt;br /&gt;&lt;br /&gt;RDB$FILTERS&lt;br /&gt;   + RDB$SECURITY_CLASS (USAGE privilege -- non standard, but probably &lt;br /&gt;useful?)&lt;br /&gt;   + RDB$OWNER_NAME (prohibits altering/dropping filters by non-owners)&lt;br /&gt;&lt;br /&gt;RDB$GENERATORS&lt;br /&gt;   + RDB$START_VALUE (start value per SQL standard)&lt;br /&gt;   + RDB$INCREMENT_VALUE (increment value per SQL standard)&lt;br /&gt;   + RDB$MIN_VALUE (minimum value per SQL standard)&lt;br /&gt;   + RDB$MAX_VALUE (maximum value per SQL standard)&lt;br /&gt;   + RDB$CYCLE_FLAG (cycle option per SQL standard)&lt;br /&gt;   + RDB$SECURITY_CLASS (allows to have the standard USAGE privilege for &lt;br /&gt;sequences)&lt;br /&gt;   + RDB$OWNER_NAME (prohibits altering/dropping sequences by non-owners)&lt;br /&gt;&lt;br /&gt;RDB$EXCEPTIONS&lt;br /&gt;   + RDB$SECURITY_CLASS (USAGE privilege for exceptions -- non standard, &lt;br /&gt;but probably useful?)&lt;br /&gt;   + RDB$OWNER_NAME (prohibits altering/dropping by non-owners)&lt;br /&gt;&lt;br /&gt;RDB$CHARACTER_SETS&lt;br /&gt;   + RDB$SECURITY_CLASS (standard USAGE privilege)&lt;br /&gt;   + RDB$OWNER_NAME (prohibits altering/dropping by non-owners)&lt;br /&gt;&lt;br /&gt;RDB$COLLATIONS&lt;br /&gt;   + RDB$SECURITY_CLASS (standard USAGE privilege)&lt;br /&gt;   + RDB$OWNER_NAME (prohibits altering/dropping by non-owners)&lt;br /&gt;&lt;br /&gt;As you can see, almost everything shown above is related to either &lt;br /&gt;enhanced metadata security or implementation of PSQL functions.&lt;br /&gt;&lt;br /&gt;I don't pretend to add all the aforementioned functionality in v3.0, &lt;br /&gt;these fields can be reserved until actually used later.&lt;br /&gt;&lt;br /&gt;I have intentionally avoided the "schemas / longer identifiers" topic &lt;br /&gt;here, as IMO it deserves a separate discussion. Is anybody willing to &lt;br /&gt;start it? :-)&lt;br /&gt;&lt;br /&gt;New monitoring tables/fields will also be discussed separately.&lt;br /&gt;&lt;br /&gt;Opinions?&lt;br /&gt;&lt;br /&gt;Adriano, if you intend to switch from UNICODE_FSS to UTF8 in ODS12 &lt;br /&gt;system tables, let's please discuss it as well (here or in a different &lt;br /&gt;thread).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-1104651733527455296?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/1104651733527455296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=1104651733527455296' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/1104651733527455296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/1104651733527455296'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2009/10/system-catalog-additions-in-ods-12.html' title='System Catalog Additions for ODS 12'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-6510940190292019400</id><published>2009-08-24T02:53:00.000-07:00</published><updated>2009-08-24T02:55:19.488-07:00</updated><title type='text'>USE_BLOCKING_THREAD</title><content type='html'>Another interesting email conversation between a developer and Dimitry Yemanov (Firebird core developer) produced this information:&lt;br /&gt;&lt;br /&gt;Q.&lt;br /&gt;What is the intent for the USE_BLOCKING_THREAD?  I see it is enabled for all  configurations except superserver. What is the rationale for that?&lt;br /&gt;&lt;br /&gt;A.&lt;br /&gt;The blocking thread (sometimes referred to as the AST delivery thread) listens for the blocking event notification posted by other processes and calls an appropriate BAST (blocking AST) routine inside the local process. This is necessary to asynchronously release or downgrade locks acquired by the current process but requested by other processes and is a vital part of the lock manager.&lt;br /&gt;&lt;br /&gt;SuperServer doesn't need this feature as it performs direct AST calls from the lock requester to the lock holder (as everybody lives inside a single process).&lt;br /&gt;&lt;br /&gt;The v2.5 embedded engine allows both in-process and cross-process interaction, thus it has the blocking thread enabled. For a single process embedded engine, USE_BLOCKING_THREAD may be undefined.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-6510940190292019400?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/6510940190292019400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=6510940190292019400' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/6510940190292019400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/6510940190292019400'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2009/08/useblockingthread.html' title='USE_BLOCKING_THREAD'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-5355589072870083484</id><published>2009-08-14T03:30:00.001-07:00</published><updated>2009-08-14T03:33:03.017-07:00</updated><title type='text'>Cache flushes to disk and Firebird</title><content type='html'>The following fragment of a message appeared on the Firebird development list. As the question and answer are interesting, I thought I would put it on the blog.&lt;br /&gt;&lt;br /&gt;"If I want to make cache flushes to disk very rare, do I set MaxUnflushedWrites &amp; MaxUnflushedWriteTime to -1 or to some large value? &lt;br /&gt;What other settings adjustments can make table flushes to disk more rare? &lt;br /&gt;Is there any combination of settings that will keep the entire db in cache and never flush it to disk?"&lt;br /&gt;&lt;br /&gt;Dimitry Yemanov answered as follows:&lt;br /&gt;&lt;br /&gt;Forced writes = OFF (at the database level)&lt;br /&gt;MaxUnflushedWrites = -1, &lt;br /&gt;MaxUnflushedWriteTime = -1 (in firebird.conf)&lt;br /&gt;&lt;br /&gt;With these settings, Firebird will never explicitly flush the cache to disk. However, flushes may still be performed by the operating system in the background. I believe you understand that these settings are somewhat risky from the database consistency point of view. There is no way to completely avoid flushes at all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-5355589072870083484?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/5355589072870083484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=5355589072870083484' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/5355589072870083484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/5355589072870083484'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2009/08/cache-flushes-to-disk-and-firebird.html' title='Cache flushes to disk and Firebird'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-9014134503467047354</id><published>2009-07-06T00:13:00.000-07:00</published><updated>2009-07-06T00:15:27.460-07:00</updated><title type='text'>Firebird /Java Plugin Milestone One</title><content type='html'>Posted by Adriano in Firebird Development:&lt;br /&gt;&lt;br /&gt;"I'm pleased to announce availability [1] of the first test version of&lt;br /&gt;FB/Java plugin.&lt;br /&gt;&lt;br /&gt;FB/Java is a plugin for FB external engines feature, to be presented in&lt;br /&gt;v3.0, that allows execution of Java code at the server side. The plugin&lt;br /&gt;allows classes/resources in the file system or stored in the database.&lt;br /&gt;File system classes/resources are global and the code run with all&lt;br /&gt;permissions. Database classes/resources are per-database and code runs&lt;br /&gt;accordingly with per-engine configured security policy.&lt;br /&gt;&lt;br /&gt;The plugin has been made with the assumption that anything could be done&lt;br /&gt;using existing FB infrastructure. You don't need to setup FTP server or&lt;br /&gt;shared directory in the server to update your code or edit security police.&lt;br /&gt;&lt;br /&gt;Installation/update of database JARs works from client command line&lt;br /&gt;utility or from SQLJ package procedures. Actually, the same Java class&lt;br /&gt;that run in the client is the one that runs in the server. You can put&lt;br /&gt;JARs in the database using a Java URL, so lookup of them is not&lt;br /&gt;restricted to client or server.&lt;br /&gt;&lt;br /&gt;Security handling is configured in a central database, with a single&lt;br /&gt;PERMISSION table. Permissions are granted to users that executes the&lt;br /&gt;Java code. This way to configure permissions is not adequate for every&lt;br /&gt;(or most) cases, and roles are not supported at the moment. I suppose&lt;br /&gt;and desire we can have a better design in the future, before a final&lt;br /&gt;release.&lt;br /&gt;&lt;br /&gt;It's welcome any attempt to bypass the security system. But please,&lt;br /&gt;report it. :-)&lt;br /&gt;&lt;br /&gt;This version also lacks some notification mechanism for when the code&lt;br /&gt;are going to be unloaded. You may note the problem in the example, right&lt;br /&gt;after disconnect all attachments from the database the log file remains&lt;br /&gt;locked, as it wasn't been garbaged collected. And no kind of "hot&lt;br /&gt;redeployment" support had been implemented or tested. However, I have&lt;br /&gt;ideas of how these problems can be solved in very good ways, based on&lt;br /&gt;existing models. For unloading (or any other type of notification),&lt;br /&gt;JPA-like listeners. For maintain state after redeployments, serializable&lt;br /&gt;sessions.&lt;br /&gt;&lt;br /&gt;In the file plugins\java-engine\examples\fbjava\README, you found&lt;br /&gt;instructions for a "quick start" with it. In&lt;br /&gt;plugins\java-engine\examples\tests there are functional tests for many&lt;br /&gt;of its feature (i.e., how type mappings works, etc).&lt;br /&gt;&lt;br /&gt;The plugin is based on Jaybird 2.2 (HEAD). I've put it in a maven&lt;br /&gt;repository at [2], with its version defined as 2.2-jrt-SNAPSHOT.&lt;br /&gt;&lt;br /&gt;The server includes my v3.0 changes, supporting packages, DDL triggers,&lt;br /&gt;over clause and some internal changes. It may have others instabilities.&lt;br /&gt;&lt;br /&gt;If you have a JAVA_HOME environment variable defined, it should just&lt;br /&gt;works without any other configuration. The quick start assumes you had&lt;br /&gt;defined FIREBIRD, ISC_USER and ISC_PASSWORD. In [1], I've zipped plugin&lt;br /&gt;and engine together, but plugin installation consists in just unpacking&lt;br /&gt;it in FB directory.&lt;br /&gt;&lt;br /&gt;Documentation has room for improvements, and is at [3]. I've done it&lt;br /&gt;with FB docbook tools.&lt;br /&gt;&lt;br /&gt;Source code is in [4].&lt;br /&gt;&lt;br /&gt;Happy testing and thanks.&lt;br /&gt;Adriano"&lt;br /&gt;&lt;br /&gt;[1] http://www.firebirdsql.org/downloads/rabbits/asfernandes/fbjava/fbjava-m1.zip&lt;br /&gt;[win32]&lt;br /&gt;[2] http://www.firebirdsql.org/downloads/rabbits/asfernandes/maven2&lt;br /&gt;[3] http://www.firebirdsql.org/downloads/rabbits/asfernandes/fbjava/fbjava.pdf&lt;br /&gt;(included in [1])&lt;br /&gt;[4] https://firebird.svn.sourceforge.net/svnroot/firebird/java-plugin/tags/2.2-jrt-M1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-9014134503467047354?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/9014134503467047354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=9014134503467047354' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/9014134503467047354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/9014134503467047354'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2009/07/firebird-java-plugin-milestone-one.html' title='Firebird /Java Plugin Milestone One'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-6693394770114714272</id><published>2009-06-30T00:35:00.001-07:00</published><updated>2009-06-30T00:37:01.070-07:00</updated><title type='text'>IBPhoenix Web Site</title><content type='html'>I need to post a note on my blog about the IBPhoenix Web site, it seems we are having problems with the T1 line. It looks like there is a problem in the central phone office, where our T1 line originates.  It's been a problem now for several days. The issue has been escalated, so hopefully things will improve shortly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-6693394770114714272?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/6693394770114714272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=6693394770114714272' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/6693394770114714272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/6693394770114714272'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2009/06/ibphoenix-web-site.html' title='IBPhoenix Web Site'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-1610496878917323063</id><published>2009-06-25T04:16:00.000-07:00</published><updated>2009-06-25T04:20:34.575-07:00</updated><title type='text'>../src/include/types_pub.h:88: error: conflicting declaration 'typedef int ISC_LONG'</title><content type='html'>Building Firebird 64bit on Solaris (sparc or intel) can sometimes produce the following error:&lt;br /&gt; -c ../src/jrd/dsc.cpp -o ../temp/boot/jrd/dsc.o&lt;br /&gt;../src/include/types_pub.h:88: error: conflicting declaration 'typedef int ISC_LONG'&lt;br /&gt;../src/include/fb_types.h:69: error: 'ISC_LONG' has a previous declaration as 'typedef SLONG ISC_LONG'&lt;br /&gt;../src/include/types_pub.h:89: error: conflicting declaration 'typedef unsigned int ISC_ULONG'&lt;br /&gt;../src/include/fb_types.h:70: error: 'ISC_ULONG' has a previous declaration as 'typedef ULONG ISC_ULONG&lt;br /&gt;&lt;br /&gt;If you see this - then you made a mistake in the build process. Configure.in when you invoked it, assumed that the size of long was 4, and you are attempting to build Firebird for a 32bit environment. As per the prefix.solaris files, you must set the following before running configure:&lt;br /&gt;&lt;br /&gt;export CXXFLAGS='-m64'&lt;br /&gt;export CFLAGS='-m64'&lt;br /&gt;export LDFLAGS='-m64'&lt;br /&gt;&lt;br /&gt;Configure will now automtically realise that you want to build in a 64 bit environment and set the size of long to 8.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-1610496878917323063?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/1610496878917323063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=1610496878917323063' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/1610496878917323063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/1610496878917323063'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2009/06/srcincludetypespubh88-error-conflicting.html' title='../src/include/types_pub.h:88: error: conflicting declaration &apos;typedef int ISC_LONG&apos;'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-251589638249521960</id><published>2009-06-24T23:33:00.001-07:00</published><updated>2009-06-24T23:39:26.537-07:00</updated><title type='text'>Some Positive Feedback for Firebird</title><content type='html'>This message appeared on the Firebird Development list, from Jens Zurawski &lt;br /&gt;&lt;br /&gt;"I think from time to time, one should really send some positive feedback&lt;br /&gt;to the people who are involved into the development of the firebird&lt;br /&gt;DBMS. Thank you very much for your efforts to make this software this good!&lt;br /&gt;&lt;br /&gt;Just before a week or so we eventually upgraded our production server&lt;br /&gt;from linux kernel 2.4 to 2.6.x and the firebird engine from 2.0.x to&lt;br /&gt;2.1.2. As some of you might remember, long time ago we had some big&lt;br /&gt;troubles with kernel 2.6.x and firebird, because our system is under&lt;br /&gt;very heavy contention and we stumbled over many freezes, so we were&lt;br /&gt;stuck to the 2.4.x kernel. (In average there are 75-150 simultaneous&lt;br /&gt;connections to one database, in peak times up to 300. The database is&lt;br /&gt;more than 20GBs in size and is serving for a pool of approx. 7 different&lt;br /&gt;applications, starting from web server (php/java) over some internal&lt;br /&gt;logistics processings (java) up to the CRM front end (Win32 native), and&lt;br /&gt;additionally there are frequent update tasks with long running&lt;br /&gt;transactions (about 10-30 minutes) and massive changes to the database&lt;br /&gt;records in them).&lt;br /&gt;&lt;br /&gt;Now our old database server broke down (hardware problem) and we had to&lt;br /&gt;buy a new one and this time we needed to go for a 2.6.x kernel because&lt;br /&gt;the new hardware was not supported from the old kernel. To my pleasant&lt;br /&gt;surprise, the actual FB 2.1.2 is working very well with a 2.6 kernel and&lt;br /&gt;the heavy contention we still have on our database. Only thing one has&lt;br /&gt;to do is to dramatically increase the semaphores. In the first place we&lt;br /&gt;increased the LockSemCount to 250 (which was the limit of the default&lt;br /&gt;kernel setup) but that wasn't enough. After half of the day firebird&lt;br /&gt;crashed down with a "Fatal lock manager error: semop failed (acquire),&lt;br /&gt;errno: 22", accepted no more new connections and also didn't serve the&lt;br /&gt;existing connections any more. Now after we increased the kernel limit&lt;br /&gt;and set the LockSemCount up to 1024, everything is working very well. No&lt;br /&gt;more freezes, no more crashes. (BTW: ironically this hint I was getting&lt;br /&gt;from a guy who just has collected some experiences with an Oracle&lt;br /&gt;installation on Linux  ;-)&lt;br /&gt;&lt;br /&gt;So, what I want to say: Thanks a lot for all the good work! firebird is&lt;br /&gt;really my most favourite open source project.&lt;br /&gt;&lt;br /&gt;Ah, and the new monitoring tables in FB 2.1 are a gift from heaven! Now&lt;br /&gt;I'm able to track down problems from applications which are not written&lt;br /&gt;by me, because now I can simply monitor hanging transactions or long&lt;br /&gt;running "sub-optimal" queries and send the developer a hint  ;)  Also&lt;br /&gt;thanks a lot for this feature!"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-251589638249521960?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/251589638249521960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=251589638249521960' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/251589638249521960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/251589638249521960'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2009/06/some-positive-feedback-for-firebird.html' title='Some Positive Feedback for Firebird'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-1688865575905133522</id><published>2009-05-07T00:18:00.000-07:00</published><updated>2009-05-07T00:20:08.290-07:00</updated><title type='text'>64 bit Firebird 2.5, and Solaris Sparc</title><content type='html'>Looks like the job is already done... I read the following post on Firebird Development from Bill Oliver (SAS)&lt;br /&gt;&lt;br /&gt;"I confirm that the issues are fixed in HEAD. I confirmed this on 64-bit &lt;br /&gt;Solaris Sparc, built with the Sun Studio native compiler - using pthreads!!!&lt;br /&gt;&lt;br /&gt;"How cool is that! Thanks very much guys for the quick turn-around.&lt;br /&gt;&lt;br /&gt;Also, big thanks to Alex for his assitance with this port!!"&lt;br /&gt;&lt;br /&gt;Excellent work!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-1688865575905133522?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/1688865575905133522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=1688865575905133522' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/1688865575905133522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/1688865575905133522'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2009/05/64-bit-firebird-25-and-solaris-sparc.html' title='64 bit Firebird 2.5, and Solaris Sparc'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-4900601325291653435</id><published>2009-04-22T03:01:00.000-07:00</published><updated>2009-04-22T03:22:11.232-07:00</updated><title type='text'>GCC 4.01 MacOSX &amp; Weak Symbols</title><content type='html'>During the QA process for Firebird V2.1.2 we found that there was a problem with creating a database remotely. In effect the inet server would crash.&lt;br /&gt;&lt;br /&gt;On further analysis we found that we have a problem where the function free()(standard C dynamic memory deallocator) was being invoked with the incorrect parameter, an address which had not been allocated using malloc(). &lt;br /&gt;&lt;br /&gt;After setting up the code to make the inet server call abort we got the following stack trace &lt;br /&gt;&lt;br /&gt;(fragment)&lt;br /&gt;&lt;br /&gt;#0  0x90005efc in free ()&lt;br /&gt;#1  0x010440b8 in Firebird::AbstractString::~AbstractString (this=0xbfffcb04) &lt;br /&gt;at ../src/include/../common/classes/fb_string.h:375&lt;br /&gt;#2  0x010440f8 Firebird::StringBase&lt;Firebird::StringComparator&gt;::~StringBase&lt;br /&gt; (this=0xbfffcb04) at ../src/include/../common/classes/fb_string.h:391&lt;br /&gt;#3  0x0101593c in LD_setup_attributes (textTypeName=0xbfffcd60 "ES_ES", &lt;br /&gt;charSetName=0xbfffccdc "ISO8859_1", &lt;br /&gt;configInfo=0x6a1204 "filename=$(this)/fbintl;icu_versions=default", &lt;br /&gt;srcLen=39, src=0x69a898 "DISABLE-COMPRESSIONS=1;SPECIALS-FIRST=1", &lt;br /&gt;dstLen=512, dst=0xbfffcdb8 "DISABLE-COMPRESSIONS=1;SPECIALS-FIRST=1,") &lt;br /&gt;at ../src/intl/ld.cpp:457&lt;br /&gt;#4  0x3011b1b4 in Jrd::IntlManager::setupCollationAttributes &lt;br /&gt;(collationName=@0xbfffd0e4, charSetName=@0xbfffd0b8, &lt;br /&gt;specificAttributes=@0xbfffd14c, newSpecificAttributes=@0xbfffd178) &lt;br /&gt;at ../src/jrd/IntlManager.cpp:317&lt;br /&gt;&lt;br /&gt;From this back trace you can see that free() is called from the operator delete[], where we would have expected MemoryPool::deallocate() to be used. For some&lt;br /&gt;reason the default operator delete[] is used. &lt;br /&gt;&lt;br /&gt;Strange, how did this code arrive at address 0x010440b8?&lt;br /&gt;&lt;br /&gt;After an analysis of nm output for fbintl and the linker's map of symbols Alex found that at this address is in fact located the redefined operator delete[], which was compiled in via ld.cpp. However in the assembly version of the file (ld.cpp), it was correctly redefined (i.e. it was calling MemoryPool::deallocate()) operator delete[]. &lt;br /&gt;&lt;br /&gt;Houston it looks as if we have a buggy toolchain. &lt;br /&gt;&lt;br /&gt;But we also need to take into account that AbstractString dtor() and operator delete[] are also &lt;span style="font-weight:bold;"&gt;WEAK&lt;/span&gt; symbols. Weak meaning that such symbols may be present in many object files, and the linker at link-time will take it from the relevant one. But in this case it looks as if it was taken from another file... &lt;br /&gt;&lt;br /&gt;But after we compiled into assembler all of the files that are used in the fbintl &lt;br /&gt;library we found that they all contained the correctly redefined operator &lt;br /&gt;delete[]. As such there is no use of operator delete[], calling std free() function in our code, but anyway we get such use in the resulting binary.&lt;br /&gt;&lt;br /&gt;In effect it looks like weak symbols are broken on MacOSX GCC 4.01 (Apple build 5747). And the only way to fix a problem is to avoid them.&lt;br /&gt;&lt;br /&gt;We are currently compiling Firebird on PPC 10.4 (Tiger) using a new switch &lt;span style="font-weight:bold;"&gt;-fno-weak&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;fno-weak:&lt;br /&gt;"Do not use weak symbol support, even if it is provided by the linker. By default, G++ will use weak symbols if they are available. This option exists only for testing, and should not be used by end-users; it will result in inferior code and has no benefits."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-4900601325291653435?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/4900601325291653435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=4900601325291653435' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4900601325291653435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4900601325291653435'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2009/04/gcc-401-macosx-weak-symbols.html' title='GCC 4.01 MacOSX &amp; Weak Symbols'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-5360385850125759720</id><published>2009-04-16T08:07:00.001-07:00</published><updated>2009-04-16T08:26:38.191-07:00</updated><title type='text'>MallocLogFile, MacOSX &amp; LaunchDaemons</title><content type='html'>I have been debugging the fb_inet_server trying to find a problem in Firebird 2.1.2 Classic for PowerPC. That takes a little bit of setting up, but I will try and explain that in another blog post. Part of one of the things that I wanted to check was what malloc was doing. However by default any "error" messages get sent to standard out, however you can set the environment variable MallocLogFile to capture messages to a specified file. But setting that in my normal environment is going to work because the  fb_inet_server is actually launched by the LaunchDaemon and is then also forked. So we need to set the environment variable in the LaunchDaemon script directly.&lt;br /&gt;&lt;br /&gt;The solution: &lt;br /&gt;&lt;br /&gt;You need to edit the xml script that "launches" the fb_inet_server. This file can be found in /Library/LaunchDaemons and is called org.firebird.gds.plist&lt;br /&gt;&lt;br /&gt;First of all unload the current launch definition &lt;br /&gt;&lt;br /&gt;launchctl unload /Library/LaunchDaemons/org.firebird.gds.plist&lt;br /&gt;&lt;br /&gt;Then edit the file as follows&lt;br /&gt;After&lt;br /&gt;&lt;br /&gt;&amp;lt;string&amp;gt;org.firebird.gds&amp;lt;/string&amp;gt;&lt;br /&gt;&lt;br /&gt;Add&lt;br /&gt;&lt;br /&gt;&amp;lt;Key&amp;gt;EnvironmentVariables&amp;lt;/Key&amp;gt;&lt;br /&gt;&amp;lt;dict&amp;gt;&lt;br /&gt;&amp;lt;Key&amp;gt;MallocLogFile&amp;lt/Key&amp;gt;&lt;br /&gt;&amp;lt;String&amp;gt;/Library/Frameworks/Firebird.framework/Malloc.log&amp;lt;/String&amp;gt;&lt;br /&gt;&amp;lt;/dict&amp;gt;&lt;br /&gt;&lt;br /&gt;Save and&lt;br /&gt;&lt;br /&gt;launchctl load /Library/LaunchDaemons/org.firebird.gds.plist&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-5360385850125759720?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/5360385850125759720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=5360385850125759720' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/5360385850125759720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/5360385850125759720'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2009/04/malloclogfile-macosx-launchdaemons.html' title='MallocLogFile, MacOSX &amp;amp; LaunchDaemons'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-4548055528195703061</id><published>2009-03-04T10:23:00.000-08:00</published><updated>2009-03-04T10:27:02.022-08:00</updated><title type='text'>Modern Music</title><content type='html'>The Brits - Hmmm - Not my list of recommended music....&lt;br /&gt;Try listening to:&lt;br /&gt;&lt;br /&gt;1. The Killers (excellent)&lt;br /&gt;2. Editors (good)&lt;br /&gt;3. The View (acquired taste)&lt;br /&gt;&lt;br /&gt;Enjoy&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-4548055528195703061?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/4548055528195703061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=4548055528195703061' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4548055528195703061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4548055528195703061'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2009/03/modern-music.html' title='Modern Music'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-7624468395743113101</id><published>2009-02-23T03:20:00.000-08:00</published><updated>2009-02-23T03:27:02.622-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Bosmere Products'/><category scheme='http://www.blogger.com/atom/ns#' term='Patio Set Covers'/><title type='text'>Bosmere Products Ltd</title><content type='html'>I don't normally do this, but about a month ago I sent the following letter to a company in the UK. I am still waiting for a reply. I am not expecting to receive one, nor do I expect a refund.&lt;br /&gt;&lt;br /&gt;So if anybody out there is googling for Patio Set Covers, and happens to bump into this post...&lt;br /&gt;&lt;br /&gt;We had bought a patio set cover for our patio tables and chairs in November 2008, and covered them up using this cover. By February 2009, the cover was falling apart. &lt;br /&gt;Letter follows.&lt;br /&gt;&lt;br /&gt;Customer Services&lt;br /&gt;Bosmere Products Ltd,&lt;br /&gt;Unit 5  Mitchell Way,&lt;br /&gt;Airport Service Road,&lt;br /&gt;Portsmouth,&lt;br /&gt;PO3 5PR,&lt;br /&gt;England.&lt;br /&gt;&lt;br /&gt;Dear Sir,&lt;br /&gt;&lt;br /&gt;I am writing to express my disappointment with the quality of your 6 seater circular patio set cover.&lt;br /&gt;&lt;br /&gt;I purchased this cover from Chinnor Garden Centre, Chinnor, Oxfordshire for £39.99 on 4th November 2008 while on a short trip to the UK from my home in France.&lt;br /&gt;&lt;br /&gt;Within a week the first of the supposedly heavy duty ties had broken – followed by the other 3 within the next month. Attempts to re-tie the broken cords were useless (they simply snapped again) and now the metal eyelets have ripped away from the plastic cover, now making it impossible to secure the cover even with heavy duty polypropylene rope which I purchased.&lt;br /&gt;&lt;br /&gt;On removing the cover, it is also apparent that large areas of the plastic coating on the inside of the cover have completely worn away and it is no longer waterproof.&lt;br /&gt;We do not live in the Outer Hebrides but south of the Loire valley in France, therefore it has most certainly not been exposed to unusually severe weather here!&lt;br /&gt;It is clear that this product is not fit for purpose – it is marketed as being top quality PVC backed polyester, secure in windy conditions and giving full winter protection – it is obvious that after just two and a half months use that it is none of these.&lt;br /&gt;&lt;br /&gt;As we live in France and very seldom travel to the UK we are unable to return the cover to the place where we purchased it. I would ask you therefore to refund the cost of the cover.&lt;br /&gt;&lt;br /&gt;Yours faithfully&lt;br /&gt;Mr Paul Beach.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-7624468395743113101?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/7624468395743113101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=7624468395743113101' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/7624468395743113101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/7624468395743113101'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2009/02/bosmere-products-ltd.html' title='Bosmere Products Ltd'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-1270051661986278812</id><published>2009-02-13T03:41:00.000-08:00</published><updated>2009-02-13T08:12:00.699-08:00</updated><title type='text'>Daily Telegraph Cryptic No 25851</title><content type='html'>I am a great fan of the Daily Telegraph Cryptic crossword, and have been doing, or attempting to do this crossword, just about every day since I was a student at University. &lt;br /&gt;&lt;br /&gt;I was introduced to it by my Grandmother many years ago, when stayed with her in Banbury. &lt;br /&gt;&lt;br /&gt;"We" (and I use We, advisedly) used to do the crossword when we had breakfast, usually my Grandmother doing the crossword and explaining how things worked, whilst every now and then I would have a eureka moment. Anyway enough digression. &lt;br /&gt;&lt;br /&gt;I found the following web site that specialises in helping people through the Telegraph Cryptic crossword in a way that is much more friendly than normal "specialist" cryptic sites. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://bigdave44.com/2009/02/13/dt-cryptic-no-25851/"&gt;Big Dave's Telegraph Crossword Blog&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For those of you who don't know Libellule, is french for Dragonfly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-1270051661986278812?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/1270051661986278812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=1270051661986278812' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/1270051661986278812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/1270051661986278812'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2009/02/daily-telegraph-cryptic-no-25851.html' title='Daily Telegraph Cryptic No 25851'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-4598179433759941216</id><published>2009-01-30T04:04:00.000-08:00</published><updated>2009-01-30T04:09:09.853-08:00</updated><title type='text'>Memory Utilisation by the Firebird Classic Server</title><content type='html'>The following was posted by Dimitry Yemanov on the Firebird Development list in response to some questions about Memory Usage within Firebird (Classic)&lt;br /&gt;&lt;br /&gt;"Need some help understanding how memory allocation is done per process on Linux 1.5.5 CS. It's understandable that there is some amount of working memory needed to support fb process, plus per connection amount, plus cache depending on database page size and buffer count."&lt;br /&gt;&lt;br /&gt;Per process (independent) memory usage:&lt;br /&gt;- page buffers (40MB in your case)&lt;br /&gt;- metadata cache (cannot be predicted/controlled, depends on the schema complexity, especially number of interdependent PSQL objects)&lt;br /&gt;- sort buffers (turned off by default on Classic, see SortMemUpperLimit in firebird.conf)&lt;br /&gt;- undo log (cannot be predicted/controlled, wastes memory mostly for multiple batch updates in the same transaction)&lt;br /&gt;&lt;br /&gt;Shared memory usage (depends on other connections):&lt;br /&gt;   - lock table (starts with LockMemSize and auto-growing)&lt;br /&gt;   - event table (starts with EventMemSize and auto-growing)&lt;br /&gt;&lt;br /&gt;"What makes me wander is how concurrent user connection count affects memory utilization per process. Somehow the more users we have on the server - the bigger overhead is added per connection. When comparing mem utilization on same database having single connection and 55 for example - utilized memory delta increases by ~33MB. On server having 160 connections it's almost 2-3 times more. Is this lock manager related data? 30MB just for that?"&lt;br /&gt;&lt;br /&gt;The lock manager data is shared, but it's mapped into the address space of the every Classic process. I dunno whether the Linux tools include the mmap'ed memory into the counters you check or not. If so, it gets easy to explain: yes, this increase is caused by the lock table. You can draftly calculate the lock manager memory requirements by this formula:&lt;br /&gt;&lt;br /&gt;number of connections * number of page buffers * 100 bytes. &lt;br /&gt;&lt;br /&gt;The exact size could be found in the output of fb_lock_print (header section) at runtime. With your quite large (for Classic) page cache settings, the numbers should be nearly the same as you experience.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-4598179433759941216?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/4598179433759941216/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=4598179433759941216' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4598179433759941216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4598179433759941216'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2009/01/memory-utilisation-by-firebird-classic.html' title='Memory Utilisation by the Firebird Classic Server'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-3617218671519567301</id><published>2009-01-30T03:58:00.000-08:00</published><updated>2009-01-30T04:02:41.725-08:00</updated><title type='text'>Firebird Trace and Audit Services</title><content type='html'>Posted by Vlad Horsun to the Firebird Development List.&lt;br /&gt;&lt;br /&gt;I am glad to introduce new Firebird facility, based on TraceAPI initially developed by Nickolay Samofatov and maintained and given to us by RedSoft (thanks!).&lt;br /&gt;&lt;br /&gt;Below is brief overview of what was done. It will be included into HEAD soon, I hope.&lt;br /&gt;&lt;br /&gt;Trace session - set of engine-generated events to trace and placement of trace output. Trace session also have its unique ID, optional name, state, flags, creator user and creation timestamp.&lt;br /&gt;&lt;br /&gt;List of available trace events is fixed and determined by the Firebird engine. List of events to trace, which data items to trace and placement of trace output is specified by trace configuration when trace session created.&lt;br /&gt;&lt;br /&gt;There are two kinds of trace sessions: system audit and user trace. System audit session is started by the engine itself and obtains configuration from the text file. This file name is set via new setting in firebird.conf and by default is "none", i.e. no system audit is configured. There may be only one system audit trace session, obviously. Configuration file contains list of traced events and placement of trace log(s). It is very flexible and allows to log different set of events &lt;br /&gt;for different databases into different log files. Example configuration file is attached.&lt;br /&gt;&lt;br /&gt;User trace session is managed by user via Services API. There are five new services for this purposes - to start, stop, suspend, resume trace session and to enlist all known trace sessions.&lt;br /&gt;&lt;br /&gt;When user application starts trace session it passed optional name and (mandatory) session configuration. Session configuration is a text. Rules and syntax the same as for configuration file mentioned above except of log placement. Engine stores output of user session in set of temporary files and deleted it automatically. After application starts user trace session it must read session's output from service (using isc_service_query). When application decide to stop its trace session it just do detach from service. Also user may manage (suspend\resume\stop) any own trace session. Administrator allowed to manage any trace session. &lt;br /&gt;&lt;br /&gt;If user trace session was created by ordinary user it will trace only connections established by this user.&lt;br /&gt;&lt;br /&gt;User trace sessions is not preserved when all Firebird processes is stopped. I.e. if user started trace session and Firebird SS or SC process is shutted down, this session is stopped and will not be restarted with new Firebird process. For CS this is not the case as user trace session can't live without connection with service manager and dedicated CS process.&lt;br /&gt;&lt;br /&gt;There are three main use cases:&lt;br /&gt;&lt;br /&gt;1. Constant audit of engine. &lt;br /&gt;This is served by system audit trace. &lt;br /&gt;&lt;br /&gt;2. On demand interactive trace of some (or all) activity in some (or all) databases. &lt;br /&gt;Application start user trace session and show traced events to user in real time on the screen. User may pause\continue trace and at last stop it.&lt;br /&gt;&lt;br /&gt;3. Aggregate of some activity for a relatively long period of time (few hours or even whole day) to analyse it later.&lt;br /&gt;Application start user trace session and save trace log in file (or set of files). Session must be stopped manually by the same application or by another one. &lt;br /&gt;&lt;br /&gt;Firebird's service manager utility (fbsvcmgr.exe) may be used to manage trace sessions. Later specialized console utility will be introduced (at least i plan to develop it soon after beta). Of course third party vendors are welcome to implement own GUI based monitoring and trace applications.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-3617218671519567301?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/3617218671519567301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=3617218671519567301' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/3617218671519567301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/3617218671519567301'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2009/01/firebird-trace-and-audit-services.html' title='Firebird Trace and Audit Services'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-5049311502580963234</id><published>2008-09-09T00:56:00.000-07:00</published><updated>2008-09-09T03:47:54.457-07:00</updated><title type='text'>InterBase 2009 comes with multicore support</title><content type='html'>I have just read the following news article on SDTimes:&lt;br /&gt;&lt;a href="http://www.sdtimes.com/INTERBASE_2009_COMES_WITH_MULTICORE_SUPPORT/About_DATABASES_and_MULTICORE_and_CODEGEAR_and_EMBARCADERO/32828"&gt;InterBase 2009 comes with multicore support&lt;/a&gt;&lt;br /&gt;A couple of aspects to this story seeme a little peculiar, while some comments require some clarification.&lt;br /&gt;&lt;br /&gt;"Thus the update for InterBase 2009 is relatively subdued" &lt;br /&gt;&lt;br /&gt;correct, I do not see any major new features in this new version, however a couple of new features highlighted are &lt;br /&gt;&lt;br /&gt;"such as over-the-wire encryption and AES as an encryption scheme".&lt;br /&gt;&lt;br /&gt;If you want over the wire encryption for Firebird you could use Zebedee. There have been a number of papers re. this in the past. However this is something that could be implemented in Firebird fairly easily if we so wished.&lt;br /&gt;&lt;br /&gt;In terms of database encryption there is code to allow it now, however the original implementation was not reliable. We did put together a more detailed proposal, but after some lengthy discussions it was decided that such functionality was going to be too complicated for the majority of users, and most of them didn't want it any way.&lt;br /&gt;&lt;br /&gt;I do have trouble working out what &lt;br /&gt;&lt;br /&gt;"The biggest change, perhaps, is the removal of any non-symmetric multiprocessing (SMP) compatible versions of the database. All versions of InterBase will now be able to use multiple processors and cores." &lt;br /&gt;&lt;br /&gt;means.. CodeGear have been stating that InterBase was SMP enabled since InterBase 7.0. So what does this mean? Was InterBase non SMP capable/SMP friendly on some platforms? Was there code that wasn't SMP enabled? Has the code been cleaned up, so that all the old platforms have been removed. Or is it just a licensing issue where the new SMP license now supports up to 8 cores/CPUs, while previously you had to buy extra CPU licenses?&lt;br /&gt;&lt;br /&gt;One particular quote was very confusing &lt;br /&gt;&lt;br /&gt;"For the existing open-source Firebird database, which is based on InterBase, these changes won't trickle down; that free database does not include SMP, disaster recovery or high availability features."&lt;br /&gt;&lt;br /&gt;Firebird was originally based on the open sourced version of InterBase 6.0, but the code bases are now quite different after 8 years of independent development work. So to state that Firebird is based on InterBase, although this is technically correct, it is a little disingenuous.&lt;br /&gt;&lt;br /&gt;Stating that changes in InterBase will not trickle down to Firebird is correct. InterBase as per Inprise/Borland/CodeGear/Embarcadero is a closed source database. After the code was originally open sourced on SourceForge by Borland, it was forked and Firebird was created. InterBase was then "closed sourced" by Borland, and development work has continued on InterBase in a closed source manner. No code or feature at any time has come from InterBase to Firebird. Although it is possible that Firebird code may have made it into InterBase. However we have no way of verifying that.&lt;br /&gt;&lt;br /&gt;In terms of SMP, by re-introducing the process based Classic Arhitecture, Firebird does support SMP. However a process based architecture isn't multi-threaded. That's an issue that's being addressed in Firebird V2.5 (SuperClassic) and Firebird 3.0.&lt;br /&gt;&lt;br /&gt;I assume by "Disaster Recovery" this refers to "Journaling with Write Ahead Logging (WAL)" something that has not been implemented in Firebird. I am unsure what the other "High Availability" features are.&lt;br /&gt;&lt;br /&gt;Finally&lt;br /&gt;&lt;br /&gt;"In October, he said that InterBase ToGo will be made available. Normally, InterBase has a memory footprint of around 100MB. ToGo will be slimmed to around 3MB"&lt;br /&gt;&lt;br /&gt;I am lost on this one. I am sure by this he means a disk footprint, not memory. And most of the size of the normal disk footprint is taken up by a stupid installer (imho) and docs. My assumption is that InterBase ToGo is effectively a variant on Firebird Embedded, but since ToGo will not be available until October it is difficult to comment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-5049311502580963234?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/5049311502580963234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=5049311502580963234' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/5049311502580963234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/5049311502580963234'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/09/interbase-2009-comes-with-multicore.html' title='InterBase 2009 comes with multicore support'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-8730201658675259333</id><published>2008-09-04T02:03:00.001-07:00</published><updated>2008-09-04T02:31:33.440-07:00</updated><title type='text'>Solaris 10, Firebird SuperServer and the Service Management Facility</title><content type='html'>&lt;span style="font-family:georgia;"&gt;I recently released Firebird V2.04 SuperServer for Solaris 10. This new build uses the Solaris 10 Service Management Facility to stop/start Firebird. Here are some notes on how it works.&lt;br /&gt;I created the following manifest file (it can be found in /opt/firebird/ as gds_db-tcp.xml):&lt;br /&gt;&lt;br /&gt;&amp;lt;?xml version='1.0'?&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'&amp;gt;&lt;br /&gt;&amp;lt;!--&lt;br /&gt;    Service manifest for firebird &lt;br /&gt;--&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;service_bundle type='manifest' name='firebird'&amp;gt;&lt;br /&gt;&amp;lt;service&lt;br /&gt; name='application/firebird'&lt;br /&gt; type='service'&lt;br /&gt; version='1'&amp;gt;&lt;br /&gt; &amp;lt;create_default_instance enabled='true' /&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;exec_method&lt;br /&gt;  type='method'&lt;br /&gt;  name='start'&lt;br /&gt;  exec='/opt/firebird/bin/fbmgr.bin -start'&lt;br /&gt;  timeout_seconds='10'&amp;gt;&lt;br /&gt;  &amp;lt;method_context&amp;gt;&lt;br /&gt;   &amp;lt;method_credential user='firebird' group='firebird' /&amp;gt;&lt;br /&gt;  &amp;lt;/method_context&amp;gt;&lt;br /&gt; &amp;lt;/exec_method&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;exec_method&lt;br /&gt;  type='method'&lt;br /&gt;  name='stop'&lt;br /&gt;  exec='/opt/firebird/bin/fbmgr.bin -stop'&lt;br /&gt;  timeout_seconds='10'&amp;gt;&lt;br /&gt;  &amp;lt;method_context&amp;gt;&lt;br /&gt;   &amp;lt;method_credential user='firebird' group='firebird' /&amp;gt;&lt;br /&gt;  &amp;lt;/method_context&amp;gt;&lt;br /&gt; &amp;lt;/exec_method&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;template&amp;gt;&lt;br /&gt;  &amp;lt;common_name&amp;gt;&lt;br /&gt;   &amp;lt;loctext xml:lang='C'&amp;gt;&lt;br /&gt;   Firebird &lt;br /&gt;   &amp;lt;/loctext&amp;gt;&lt;br /&gt;  &amp;lt;/common_name&amp;gt;&lt;br /&gt; &amp;lt;/template&amp;gt;&lt;br /&gt;&amp;lt;/service&amp;gt;&lt;br /&gt;&amp;lt;/service_bundle&amp;gt;&lt;br /&gt;&lt;br /&gt;This manifest file is automatically installed by the pkg installer.&lt;br /&gt;You can manually stop and start firebird using the following commands, instead of using fbmgr.bin&lt;br /&gt;&lt;br /&gt;svcadm enable svc:/application/firebird:default&lt;br /&gt;svcadm disable svc:/application/firebird:default&lt;br /&gt;&lt;br /&gt;You can verify whether the Firebird "service" is running by using the following:&lt;br /&gt;&lt;br /&gt;svcs -a | grep firebird&lt;br /&gt;&lt;br /&gt;Supposedly the new Service Management Facility provides automatic recovery from software and hardware errors, so theoretically SuperServer on Solaris 10 no longer has need of the Firebird Guardian, since SMF should do the same job that the Guardian was designed to do. This is going to need some testing ....&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/create_default_instance&gt;&lt;/service&gt;&lt;/service_bundle&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-8730201658675259333?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/8730201658675259333/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=8730201658675259333' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/8730201658675259333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/8730201658675259333'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/09/solaris-10-firebird-superserver-and.html' title='Solaris 10, Firebird SuperServer and the Service Management Facility'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-2208314188209161010</id><published>2008-07-21T03:46:00.000-07:00</published><updated>2008-07-21T03:52:35.044-07:00</updated><title type='text'>Solaris 10 and iscsi</title><content type='html'>&lt;span style="font-family: georgia;"&gt;Seems that applying all of the patches discussed previously has broken my version of Solaris, as it now seems to have problems booting.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;It seems to hang during the boot cycle, so I had to do some hunting to try and find out the cause.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;Boooting with a -v (verbose) shows that the system is hanging in iscsi.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;After some googling it seems the only way to fix this, so you can get in is to do the following..&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;1. Boot using -m milestone=none&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;2. Login as root&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;3. svcadm enable -r filesystem/minimal&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;4. svcadm enable -r filesystem/local&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;5. cd /etc/iscsi&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;6. mv iscsi_v1.dbc iscsi_v1.dbc.bad&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;7. reboot&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;Now you can get in, I suggest you go and install the latest iscsi path from sunsolve:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;Patch number 119091 for x86 Solaris.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;reboot and hopefully all will be well.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-2208314188209161010?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/2208314188209161010/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=2208314188209161010' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/2208314188209161010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/2208314188209161010'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/07/solaris-10-and-iscsi.html' title='Solaris 10 and iscsi'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-5026070328555455312</id><published>2008-07-02T05:25:00.000-07:00</published><updated>2008-07-04T04:51:56.965-07:00</updated><title type='text'>Solaris and the 256 File Descriptor Problem</title><content type='html'>&lt;span style="font-family:georgia;"&gt;Some of you reading this may remember that back when InterBase 6.0 was released on Solaris we ran into a fundamental problem on Solaris. It seems that since 1992 there has been an open bug documenting Solaris' file descriptor problem: "&lt;/span&gt;&lt;span style="font-family:georgia;"&gt;32-bit stdio routines should support file descriptors &gt;255."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Bug id:&lt;/span&gt;&lt;br /&gt;&lt;a style="font-family: georgia;" href="http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=1085341"&gt;&lt;span&gt;1085341&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;When this issue was discovered, we chose to use SFIO, a stdio variant from AT&amp;amp;T&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Comments on this issue can be found in jrd/common.h which forces a superserver build to use our own internal stdio.h found in extern/SfIO/include.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Well it looks like in Solaris 10 Sun have finally fixed the issue.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;More details can be found in the article entitled:&lt;/span&gt;&lt;br /&gt;&lt;a style="font-family: georgia;" href="http://developers.sun.com/solaris/articles/stdio_256.html"&gt;Solaris OS Solutions to 32-Bit stdio's 256 File-Descriptors Limitation&lt;/a&gt;&lt;span style="font-family:georgia;"&gt; by Giri Mandalika dated May 2007&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Suffice it say - the bug has been fixed, but in a fairly typical Sun way.... the fix is more complicated than it should be... why they didn't just change the char to a short and be done with it I really don't know.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Anyway it should be possible on Solaris 10 to use this fix instead of our "own" implementation of stdio.h, just by adding a couple of lines to gds.cpp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;e.g.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;#ifdef SOLARIS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;#include &amp;lt;stdio_ext.h&amp;gt;&lt;/span&gt;&lt;stdio_ext.h&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;#endif&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;after including &lt;/span&gt;&lt;stdio.h&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;and then adding the following at around about line 3535 (Firebird 2.0.4)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;#ifdef SOLARIS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;enable_extended_FILE_stdio (-1, -1);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;#endif&lt;br /&gt;&lt;br /&gt;Hmm that seems to be a nice simple solution, except that its always more complicated than that.&lt;br /&gt;It seems that this fix is only available from later releases of Solaris 10, so if you have a version of Solaris from &lt;/span&gt;&lt;span style="font-family:georgia;"&gt;Solaris 10 3/05 through Solaris 10 11/06  you will need to install just 3 patches...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Well no - thats not the case. I had to do the following to get this to work...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Download and install the following patches:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;1. 118855-36&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;2. 118919-21&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;3. 119255-53&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;4. 120273-21&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;5. 123840-04&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;6. 127756-01&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;7. 125504-02&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;8. 122661-08&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;9. 125548-02&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;10. 126420-01&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;11. 126424-03&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;And then finally in single user mode, followed by a reconfigure reboot:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;To boot Solaris x86 in single user mode, requires some fun and games too...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;At the GRUB menu, type 'e' before it times out and takes the default boot option.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Scroll to the default multiuser boot line, then type 'e' egain.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;This will bring you in to edit mode. Add a ' -s' at the end of the line.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Then type 'b' to boot.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;12. 120012-14&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Install this patch - then reconfigure&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;At the GRUB menu, type 'e' before it times out and takes the default boot option.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt; Scroll to the default multiuser boot line, then type 'e' egain.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt; This will bring you in to edit mode. Add a ' -r' at the end of the line.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Then type 'b' to boot.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;&lt;br /&gt;I am not sure that we can ask Solaris users of Firebird if they do not have the fix already installed to go through this, so we will have a look at keeping our own SfIO. However currently that will not compile using gcc 4.2.1 and thats something else we need to try and fix.&lt;br /&gt;&lt;br /&gt;Addendum:&lt;br /&gt;sftp is now broken - so you need to add two more patches to the list above&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;13. 119253-26&lt;br /&gt;14. 124629-07&lt;br /&gt;&lt;em style="font-family: georgia;"&gt;&lt;/em&gt;&lt;/stdio.h&gt;&lt;/stdio_ext.h&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-5026070328555455312?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/5026070328555455312/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=5026070328555455312' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/5026070328555455312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/5026070328555455312'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/07/solaris-and-256-file-descriptor-problem.html' title='Solaris and the 256 File Descriptor Problem'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-6885017321140851913</id><published>2008-06-05T03:00:00.000-07:00</published><updated>2008-06-05T03:06:30.742-07:00</updated><title type='text'>MacOSX and stdin,stdout,stderr</title><content type='html'>&lt;span style="font-family: georgia;"&gt;I am in the process of porting a friends software to MacOSX. Don't ask what it does yet, all will be revealed soon. The code compiles quite happily on Solaris and Linux, but fails with the following error on MacOSX...&lt;br /&gt;&lt;br /&gt;Why?&lt;br /&gt;&lt;br /&gt;dbFile.c: In function ‘_setLogfile’:&lt;br /&gt;dbFile.c:243: error: invalid lvalue in assignment&lt;br /&gt;dbFile.c:244: error: invalid lvalue in assignment&lt;br /&gt;dbFile.c: In function ‘fieldFillGen’:&lt;br /&gt;&lt;br /&gt;I know what the problem is -&lt;br /&gt;Seems on MacOSX 10.4 and below:&lt;br /&gt;stdin, stdout, and stderr are addresses of a FILE rather than a FILE*&lt;br /&gt;On MacOSX 10.5 they are FILE*&lt;br /&gt;&lt;br /&gt;So depending on the OS version you are targeting will determine whether the code compiles or not. The issue goes back to the way FreeBSD originally implemented this in stdio.h which is the base for MacOSX, and it looks like it finally became "correct" i.e. portable and adhering to other implementations in MacOSX 10.5&lt;br /&gt;A quick look at /usr/include/stdio.h confirms this...&lt;br /&gt;the FILE* appears within the ifdef for _DARWIN_UNIX_03&lt;br /&gt;&lt;br /&gt;__BEGIN_DECLS&lt;br /&gt;#if __DARWIN_UNIX03&lt;br /&gt;extern FILE *__stdinp;&lt;br /&gt;extern FILE *__stdoutp;&lt;br /&gt;extern FILE *__stderrp;&lt;br /&gt;#else /* !__DARWIN_UNIX03 */&lt;br /&gt;extern FILE __sF[];&lt;br /&gt;#endif /* __DARWIN_UNIX03 */&lt;br /&gt;__END_DECLS&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So I need to come up with a simple workaround for what was originally valid code on other operating systems:&lt;br /&gt;&lt;br /&gt;stderr = wk;&lt;br /&gt;stdout = wk;&lt;br /&gt;&lt;br /&gt;the following seems to work:&lt;br /&gt;&lt;br /&gt;dup2(wk-&gt;_file ,STDERR_FILENO);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: georgia;"&gt;dup2(wk-&gt;_file ,STDOUT_FILENO);&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-6885017321140851913?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/6885017321140851913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=6885017321140851913' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/6885017321140851913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/6885017321140851913'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/06/macosx-and-stdinstdoutstderr.html' title='MacOSX and stdin,stdout,stderr'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-1638601097932326115</id><published>2008-06-04T05:04:00.000-07:00</published><updated>2008-06-04T05:14:43.888-07:00</updated><title type='text'>Standard delete v's Firebird delete</title><content type='html'>&lt;span style="font-family:georgia;"&gt;Alex and I have just committed a slew of changes to the code in Firebird 2.1.&lt;br /&gt;This all started when we did the 32 bit builds for Firebird on MacOSX.&lt;br /&gt;&lt;br /&gt;We found that in remote we would get asserts trying to create a database. On deeper and further investigation over a period of a couple of weeks we realised that in some cases the standard delete was being called instead of the redefined version in Firebird i.e. it invoked free() instead of&lt;br /&gt;MemoryPool::globalFree(). After some extensive googling  we found other people have also run into similar problems.&lt;br /&gt;&lt;br /&gt;As a solution it   was suggested to use:&lt;br /&gt;1. Use switches -fvisibility=hidden and -fvisibility-inlines-hidden together.&lt;br /&gt;2. Use switch -fvisibility=hidden and __attribute__((always_inline)).&lt;br /&gt;&lt;br /&gt;Trying with second combination we found that we sometimes got (depending on the version of gcc) an error:&lt;br /&gt;sorry, unimplemented: inlining failed in call to 'void operator delete(void*) throw ()'.&lt;br /&gt;&lt;br /&gt;It seems that  without -fvisibility=hidden and __attribute__((always_inline)) gcc is&lt;br /&gt;using non-inline body for operator delete. And is randomly using the wrong body, the one from the standard &lt;/span&gt;&lt;span style="font-family:georgia;"&gt;operator &lt;/span&gt;&lt;span style="font-family:georgia;"&gt;delete.&lt;br /&gt;&lt;br /&gt;The first combination helps to avoid this bug - but any entrypoint, which is to be exported, now has to be marked with __attribute__((visibility="default")).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-1638601097932326115?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/1638601097932326115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=1638601097932326115' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/1638601097932326115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/1638601097932326115'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/06/standard-delete-vs-firebird-delete.html' title='Standard delete v&apos;s Firebird delete'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-6713053554753170262</id><published>2008-04-21T03:00:00.000-07:00</published><updated>2008-04-21T03:39:16.573-07:00</updated><title type='text'>64bit PPC build for MacOSX</title><content type='html'>&lt;span style="font-family:georgia;"&gt;Someone asked me why there wasn't a 64bit version of Firebird for MacOS powerpc... so I tried a build on the powerpc MacOSX box we have...&lt;br /&gt;sw_vers -productVersion = 10.4.11&lt;br /&gt;Build fails when we try to build config_root.cpp.&lt;br /&gt;&lt;br /&gt;/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MachineExceptions.h:272: error: typedef 'ExceptionHandlerProcPtr' is initialized (use __typeof__ instead)&lt;br /&gt;/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MachineExceptions.h:272: error: 'ExceptionInformation' was not declared in this scope&lt;br /&gt;/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MachineExceptions.h:272: error: 'theException' was not declared in this scope&lt;br /&gt;/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MachineExceptions.h:306: error: 'ExceptionInformation' was not declared in this scope&lt;br /&gt;/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MachineExceptions.h:306: error: 'theException' was not declared in this scope&lt;br /&gt;/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MachineExceptions.h:307: error: expected primary-expression before 'userUPP'&lt;br /&gt;/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MachineExceptions.h:307: error: initializer expression list treated as compound expression&lt;br /&gt;/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/fp.h:1338: error: 'SIGDIGLEN' was not declared in this scope&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Some googling explains what the problem is. Seems MacOSX is 10.4 is not 100% 64bit friendly and the carbon framework will not support a full 64bit build until MacOSX 10.5.&lt;br /&gt;&lt;br /&gt;We use the carbon framework in a few, but very specific places, mainly to load UDF libraries as bundles and also the fbintl library.&lt;br /&gt;&lt;br /&gt;So....&lt;br /&gt;&lt;br /&gt;I either need to upgrade our powerpc Mac to MacOSX 10.5 to do the build...&lt;br /&gt;or&lt;br /&gt;Anybody out there got a powerpc Mac running MacOSX 10.5 that I could use to check the build?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-6713053554753170262?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/6713053554753170262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=6713053554753170262' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/6713053554753170262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/6713053554753170262'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/04/64bit-ppc-build-for-macosx.html' title='64bit PPC build for MacOSX'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-8610296558267065203</id><published>2008-04-08T07:23:00.000-07:00</published><updated>2008-04-08T07:30:55.861-07:00</updated><title type='text'>Editline, Curses and Solaris AMD64</title><content type='html'>&lt;span style="font-family: georgia;"&gt;We finally solved the last major problem in the Firebird 2.0x build for Solaris 10 AMD 64bit. Whenever we tried to include editline in the build isql_static would coredump. We tracked the problem down to the following:&lt;br /&gt;&lt;br /&gt;Seems there is a problem in the Solaris' native implementation of libcurses,  the function tgetstr() returns a bad pointer (non-NULL, but out of the process space). This means that until Sun fix it we can't use libcurses to link with editline on Solaris 64bit AMD.&lt;br /&gt;&lt;br /&gt;So we came up with a solution...&lt;br /&gt;We downloaded and built ncurses... (5.5) then copied libncurses.a to gen/firebird/lib along with the normal editline.a&lt;br /&gt;Then adjusted make.defaults to remove references to -lcurses for LINK_LIBS and STATICLINK_LIBS and added -lncurses.&lt;br /&gt;&lt;br /&gt;We now have a succesful build that seems to work properly. I hope to put the 64bit Solaris AMD builds up in the firebird prerelease area for testing purposes, then commit the changes made to the code base. Then wen 2.04 is ready to be released will create proper versions for full release.&lt;br /&gt;&lt;br /&gt;Hope that somebody out there finds this useful, or at least the builds anyway.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-8610296558267065203?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/8610296558267065203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=8610296558267065203' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/8610296558267065203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/8610296558267065203'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/04/editline-curses-and-solaris-amd64.html' title='Editline, Curses and Solaris AMD64'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-7362010154753960653</id><published>2008-04-07T05:51:00.000-07:00</published><updated>2008-04-07T05:58:17.540-07:00</updated><title type='text'>Wrongly Named libfbclient on Solaris</title><content type='html'>&lt;span style="font-family: georgia;"&gt;There is a small problem with the currently shipping versions of Firebird 2.0.3 for Solaris.&lt;br /&gt;The problem doesn't affect the general workings of Firebird, but if you try to link with the libfbclient library using your own program, you will run into a problem where you will consistently get the following error:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new,monospace;"&gt;&lt;span style="font-family: georgia;"&gt;ld: fatal: library -lfbclient:  not found&lt;br /&gt;&lt;br /&gt;The problem is due to a misnamed libfbclient.so in /opt/firebird/lib&lt;br /&gt;&lt;br /&gt;To correct:&lt;br /&gt;cd /opt/firebird/lib&lt;br /&gt;rm libfbclient.so&lt;br /&gt;ln -s libfbclient.so.2 libfbclient.so&lt;br /&gt;&lt;br /&gt;This has already been corrected in CVS&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-7362010154753960653?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/7362010154753960653/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=7362010154753960653' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/7362010154753960653'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/7362010154753960653'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/04/wrongly-named-libfbclient-on-solaris.html' title='Wrongly Named libfbclient on Solaris'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-9036268660282975451</id><published>2008-04-01T02:33:00.000-07:00</published><updated>2008-04-02T03:33:52.448-07:00</updated><title type='text'>64bit Firebird for Solaris 10 AMD64</title><content type='html'>&lt;span style="font-family:georgia;"&gt;Looks like having a 64bit build of Firebird on Solaris 10 AMD64 is going to be a non-starter.&lt;br /&gt;Alex and I have done all the hard work, and we have a build (currently without editline, since thats a problem in itself), but when we try and run isql created by the build we get the following:&lt;br /&gt;&lt;br /&gt;ld.so.1: ./isql: fatal: relocation error: R_AMD^$_32S:&lt;br /&gt;file /usr/lib/64/libfbembed.so.2: symbol (unknown): vakue 0xfffffd7ffee00000&lt;br /&gt;does not fit&lt;br /&gt;&lt;br /&gt;or in debug mode trying to run isql from the build directly:&lt;br /&gt;ld.so.1: isql: fatal: relocation error: R_AMD64_PC32&lt;br /&gt;file /home/pbeach/firebird64/gen/firebird/lib/libfbembed.so.2:&lt;br /&gt;symbol main: value 0x2800155d494 does not fit.&lt;br /&gt;&lt;br /&gt;A bit of googling finds this:&lt;br /&gt;&lt;br /&gt;Bug ID 5102797&lt;br /&gt;&lt;a href="http://bugs.opensolaris.org/bugdatabase/view_bug.do;jsessionid=a68c8de187c30929fb79755edd017?bug_id=5102797"&gt;Synopsis AMD64: static relocation in dynamic library fails&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you read the details, seems the bug has been around since 15th Sept 2004&lt;br /&gt;and because of its nature, there are no plans to fix it until Solaris 11.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Addendum: 2nd April 2007&lt;/span&gt;&lt;br /&gt;Looks like we have found the problem.&lt;br /&gt;LIB_LINK_OPTIONS in the prefix build file was -G&lt;br /&gt;-G on Solaris should tell the linker to create a shared library&lt;br /&gt;However because we are using gcc, something somewhere was getting confused.&lt;br /&gt;If we pass -fPIC and -shared instead the problem is resolved.&lt;br /&gt;&lt;br /&gt;From the gcc manaual:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;-shared&lt;br /&gt;&lt;br /&gt;Produce a shared object which can then be linked with other objects to form an executable.  Not all systems support this option.  For predictable results, you must also specify the same set of options that were used to generate code (&lt;samp&gt;&lt;span class="option"&gt;-fpic&lt;/span&gt;&lt;/samp&gt;, &lt;samp&gt;&lt;span class="option"&gt;-fPIC&lt;/span&gt;&lt;/samp&gt;, or model suboptions) when you specify this option&lt;br /&gt;&lt;br /&gt;On some systems, `&lt;samp&gt;&lt;span class="samp"&gt;gcc -shared&lt;/span&gt;&lt;/samp&gt;' needs to build supplementary stub code for constructors to work.  On multi-libbed systems, `&lt;samp&gt;&lt;span class="samp"&gt;gcc -shared&lt;/span&gt;&lt;/samp&gt;' must select the correct support libraries to link against.  Failing to supply the correct flags may lead to subtle defects.  Supplying them in cases where they are not necessary is innocuous.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-9036268660282975451?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/9036268660282975451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=9036268660282975451' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/9036268660282975451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/9036268660282975451'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/04/64bit-firebird-for-solaris-10-amd64.html' title='64bit Firebird for Solaris 10 AMD64'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-4174039547583189344</id><published>2008-03-28T04:37:00.000-07:00</published><updated>2008-03-28T04:54:51.722-07:00</updated><title type='text'>FreeAdhocUDF for MacOSX</title><content type='html'>&lt;span style="font-family:georgia;"&gt;I&lt;span style="font-family:georgia;"&gt; have just finished porting FreeAdhocUDF to MacOSX and sent the Makefiles, code, plus 32bit UDF libraries for Firebird 1.5.5 and Firebird 2.x to the FreeAdhocUDF types to be included in the distribution.&lt;br /&gt;&lt;br /&gt;Issues that you might need to be aware of.&lt;br /&gt;1. In Firebird 1.5.5 we don't ship libib_util.dylib, and even if we did you wouldn't be able to link to it. It seems that Firebird 1.5.5's installer doesn't copy the library to the Framework. This has now been fixed for the next release. Secondly the library was being built as a bundle. All Firebird UDF's need to be created as bundles to work on MacOSX. You can't link a bundle to a bundle. This has also been fixed.&lt;br /&gt;2. In Firebird 1.5.5 you must remove any extension from the UDF library (e.g dylib) to get it to work. So for example FreeAdhocUDF.dylib needs to be renamed to FreeAdhocUDF. This bug has been fixed in flu.cpp for the next version.&lt;br /&gt;&lt;br /&gt;Firebird 2.x does not have any of these problems :-)&lt;br /&gt;&lt;br /&gt;In compiling FreeAdhocUDF for MacOSX, it has to be noted that MacOSX has no idea of sysinfo.h, so I had to add a chunk of code to handle the getting of a MAC address, and to get the random_info/randomness for GUIDs. This does seem to work nicely now.&lt;br /&gt;&lt;br /&gt;The FreeAdhocUDF libraries I have provided are 32bit intel for Firebird 1.5.5 and Firebird 2.x, if you want to build ppc libraries, or 64bit libraries enjoy. If you have problems, let me know.&lt;br /&gt;&lt;br /&gt;On ppc you "might" have to add the following to the Makefile&lt;br /&gt;i.e. change&lt;br /&gt;LDFLAGS=$(CF) $(LIB) -bundle -flat_namespace -undefined suppress to&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:georgia;"&gt;&lt;span style="font-family:georgia;"&gt;LDFLAGS=$(CF) $(LIB) -bundle -flat_namespace -undefined suppress /usr/sys/bundle.o&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-4174039547583189344?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/4174039547583189344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=4174039547583189344' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4174039547583189344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4174039547583189344'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/03/freeadhocudf-for-macosx.html' title='FreeAdhocUDF for MacOSX'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-4763943956627878425</id><published>2008-03-21T08:06:00.000-07:00</published><updated>2008-03-21T08:26:08.285-07:00</updated><title type='text'>Exceptions, gcc and Solaris 10 AMD 64bit</title><content type='html'>&lt;span style="font-family: georgia;"&gt;For a little while now Alex and I have been battling a problem on Solaris 10 64bit AMD.  We have been trying to port Firebird 2.0x to  64bit Solaris. However after fixing a few issues, e.g. defining the platform etc, we found that isql_static would core dump on trying to create a database. This is where the fun begins...&lt;br /&gt;&lt;br /&gt;The default debugger for gcc shipped with Solaris 10 can't handle 64bit applications. Solution - build your own from a later version. At least this way we can now step through the Firebird code and try to see whats happening..&lt;br /&gt;&lt;br /&gt;After some careful debugging sessions we find that Firebird seems to be OK, when you try to create a database, Firebird first trys to open it as an existing database, if it can't find an existing database we throw an internal exception and go on to create it.&lt;br /&gt;&lt;br /&gt;The problem is isql_static is occurring when the exception is thrown...&lt;br /&gt;&lt;br /&gt;Program received signal SIGSEGV, Segmentation fault.&lt;br /&gt;0x0000000000488385 in __EH_FRAME_BEGIN__ ()&lt;br /&gt;&lt;br /&gt;(gdb) bt&lt;br /&gt;#0  0x0000000000488385 in __EH_FRAME_BEGIN__ ()&lt;br /&gt;#1  0xfffffd7ffedacf3c in _Unwind_RaiseException_Body () from /lib/64/libc.so.1&lt;br /&gt;#2  0xfffffd7ffedad129 in _Unwind_RaiseException () from /lib/64/libc.so.1&lt;br /&gt;#3  0xfffffd7ffef3c71e in __cxa_throw (obj=0x1, tinfo=0x1, dest=0x474e5543432b2b00)&lt;br /&gt;    at /builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3/libstdc++-v3/libsupc++/eh_throw.cc:75&lt;br /&gt;#4  0x000000000056510b in Firebird::status_exception::raise (status_vector=0x8d19e0)&lt;br /&gt;    at ../src/common/fb_exception.cpp:197&lt;br /&gt;#5  0x0000000000694137 in ERR_punt () at ../src/jrd/err.cpp:562&lt;br /&gt;#6  0x0000000000693ced in ERR_post (status=335544344) at ../src/jrd/err.cpp:441&lt;br /&gt;#7  0x00000000005c66d4 in PIO_open (dbb=0xfffffd7ffec29050, string=@0xfffffd7fffdec9e0,&lt;br /&gt;    trace_flag=false, connection=0x0, file_name=@0xfffffd7fffdeca20, share_delete=false)&lt;br /&gt;    at ../src/jrd/os/posix/unix.cpp:646&lt;br /&gt;&lt;br /&gt;So Firebird looks OK, i.e. its doing what it should do, however Solaris is causing a crash dump on the exception.&lt;br /&gt;&lt;br /&gt;Some more detective work uncovered the following:&lt;br /&gt;&lt;br /&gt;The problem is caused by the use of the -lc flag which was explicitly added to linker command line by autoconf.&lt;br /&gt;&lt;br /&gt;Because we always use g++/gcc as linker, there is no need for us to need add in libc explicitly - it's done by compiler itself when it invokes ld. But autoconf seems to be doing it anyway.&lt;br /&gt;&lt;br /&gt;When it is added to the command line,  libc (Solaris native library) then happens to be added to ld's command line before libgcc_s where we would find gcc's own exception support library. If this happens any call to functions that have the same name, that happen to be present in both libraries, will go to libc, not libgcc_s.&lt;br /&gt;&lt;br /&gt;There is at least one such function - Unwind_RaiseException(), which is called by g++ generated&lt;br /&gt;code when exception is thrown. But instead of libgcc_s::Unwind_RaiseException() libc::Unwind_RaiseException() is called, but not with the parameters the Solaris native function expects - cue core dump.&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;&lt;br /&gt;Don't use -lc&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-4763943956627878425?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/4763943956627878425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=4763943956627878425' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4763943956627878425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4763943956627878425'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/03/exceptions-gcc-and-solaris-10-amd-64bit.html' title='Exceptions, gcc and Solaris 10 AMD 64bit'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-4574840872112630218</id><published>2008-03-13T02:13:00.000-07:00</published><updated>2008-03-13T02:21:21.769-07:00</updated><title type='text'>Where is libfbclient.dylib on MacOSX?</title><content type='html'>&lt;span style="font-family: georgia;"&gt;There was a post to the Firebird Support list, asking how you link Qt to the libfbclient.dylib on MacOSX Firebird SuperServer. The problem being, that libfbclient.dylib is not "shipped" as part of the MacOSX framework... heres the detailed answer on how it works.&lt;br /&gt;&lt;br /&gt;Firebird on MacOSX is delivered as a framework,&lt;br /&gt;&lt;br /&gt;For more information on a frameworks look on : http://developer.apple.com&lt;br /&gt;&lt;br /&gt;In a nutshell - "A framework is a hierarchical directory that encapsulates shared resources, such as a dynamic shared library, nib files, image files, localized strings, header files, and reference documentation in a single package. Multiple applications can use all of these resources simultaneously. The system  loads them into memory as needed and shares the one copy of the resource among all applications whenever possible."&lt;br /&gt;&lt;br /&gt;This is the "best" way to deliver an application on MacOSX.&lt;br /&gt;&lt;br /&gt;However to do this the main dylibs (shared libraries) that run Firebird become part of the framework itself.&lt;br /&gt;&lt;br /&gt;The main dylib that drives Classic is libfbembed, for SuperServer its libfbclient.&lt;br /&gt;&lt;br /&gt;With Classic we ship both libfbembed and libfbclient, libfbclient as a separate dylib can be found in the libraries directory.&lt;br /&gt;&lt;br /&gt;for SuperServer we ship libfbclient&lt;br /&gt;&lt;br /&gt;However libfbembed (Classic) and libfbclient (SuperServer) are not directly obvious as shared libraries, i.e. if you look for them by that name with a dylib extension you are not going to find them. However if you took a close look at postfix.darwin in the Firebird source builds/posix (this is the code that sets up the framework) you will find that they become Firebird.framework/Firebird which is a link to Firebird.framework/Versions/Current/Firebird.&lt;br /&gt;&lt;br /&gt;Where &lt;/span&gt;&lt;span style="font-family: georgia;"&gt;Firebird.framework/Firebird is libfbembed.dylib for Classic and&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: georgia;"&gt;&lt;/span&gt;&lt;span style="font-family: georgia;"&gt;Firebird.framework/Firebird is libfbclient.dylib for SuperServer&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: georgia;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-4574840872112630218?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/4574840872112630218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=4574840872112630218' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4574840872112630218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4574840872112630218'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/03/where-is-libfbclientdylib-on-macosx.html' title='Where is libfbclient.dylib on MacOSX?'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-4577417086365233735</id><published>2008-03-11T05:45:00.000-07:00</published><updated>2009-06-15T05:23:00.101-07:00</updated><title type='text'>Building GCC 4.2.1 On Solaris</title><content type='html'>&lt;span style="font-family:georgia;"&gt;Alex and I are currently trying to implement a 64bit version of Firebird 2.x for Solaris 10, and we are running into a number of problems. However they shouldn't be insurmountable. Every port has its problems one way or another, but this one is proving to be particularly annoying....&lt;br /&gt;&lt;br /&gt;The default version of gcc shipped with Solaris 10 is 3.4.3 and is found in /usr/sfw/bin&lt;br /&gt;The current available version of gcc (released is) 4.3&lt;br /&gt;So the version Sun makes available dates from 2005...&lt;br /&gt;One assumes that Sun has no interest in letting Solaris users use more modern versions of gcc and would rather we use their own compiler.&lt;br /&gt;Hmm so much for Sun and open source...&lt;br /&gt;&lt;br /&gt;But to properly compile on Solaris 10 with 64bit see notes from gcc.gnu.org&lt;br /&gt;&lt;br /&gt;"&lt;/span&gt;i?86-*-solaris2.10&lt;br /&gt;Use this for Solaris 10 or later on x86 and x86-64 systems.  This configuration is supported by GCC 4.0 and later versions only.     &lt;p&gt;It is recommended that you configure GCC to use the GNU assembler in &lt;samp&gt;&lt;span class="file"&gt;/usr/sfw/bin/gas&lt;/span&gt;&lt;/samp&gt; but the Sun linker, using the options &lt;samp&gt;&lt;span class="option"&gt;--with-gnu-as --with-as=/usr/sfw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld&lt;/span&gt;&lt;/samp&gt;"&lt;/p&gt;&lt;p&gt;So gcc 4.0 is the lowest version you can use for cross-compiling 32bit and 64bit applications on Solaris 10...&lt;/p&gt;So we have to build our own gcc to do the firebird compilation, here's how you do it....&lt;br /&gt;1. Download a copy of the gcc source (e.g. gcc-4.1.2.tar.gz) from gcc.gnu.org&lt;br /&gt;2. Install gnu tar, solaris tar has problems extracting the source from the gcc tar file.&lt;br /&gt;3. You will probably need to install libintl too (you can get a pre-built version of this froim www.sunfreeware.com)&lt;br /&gt;4. gunzip gcc-4.1.2.tar.gz&lt;br /&gt;5. /usr/local/bin/tar  -xvf gcc-4.1.2.tar&lt;br /&gt;6. cd gcc-4.1.2&lt;br /&gt;7. mkdir objdir&lt;br /&gt;8. cd objdir&lt;br /&gt;9. ../configure --with-gnu-as --with-as=/usr/sfw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++&lt;br /&gt;10.  gmake&lt;br /&gt;11.  as root - make install&lt;br /&gt;&lt;br /&gt;Your new version of gcc will be installed in /usr/local/bin&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-4577417086365233735?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/4577417086365233735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=4577417086365233735' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4577417086365233735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4577417086365233735'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/03/building-gcc-421-on-solaris.html' title='Building GCC 4.2.1 On Solaris'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-1791964545331020910</id><published>2008-02-29T06:57:00.000-08:00</published><updated>2008-02-29T07:10:51.621-08:00</updated><title type='text'>Symbol Variants - MacOSX</title><content type='html'>&lt;span style="font-family: georgia;font-family:georgia;" &gt;Up until now it has been impossible to run kinterbasdb against SuperServer builds of Firebird for MacOSX on Tiger (10.4). When you try and import kinterbasdb into Python the following error occurs:&lt;br /&gt;Symbol not found fputs$UNIX2003&lt;br /&gt;This is a bit of a problem.&lt;br /&gt;Reading around the issue indicates that symbol usage between MacOSX 10.4 and 10.5 has changed because of the introduction of &lt;/span&gt;&lt;span style="font-family: georgia;"&gt;UNIX cconformance.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;This &lt;/span&gt;&lt;a style="font-family: georgia;" href="http://developer.apple.com/releasenotes/Darwin/SymbolVariantsRelNotes/index.html"&gt;article&lt;/a&gt;&lt;span style="font-family: georgia;"&gt; on developer.apple.com explains why we might see UNIX2003 symbols.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;Basically anything compiled on 10.5 will use the new conforming UNIX2003 sysmbols where appropriate.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;However we shouldn't be seeing these symbols if we compile everything with&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;--mmacosx-version-min=10.4 and/or set MACOSX_DEPLOYMENT_TARGET=10.4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;So why when we try and run kinterbasdb on 10.4 we have a problem?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;A nm -a libfbclient.dylib shows that there are 4 UNIX2003 symbols in the library...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;and I had no idea where they were coming from.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;It seems that we have a link problem, and the only way to make sure that they do not get pulled in to the libfbclient library is to insist that the linker links against the 10.4 sdk.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;A small change to prefix.darwin_i386 seems to solve the problem&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;Add LD_FLAGS+=-isysroot /Developer/SDKs/MacOSX10.4u.sdk&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;Why the linker ignores the flag/environment variable is a mystery to solve another day.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-1791964545331020910?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/1791964545331020910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=1791964545331020910' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/1791964545331020910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/1791964545331020910'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/02/symbol-variants-macosx.html' title='Symbol Variants - MacOSX'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-8685452283692747773</id><published>2008-02-21T03:33:00.000-08:00</published><updated>2011-02-10T23:55:49.064-08:00</updated><title type='text'>Firebird and MacOSX Uninstalls</title><content type='html'>&lt;span style="font-family:georgia;"&gt;  MacOSX doesn't have an uninstall utility.&lt;br /&gt;I use the following script to clean up Firebird installs on Leopard.&lt;br /&gt;It should work on Tiger as well.&lt;br /&gt;Would it make sense to include this in the Firebird package, along with a similar script for earlier versions of MacOSX (pre 10.4 for the powerpc builds)&lt;br /&gt;&lt;br /&gt;#!/bin/sh&lt;br /&gt;echo "Clean Services"&lt;br /&gt;echo "Clean User"&lt;br /&gt;dscl localhost -delete /Local/Default/Users/firebird&lt;br /&gt;echo "Clean Group"&lt;br /&gt;dscl localhost -delete /Local/Default/Groups/firebird&lt;br /&gt;if [ -f "/Library/StartupItems/Firebird" ]; then&lt;br /&gt;echo "Remove SuperServer StartupItem"&lt;br /&gt;rm -fr /Library/StartupItems/Firebird&lt;br /&gt;fi&lt;br /&gt;if [ -f "/Library/LaunchDaemons/org.firebird.gds.plist" ]; then&lt;br /&gt;echo "Remove Launchd"&lt;br /&gt;launchctl unload /Library/LaunchDaemons/org.firebird.gds.plist&lt;br /&gt;rm /Library/LaunchDaemons/org.firebird.gds.plist&lt;br /&gt;fi&lt;br /&gt;echo "Remove Framework"&lt;br /&gt;rm -fr /Library/Frameworks/Firebird.framework&lt;br /&gt;echo "Remove Receipt"&lt;br /&gt;rm -fr /Library/Receipts/Firebird*.pkg&lt;br /&gt;&lt;br /&gt;#Add the following for Firebird V2.5&lt;br /&gt;echo "Remove /tmp/firebird"&lt;br /&gt;rm -fr /tmp/firebird&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-8685452283692747773?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/8685452283692747773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=8685452283692747773' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/8685452283692747773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/8685452283692747773'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/02/firebird-and-macosx-uninstalls.html' title='Firebird and MacOSX Uninstalls'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-9008687573803145618</id><published>2008-02-19T04:35:00.000-08:00</published><updated>2008-03-11T04:59:44.711-07:00</updated><title type='text'>Python, kinterbasdb and 64bit MacOSX 10.5</title><content type='html'>&lt;span style="font-family:georgia;"&gt;Now we have 64bit builds of Firebird 2.1 for MacOSX 10.5, we have issues trying to test them properly using the Firebird QMTest QA suite. This QA suite relies on Python and kinterbasdb. Currently Philippe Makowski has been able to run the tests from a 64bit Linux client. But is unable to run the tests locally. Well currently the python framework that comes with MacOSX 10.5 is only 32bit and this forces a 32bit build of kinterbasdb, since the build environment of kinterbasdb uses distutils to use the same compile switches as python. So I thought I would have a look at the issue and see if I could build a 64bit version of kinterbasdb for MacOSX 10.5.&lt;br /&gt;&lt;br /&gt;This is how I did it...&lt;br /&gt;&lt;br /&gt;1. Download the source distribution of &lt;a href="http://www.python.org/"&gt;Python&lt;/a&gt;&lt;br /&gt;2. Edit configure.in and change line 817, so it looks like this&lt;br /&gt;BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd -arch x86_64"&lt;br /&gt;3. Make sure that (just in case)&lt;br /&gt;a, CFLAGS, CXXFLAGS and LDFLAGS are exported with -arch x86_64&lt;br /&gt;e.g. export CFLAGS='-arch x86_64'&lt;br /&gt;b, export MACOSX_DEPLOYMENT_TARGET=10.5&lt;br /&gt;4. autoconf&lt;br /&gt;5. ./configure --disable-toolbox-glue&lt;br /&gt;This disables Carbon as its only 32bit and you will get compile errors if you don't&lt;br /&gt;We are not building a framework, or a universal binary just a simple standalone version of 64bit python. So do not enable those options.&lt;br /&gt;6. make&lt;br /&gt;You may get a warning/errors possibly in some of the extensions e.g.&lt;br /&gt;ld warning in /System/Library/Frameworks/TK.framework/Tk missing required architecture x86_64 in file.&lt;br /&gt;I guess you would have to download the relevant code and rebuild these as 64bit if you need them. But since we are only interested in kinterbasdb I guess I can afford to ignore it.&lt;br /&gt;A check on the built python.exe shows that it is Mach-O 64 bit executable.&lt;br /&gt;&lt;br /&gt;Now we need to build kinterbas db using this python.exe&lt;br /&gt;1. Download &lt;a href="http://kinterbasdb.sourceforge.net/"&gt;kinterbasdb&lt;/a&gt; from sourceforge&lt;br /&gt;-&gt; 2. Replace in the kinterbasdb source the __init__.py with this one :&lt;br /&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=8986782557879316238&amp;amp;postID=9008687573803145618"&gt;&lt;span style="font-family:georgia;"&gt;https://firebird.svn.sourceforge.net/svnroot/firebird/qa/trunk/kinterbasdb/__init__.py&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;b&gt;Note&lt;/b&gt; I forgot to add this step when I wrote the original instructions.&lt;br /&gt;3. Make sure you have the 64bit Firebird 2.1 for MacOSX installed&lt;br /&gt;4. Make sure you are running as root&lt;br /&gt;su and log in&lt;br /&gt;export MACOSX_DEPLOYMENT_TARGET=10.5&lt;br /&gt;export CFLAGS, CXXFLAGS and LDFLAGS ='-arch x86_64'&lt;br /&gt;The install option will want to put the kinterbasdb in /usr/local/lib/python2.5&lt;br /&gt;Although I suspect you can change this by using a different --prefix when you build python&lt;br /&gt;5. pathtojustbuilt64bitpython/python.exe setup.py install&lt;br /&gt;or&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:georgia;"&gt;pathtojustbuilt64bitpython/python.exe setup.py build&lt;br /&gt;if you just want to build it.&lt;br /&gt;6. You can check what you have installed by&lt;br /&gt;file /usr/local/lib/python2.5/site-packages/kinterbasdb/_kinterbasdb.so&lt;br /&gt;Mach-O 64bit bundle x86_64&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now we can test it...&lt;br /&gt;create a database using isql&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:georgia;"&gt;pathtojustbuilt64bitpython/python.exe&lt;br /&gt;&gt;&gt;&gt; import kinterbasdb;kinterbasdb.init(type_conv=200)&lt;br /&gt;Don't use mx.DateTime use the default python DateTime&lt;br /&gt;&gt;&gt;&gt; con = kinterbasdb.connect(dsn='localhost:/pathtodd/test.fdb', user='sysdba', password='masterkey')&lt;br /&gt;&lt;br /&gt;It works ....&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-9008687573803145618?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/9008687573803145618/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=9008687573803145618' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/9008687573803145618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/9008687573803145618'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/02/python-kinterbasdb-and-64bit-macosx-105.html' title='Python, kinterbasdb and 64bit MacOSX 10.5'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-2764605993440567553</id><published>2008-02-12T03:20:00.000-08:00</published><updated>2008-02-12T03:38:18.500-08:00</updated><title type='text'>Testing and Debugging the Service Manager on MacOSX</title><content type='html'>&lt;span style="font-family: georgia;"&gt;For Classic - SuperServer is easy.&lt;br /&gt;&lt;br /&gt;PATH=$PATH:/Library/Frameworks/Firebird.framework/Resources/bin&lt;br /&gt;export PATH&lt;br /&gt;&lt;br /&gt;In one terminal session:&lt;br /&gt;gsec -user xxx -password -xxx -database localhost:/Library/Frameworks/Firebird.framework/Resources/English.lproj/var/security2.fdb&lt;br /&gt;This will start a remote connection to gsec via the service manager...&lt;br /&gt;ps -eaf | grep fb&lt;br /&gt;and look for the running fb_inet_server&lt;br /&gt;&lt;br /&gt;In the other&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: georgia;"&gt;cd /Library/Frameworks/Firebird.framework/Resources/bin&lt;br /&gt;gdb ./fb_inet_server --pid=&lt;br /&gt;Set the pid to the running fb_inet_server&lt;br /&gt;gdb&gt; break svc.cpp:2461&lt;br /&gt;set an appropriate break point - in this case when vfork starts&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: georgia;"&gt;gdb&gt; continue&lt;br /&gt;&lt;br /&gt;In the original session&lt;br /&gt;gsec&gt; display&lt;br /&gt;&lt;br /&gt;In the gdb session the debugger should break when vfork is called in svc.cpp&lt;br /&gt;&lt;br /&gt;Now do what you need to - to walk through the code.&lt;br /&gt;&lt;br /&gt;If all is working properly, try doing a backup using the service manager...&lt;br /&gt;gbak -v -b -user xxxx -password xxxx /Users/pbeach/databases/test.fdb /Users/pbeach/databases/test.fbk -se localhost:service_mgr&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-2764605993440567553?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/2764605993440567553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=2764605993440567553' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/2764605993440567553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/2764605993440567553'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/02/testing-and-debugging-service-manager.html' title='Testing and Debugging the Service Manager on MacOSX'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-3232249831410392058</id><published>2008-02-08T00:31:00.000-08:00</published><updated>2009-01-13T05:12:44.843-08:00</updated><title type='text'>Adding a User to a Group using dscl</title><content type='html'>&lt;span style="font-family: georgia;"&gt;How to add a user to the Firebird group on MacOS using dscl&lt;br /&gt;&lt;br /&gt;dscl localhost append /Local/Default/Groups/firebird GroupMembership pbeach&lt;br /&gt;or&lt;br /&gt;dscl . append Groups/firebird GroupMembership pbeach&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-3232249831410392058?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/3232249831410392058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=3232249831410392058' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/3232249831410392058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/3232249831410392058'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/02/adding-user-to-group-using-dscl.html' title='Adding a User to a Group using dscl'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-8042214424067042507</id><published>2008-02-03T02:29:00.000-08:00</published><updated>2008-02-03T02:33:46.764-08:00</updated><title type='text'>Nine Below Zero</title><content type='html'>&lt;span style="font-family: georgia;"&gt;Non Technical for a change:&lt;br /&gt;&lt;br /&gt;2nd Feb 2008 + &lt;a href="http://www.cafefrancais.fr/main_accueil/"&gt;Cafe Francaise@Chinon&lt;/a&gt; + &lt;a href="http://www.ninebelowzero.com/"&gt;Nine Below Zero&lt;/a&gt; &lt;/span&gt;&lt;span style="font-family: georgia;"&gt; * (Rhythm + Blues)&lt;/span&gt;&lt;span style="font-family: georgia;"&gt; + 150 people = Superb gig.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-8042214424067042507?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/8042214424067042507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=8042214424067042507' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/8042214424067042507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/8042214424067042507'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/02/nine-below-zero.html' title='Nine Below Zero'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-7391271996974739073</id><published>2008-01-18T03:42:00.000-08:00</published><updated>2008-02-08T03:07:26.603-08:00</updated><title type='text'>64bit Firebird for MacOS 10.5 (Leopard)</title><content type='html'>&lt;span style="font-family:georgia;"&gt;   Today I put the finishing touches to a native 64bit port of Firebird for MacOS 10.5 (Leopard).&lt;br /&gt;This required the following changes to the Firebird 2.1 code base (B2_1_Release). For anybody else considering adding a new platform to Firebird then you may find  this useful.&lt;br /&gt;&lt;br /&gt;Changes:&lt;br /&gt;1. src/jrd/common.h (line 289)&lt;br /&gt;#ifdef __x86_64__&lt;br /&gt;#define DARWIN64&lt;br /&gt;#define IMPLEMENTATION isc_info_db_impl_darwin_x64 /* 73 */&lt;br /&gt;#endif&lt;br /&gt;&lt;br /&gt;2. src/jrd/inf_pub.h (line 203)&lt;br /&gt;add&lt;br /&gt;isc_info_db_impl_darwin_x64 = 73,&lt;br /&gt;&lt;br /&gt;3.  src/jrd/license.h (line 135)&lt;br /&gt;amend&lt;br /&gt;#ifdef DARWIN&lt;br /&gt;#if defined(i386)&lt;br /&gt;#define FB_PLATFORM    "UI" /* Darwin/Intel */&lt;br /&gt;to&lt;br /&gt;#if defined(i386) || defined (__x86_64__)&lt;br /&gt;&lt;br /&gt;4.  src/jrd/pag.cpp (line 155)&lt;br /&gt;insert (last)&lt;br /&gt;static const int CLASS_DARWIN_X64 = 31;    // Darwin x64&lt;br /&gt;amend (line 158)&lt;br /&gt;static const int CLASS_MAX = CLASS_DARWIN_X64;&lt;br /&gt;since this is the last one added&lt;br /&gt;&lt;br /&gt;5. src/jrd/pag.cpp (line 245)&lt;br /&gt;insert (last)&lt;br /&gt;archLittleEndian    // CLASS_DARWIN_X64&lt;br /&gt;make sure you add a , to the class above...&lt;br /&gt;&lt;br /&gt;6. src/jrd/pag.cpp (line 322)&lt;br /&gt;Pick up the right class for the right architecture..&lt;br /&gt;add&lt;br /&gt;#ifdef DARWIN64&lt;br /&gt;const SSHORT CLASS = CLASS_DARWIN_X64&lt;br /&gt;#endif&lt;br /&gt;&lt;br /&gt;7.  src/remote/protocol.h (line 150)&lt;br /&gt;add a new architecture&lt;br /&gt;arch_darwin_64 = 41,&lt;br /&gt;and update arch_max&lt;br /&gt;arch_max = 42&lt;br /&gt;&lt;br /&gt;8. src/remote/remote_def.h (line 72)&lt;br /&gt;add a new architecture&lt;br /&gt;#elif defined(DARWIN64)&lt;br /&gt;const P_ARCH ARCHITECTURE = arch_darwin_64;&lt;br /&gt;&lt;br /&gt;9. src/remote/xdr.cpp&lt;br /&gt;Make sure SWOP DOUBLE is defined correctly&lt;br /&gt;by appending&lt;br /&gt;|| defined(DARWIN64)&lt;br /&gt;to the intel crowd.&lt;br /&gt;&lt;br /&gt;10. src/jrd/utl.cpp (line 218)&lt;br /&gt;add&lt;br /&gt;"Firebird/Darwin/Intel64"    /* 73 */&lt;br /&gt;&lt;br /&gt;11. src/common/classes/fb_atomic.h (line 82)&lt;br /&gt;add || defined (__x86_64__)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:georgia;"&gt;12.  configure.in (line 62)&lt;br /&gt;In the target  darwin section  add&lt;br /&gt;dnl CPU_TYPE=x86_64&lt;br /&gt;This can be uncommented when you do a 64bit build&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;&lt;br /&gt;Now read the notes in builds/posix/prefix.darwin_x86_64&lt;br /&gt;&lt;br /&gt;1. edit configure.in so that MAKEFILE_PREFIX=darwin_x86_64&lt;br /&gt;2. Uncomment the CPU_TYPE&lt;br /&gt;3. edit extern/icu/source/config/mh-darwin to set the right 64bit flags (-arch x86_64) for LD_FLAGS&lt;br /&gt;for CFLAGS, CXXFLAGS&lt;br /&gt;4. export CFLAGS='-arch x86_64'&lt;br /&gt;5. export CXXFLAGS='-arch x86_64'&lt;br /&gt;&lt;br /&gt;Then check and make sure that&lt;br /&gt;MACOSX_DEPLOYMENT_TARGET=10.5&lt;br /&gt;and export that for good measure.&lt;br /&gt;&lt;br /&gt;Build should be good to go. Welcome to native 64bit Firebird on MacOS&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-7391271996974739073?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/7391271996974739073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=7391271996974739073' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/7391271996974739073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/7391271996974739073'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/01/64bit-firebird-for-macos-105-leopard.html' title='64bit Firebird for MacOS 10.5 (Leopard)'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-7043171524759954956</id><published>2008-01-09T07:42:00.000-08:00</published><updated>2008-01-11T04:34:58.945-08:00</updated><title type='text'>depot Files and HP-UX</title><content type='html'>&lt;span style="font-family:georgia;"&gt;I have just finished writing a depot install for Firebird Classic 2.0x on HPUX . A depot install is the HP equivalent of a Linux rpm or Solaris package. The operating system install uninstall utilities take command of looking after the files. Although in more complex areas you still have to have the relevant postinstall and postremove scripts to handle things like links etc.&lt;br /&gt;To allow a user other than root to use SD-UX you need to give yourself access to it e.g.&lt;br /&gt;swacl -m user:pbeach:crwit -l host&lt;br /&gt;To create a depot install you need to write a .psf file (the Firebird specific one will be found in builds/install/arch-specific/hpux/classic/firebirdCS.psf), you then&lt;br /&gt;&lt;br /&gt;test it using:&lt;br /&gt;swpackage -vv -p ./firebirdCS.psf&lt;br /&gt;&lt;br /&gt;create it using:&lt;br /&gt;swpackage -d "| gzip -c &gt; /firebird2/gen/firebird.depot.gz" -x media_type=tape -vv -s firebirdCS.psf&lt;br /&gt;&lt;br /&gt;install it using:&lt;br /&gt;swinstall -s /firebird.depot.gz&lt;br /&gt;&lt;br /&gt;list installed packages using&lt;br /&gt;swlist&lt;br /&gt;&lt;br /&gt;remove it using&lt;br /&gt;swremove Firebird&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-7043171524759954956?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/7043171524759954956/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=7043171524759954956' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/7043171524759954956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/7043171524759954956'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/01/depot-files-and-hp-ux.html' title='depot Files and HP-UX'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-1217985265150423916</id><published>2008-01-09T00:24:00.000-08:00</published><updated>2008-01-09T04:17:59.939-08:00</updated><title type='text'>Open Source Code Contains Security Holes</title><content type='html'>&lt;span style="font-family:georgia;"&gt;The following was sent to Charles Babcock at Information week in reply to an article entitled:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.informationweek.com/news/showArticle.jhtml?articleID=205600229&amp;amp;subSection=News"&gt;Open Source Code Contains Security Holes&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:georgia;"&gt;&lt;br /&gt;As a developer and administrator of the Firebird Project I completely reject the statement you made in the above article.&lt;br /&gt;&lt;br /&gt;"The somewhat moribund Firebird project, for example, is listed with 195 identified defects, of which it has verified zero and fixed zero. The active Firefox browser project, on the other hand,&lt;br /&gt;has fixed 370 bugs, verified 56 and faces another 246 to verify and fix."&lt;br /&gt;&lt;br /&gt;The Firebird project is in fact incredibly active - perhaps a look at this chart on our bug tracker might give you a clue.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=8986782557879316238&amp;amp;postID=1217985265150423916"&gt;&lt;span style="font-family:georgia;"&gt;&lt;/span&gt;&lt;/a&gt;&lt;a href="http://tinyurl.com/yt5pgl"&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="font-family:georgia;"&gt;&lt;a href="http://tinyurl.com/yt5pgl"&gt;http://tinyurl.com/yt5pgl&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Firstly the Firebird project reviewed the Coverity results almost immediately they were published and found that the report isn't actually related to the Firebird engine. This URL shows our appropriate  comments from the 7th March 2006:&lt;br /&gt;&lt;a href="http://www.firebirdnews.org/?p=180"&gt;&lt;span style="font-family:georgia;"&gt;http://www.firebirdnews.org/?p=180&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Also more comments from Claudio on the 26th March 2006:&lt;br /&gt;&lt;a href="http://www.firebirdnews.org/?p=243"&gt;http://www.firebirdnews.org/?p=243&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Secondly in a more detailed reply to the actual "PR" issue raised by David Maxwell, open source strategist for Coverity. If you had asked about this before printing the article you could have put some facts straight.&lt;br /&gt;&lt;br /&gt;Nearly all of the 195 identified defects are in fact actually within an external piece of code we use for character sets and collation sequences ICU&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=8986782557879316238&amp;amp;postID=1217985265150423916"&gt;&lt;span style="font-family:georgia;"&gt;&lt;/span&gt;&lt;/a&gt;&lt;a href="http://www-306.ibm.com/software/globalization/icu/index.jsp"&gt;&lt;/a&gt;&lt;span style="font-family:georgia;"&gt;&lt;a href="http://www-306.ibm.com/software/globalization/icu/index.jsp"&gt;http://www-306.ibm.com/software/globalization/icu/index.jsp&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;&lt;br /&gt;"The International Component for Unicode (ICU) is a mature, portable set of C/C++ and Java libraries for Unicode support, software internationalization (I18N) and globalization (G11N),&lt;br /&gt;giving applications the same results on all platforms."&lt;br /&gt;&lt;br /&gt;A open source project maintained by IBM. I will admit that we are using an older version of ICU (3.0) than is currently available and we will be upgrading to a newer version in the near future.&lt;br /&gt;But this is not something that is a trivial exercise, as it means that any database using a different version of ICU would be incompatible with the version we ship. We plan to upgrade ICU&lt;br /&gt;in Firebird version 2.5&lt;br /&gt;&lt;br /&gt;Other defects reported are one in&lt;br /&gt;usr/include/c++/4.0.2/i386-redhat-linux/bits/gthr-default.h&lt;br /&gt;Not our problem either....&lt;br /&gt;&lt;br /&gt;And there are four defects in firebird2/src/gpre/pretty.cpp a piece of old code used with a pre-compiler (gpre) to make BLR look good.  BLR (Binary Language Representation),&lt;br /&gt;Firebird's internal compiled language. This doesn't affect the Firebird server at all.&lt;br /&gt;&lt;br /&gt;I would like you to print a correction or at least acknowledge the innacuracy of the article as regards Firebird.&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Paul Beach&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-1217985265150423916?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/1217985265150423916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=1217985265150423916' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/1217985265150423916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/1217985265150423916'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/01/open-source-code-contains-security.html' title='Open Source Code Contains Security Holes'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-5217701300613501206</id><published>2008-01-07T05:45:00.000-08:00</published><updated>2008-01-07T05:50:22.167-08:00</updated><title type='text'>Firebird 2.03 on HPUX 11</title><content type='html'>&lt;span style="font-family: georgia;"&gt;I have just released a classic version of Firebird V2.03 for HPUX 11. This is a 64bit version for PA-RISC 2.0. The current install mechanism as per Firebird 1.5.x uses a tar file and scripts to install firebird into /opt/firebird etc. I think the time has now come to try and write a depot file so that we can use the HPUX installer to install firebird. Initial analysis indicates that I need to write a .psf file that contains the relevant instructions, and that I can test it using the following command:&lt;br /&gt;swpackage -p -vv -s ./firebirdCS.psf -d /sd/firebird&lt;br /&gt;Where:&lt;br /&gt;-p = preview mode (don't do anything - just test the psf file)&lt;br /&gt;-vv = very verbose&lt;br /&gt;-s = source psf file&lt;br /&gt;-d = destination&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-5217701300613501206?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/5217701300613501206/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=5217701300613501206' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/5217701300613501206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/5217701300613501206'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2008/01/firebird-203-on-hpux-11.html' title='Firebird 2.03 on HPUX 11'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-6592506246184276988</id><published>2007-12-21T08:54:00.000-08:00</published><updated>2007-12-21T09:04:33.744-08:00</updated><title type='text'>Leopard 64bit OS and Firebird</title><content type='html'>&lt;span style="font-family: georgia;"&gt;F&lt;span style="font-family: georgia;"&gt;or anybody who may even be remotely interested MacOS 10.5 (Leopard) is a 64 bit OS and allows you to build and run 64 bit binaries. The current Firebird build for MacOS 10.4 and MacOS 10.5 is 32bit. I now have a 64bit build for Leopard. When I get the chance I will explain exactly what was done. I think we will start offering 64bit builds for MacOS with Firebird 2.1 for those who want them.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-6592506246184276988?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/6592506246184276988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=6592506246184276988' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/6592506246184276988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/6592506246184276988'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2007/12/leopard-64bit-os-and-firebird.html' title='Leopard 64bit OS and Firebird'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-1146854454707105825</id><published>2007-12-20T04:52:00.000-08:00</published><updated>2007-12-21T09:16:41.329-08:00</updated><title type='text'>O_DIRECT and MacOS</title><content type='html'>&lt;span style="font-family:georgia;"&gt;Mac's don't support the O_DIRECT flag for files but F_NOCACHE should do the trick....&lt;br /&gt;For more details look at jrd/os/posix/unix.cpp and forced writes in the 2.1 cvs tree.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-1146854454707105825?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/1146854454707105825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=1146854454707105825' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/1146854454707105825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/1146854454707105825'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2007/12/odirect-and-macos.html' title='O_DIRECT and MacOS'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-8412668652315283190</id><published>2007-12-18T02:07:00.001-08:00</published><updated>2007-12-18T03:22:48.037-08:00</updated><title type='text'>Preprocesser Macros</title><content type='html'>The following are the C preprocessor                     macros used for making various compile-time                     checks against MacOSX architectur&lt;span style="font-family:georgia;"&gt;es - Firebird currently checks for the 32bit macros... I hope to try a 64bit intel build on Leopard in the not too distant future. This will mean defining yet another "new" platform.&lt;br /&gt;&lt;br /&gt;__ppc__&lt;br /&gt;__ppc64__&lt;br /&gt;__i386__&lt;br /&gt;__x86_64__&lt;/span&gt;&lt;code&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-8412668652315283190?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/8412668652315283190/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=8412668652315283190' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/8412668652315283190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/8412668652315283190'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2007/12/following-are-c-preprocessor-macros.html' title='Preprocesser Macros'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-1703173575105330140</id><published>2007-12-18T02:02:00.001-08:00</published><updated>2007-12-18T03:20:03.640-08:00</updated><title type='text'>MACOSX_DEPLOYMENT_TARGET</title><content type='html'>&lt;span style="font-family:georgia;"&gt;I have read in a number of places that &lt;/span&gt;I should be using&lt;br /&gt;&lt;br /&gt;gcc -mmacosx-version-min=10.4&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;rather than                     the&lt;br /&gt;&lt;br /&gt;MACOSX_DEPLOYMENT_TARGET=10.4&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;environment variable because the latter has now been                     deprecated.&lt;br /&gt;&lt;br /&gt;NO! Any attempt to compile Firebird on MacOS 10.5 and run it on MacOS 10.4 will create bus errors. You must set the MACOSX_DEPLOYMENT_TARGET variable!&lt;br /&gt;&lt;br /&gt;(The Firebird build environment now uses both - just to make 100% certain)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-1703173575105330140?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/1703173575105330140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=1703173575105330140' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/1703173575105330140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/1703173575105330140'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2007/12/i-have-read-in-number-of-places-that-i.html' title='MACOSX_DEPLOYMENT_TARGET'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-4532920833962159851</id><published>2007-12-13T05:04:00.000-08:00</published><updated>2007-12-21T08:52:32.440-08:00</updated><title type='text'>MacOS Architectures Compile Flags</title><content type='html'>&lt;span style="font-family:georgia;"&gt;It is possible to define what architecture you wish to compile against on MacOS using the following C/C++ flag(s):&lt;br /&gt;&lt;br /&gt;-arch ppc (ppc 32bit)&lt;br /&gt;-arch ppc64 (ppc 64bit)&lt;br /&gt;-arch i386 (intel 32bit)&lt;br /&gt;-arch x86_64 (intel 64bit)&lt;br /&gt;&lt;br /&gt;Its even possible to combine them to create "Universal Binaries" however the endian-ness of Firebird on ppc v's intel and the way that Firebird is currently built makes this somewhat impossible. Something for the future I think.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-4532920833962159851?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/4532920833962159851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=4532920833962159851' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4532920833962159851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4532920833962159851'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2007/12/macos-architectures-compile-flags.html' title='MacOS Architectures Compile Flags'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-6452503490817531761</id><published>2007-12-12T06:30:00.001-08:00</published><updated>2007-12-12T07:21:55.181-08:00</updated><title type='text'>Trying To Debug Semaphores</title><content type='html'>&lt;span style="font-family:georgia;"&gt;We are trying to debug semaphore creation and usage on MacOS to get Signal Safe Semaphores implemented in SuperServer. But we are having some issues... (as per previous posts)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;We have a gds__log print in semaphore.h to see whether the semaphore is created.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;&lt;/span&gt;&lt;span style="font-family:georgia;"&gt; If we try and start the server automatically via&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;the StartupItem (Mac's method for starting Services)&lt;/span&gt;&lt;span style="font-family:georgia;"&gt;&lt;br /&gt;we see:&lt;br /&gt;sem=0x0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;If we try and run ./fbserver from gdb or the command&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;line we see&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt; sem=0x3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;&lt;/span&gt;&lt;span style="font-family:georgia;"&gt;In the firebird.log file.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;It looks like for darwin semaphore's handle is &lt;/span&gt;&lt;span style="font-family:georgia;"&gt;really a file descriptor - nothing more. When statring firebird as a service, there are no  &lt;/span&gt;&lt;span style="font-family:georgia;"&gt;opened files passed to it, because it's supposed to be a daemon. Therefore the &lt;/span&gt;&lt;span style="font-family:georgia;"&gt;first opened file (or semaphore) is 0. When starting from the command line, &lt;/span&gt;&lt;span style="font-family:georgia;"&gt;stdin(0), stdout(1) and stderr(2) are already opened. Therefore - we get 3 which is the &lt;/span&gt;&lt;span style="font-family:georgia;"&gt;next free handle.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-6452503490817531761?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/6452503490817531761/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=6452503490817531761' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/6452503490817531761'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/6452503490817531761'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2007/12/trying-to-debug-semaphores.html' title='Trying To Debug Semaphores'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-6653994439725162497</id><published>2007-12-12T05:38:00.000-08:00</published><updated>2007-12-12T06:38:21.832-08:00</updated><title type='text'>DTrace</title><content type='html'>&lt;span style="font-family:monospace;"&gt;&lt;span style="font-family:georgia;"&gt;MacOS 10.5 (Leopard) has replaced the kernel debugging tool KTrace with a new tool called DTrace.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;KTrace was relatively simple to use, and although not probably the best tool around for looking at what the kernel is doing - it did give you information that you needed simply and easily.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;For those of you who might even be marginally interested in DTrace.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Here's a &lt;/span&gt;&lt;a style="font-family: georgia;" href="http://www.mactech.com/articles/mactech/Vol.23/23.11/ExploringLeopardwithDTrace/index.html"&gt;link &lt;/a&gt;&lt;span style="font-family:georgia;"&gt; on MacTech.&lt;br /&gt;And thats just the tip of the iceberg.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Great - something completely new to try and understand. Why couldn't Apple have left KTrace and its friends on the 10.5 system, so we could use it, while we got to grips with DTrace?&lt;br /&gt;&lt;br /&gt;Looks like DTruss will do the trick....&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-6653994439725162497?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/6653994439725162497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=6653994439725162497' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/6653994439725162497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/6653994439725162497'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2007/12/dtrace.html' title='DTrace'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-4458583576794787450</id><published>2007-12-12T03:55:00.000-08:00</published><updated>2007-12-12T04:04:11.319-08:00</updated><title type='text'>Whats That Number?</title><content type='html'>&lt;span style="font-family:georgia;"&gt;For those who might not know, the number that you see after the table name in gstat for example (130) is the relation id.  For those of you who might not have 100+ tables, you might ask why do you always see 3 digits. Well the answer is as follows:&lt;br /&gt;&lt;br /&gt;Numbers 0-127 are reserved for system table relation ids.  So 128, 129+, etc., in creation order are used for normal table/relation ids.&lt;br /&gt;&lt;br /&gt;Analyzing database pages ...&lt;br /&gt;ACC_CHARGES (130)&lt;br /&gt;   Primary pointer page: 264, Index root page: 265&lt;br /&gt;   Data pages: 1, data page slots: 1, average fill: 16%&lt;br /&gt;   Fill distribution:&lt;br /&gt;        0 - 19% = 1&lt;br /&gt;       20 - 39% = 0&lt;br /&gt;       40 - 59% = 0&lt;br /&gt;       60 - 79% = 0&lt;br /&gt;       80 - 99% = 0&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-4458583576794787450?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/4458583576794787450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=4458583576794787450' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4458583576794787450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4458583576794787450'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2007/12/whats-that-number.html' title='Whats That Number?'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-6541792500650859413</id><published>2007-12-10T03:46:00.000-08:00</published><updated>2007-12-10T04:12:31.607-08:00</updated><title type='text'>Leopard V's Tiger</title><content type='html'>&lt;span style="font-family:georgia;"&gt;Looks like we are going to need separate download binaries for Firebird on Leopard and pre-Leopard (Tiger). Firebird 2.0.3 compiled on Leopard works perfectly on Leopard, but when you try to run and install Firebird that was built on Leopard on Tiger, all the utilities give a bus error, and you get the following type of debug trace from gdb:&lt;br /&gt;&lt;br /&gt;Program received signal EXC_BAD_ACCESS, Could not access memory.&lt;br /&gt;Reason: KERN_PROTECTION_FAILURE at address: 0x00000000&lt;br /&gt;0x302188f0 in Firebird::MemoryPool::allocate_nothrow ()&lt;br /&gt;(gdb) bt&lt;br /&gt;#0  0x302188f0 in Firebird::MemoryPool::allocate_nothrow ()&lt;br /&gt;#1  0x3000e5d6 in gds__alloc_debug ()&lt;br /&gt;#2  0x00012c8f in parse_arg ()&lt;br /&gt;#3  0x00018d51 in ISQL_main ()&lt;br /&gt;#4  0x000190bf in main ()&lt;br /&gt;&lt;br /&gt;Supposedly a &lt;/span&gt;&lt;span class="articleText"&gt;EXC_BAD_ACCESS/KERN_PROTECTION_FAILURE —  is caused by the thread trying to write to read-only memory. This is always caused by a data access.&lt;br /&gt;&lt;br /&gt;So why does Firebird 2.03 compiled on Tiger work perfectly? For some strange reason we smell a rat with either the Operating System or the compiler. But what the problem is - is a very good question. I am open to suggestions.&lt;br /&gt;&lt;br /&gt;Using the link command:&lt;br /&gt;&lt;br /&gt;-Wl,-macosx_version_min -Wl,10.4 has no effect.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:georgia;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-6541792500650859413?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/6541792500650859413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=6541792500650859413' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/6541792500650859413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/6541792500650859413'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2007/12/leopard-vs-tiger.html' title='Leopard V&apos;s Tiger'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-6674940032762231687</id><published>2007-12-07T03:32:00.001-08:00</published><updated>2007-12-07T03:50:18.966-08:00</updated><title type='text'>Building Firebird 2.0x MacOS - semaphore.h</title><content type='html'>&lt;span style="font-family:georgia;"&gt;If you download the Firebird Source Code and want to build your own version of Firebird 2.0x on MacOS 10.4 (Tiger) you will probably have to make a minor change to the code. Seems there are changes in /usr/include/sys/semaphore.h between 10.4 and 10.5 to make semaphore.h more compliant.&lt;br /&gt;We use (for Mac purposes) the following in src/common/classes/semaphore.h at line 106&lt;br /&gt;&lt;br /&gt;if (sem == SEM_FAILED) {&lt;br /&gt;&lt;br /&gt;Which seems obvious right?&lt;br /&gt;&lt;br /&gt;Well on 10.4 the build will fail with the following error:&lt;br /&gt;&lt;br /&gt;make -f ../gen/Makefile.libfbclient libfbclient&lt;br /&gt;g++  -DSUPERCLIENT -D_THREAD_SAFE  -I../src/include/gen -I../src/include -I../src/vulcan -I../extern/icu/source/common -I../extern/icu/source/i18n -DNAMESPACE=Vulcan -ggdb -DDARWIN -pipe -p -MMD -fPIC -fno-common -Wall -arch i386  -DDEV_BUILD -c ../src/jrd/alt.cpp -o ../temp/superclient/jrd/alt.o&lt;br /&gt;../src/include/../jrd/../common/classes/semaphore.h: In constructor 'Firebird::SignalSafeSemaphore::SignalSafeSemaphore()':&lt;br /&gt;../src/include/../jrd/../common/classes/semaphore.h:106: error: ISO C++ forbids comparison between pointer and integer&lt;br /&gt;../src/jrd/../jrd/common.h: At global scope:&lt;br /&gt;&lt;br /&gt;A quick check of /usr/include/sys/semaphore.h on 10.4 and 10.5 shows:&lt;br /&gt;&lt;br /&gt;10.4 #define SEM_FAILED -1&lt;br /&gt;10.5 #define SEM_FAILED ((sem_t *)-1)&lt;br /&gt;&lt;br /&gt;Hmm - 10.5 looks more like what we would expect (same as linux for example)&lt;br /&gt;A problem with types? Looks like it.&lt;br /&gt;&lt;br /&gt;Change line 106 in src/common/classes/semaphore.h&lt;br /&gt;&lt;br /&gt;from:&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:georgia;"&gt;if (sem == SEM_FAILED) {&lt;br /&gt;to:&lt;br /&gt;if (sem == (sem_t*)SEM_FAILED) {&lt;br /&gt;&lt;br /&gt;Or upgrade your /usr/include/sys/semaphore.h to something thats correct!&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-6674940032762231687?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/6674940032762231687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=6674940032762231687' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/6674940032762231687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/6674940032762231687'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2007/12/building-firebird-20x-macos-semaphoreh.html' title='Building Firebird 2.0x MacOS - semaphore.h'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-4239807363271477847</id><published>2007-12-07T03:14:00.000-08:00</published><updated>2007-12-07T03:22:20.633-08:00</updated><title type='text'>Semaphores With Timeouts</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;span style="font-family:georgia;"&gt;Firebird normally makes use of semaphores with timeouts, and I read on an Apple mailing list the following question posted in May 2004:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;"&lt;/span&gt;I have a project that depends on semaphores with timeouts (sometimes&lt;br /&gt;referred to as realtime extensions to semaphores).  I use autoconf to&lt;br /&gt;select either SysV semaphores or POSIX semaphores, but MacOS X does not&lt;br /&gt;have a complete set of either one.  Neither sem_timedwait nor semtimedop&lt;br /&gt;are implemented.  On top of that, the POSIX semaphore implementation&lt;br /&gt;doesn't even have sem_init (though I did see the recent discussion about&lt;br /&gt;it on this list, so I'm moderately hopeful for 10.4).&lt;br /&gt;Are semtimedop or sem_timedwait implementations planned anytime soon?"&lt;br /&gt;&lt;br /&gt;Well he answer is no. Leopard MacOS 10.5 doesn't solve the problem either. Hence a number of changes we have had to make to the Firebird code and build process to handle this. Look at the latest (being committed) configure.in and semaphore.h to see how we have had to try and work around what should not be a problem by using a poor man's semaphore based on a mutex and conditional  variable.&lt;br /&gt;&lt;br /&gt;Hint to the Apple developers - You really should fix this soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-4239807363271477847?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/4239807363271477847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=4239807363271477847' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4239807363271477847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/4239807363271477847'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2007/12/firebird-normally-makes-use-of.html' title='Semaphores With Timeouts'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8986782557879316238.post-8916089732439604195</id><published>2007-12-06T01:47:00.001-08:00</published><updated>2007-12-06T02:09:14.906-08:00</updated><title type='text'>32bit or 64bit binaries on MacOS</title><content type='html'>I have just built a version of Firebird 2.03 Classic for MacOS using a new MacOS 10.5 (Leopard) system I got recently. My basic tests show everything working OK. So a copy of the build was sent to Philippe Makowski for QA. However after install he gets a bus error trying to run isql. He is running MacOS 10.4 (Tiger).&lt;br /&gt;&lt;br /&gt;First thought as to what the problem might be was that Leopard is a 64bit OS whilst Tiger is 32bit and that gcc/ld might have built incompatible binaries for the two platforms by default.&lt;br /&gt;&lt;br /&gt;Well - Hmm - heres the problem, how do you find out whether a binary is 64bit or not?&lt;br /&gt;MacOS has no ldd. But it does have something called otool&lt;br /&gt;file ./isql gives the following answer: ./isql: Mach-O executable i386&lt;br /&gt;Without going into the ins and outs of how MacOS loads binaries etc there is no simple and easy way to find out for sure - even using otool...&lt;br /&gt;&lt;br /&gt;The solution:&lt;br /&gt;otool -h ./isql&lt;br /&gt;./isql&lt;br /&gt;mach header&lt;br /&gt;       magic cputype cpusubtype caps  filetype ncmds sizeofcmds                 flags&lt;br /&gt;0xfeedface           7                    3 0x00          2      16             1868   0x00000085&lt;br /&gt;&lt;br /&gt;The key is the magic number, looking at /usr/include/mach-o/loader.h will give you the magic number for 32bit and 64bit binaries...&lt;br /&gt;0xfeedface = 32bit&lt;br /&gt;0xfeedfacf = 64bit&lt;br /&gt;&lt;br /&gt;So we can see from the information above that we do have a 32 bit build. So thats not the problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8986782557879316238-8916089732439604195?l=paulbeachsblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulbeachsblog.blogspot.com/feeds/8916089732439604195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8986782557879316238&amp;postID=8916089732439604195' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/8916089732439604195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8986782557879316238/posts/default/8916089732439604195'/><link rel='alternate' type='text/html' href='http://paulbeachsblog.blogspot.com/2007/12/32bit-or-64bit-binaries-on-macos.html' title='32bit or 64bit binaries on MacOS'/><author><name>Paul Beach</name><uri>http://www.blogger.com/profile/01887777727779537695</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
