Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121290 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 69000 invoked from network); 13 Oct 2023 00:36:37 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Oct 2023 00:36:37 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C233C1804BC for ; Thu, 12 Oct 2023 17:36:36 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-oo1-f41.google.com (mail-oo1-f41.google.com [209.85.161.41]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 12 Oct 2023 17:36:36 -0700 (PDT) Received: by mail-oo1-f41.google.com with SMTP id 006d021491bc7-57bbb38d5d4so783262eaf.2 for ; Thu, 12 Oct 2023 17:36:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697157395; x=1697762195; darn=lists.php.net; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=tBAbvPYuUJwfevfd+Wjc5D5pKYSz9XsOBU4YEfcQ9fo=; b=lX9U0j1fTwRWytmJjdxv27h3LdcZ/kuZnz4k7v6YS7mYf97aoE7xbPt+cm5U6duYDU VQtXrltbDzZb1Yi8aHxeNLWlf2Edj97ZNXIiLFZtmgvuurdeEQN4Tze55HvuX9mE7FEq l4ReZN4oz0bw+Qzqcy8H+aOIZUjjX5JejI4cuZFbQ6k5cNkqx3OdLTaPQAy/3CHds4Yg fanbnGbAjyNSen7v/568yhiISlYKB2R8zZ9IRYMAt5KNV/fitMVN1xDWlz7Hg6j+4EjH VFnQUm5NagZs3RiV/HQUfTjRRcEoEiMSM9nDz0tYhByHv3PAvgQ8wKrhpXjdiHJ8fFKZ G8lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697157395; x=1697762195; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tBAbvPYuUJwfevfd+Wjc5D5pKYSz9XsOBU4YEfcQ9fo=; b=glZOOCX90uVsT+Z0yhkNmhbxUg3dVCWtpK2034tJ0hXpx46qZeOHERUpVEiLOpyIZh OYOvrd46Y0/tVZeyixb8kGgI/NOV3kb6enY2PxNLnNhSu1X5q8Fa8W5KjdK/v55CqyLn G//jnOf3hceP+T5NxoFl59ZpYGgzLN/dPHvGU8tSmU437mVivqf8Ts91Mm9oUoukfs9O gSJ+KnKb35SGG53vmeEZUYQqMuhm9fKe7yq6VSEY6R6JaHmUFN5Oqkmo7SGxxL3knv07 6G7Qu/wmqvr8QIPNa7JM9fcOPSP3T86MaJ9DV5+y803d9+/XlSSS8BVtFbhrKJaYofsU eaDQ== X-Gm-Message-State: AOJu0YzNkfbsybtwRA1E0jo6+RAfCxNuOz+VgBL58pYp3V3NLzU1WEzK O12dyJ5L7QAbfr6AeHT/4fDJ15jjK8tk+r7VAek= X-Google-Smtp-Source: AGHT+IFc4OR6Lh/IIveZP3Nb1ukfJqKK+kjR2LmUSPQUOPT2QKoPTgfjPGW6xQYLvYYeOkdRlAhAeNpRVkQGIhNCHDY= X-Received: by 2002:a4a:b38c:0:b0:581:61f2:bf13 with SMTP id p12-20020a4ab38c000000b0058161f2bf13mr5800837ooo.9.1697157395559; Thu, 12 Oct 2023 17:36:35 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 13 Oct 2023 02:36:21 +0200 Message-ID: To: Karoly Negyesi Cc: Kamil Tekiela , PHP internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Expose pdo_parse_params to userspace From: landers.robert@gmail.com (Robert Landers) On Wed, Oct 11, 2023 at 8:36=E2=80=AFPM Karoly Negyesi = wrote: > > That's rather concerning on both fronts. > > Drupal doesn't plan on abandoning PDO, I believe. At least I haven't seen > that proposed. > > Is there anything I could help with fixing pdo_parse_params ? > > Also what's the problem with mysqli async? With fibers introduced in 8.1 = it > seems a very good fit , where can I read / help on problems with this > pairing? > > Thanks > > Karoly Negyesi > > > On Wed, Oct 11, 2023 at 5:47=E2=80=AFPM Kamil Tekiela wrote: > > > Hi, > > > > I have to say I am not a fan of this proposal. While definitely a super > > nice feature in PDO, it's more of a hack rather than proper feature. > > Certain RDBMSs support named parameters in prepared statements, but MyS= QL > > doesn't. Therefore, the solution implemented in PDO is a hack. It's ver= y > > flawed and the current implementation has multiple bugs and shortcoming= s. > > One could say that some bugs are security issues. > > > > For the above reason, I don't think we should support this in mysqli. W= e > > cannot reliably implement such feature. We could make a copy of > > pdo_parse_params and fix as many MySQL issues as possible, but we would > > never be able to fix it fully due to the nature of MySQL API. > > > > If someone wants to implement this in userland, then be my guest. As lo= ng > > as you are aware of the shortcomings and you know how to use it safely = then > > it's fine. > > > > Unrelated, but I would not consider the async feature of mysqli useful = or > > even a good reason to abandon PDO. IMHO the async feature is a failed > > experiment with limited applicability. > > > > Regards, > > Kamil Tekiela > > There isn't a PHP event loop, so fibers are basically useless in Drupal, unless Drupal is going to provide their own or use Revolt, or something. In that case, you pretty much have to change your entire programming model to work with it and accept the interrupts. It's funny because fibers were intended to prevent the 'what color is your function' problem, but instead it became the 'I have no idea what color my function is' problem. So, just like with async/await, you have to go all-in or none-at-all, or very carefully craft your stack to handle multiple layers of fibers. Or maybe I've just been "doing it wrong" which is certainly possible.