Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-347

Add new api function mariadb_stmt_fetch_fields

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 3.1.0
    • Documentation
    • None

    Description

      To get metadata information for the binary protocol (prepared statements), a resultset handle must be allocated via mysql_stmt_result_metadata() which contains a pointer to stmt-> fields. Afterwards this handle must be released via mysql_free_result().

      Instead of allocating and freeing memory it would be much simpler to have an additional API function mariadb_stmt_fetch_fields() which just returns stmt->fields:

      MYSQL_FIELD STDCALL *mariadb_stmt_fetch_fields(MYSQL_STMT *stmt)
      {
        if (stmt)
          return stmt->fields;
        return NULL;
      }
      

      Attachments

        Activity

          georg Georg Richter created issue -
          georg Georg Richter made changes -
          Field Original Value New Value
          Description To get metadata information for the binary protocol (prepared statements), a resultset handle must be allocated(via {{mysql_stmt_result_metadata()}} which contains a pointer to {{stmt-> fields}}. Afterwards this handle must be released via {{mysql_free_result()}}.

          Instead of allocating and freeing memory it would be much simpler to have an additional API function {{mysql_stmt_fetch_fields()}} which just returns {{stmt->fields}}:


          {code:java}
          MYSQL_FIELD STDCALL *mysql_stmt_fetch_fields(MYSQL_STMT *stmt)
          {
            if (stmt)
              return stmt->fields;
            return NULL;
          }
          {code}
          To get metadata information for the binary protocol (prepared statements), a resultset handle must be allocated via {{mysql_stmt_result_metadata()}} which contains a pointer to {{stmt-> fields}}. Afterwards this handle must be released via {{mysql_free_result()}}.

          Instead of allocating and freeing memory it would be much simpler to have an additional API function {{mysql_stmt_fetch_fields()}} which just returns {{stmt->fields}}:


          {code:java}
          MYSQL_FIELD STDCALL *mysql_stmt_fetch_fields(MYSQL_STMT *stmt)
          {
            if (stmt)
              return stmt->fields;
            return NULL;
          }
          {code}
          georg Georg Richter made changes -
          Description To get metadata information for the binary protocol (prepared statements), a resultset handle must be allocated via {{mysql_stmt_result_metadata()}} which contains a pointer to {{stmt-> fields}}. Afterwards this handle must be released via {{mysql_free_result()}}.

          Instead of allocating and freeing memory it would be much simpler to have an additional API function {{mysql_stmt_fetch_fields()}} which just returns {{stmt->fields}}:


          {code:java}
          MYSQL_FIELD STDCALL *mysql_stmt_fetch_fields(MYSQL_STMT *stmt)
          {
            if (stmt)
              return stmt->fields;
            return NULL;
          }
          {code}
          To get metadata information for the binary protocol (prepared statements), a resultset handle must be allocated via {{mysql_stmt_result_metadata()}} which contains a pointer to {{stmt-> fields}}. Afterwards this handle must be released via {{mysql_free_result()}}.

          Instead of allocating and freeing memory it would be much simpler to have an additional API function {{mariadb_stmt_fetch_fields()}} which just returns {{stmt->fields}}:


          {code:java}
          MYSQL_FIELD STDCALL *mariadb_stmt_fetch_fields(MYSQL_STMT *stmt)
          {
            if (stmt)
              return stmt->fields;
            return NULL;
          }
          {code}
          georg Georg Richter made changes -
          Summary Add new api function mysql_stmt_fetch_fields Add new api function mariadb_stmt_fetch_fields
          georg Georg Richter made changes -
          Assignee Georg Richter [ georg ] Lawrin Novitsky [ lawrin ]
          Status Open [ 1 ] In Review [ 10002 ]
          Lawrin Lawrin Novitsky made changes -
          Status In Review [ 10002 ] Stalled [ 10000 ]
          ralf.gebhardt Ralf Gebhardt made changes -
          Fix Version/s 3.2 [ 23723 ]
          Fix Version/s 3.1.0 [ 22519 ]
          diego dupin Diego Dupin made changes -
          Fix Version/s 3.2.0 [ 25122 ]
          Fix Version/s 3.2 [ 23723 ]
          georg Georg Richter made changes -
          Component/s Documentation [ 16811 ]
          georg Georg Richter made changes -
          Assignee Lawrin Novitsky [ lawrin ] Georg Richter [ georg ]
          serg Sergei Golubchik made changes -
          Fix Version/s 3.1.0 [ 22519 ]
          Fix Version/s 3.2.0 [ 25122 ]
          serg Sergei Golubchik made changes -
          Resolution Fixed [ 1 ]
          Status Stalled [ 10000 ] Closed [ 6 ]
          julien.fritsch Julien Fritsch made changes -
          Workflow MariaDB connectors [ 88574 ] MariaDB v4 [ 161133 ]

          People

            georg Georg Richter
            georg Georg Richter
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.