[MDEV-4993] Impossible to free a dynamic column Created: 2013-09-04  Updated: 2013-09-18  Resolved: 2013-09-18

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.5
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Georg Richter Assignee: Oleksandr Byelkin
Resolution: Fixed Votes: 0
Labels: None
Environment:

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);
+}



 Comments   
Comment by Oleksandr Byelkin [ 2013-09-17 ]

above is incomplete patch. The complete patch committed 12.09.2013 09:45 EET subject of the e-mail is "[Commits] Rev 3812: MDEV-4993:Impossible to free a dynamic column in file:///home/bell/maria/bzr/work-maria-10.0-MDEV-4994/"

Comment by Oleksandr Byelkin [ 2013-09-17 ]

New patch with other functions renaming committed.

Comment by Oleksandr Byelkin [ 2013-09-18 ]

The knowledge base information fixed.

Generated at Thu Feb 08 07:00:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.