diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-04-29 16:24:52 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-04-29 16:24:52 +0200 |
commit | 4c87f727734955f9e4a0ffde25aae4d43ec0b2a5 (patch) | |
tree | 0a2a259bed03537adae8aa51b37e0425d85c0325 /sql | |
parent | f632b51d9958ea807e6827010708b99cdfc73efd (diff) | |
parent | a4477d297728c18cbd25f10d71ea946356e54bfd (diff) | |
download | mariadb-git-4c87f727734955f9e4a0ffde25aae4d43ec0b2a5.tar.gz |
Merge branch '5.5' into bb-5.5-sergmariadb-5.5.43
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_geofunc.h | 2 | ||||
-rw-r--r-- | sql/uniques.cc | 11 |
2 files changed, 6 insertions, 7 deletions
diff --git a/sql/item_geofunc.h b/sql/item_geofunc.h index 2d715dc8765..a2a61758617 100644 --- a/sql/item_geofunc.h +++ b/sql/item_geofunc.h @@ -116,7 +116,7 @@ class Item_func_point: public Item_geometry_func public: Item_func_point(Item *a, Item *b): Item_geometry_func(a, b) {} Item_func_point(Item *a, Item *b, Item *srid): Item_geometry_func(a, b, srid) {} - const char *func_name() const { return "st_point"; } + const char *func_name() const { return "point"; } String *val_str(String *); Field::geometry_type get_geometry_type() const; }; diff --git a/sql/uniques.cc b/sql/uniques.cc index 72411be5cd6..fe3e329cda6 100644 --- a/sql/uniques.cc +++ b/sql/uniques.cc @@ -97,7 +97,7 @@ Unique::Unique(qsort_cmp2 comp_func, void * comp_func_fixed_arg, max_elements= (ulong) (max_in_memory_size / ALIGN_SIZE(sizeof(TREE_ELEMENT)+size)); (void) open_cached_file(&file, mysql_tmpdir,TEMP_PREFIX, DISK_BUFFER_SIZE, - MYF(MY_WME)); + MYF(MY_WME)); } @@ -607,8 +607,8 @@ bool Unique::walk(TABLE *table, tree_walk_action action, void *walk_action_arg) return 1; if (flush_io_cache(&file) || reinit_io_cache(&file, READ_CACHE, 0L, 0, 0)) return 1; - ulong buff_sz= (max_in_memory_size / full_size + 1) * full_size; - if (!(merge_buffer= (uchar *) my_malloc((ulong) buff_sz, MYF(0)))) + size_t buff_sz= (max_in_memory_size / full_size + 1) * full_size; + if (!(merge_buffer = (uchar *)my_malloc(buff_sz, MYF(MY_WME)))) return 1; if (buff_sz < (ulong) (full_size * (file_ptrs.elements + 1))) res= merge(table, merge_buffer, buff_sz >= full_size * MERGEBUFF2) ; @@ -737,9 +737,8 @@ bool Unique::get(TABLE *table) /* Not enough memory; Save the result to file && free memory used by tree */ if (flush()) return 1; - - ulong buff_sz= (max_in_memory_size / full_size + 1) * full_size; - if (!(sort_buffer= (uchar*) my_malloc(buff_sz, MYF(0)))) + size_t buff_sz= (max_in_memory_size / full_size + 1) * full_size; + if (!(sort_buffer= (uchar*) my_malloc(buff_sz, MYF(MY_WME)))) return 1; if (merge(table, sort_buffer, FALSE)) |