summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2004-03-12 18:51:03 +0400
committerunknown <hf@deer.(none)>2004-03-12 18:51:03 +0400
commit3bf2e442abf45f2a61f44f2b499b5a54eb116ac1 (patch)
tree416c45416bcc8605ff5754473476ddabbd22fe2f /sql
parent54042aa975b8ef37bf379942bb134f040246cf86 (diff)
downloadmariadb-git-3bf2e442abf45f2a61f44f2b499b5a54eb116ac1.tar.gz
WL#1163 To make spatial code optional
myisam spatial code isolated myisam/mi_create.c: spatial code ifdef-ed myisam/mi_key.c: spatial code ifdef-ed myisam/mi_open.c: spatial code ifdef-ed myisam/mi_range.c: spatial code ifdef-ed myisam/mi_rkey.c: spatial code ifdef-ed myisam/mi_rnext.c: spatial code ifdef-ed myisam/mi_rnext_same.c: spatial code ifdef-ed myisam/rt_index.c: spatial code ifdef-ed myisam/rt_index.h: spatial code ifdef-ed myisam/rt_key.c: spatial code ifdef-ed myisam/rt_key.h: spatial code ifdef-ed myisam/rt_mbr.c: spatial code ifdef-ed myisam/rt_mbr.h: spatial code ifdef-ed myisam/rt_split.c: spatial code ifdef-ed myisam/rt_test.c: spatial code ifdef-ed myisam/sp_defs.h: spatial code ifdef-ed myisam/sp_key.c: spatial code ifdef-ed myisam/sp_test.c: spatial code ifdef-ed sql/spatial.cc: spatial code ifdef-ed sql/spatial.h: spatial code ifdef-ed sql/sql_yacc.yy: wrong error messages fixed
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 f98799e26d1..a08a1508ecc 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 5d425725437..b3018668842 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;
@@ -460,4 +462,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 f317219bd38..2b960423526 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -1303,7 +1303,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;
@@ -1595,7 +1594,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
@@ -1629,7 +1627,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
@@ -2582,7 +2579,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;
@@ -2594,7 +2590,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;
@@ -2606,7 +2601,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;
@@ -2618,7 +2612,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;
@@ -2713,7 +2706,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