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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
63d6bc34
Commit
63d6bc34
authored
Aug 27, 2005
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge deer.(none):/home/hf/work/mysql-5.0.10499
into deer.(none):/home/hf/work/mysql-5.0.clean
parents
418a7bfc
a99c04b2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
2 deletions
+22
-2
mysql-test/r/gis.result
mysql-test/r/gis.result
+9
-0
mysql-test/t/gis.test
mysql-test/t/gis.test
+9
-0
sql/sp_head.cc
sql/sp_head.cc
+1
-1
sql/sp_head.h
sql/sp_head.h
+1
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+2
-1
No files found.
mysql-test/r/gis.result
View file @
63d6bc34
...
...
@@ -670,3 +670,12 @@ create trigger t1_bu before update on t1 for each row set new.s1 = null;
insert into t1 values (null,null);
ERROR 23000: Column 's1' cannot be null
drop table t1;
create function fn3 () returns point return GeomFromText("point(1 1)");
show create function fn3;
Function sql_mode Create Function
fn3 CREATE FUNCTION `test`.`fn3`() RETURNS point
return GeomFromText("point(1 1)")
select astext(fn3());
astext(fn3())
POINT(1 1)
drop function fn3;
mysql-test/t/gis.test
View file @
63d6bc34
...
...
@@ -383,3 +383,12 @@ create trigger t1_bu before update on t1 for each row set new.s1 = null;
--
error
1048
insert
into
t1
values
(
null
,
null
);
drop
table
t1
;
#
# Bug #10499 (function creation with GEOMETRY datatype)
#
create
function
fn3
()
returns
point
return
GeomFromText
(
"point(1 1)"
);
show
create
function
fn3
;
select
astext
(
fn3
());
drop
function
fn3
;
sql/sp_head.cc
View file @
63d6bc34
...
...
@@ -597,7 +597,7 @@ sp_head::make_field(uint max_length, const char *name, TABLE *dummy)
field
=
::
make_field
((
char
*
)
0
,
!
m_returns_len
?
max_length
:
m_returns_len
,
(
uchar
*
)
""
,
0
,
m_returns_pack
,
m_returns
,
m_returns_cs
,
(
enum
Field
::
geometry_type
)
0
,
Field
::
NONE
,
m_geom_returns
,
Field
::
NONE
,
m_returns_typelib
,
name
?
name
:
(
const
char
*
)
m_name
.
str
,
dummy
);
DBUG_RETURN
(
field
);
...
...
sql/sp_head.h
View file @
63d6bc34
...
...
@@ -110,6 +110,7 @@ class sp_head :private Query_arena
int
m_type
;
// TYPE_ENUM_FUNCTION or TYPE_ENUM_PROCEDURE
enum
enum_field_types
m_returns
;
// For FUNCTIONs only
Field
::
geometry_type
m_geom_returns
;
CHARSET_INFO
*
m_returns_cs
;
// For FUNCTIONs only
TYPELIB
*
m_returns_typelib
;
// For FUNCTIONs only
uint
m_returns_len
;
// For FUNCTIONs only
...
...
sql/sql_yacc.yy
View file @
63d6bc34
...
...
@@ -1444,7 +1444,7 @@ create_function_tail:
sp_prepare_create_field(YYTHD, new_field);
if (prepare_create_field(new_field, &unused1, &unused2, &unused2,
0
))
HA_CAN_GEOMETRY
))
YYABORT;
sp->m_returns= new_field->sql_type;
...
...
@@ -1452,6 +1452,7 @@ create_function_tail:
sp->m_returns_len= new_field->length;
sp->m_returns_pack= new_field->pack_flag;
sp->m_returns_typelib= new_field->interval;
sp->m_geom_returns= new_field->geom_type;
new_field->interval= NULL;
bzero((char *)&lex->sp_chistics, sizeof(st_sp_chistics));
...
...
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