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

Impossible to free a dynamic column

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 10.0.5
    • None
    • None
    • None
    • Windows

    Description

      It's not possible to free a dynamic column, since dynstr_free() is not exported. Additionally the initialization macro should have a mariadb_ prefix.

      Suggested fix:

      === modified file 'include/ma_dyncol.h'
      --- include/ma_dyncol.h 2013-01-29 14:10:47 +0000
      +++ include/ma_dyncol.h 2013-09-04 06:59:14 +0000
      @@ -181,7 +181,7 @@
       enum enum_dyncol_func_result
       mariadb_dyncol_json(DYNAMIC_COLUMN *str, DYNAMIC_STRING *json);
       
      -#define dynamic_column_initialize(A) memset((A), 0, sizeof(*(A)))
      +#define mariadb_dyncol_init(A) memset((A), 0, sizeof(*(A)))
       #define dynamic_column_column_free(V) dynstr_free(V)
       
       /* conversion of values to 3 base types */
       
      === modified file 'libmysql/CMakeLists.txt'
      --- libmysql/CMakeLists.txt     2013-07-21 14:39:19 +0000
      +++ libmysql/CMakeLists.txt     2013-09-04 06:52:40 +0000
      @@ -229,6 +229,7 @@
       mariadb_dyncol_update_many_named
       mariadb_dyncol_exists
       mariadb_dyncol_exists_named
      +mariadb_dyncol_free
       mariadb_dyncol_list
       mariadb_dyncol_list_named
       mariadb_dyncol_get
       
      === modified file 'mysys/ma_dyncol.c'
      --- mysys/ma_dyncol.c   2013-08-07 15:40:25 +0000
      +++ mysys/ma_dyncol.c   2013-09-04 06:49:57 +0000
      @@ -4324,3 +4324,13 @@
         *column_count= header.column_count;
         return rc;
       }
      +
      +/**
      +  Free dynamic column
      +
      +  @param str             The packed string
      +*/
      +void mariadb_dyncol_free(DYNAMIC_COLUMN *str)
      +{
      +  dynstr_free(str);
      +}

      Attachments

        Activity

          People

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