Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-42089

inability to use streaming mode for retrieving query results

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • None
    • N/A
    • Server
    • None
    • Not for Release Notes

    Description

      I may be misunderstanding the documentation but
      I was expecting that this code would show different timestamps:
      $ php -a
      Interactive shell

      php > $query="select id, (select count from dropbox2002_202606.focalfollow where focal = b.id and endtype='END') nff from capuchin.biograph3 b having nff>0 limit 9";
      php > $mysqli = new mysqli("localhost", "root", "", "dropbox2002_202606");
      php > $uresult = $mysqli->query($query, MYSQLI_USE_RESULT);
      if ($uresult) { while ($row = $uresult->fetch_assoc())

      { echo date('c') . $row['id'] . PHP_EOL; }

      }
      php > php { 2026-11-05T21:04:59+00:00AM
      2026-11-05T21:04:59+00:00AN
      2026-11-05T21:04:59+00:00AR
      2026-11-05T21:04:59+00:00BE
      2026-11-05T21:04:59+00:00BK
      2026-11-05T21:04:59+00:00BL
      2026-11-05T21:04:59+00:00BX
      2026-11-05T21:04:59+00:00CG
      2026-11-05T21:04:59+00:00CL

      The query, when run with different limits, takes different amounts of time, roughly proportional to the limit, e.g., limit 1 takes .265 sec, limit 4 takes .73 sec, limit 9 takes 1.497 sec.
      And explain of the query returns, as expected, b as primary and DEPENDENT SUBQUERY for focalfollow.

      So what am I missing? Is this a bug in php? Mariadb? (I never got it to work in mysql either)

      Attachments

        Activity

          People

            Unassigned Unassigned
            Don Cohen Don Cohen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.