Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
44325614
Commit
44325614
authored
Oct 12, 2007
by
holyfoot/hf@hfmain.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/hf/work/31155/my50-31155
into mysql.com:/home/hf/work/31155/my51-31155
parents
96e68cfb
16db036d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
25 deletions
+17
-25
sql/item.cc
sql/item.cc
+3
-8
sql/item.h
sql/item.h
+4
-2
sql/item_geofunc.cc
sql/item_geofunc.cc
+7
-11
sql/item_geofunc.h
sql/item_geofunc.h
+3
-4
No files found.
sql/item.cc
View file @
44325614
...
...
@@ -4457,11 +4457,8 @@ Field *Item::tmp_table_field_from_field_type(TABLE *table, bool fixed_length)
field
=
new
Field_blob
(
max_length
,
maybe_null
,
name
,
collation
.
collation
);
break
;
// Blob handled outside of case
case
MYSQL_TYPE_GEOMETRY
:
field
=
new
Field_geom
(
max_length
,
maybe_null
,
name
,
table
->
s
,
(
Field
::
geometry_type
)
((
type
()
==
Item
::
TYPE_HOLDER
)
?
((
Item_type_holder
*
)
this
)
->
get_geometry_type
()
:
((
Item_geometry_func
*
)
this
)
->
get_geometry_type
()));
field
=
new
Field_geom
(
max_length
,
maybe_null
,
name
,
table
->
s
,
get_geometry_type
());
}
if
(
field
)
field
->
init
(
table
);
...
...
@@ -6586,9 +6583,7 @@ Item_type_holder::Item_type_holder(THD *thd, Item *item)
decimals
=
0
;
prev_decimal_int_part
=
item
->
decimal_int_part
();
if
(
item
->
field_type
()
==
MYSQL_TYPE_GEOMETRY
)
geometry_type
=
(
item
->
type
()
==
Item
::
FIELD_ITEM
)
?
((
Item_field
*
)
item
)
->
get_geometry_type
()
:
(
Field
::
geometry_type
)((
Item_geometry_func
*
)
item
)
->
get_geometry_type
();
geometry_type
=
item
->
get_geometry_type
();
}
...
...
sql/item.h
View file @
44325614
...
...
@@ -1001,6 +1001,8 @@ public:
*/
virtual
bool
result_as_longlong
()
{
return
FALSE
;
}
bool
is_datetime
();
virtual
Field
::
geometry_type
get_geometry_type
()
const
{
return
Field
::
GEOM_GEOMETRY
;
};
};
...
...
@@ -1469,7 +1471,7 @@ public:
int
fix_outer_field
(
THD
*
thd
,
Field
**
field
,
Item
**
reference
);
virtual
Item
*
update_value_transformer
(
uchar
*
select_arg
);
void
print
(
String
*
str
);
Field
::
geometry_type
get_geometry_type
()
Field
::
geometry_type
get_geometry_type
()
const
{
DBUG_ASSERT
(
field_type
()
==
MYSQL_TYPE_GEOMETRY
);
return
field
->
get_geometry_type
();
...
...
@@ -2807,7 +2809,7 @@ public:
Field
*
make_field_by_type
(
TABLE
*
table
);
static
uint32
display_length
(
Item
*
item
);
static
enum_field_types
get_real_type
(
Item
*
);
Field
::
geometry_type
get_geometry_type
()
{
return
geometry_type
;
};
Field
::
geometry_type
get_geometry_type
()
const
{
return
geometry_type
;
};
};
...
...
sql/item_geofunc.cc
View file @
44325614
...
...
@@ -28,7 +28,7 @@ Field *Item_geometry_func::tmp_table_field(TABLE *t_arg)
{
Field
*
result
;
if
((
result
=
new
Field_geom
(
max_length
,
maybe_null
,
name
,
t_arg
->
s
,
(
Field
::
geometry_type
)
get_geometry_type
())))
get_geometry_type
())))
result
->
init
(
t_arg
);
return
result
;
}
...
...
@@ -41,10 +41,6 @@ void Item_geometry_func::fix_length_and_dec()
maybe_null
=
1
;
}
int
Item_geometry_func
::
get_geometry_type
()
const
{
return
(
int
)
Field
::
GEOM_GEOMETRY
;
}
String
*
Item_func_geometry_from_text
::
val_str
(
String
*
str
)
{
...
...
@@ -163,9 +159,9 @@ String *Item_func_geometry_type::val_str(String *str)
}
int
Item_func_envelope
::
get_geometry_type
()
const
Field
::
geometry_type
Item_func_envelope
::
get_geometry_type
()
const
{
return
(
int
)
Field
::
GEOM_POLYGON
;
return
Field
::
GEOM_POLYGON
;
}
...
...
@@ -193,9 +189,9 @@ String *Item_func_envelope::val_str(String *str)
}
int
Item_func_centroid
::
get_geometry_type
()
const
Field
::
geometry_type
Item_func_centroid
::
get_geometry_type
()
const
{
return
(
int
)
Field
::
GEOM_POINT
;
return
Field
::
GEOM_POINT
;
}
...
...
@@ -333,9 +329,9 @@ err:
*/
int
Item_func_point
::
get_geometry_type
()
const
Field
::
geometry_type
Item_func_point
::
get_geometry_type
()
const
{
return
(
int
)
Field
::
GEOM_POINT
;
return
Field
::
GEOM_POINT
;
}
...
...
sql/item_geofunc.h
View file @
44325614
...
...
@@ -33,7 +33,6 @@ public:
void
fix_length_and_dec
();
enum_field_types
field_type
()
const
{
return
MYSQL_TYPE_GEOMETRY
;
}
Field
*
tmp_table_field
(
TABLE
*
t_arg
);
virtual
int
get_geometry_type
()
const
;
bool
is_null
()
{
(
void
)
val_int
();
return
null_value
;
}
};
...
...
@@ -92,7 +91,7 @@ public:
Item_func_centroid
(
Item
*
a
)
:
Item_geometry_func
(
a
)
{}
const
char
*
func_name
()
const
{
return
"centroid"
;
}
String
*
val_str
(
String
*
);
int
get_geometry_type
()
const
;
Field
::
geometry_type
get_geometry_type
()
const
;
};
class
Item_func_envelope
:
public
Item_geometry_func
...
...
@@ -101,7 +100,7 @@ public:
Item_func_envelope
(
Item
*
a
)
:
Item_geometry_func
(
a
)
{}
const
char
*
func_name
()
const
{
return
"envelope"
;
}
String
*
val_str
(
String
*
);
int
get_geometry_type
()
const
;
Field
::
geometry_type
get_geometry_type
()
const
;
};
class
Item_func_point
:
public
Item_geometry_func
...
...
@@ -111,7 +110,7 @@ public:
Item_func_point
(
Item
*
a
,
Item
*
b
,
Item
*
srid
)
:
Item_geometry_func
(
a
,
b
,
srid
)
{}
const
char
*
func_name
()
const
{
return
"point"
;
}
String
*
val_str
(
String
*
);
int
get_geometry_type
()
const
;
Field
::
geometry_type
get_geometry_type
()
const
;
};
class
Item_func_spatial_decomp
:
public
Item_geometry_func
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment