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
Field | Original Value | New Value |
---|---|---|
Status | Open [ 1 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | Stalled [ 10000 ] |
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); +} |
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: {noformat} === 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); +} {noformat} |
Priority | Trivial [ 5 ] | Minor [ 4 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | Stalled [ 10000 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | Stalled [ 10000 ] |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Workflow | defaullt [ 28818 ] | MariaDB v2 [ 43303 ] |
Workflow | MariaDB v2 [ 43303 ] | MariaDB v3 [ 62390 ] |
Workflow | MariaDB v3 [ 62390 ] | MariaDB v4 [ 147015 ] |