On 11.02.2019 08:35, Lucio De Re wrote:
On 2019/02/11 09:22, Howard Chu wrote:
> *Opening* a DBI handle can only be done by one transaction.*Using* an
> open DBI handle
> can be done by any transactions.
That still means that the "opening transaction" must complete before the
handle becomes public.
Yes. I think you two just misunderstand each other a bit.
I guess (I really am applying commonsense, here, so I
could be wrong in real terms) that such an opening transaction ought to be
restricted to the open and nothing else, unless it is going to be the only one.
No. We could document that as a recommendation for opening existing DBs.
However, creating a database also involves opening it. You might want to
use transactions to ensure that if some small database exists, its contents
is complete. Similar to how you often do with plain files: You don't want
to have to first create an empty file, then fill it in.