Uploaded image for project: 'MariaDB Connector/node.js'
  1. MariaDB Connector/node.js
  2. CONJS-223

Metadata column name gets sporadic corrupted

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • None
    • 3.0.2
    • other
    • None

    Description

      see https://github.com/mariadb-corporation/mariadb-connector-nodejs/issues/215

      ISSUE 215

      I have a problem with column aliases (name()) from the result metadata. If I run the same query multiple times, sometimes the names returned from meta[x].name() is corrupted, and looks like something from a memory leak.
      There seems to be a correlation between the problem and the size of the resultset, because if I set a limit in the query of fx 30 rows, there is no problem. In my case I only saw the problem when the result was more than about 300 rows.

      Here is some of my code:
      const r1 = await dbc.query(

      Unknown macro: { rowsAsArray}

      );
      const cols = r1.meta.map(c => (

      Unknown macro: { name}

      ));

      I'm using connector @3.0.1 and MariaDB 10.6.7 on Ubuntu.
      There seems to be no problems with version @2.5.6.

      BR, Thomas

      Attachments

        Activity

          diego dupin Diego Dupin added a comment -

          corrected with https://github.com/mariadb-corporation/mariadb-connector-nodejs/commit/6bdb463ca921cabca790dfe8f699bf77e1ca1ec6

          When the metadata is parsed, buffer that comes from socket chunk is saved to avoid unnecessarily buffer parsing. The problem is that this buffer can be reused by the socket, the metadata returning then erroneous data

          diego dupin Diego Dupin added a comment - corrected with https://github.com/mariadb-corporation/mariadb-connector-nodejs/commit/6bdb463ca921cabca790dfe8f699bf77e1ca1ec6 When the metadata is parsed, buffer that comes from socket chunk is saved to avoid unnecessarily buffer parsing. The problem is that this buffer can be reused by the socket, the metadata returning then erroneous data

          People

            diego dupin Diego Dupin
            diego dupin Diego Dupin
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.