diff options
author | Galina Shalygina <galashalygina@gmail.com> | 2016-05-01 22:29:47 +0300 |
---|---|---|
committer | Galina Shalygina <galashalygina@gmail.com> | 2016-08-23 00:39:12 +0300 |
commit | eb2c1474752a5f743db638d5b06612c9e3f07f74 (patch) | |
tree | 2cbdafbe8617bf72f8addf3cfcdd53b10c7cbe8e /sql/item_geofunc.h | |
parent | 8b94aec11af19fc711ed48f13410986814bc51a0 (diff) | |
download | mariadb-git-eb2c1474752a5f743db638d5b06612c9e3f07f74.tar.gz |
The consolidated patch for mdev-9197.
Diffstat (limited to 'sql/item_geofunc.h')
-rw-r--r-- | sql/item_geofunc.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/sql/item_geofunc.h b/sql/item_geofunc.h index 56e2a729924..9a2a49f633b 100644 --- a/sql/item_geofunc.h +++ b/sql/item_geofunc.h @@ -51,6 +51,8 @@ public: Item_geometry_func(thd, a, srid) {} const char *func_name() const { return "st_geometryfromtext"; } String *val_str(String *); + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_geometry_from_text>(thd, mem_root, this); } }; class Item_func_geometry_from_wkb: public Item_geometry_func @@ -61,6 +63,8 @@ public: Item_geometry_func(thd, a, srid) {} const char *func_name() const { return "st_geometryfromwkb"; } String *val_str(String *); + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_geometry_from_wkb>(thd, mem_root, this); } }; class Item_func_as_wkt: public Item_str_ascii_func @@ -70,6 +74,8 @@ public: const char *func_name() const { return "st_astext"; } String *val_str_ascii(String *); void fix_length_and_dec(); + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_as_wkt>(thd, mem_root, this); } }; class Item_func_as_wkb: public Item_geometry_func @@ -79,6 +85,8 @@ public: const char *func_name() const { return "st_aswkb"; } String *val_str(String *); enum_field_types field_type() const { return MYSQL_TYPE_BLOB; } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_as_wkb>(thd, mem_root, this); } }; class Item_func_geometry_type: public Item_str_ascii_func @@ -93,6 +101,8 @@ public: fix_length_and_charset(20, default_charset()); maybe_null= 1; }; + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_geometry_type>(thd, mem_root, this); } }; @@ -125,6 +135,8 @@ public: {} const char *func_name() const { return "st_convexhull"; } String *val_str(String *); + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_convexhull>(thd, mem_root, this); } }; @@ -135,6 +147,8 @@ public: const char *func_name() const { return "st_centroid"; } String *val_str(String *); Field::geometry_type get_geometry_type() const; + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_centroid>(thd, mem_root, this); } }; class Item_func_envelope: public Item_geometry_func @@ -144,6 +158,8 @@ public: const char *func_name() const { return "st_envelope"; } String *val_str(String *); Field::geometry_type get_geometry_type() const; + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_envelope>(thd, mem_root, this); } }; @@ -175,6 +191,8 @@ public: Item_func_boundary(THD *thd, Item *a): Item_geometry_func(thd, a) {} const char *func_name() const { return "st_boundary"; } String *val_str(String *); + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_boundary>(thd, mem_root, this); } }; @@ -187,6 +205,8 @@ public: const char *func_name() const { return "point"; } String *val_str(String *); Field::geometry_type get_geometry_type() const; + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_point>(thd, mem_root, this); } }; class Item_func_spatial_decomp: public Item_geometry_func @@ -211,6 +231,8 @@ public: } } String *val_str(String *); + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_spatial_decomp>(thd, mem_root, this); } }; class Item_func_spatial_decomp_n: public Item_geometry_func @@ -235,6 +257,8 @@ public: } } String *val_str(String *); + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_spatial_decomp_n>(thd, mem_root, this); } }; class Item_func_spatial_collection: public Item_geometry_func @@ -268,6 +292,8 @@ public: } const char *func_name() const { return "st_multipoint"; } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_spatial_collection>(thd, mem_root, this); } }; @@ -299,6 +325,7 @@ public: return add_key_fields_optimize_op(join, key_fields, and_level, usable_tables, sargables, false); } + Item *build_clone(THD *thd, MEM_ROOT *mem_root) { return 0; } }; @@ -310,6 +337,8 @@ public: { } longlong val_int(); const char *func_name() const; + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_spatial_mbr_rel>(thd, mem_root, this); } }; @@ -324,6 +353,8 @@ public: { } longlong val_int(); const char *func_name() const; + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_spatial_precise_rel>(thd, mem_root, this); } }; @@ -339,6 +370,8 @@ public: { } longlong val_int(); const char *func_name() const { return "st_relate"; } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_spatial_relate>(thd, mem_root, this); } }; @@ -368,6 +401,8 @@ public: { Item_func::print(str, query_type); } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_spatial_operation>(thd, mem_root, this); } }; @@ -419,6 +454,8 @@ public: Item_geometry_func(thd, obj, distance) {} const char *func_name() const { return "st_buffer"; } String *val_str(String *); + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_buffer>(thd, mem_root, this); } }; @@ -429,6 +466,8 @@ public: longlong val_int(); const char *func_name() const { return "st_isempty"; } void fix_length_and_dec() { maybe_null= 1; } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_isempty>(thd, mem_root, this); } }; class Item_func_issimple: public Item_int_func @@ -443,6 +482,8 @@ public: const char *func_name() const { return "st_issimple"; } void fix_length_and_dec() { decimals=0; max_length=2; } uint decimal_precision() const { return 1; } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_issimple>(thd, mem_root, this); } }; class Item_func_isclosed: public Item_int_func @@ -453,6 +494,8 @@ public: const char *func_name() const { return "st_isclosed"; } void fix_length_and_dec() { decimals=0; max_length=2; } uint decimal_precision() const { return 1; } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_isclosed>(thd, mem_root, this); } }; class Item_func_isring: public Item_func_issimple @@ -461,6 +504,8 @@ public: Item_func_isring(THD *thd, Item *a): Item_func_issimple(thd, a) {} longlong val_int(); const char *func_name() const { return "st_isring"; } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_isring>(thd, mem_root, this); } }; class Item_func_dimension: public Item_int_func @@ -471,6 +516,8 @@ public: longlong val_int(); const char *func_name() const { return "st_dimension"; } void fix_length_and_dec() { max_length= 10; maybe_null= 1; } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_dimension>(thd, mem_root, this); } }; class Item_func_x: public Item_real_func @@ -485,6 +532,8 @@ public: Item_real_func::fix_length_and_dec(); maybe_null= 1; } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_x>(thd, mem_root, this); } }; @@ -500,6 +549,8 @@ public: Item_real_func::fix_length_and_dec(); maybe_null= 1; } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_y>(thd, mem_root, this); } }; @@ -511,6 +562,8 @@ public: longlong val_int(); const char *func_name() const { return "st_numgeometries"; } void fix_length_and_dec() { max_length= 10; maybe_null= 1; } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_numgeometries>(thd, mem_root, this); } }; @@ -522,6 +575,8 @@ public: longlong val_int(); const char *func_name() const { return "st_numinteriorrings"; } void fix_length_and_dec() { max_length= 10; maybe_null= 1; } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_numinteriorring>(thd, mem_root, this); } }; @@ -533,6 +588,8 @@ public: longlong val_int(); const char *func_name() const { return "st_numpoints"; } void fix_length_and_dec() { max_length= 10; maybe_null= 1; } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_numpoints>(thd, mem_root, this); } }; @@ -548,6 +605,8 @@ public: Item_real_func::fix_length_and_dec(); maybe_null= 1; } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_area>(thd, mem_root, this); } }; @@ -563,6 +622,8 @@ public: Item_real_func::fix_length_and_dec(); maybe_null= 1; } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_glength>(thd, mem_root, this); } }; @@ -574,6 +635,8 @@ public: longlong val_int(); const char *func_name() const { return "srid"; } void fix_length_and_dec() { max_length= 10; maybe_null= 1; } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_srid>(thd, mem_root, this); } }; @@ -588,6 +651,8 @@ public: Item_func_distance(THD *thd, Item *a, Item *b): Item_real_func(thd, a, b) {} double val_real(); const char *func_name() const { return "st_distance"; } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_distance>(thd, mem_root, this); } }; @@ -602,6 +667,8 @@ public: const char *func_name() const { return "st_pointonsurface"; } String *val_str(String *); Field::geometry_type get_geometry_type() const; + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_pointonsurface>(thd, mem_root, this); } }; @@ -613,6 +680,8 @@ class Item_func_gis_debug: public Item_int_func { null_value= false; } const char *func_name() const { return "st_gis_debug"; } longlong val_int(); + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_gis_debug>(thd, mem_root, this); } }; #endif |