summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/spatial.cc4
-rw-r--r--sql/spatial.h3
-rw-r--r--sql/sql_yacc.yy8
3 files changed, 7 insertions, 8 deletions
diff --git a/sql/spatial.cc b/sql/spatial.cc
index ab415d9af10..9769f6e7ca9 100644
--- a/sql/spatial.cc
+++ b/sql/spatial.cc
@@ -15,6 +15,9 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "mysql_priv.h"
+
+#ifdef HAVE_SPATIAL
+
#define MAX_DIGITS_IN_DOUBLE 16
/***************************** Gis_class_info *******************************/
@@ -1652,3 +1655,4 @@ const Geometry::Class_info *Gis_geometry_collection::get_class_info() const
return &geometrycollection_class;
}
+#endif /*HAVE_SPATIAL*/
diff --git a/sql/spatial.h b/sql/spatial.h
index cc1cc70f1bc..45db1ca8d00 100644
--- a/sql/spatial.h
+++ b/sql/spatial.h
@@ -17,6 +17,8 @@
#ifndef _spatial_h
#define _spatial_h
+#ifdef HAVE_SPATIAL
+
const uint SRID_SIZE= 4;
const uint SIZEOF_STORED_DOUBLE= 8;
const uint POINT_DATA_SIZE= SIZEOF_STORED_DOUBLE*2;
@@ -459,4 +461,5 @@ struct Geometry_buffer
void *arr[(geometry_buffer_size - 1)/sizeof(void *) + 1];
};
+#endif /*HAVE_SPATAIAL*/
#endif
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 6b8fb78bd00..6a40dc3c23a 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -1312,7 +1312,6 @@ type:
$$=FIELD_TYPE_GEOMETRY;
#else
net_printf(Lex->thd, ER_FEATURE_DISABLED,
- ER(ER_FEATURE_DISABLED),
sym_group_geom.name,
sym_group_geom.needed_define);
YYABORT;
@@ -1630,7 +1629,6 @@ key_type:
$$= Key::SPATIAL;
#else
net_printf(Lex->thd, ER_FEATURE_DISABLED,
- ER(ER_FEATURE_DISABLED),
sym_group_geom.name, sym_group_geom.needed_define);
YYABORT;
#endif
@@ -1664,7 +1662,6 @@ opt_unique_or_fulltext:
$$= Key::SPATIAL;
#else
net_printf(Lex->thd, ER_FEATURE_DISABLED,
- ER(ER_FEATURE_DISABLED),
sym_group_geom.name, sym_group_geom.needed_define);
YYABORT;
#endif
@@ -2676,7 +2673,6 @@ simple_expr:
if (!$1.symbol->create_func)
{
net_printf(Lex->thd, ER_FEATURE_DISABLED,
- ER(ER_FEATURE_DISABLED),
$1.symbol->group->name,
$1.symbol->group->needed_define);
YYABORT;
@@ -2688,7 +2684,6 @@ simple_expr:
if (!$1.symbol->create_func)
{
net_printf(Lex->thd, ER_FEATURE_DISABLED,
- ER(ER_FEATURE_DISABLED),
$1.symbol->group->name,
$1.symbol->group->needed_define);
YYABORT;
@@ -2700,7 +2695,6 @@ simple_expr:
if (!$1.symbol->create_func)
{
net_printf(Lex->thd, ER_FEATURE_DISABLED,
- ER(ER_FEATURE_DISABLED),
$1.symbol->group->name,
$1.symbol->group->needed_define);
YYABORT;
@@ -2712,7 +2706,6 @@ simple_expr:
if (!$1.symbol->create_func)
{
net_printf(Lex->thd, ER_FEATURE_DISABLED,
- ER(ER_FEATURE_DISABLED),
$1.symbol->group->name,
$1.symbol->group->needed_define);
YYABORT;
@@ -2809,7 +2802,6 @@ simple_expr:
$$= $1;
#else
net_printf(Lex->thd, ER_FEATURE_DISABLED,
- ER(ER_FEATURE_DISABLED),
sym_group_geom.name, sym_group_geom.needed_define);
YYABORT;
#endif