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
a43c40f1
Commit
a43c40f1
authored
Aug 30, 2004
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed printing of stored procedure functions names (BUG#5149)
parent
508fb5aa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
1 deletion
+34
-1
mysql-test/r/view.result
mysql-test/r/view.result
+10
-0
mysql-test/t/view.test
mysql-test/t/view.test
+10
-0
sql/item_func.cc
sql/item_func.cc
+14
-1
No files found.
mysql-test/r/view.result
View file @
a43c40f1
...
...
@@ -1166,3 +1166,13 @@ Table Create Table
v3 CREATE VIEW `test`.`v3` AS select `v1`.`col1` AS `a`,`v2`.`col1` AS `b` from `test`.`v1` join `test`.`v2` where (`v1`.`col1` = `v2`.`col1`)
drop view v3, v2, v1;
drop table t2, t1;
create function `f``1` () returns int return 5;
create view v1 as select test.`f``1` ();
show create view v1;
Table Create Table
v1 CREATE VIEW `test`.`v1` AS select `test`.`f``1`() AS `test.``f````1`` ()`
select * from v1;
test.`f``1` ()
5
drop view v1;
drop function `f``1`;
mysql-test/t/view.test
View file @
a43c40f1
...
...
@@ -1106,3 +1106,13 @@ select * from v3;
show
create
view
v3
;
drop
view
v3
,
v2
,
v1
;
drop
table
t2
,
t1
;
#
# VIEW based on functions with complex names
#
create
function
`
f
``
1
` () returns int return 5;
create view v1 as select test.`
f
``
1
` ();
show create view v1;
select * from v1;
drop view v1;
drop function `
f
``
1
`
;
sql/item_func.cc
View file @
a43c40f1
...
...
@@ -3270,9 +3270,22 @@ Item_func_sp::Item_func_sp(sp_name *name, List<Item> &list)
const
char
*
Item_func_sp
::
func_name
()
const
{
return
m_name
->
m_name
.
str
;
THD
*
thd
=
current_thd
;
uint
len
=
((
m_name
->
m_db
.
length
+
m_name
->
m_name
.
length
)
*
2
+
//characters*quoting
2
+
// ` and `
1
+
// .
1
);
// end of string
String
qname
(
alloc_root
(
&
thd
->
mem_root
,
len
),
len
,
system_charset_info
);
qname
.
length
(
0
);
append_identifier
(
thd
,
&
qname
,
m_name
->
m_db
.
str
,
m_name
->
m_db
.
length
);
qname
.
append
(
'.'
);
append_identifier
(
thd
,
&
qname
,
m_name
->
m_name
.
str
,
m_name
->
m_name
.
length
);
return
qname
.
ptr
();
}
int
Item_func_sp
::
execute
(
Item
**
itp
)
{
...
...
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