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
7682b10e
Commit
7682b10e
authored
Aug 30, 2004
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed case when real length very close to calculated (BUG#5150)
parent
a43c40f1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
2 deletions
+20
-2
mysql-test/r/view.result
mysql-test/r/view.result
+7
-0
mysql-test/t/view.test
mysql-test/t/view.test
+9
-0
sql/item_func.cc
sql/item_func.cc
+4
-2
No files found.
mysql-test/r/view.result
View file @
7682b10e
...
...
@@ -1176,3 +1176,10 @@ test.`f``1` ()
5
drop view v1;
drop function `f``1`;
create function x () returns int return 5;
create view v1 as select x ();
select * from v1;
x ()
5
drop view v1;
drop function x;
mysql-test/t/view.test
View file @
7682b10e
...
...
@@ -1116,3 +1116,12 @@ show create view v1;
select * from v1;
drop view v1;
drop function `
f
``
1
`
;
#
# tested problem when function name length close to ALIGN_SIZE
#
create
function
x
()
returns
int
return
5
;
create
view
v1
as
select
x
();
select
*
from
v1
;
drop
view
v1
;
drop
function
x
;
sql/item_func.cc
View file @
7682b10e
...
...
@@ -3271,12 +3271,14 @@ const char *
Item_func_sp
::
func_name
()
const
{
THD
*
thd
=
current_thd
;
/* Calculate length to avoud reallocation of string for sure */
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
,
1
+
// end of string
ALIGN_SIZE
(
1
));
// to avoid String reallocation
String
qname
((
char
*
)
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
);
...
...
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