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
16c66d49
Commit
16c66d49
authored
Oct 31, 2005
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Additional fix for #12839
parent
12068b45
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
sql/field.cc
sql/field.cc
+1
-2
sql/spatial.cc
sql/spatial.cc
+9
-9
No files found.
sql/field.cc
View file @
16c66d49
...
@@ -5745,8 +5745,7 @@ void Field_blob::get_key_image(char *buff,uint length,
...
@@ -5745,8 +5745,7 @@ void Field_blob::get_key_image(char *buff,uint length,
return
;
return
;
}
}
get_ptr
(
&
blob
);
get_ptr
(
&
blob
);
gobj
=
Geometry
::
construct
(
&
buffer
,
gobj
=
Geometry
::
construct
(
&
buffer
,
blob
,
blob_length
);
blob
+
SRID_SIZE
,
blob_length
-
SRID_SIZE
);
if
(
gobj
->
get_mbr
(
&
mbr
,
&
dummy
))
if
(
gobj
->
get_mbr
(
&
mbr
,
&
dummy
))
bzero
(
buff
,
SIZEOF_STORED_DOUBLE
*
4
);
bzero
(
buff
,
SIZEOF_STORED_DOUBLE
*
4
);
else
else
...
...
sql/spatial.cc
View file @
16c66d49
...
@@ -224,10 +224,10 @@ int Geometry::create_from_wkb(Geometry_buffer *buffer,
...
@@ -224,10 +224,10 @@ int Geometry::create_from_wkb(Geometry_buffer *buffer,
res
->
reserve
(
WKB_HEADER_SIZE
,
512
))
res
->
reserve
(
WKB_HEADER_SIZE
,
512
))
return
1
;
return
1
;
res
->
q_append
((
char
)
wkb_ndr
);
res
->
q_append
((
char
)
wkb_ndr
);
res
->
q_append
(
geom_type
);
res
->
q_append
(
geom_type
);
return
geom
->
init_from_wkb
(
wkb
+
WKB_HEADER_SIZE
,
len
-
WKB_HEADER_SIZE
,
return
geom
->
init_from_wkb
(
wkb
+
WKB_HEADER_SIZE
,
len
-
WKB_HEADER_SIZE
,
(
wkbByteOrder
)
wkb
[
0
],
res
);
(
wkbByteOrder
)
wkb
[
0
],
res
);
}
}
...
@@ -689,7 +689,7 @@ bool Gis_polygon::init_from_wkt(Gis_read_stream *trs, String *wkb)
...
@@ -689,7 +689,7 @@ bool Gis_polygon::init_from_wkt(Gis_read_stream *trs, String *wkb)
trs
->
check_next_symbol
(
')'
))
trs
->
check_next_symbol
(
')'
))
return
1
;
return
1
;
ls
.
set_data_ptr
(
wkb
->
ptr
()
+
ls_pos
,
wkb
->
length
()
-
ls_pos
);
ls
.
set_data_ptr
(
wkb
->
ptr
()
+
ls_pos
,
wkb
->
length
()
-
ls_pos
);
if
(
ls
.
is_closed
(
&
closed
)
||
!
closed
)
if
(
ls
.
is_closed
(
&
closed
)
||
!
closed
)
{
{
trs
->
set_error_msg
(
"POLYGON's linear ring isn't closed"
);
trs
->
set_error_msg
(
"POLYGON's linear ring isn't closed"
);
...
@@ -730,7 +730,7 @@ uint Gis_polygon::init_from_wkb(const char *wkb, uint len, wkbByteOrder bo,
...
@@ -730,7 +730,7 @@ uint Gis_polygon::init_from_wkb(const char *wkb, uint len, wkbByteOrder bo,
if
(
!
(
ls_len
=
ls
.
init_from_wkb
(
wkb
,
len
,
bo
,
res
)))
if
(
!
(
ls_len
=
ls
.
init_from_wkb
(
wkb
,
len
,
bo
,
res
)))
return
0
;
return
0
;
ls
.
set_data_ptr
(
res
->
ptr
()
+
ls_pos
,
res
->
length
()
-
ls_pos
);
ls
.
set_data_ptr
(
res
->
ptr
()
+
ls_pos
,
res
->
length
()
-
ls_pos
);
if
(
ls
.
is_closed
(
&
closed
)
||
!
closed
)
if
(
ls
.
is_closed
(
&
closed
)
||
!
closed
)
return
0
;
return
0
;
...
@@ -1052,7 +1052,7 @@ uint Gis_multi_point::init_from_wkb(const char *wkb, uint len, wkbByteOrder bo,
...
@@ -1052,7 +1052,7 @@ uint Gis_multi_point::init_from_wkb(const char *wkb, uint len, wkbByteOrder bo,
res
->
q_append
((
char
)
wkb_ndr
);
res
->
q_append
((
char
)
wkb_ndr
);
res
->
q_append
((
uint32
)
wkb_point
);
res
->
q_append
((
uint32
)
wkb_point
);
if
(
!
p
.
init_from_wkb
(
wkb
+
WKB_HEADER_SIZE
,
if
(
!
p
.
init_from_wkb
(
wkb
+
WKB_HEADER_SIZE
,
POINT_DATA_SIZE
,
(
wkbByteOrder
)
wkb
[
0
],
res
))
POINT_DATA_SIZE
,
(
wkbByteOrder
)
wkb
[
0
],
res
))
return
0
;
return
0
;
}
}
return
proper_size
;
return
proper_size
;
...
@@ -1195,7 +1195,7 @@ uint Gis_multi_line_string::init_from_wkb(const char *wkb, uint len,
...
@@ -1195,7 +1195,7 @@ uint Gis_multi_line_string::init_from_wkb(const char *wkb, uint len,
res
->
q_append
((
uint32
)
wkb_linestring
);
res
->
q_append
((
uint32
)
wkb_linestring
);
if
(
!
(
ls_len
=
ls
.
init_from_wkb
(
wkb
+
WKB_HEADER_SIZE
,
len
,
if
(
!
(
ls_len
=
ls
.
init_from_wkb
(
wkb
+
WKB_HEADER_SIZE
,
len
,
(
wkbByteOrder
)
wkb
[
0
],
res
)))
(
wkbByteOrder
)
wkb
[
0
],
res
)))
return
0
;
return
0
;
wkb
+=
(
ls_len
+
WKB_HEADER_SIZE
);
wkb
+=
(
ls_len
+
WKB_HEADER_SIZE
);
len
-=
(
ls_len
+
WKB_HEADER_SIZE
);
len
-=
(
ls_len
+
WKB_HEADER_SIZE
);
...
@@ -1446,7 +1446,7 @@ uint Gis_multi_polygon::init_from_wkb(const char *wkb, uint len,
...
@@ -1446,7 +1446,7 @@ uint Gis_multi_polygon::init_from_wkb(const char *wkb, uint len,
res
->
q_append
((
uint32
)
wkb_polygon
);
res
->
q_append
((
uint32
)
wkb_polygon
);
if
(
!
(
p_len
=
p
.
init_from_wkb
(
wkb
+
WKB_HEADER_SIZE
,
len
,
if
(
!
(
p_len
=
p
.
init_from_wkb
(
wkb
+
WKB_HEADER_SIZE
,
len
,
(
wkbByteOrder
)
wkb
[
0
],
res
)))
(
wkbByteOrder
)
wkb
[
0
],
res
)))
return
0
;
return
0
;
wkb
+=
(
p_len
+
WKB_HEADER_SIZE
);
wkb
+=
(
p_len
+
WKB_HEADER_SIZE
);
len
-=
(
p_len
+
WKB_HEADER_SIZE
);
len
-=
(
p_len
+
WKB_HEADER_SIZE
);
...
@@ -1743,12 +1743,12 @@ uint Gis_geometry_collection::init_from_wkb(const char *wkb, uint len,
...
@@ -1743,12 +1743,12 @@ uint Gis_geometry_collection::init_from_wkb(const char *wkb, uint len,
return
0
;
return
0
;
res
->
q_append
((
char
)
wkb_ndr
);
res
->
q_append
((
char
)
wkb_ndr
);
wkb_type
=
wkb_get_uint
(
wkb
+
1
,
(
wkbByteOrder
)
wkb
[
0
]);
wkb_type
=
wkb_get_uint
(
wkb
+
1
,
(
wkbByteOrder
)
wkb
[
0
]);
res
->
q_append
(
wkb_type
);
res
->
q_append
(
wkb_type
);
if
(
!
(
geom
=
create_by_typeid
(
&
buffer
,
wkb_type
))
||
if
(
!
(
geom
=
create_by_typeid
(
&
buffer
,
wkb_type
))
||
!
(
g_len
=
geom
->
init_from_wkb
(
wkb
+
WKB_HEADER_SIZE
,
len
,
!
(
g_len
=
geom
->
init_from_wkb
(
wkb
+
WKB_HEADER_SIZE
,
len
,
(
wkbByteOrder
)
wkb
[
0
],
res
)))
(
wkbByteOrder
)
wkb
[
0
],
res
)))
return
0
;
return
0
;
wkb
+=
(
g_len
+
WKB_HEADER_SIZE
);
wkb
+=
(
g_len
+
WKB_HEADER_SIZE
);
len
-=
(
g_len
+
WKB_HEADER_SIZE
);
len
-=
(
g_len
+
WKB_HEADER_SIZE
);
...
...
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