diff options
author | unknown <sanja@askmonty.org> | 2012-12-23 22:17:22 +0200 |
---|---|---|
committer | unknown <sanja@askmonty.org> | 2012-12-23 22:17:22 +0200 |
commit | 082ff5931770ed70df0ec1e85f81fa880a4d9e62 (patch) | |
tree | 4579610f7b0a509a97226da3cfc65ec26a018281 /sql | |
parent | 40ae63dd65fb9e812f29d3520acb0ba6b64d3005 (diff) | |
download | mariadb-git-082ff5931770ed70df0ec1e85f81fa880a4d9e62.tar.gz |
Post-post review fixes.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_func.h | 2 | ||||
-rw-r--r-- | sql/item_strfunc.cc | 12 | ||||
-rw-r--r-- | sql/item_strfunc.h | 8 |
3 files changed, 10 insertions, 12 deletions
diff --git a/sql/item_func.h b/sql/item_func.h index ccb86fd03e5..e13fa0834f0 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -58,7 +58,7 @@ public: NOW_FUNC, TRIG_COND_FUNC, SUSERVAR_FUNC, GUSERVAR_FUNC, COLLATE_FUNC, EXTRACT_FUNC, CHAR_TYPECAST_FUNC, FUNC_SP, UDF_FUNC, - NEG_FUNC, GSYSVAR_FUNC, DYNCOL }; + NEG_FUNC, GSYSVAR_FUNC, DYNCOL_FUNC }; enum optimize_type { OPTIMIZE_NONE,OPTIMIZE_KEY,OPTIMIZE_OP, OPTIMIZE_NULL, OPTIMIZE_EQUAL }; enum Type type() const { return FUNC_ITEM; } diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 706fbbff94d..5559ffa6c20 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -3837,7 +3837,7 @@ bool Item_func_dyncol_create::prepare_arguments(bool force_names_arg) if (type == DYN_COL_STRING && args[valpos]->type() == Item::FUNC_ITEM && - ((Item_func *)args[valpos])->functype() == DYNCOL) + ((Item_func *)args[valpos])->functype() == DYNCOL_FUNC) { force_names= 1; break; @@ -3904,7 +3904,7 @@ bool Item_func_dyncol_create::prepare_arguments(bool force_names_arg) } if (type == DYN_COL_STRING && args[valpos]->type() == Item::FUNC_ITEM && - ((Item_func *)args[valpos])->functype() == DYNCOL) + ((Item_func *)args[valpos])->functype() == DYNCOL_FUNC) { DBUG_ASSERT(names || force_names); type= DYN_COL_DYNCOL; @@ -3988,7 +3988,7 @@ bool Item_func_dyncol_create::prepare_arguments(bool force_names_arg) case DYN_COL_DECIMAL: if ((dres= args[valpos]->val_decimal(&dtmp))) { - dynamic_column_prepare_decimal(&vals[i]); + mariadb_dyncol_prepare_decimal(&vals[i]); DBUG_ASSERT(vals[i].x.decimal.value.len == dres->len); vals[i].x.decimal.value.intg= dres->intg; vals[i].x.decimal.value.frac= dres->frac; @@ -3998,7 +3998,7 @@ bool Item_func_dyncol_create::prepare_arguments(bool force_names_arg) } else { - dynamic_column_prepare_decimal(&vals[i]); // just to be safe + mariadb_dyncol_prepare_decimal(&vals[i]); // just to be safe DBUG_ASSERT(args[valpos]->null_value); } break; @@ -4055,7 +4055,7 @@ String *Item_func_dyncol_create::val_str(String *str) /* Move result from DYNAMIC_COLUMN to str_value */ char *ptr; size_t length, alloc_length; - mariadb_dyncol_reassociate(&col, &ptr, &length, &alloc_length); + dynstr_reassociate(&col, &ptr, &length, &alloc_length); str_value.reassociate(ptr, (uint32) length, (uint32) alloc_length, &my_charset_bin); res= &str_value; @@ -4197,7 +4197,7 @@ String *Item_func_dyncol_add::val_str(String *str) /* Move result from DYNAMIC_COLUMN to str */ char *ptr; size_t length, alloc_length; - mariadb_dyncol_reassociate(&col, &ptr, &length, &alloc_length); + dynstr_reassociate(&col, &ptr, &length, &alloc_length); str->reassociate(ptr, (uint32) length, (uint32) alloc_length, &my_charset_bin); null_value= FALSE; diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 8ef67654b35..d21c938f378 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -1013,7 +1013,7 @@ public: const char *func_name() const{ return "column_create"; } String *val_str(String *); virtual void print(String *str, enum_query_type query_type); - virtual enum Functype functype() const { return DYNCOL; } + virtual enum Functype functype() const { return DYNCOL_FUNC; } }; @@ -1051,11 +1051,9 @@ class Item_dyncol_get: public Item_str_func public: Item_dyncol_get(Item *str, Item *num) :Item_str_func(str, num) - { - max_length= MAX_DYNAMIC_COLUMN_LENGTH; - } + {} void fix_length_and_dec() - { maybe_null= 1; } + { maybe_null= 1; max_length= MAX_BLOB_WIDTH; } /* Mark that collation can change between calls */ bool dynamic_result() { return 1; } |