diff options
author | unknown <sanja@montyprogram.com> | 2012-09-28 14:01:17 +0300 |
---|---|---|
committer | unknown <sanja@montyprogram.com> | 2012-09-28 14:01:17 +0300 |
commit | 7327cd9717f0b98499f0f5b19c84e5e3e48241df (patch) | |
tree | f652710ef9b4e4f9709728f1bca3b01ee52fdfc9 /include | |
parent | 4db207d56da2f832d8bc6cc1d935a17efcbc1035 (diff) | |
download | mariadb-git-7327cd9717f0b98499f0f5b19c84e5e3e48241df.tar.gz |
MDEV-377 Name support for dynamic columns
MDEV-127 Optimization of memory allocation
MDEV-483 Make column_check function which cheŃks dynamic columns integrit
JSON conversion function
Diffstat (limited to 'include')
-rw-r--r-- | include/ma_dyncol.h | 32 | ||||
-rw-r--r-- | include/my_sys.h | 6 |
2 files changed, 38 insertions, 0 deletions
diff --git a/include/ma_dyncol.h b/include/ma_dyncol.h index 6174328d62a..b4b9df7da19 100644 --- a/include/ma_dyncol.h +++ b/include/ma_dyncol.h @@ -103,6 +103,13 @@ dynamic_column_create_many(DYNAMIC_COLUMN *str, DYNAMIC_COLUMN_VALUE *values); enum enum_dyncol_func_result +dynamic_column_create_many_fmt(DYNAMIC_COLUMN *str, + uint column_count, + uchar *column_keys, + DYNAMIC_COLUMN_VALUE *values, + my_bool names); + +enum enum_dyncol_func_result dynamic_column_update(DYNAMIC_COLUMN *org, uint column_nr, DYNAMIC_COLUMN_VALUE *value); enum enum_dyncol_func_result @@ -110,16 +117,30 @@ dynamic_column_update_many(DYNAMIC_COLUMN *str, uint add_column_count, uint *column_numbers, DYNAMIC_COLUMN_VALUE *values); +enum enum_dyncol_func_result +dynamic_column_update_many_fmt(DYNAMIC_COLUMN *str, + uint add_column_count, + void *column_keys, + DYNAMIC_COLUMN_VALUE *values, + my_bool string_keys); enum enum_dyncol_func_result dynamic_column_delete(DYNAMIC_COLUMN *org, uint column_nr); enum enum_dyncol_func_result dynamic_column_exists(DYNAMIC_COLUMN *org, uint column_nr); +enum enum_dyncol_func_result +dynamic_column_exists_str(DYNAMIC_COLUMN *str, LEX_STRING *name); +enum enum_dyncol_func_result +dynamic_column_exists_fmt(DYNAMIC_COLUMN *str, void *key, my_bool string_keys); /* List of not NULL columns */ enum enum_dyncol_func_result dynamic_column_list(DYNAMIC_COLUMN *org, DYNAMIC_ARRAY *array_of_uint); +enum enum_dyncol_func_result +dynamic_column_list_str(DYNAMIC_COLUMN *str, DYNAMIC_ARRAY *array_of_lexstr); +enum enum_dyncol_func_result +dynamic_column_list_fmt(DYNAMIC_COLUMN *str, DYNAMIC_ARRAY *array, my_bool string_keys); /* if the column do not exists it is NULL @@ -127,6 +148,17 @@ dynamic_column_list(DYNAMIC_COLUMN *org, DYNAMIC_ARRAY *array_of_uint); enum enum_dyncol_func_result dynamic_column_get(DYNAMIC_COLUMN *org, uint column_nr, DYNAMIC_COLUMN_VALUE *store_it_here); +enum enum_dyncol_func_result +dynamic_column_get_str(DYNAMIC_COLUMN *str, LEX_STRING *name, + DYNAMIC_COLUMN_VALUE *store_it_here); + +my_bool dynamic_column_has_names(DYNAMIC_COLUMN *str); + +enum enum_dyncol_func_result +dynamic_column_check(DYNAMIC_COLUMN *str); + +enum enum_dyncol_func_result +dynamic_column_json(DYNAMIC_COLUMN *str, DYNAMIC_STRING *json); #define dynamic_column_initialize(A) memset((A), 0, sizeof(*(A))) #define dynamic_column_column_free(V) dynstr_free(V) diff --git a/include/my_sys.h b/include/my_sys.h index a02c390fe4b..58a343bb789 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -793,12 +793,18 @@ my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append, size_t length); extern my_bool dynstr_append_os_quoted(DYNAMIC_STRING *str, const char *append, ...); +extern my_bool dynstr_append_quoted(DYNAMIC_STRING *str, + const char *append, size_t len); extern my_bool dynstr_set(DYNAMIC_STRING *str, const char *init_str); extern my_bool dynstr_realloc(DYNAMIC_STRING *str, size_t additional_size); extern my_bool dynstr_trunc(DYNAMIC_STRING *str, size_t n); extern void dynstr_free(DYNAMIC_STRING *str); extern void dynstr_reassociate(DYNAMIC_STRING *str, char **res, size_t *length, size_t *alloc_length); +extern uint32 copy_and_convert_extended(char *to, uint32 to_length, + CHARSET_INFO *to_cs, + const char *from, uint32 from_length, + CHARSET_INFO *from_cs, uint *errors); #ifdef HAVE_MLOCK extern void *my_malloc_lock(size_t length,myf flags); extern void my_free_lock(void *ptr); |