Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104910 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 72089 invoked from network); 24 Mar 2019 03:30:00 -0000 Received: from unknown (HELO mail-ot1-f44.google.com) (209.85.210.44) by pb1.pair.com with SMTP; 24 Mar 2019 03:30:00 -0000 Received: by mail-ot1-f44.google.com with SMTP id x8so5048906otg.7 for ; Sat, 23 Mar 2019 17:22:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=J8+LtqPoN+qwQsgS4uenKbwn7+LJhD7Z9Nxlwi2pDiU=; b=OoHvlZntVI+FahPn4MzkLfkoj/KZ7RkFuFTHNXfQQGKTdUUAzUhI+53qrJqPq7I+P6 56r8x0i30GwXlJHG5dAx4zDqjjzXxvAryCWtQCUmjbH0CjkbbG+dl3ZY/dnC6GtwJkSg AAlhlR18tN/r4iyVzbJ/2di5JdYRfcazsLKcN6Ox+2DYCEVImOAp8WvKxBOsMqVA86nj LZx2OJC4EE+Aj3f8yaRO/olXtKGPkF/VFk4iTPxqqbLlob07L90rZz897C7f7qzezFdD 7SBMtsoN+tGmCg89Yim4Eu6NnIPsW3rD334YYQslQ9+o1g3WryiPWy+Od897TU7GBZJN kS5Q== X-Gm-Message-State: APjAAAVMGnwuz1+4Xh/VHbeyCKNHnuFzbZXUKdm5iXtooeun5ULfPS1A QS8C35+CpbxLQVxhFqb6dAPetw2jkYVQRfZH/xXFngpe+Sg= X-Google-Smtp-Source: APXvYqyPvkDqtmhiWHavcbCg08U9s0D3OOeg3R3L+4PrirCy7gI7f7oyaVJwbeO93S5Tu+ccPxpbm7DmeJtVyLsbdBg= X-Received: by 2002:a9d:4799:: with SMTP id b25mr12355675otf.264.1553386965799; Sat, 23 Mar 2019 17:22:45 -0700 (PDT) MIME-Version: 1.0 References: <33dee569-a06f-c5ab-d358-f7b8df3f8a76@lsces.co.uk> <1166897a-379d-4e6f-d132-744171ea19d5@lsces.co.uk> In-Reply-To: <1166897a-379d-4e6f-d132-744171ea19d5@lsces.co.uk> Date: Sun, 24 Mar 2019 02:22:32 +0200 Message-ID: To: Lester Caine Cc: Internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Unbundle ext/interbase From: kalle@php.net (Kalle Sommer Nielsen) Hi Lester Den l=C3=B8r. 23. mar. 2019 kl. 23.41 skrev Lester Caine : > Thread safety is one area where the way the extension was structured > originally may now be wrong, but the main problem with multiple > connections is confined completely to multiple connections to a single > database. In particular the 'default link' is actually the default > transaction handle and additional links are simply multiple transactions > on the one connection which I think is where some of the confusion has > come from :( A more established Firebird user would simply start a new > transaction, while a newbie may try to start a new connection. And in > the past the extension has hidden that and quietly picked up the > existing one ... The default link should not be related to thread safety, it should be related to the design of how database extensions used to be working. The design was as follows (using the old ext/mysql as an example here). mysql_connect('localhost', 'user', 'password'); mysql_select_db('test'); // The last created connection is implicitly added= here This is the "default" link. This is some magical behavior which made the API very easy to use, however it also created some hard to debug situations with multiple connections. ext/interbase seems to still go by this design which is most likely the reason to why some of the weirdness of the extension behavior after the blind updates to somewhat work on PHP7. Regarding the connection and fork(), is this a problem in other database extensions, if not, then it may be worth it for whoever ends up picking up the extension to look at how others do this. The design of this extension is fairly old and prone to unforeseen errors. > "A small subset of field types are supported, anything else crashes" > This is news to me ... is there any bug report to back it up? All the > current data types provided by Firebird are working in the extension, > but you may well be right that we may be better off cloning the existing > code and building a Firebird only port going forward. The concern is the > same one we had with windows in the past, where adding extra extensions > does not always work reliably ... one has to provide a wrapped package > with all the edge cases addressed. But all my use in production is using > ADOdb to wrap the database SQL problems ... I count 13 open bugs[1] in regards to ext/interbase thats been reported, there are probably a ton more. Bug#74946 talks about a crash with a type, leading me to believe that if one type can crash, then more are very likely too. [1] https://bugs.php.net/search.php?cmd=3Ddisplay&bug_type=3DAll&status=3DO= pen&package_name%5B%5D=3DInterBase+related&by=3DAny&limit=3D30 regards, Kalle Sommer Nielsen kalle@php.net