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
1fc3582b
Commit
1fc3582b
authored
Apr 03, 2003
by
pem@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Got rid of the last unecessary Item_strings.
parent
e483c8ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
18 deletions
+15
-18
sql/sp_head.cc
sql/sp_head.cc
+11
-12
sql/sp_head.h
sql/sp_head.h
+4
-6
No files found.
sql/sp_head.cc
View file @
1fc3582b
...
...
@@ -96,9 +96,10 @@ sp_head::sp_head(LEX_STRING *name, LEX *lex)
{
const
char
*
dstr
=
(
const
char
*
)
lex
->
buf
;
m_name
=
new
Item_string
(
name
->
str
,
name
->
length
,
system_charset_info
);
m_defstr
=
new
Item_string
(
dstr
,
lex
->
end_of_query
-
lex
->
buf
,
system_charset_info
);
m_name
.
length
=
name
->
length
;
m_name
.
str
=
name
->
str
;
m_defstr
.
length
=
lex
->
end_of_query
-
lex
->
buf
;
m_defstr
.
str
=
sql_strmake
(
dstr
,
m_defstr
.
length
);
m_pcont
=
lex
->
spcont
;
my_init_dynamic_array
(
&
m_instr
,
sizeof
(
sp_instr
*
),
16
,
8
);
m_backpatch
.
empty
();
...
...
@@ -108,20 +109,18 @@ int
sp_head
::
create
(
THD
*
thd
)
{
DBUG_ENTER
(
"sp_head::create"
);
String
*
name
=
m_name
->
const_string
();
String
*
def
=
m_defstr
->
const_string
();
int
ret
;
DBUG_PRINT
(
"info"
,
(
"type: %d name: %s def: %s"
,
m_type
,
name
->
c_ptr
(),
def
->
c_ptr
()
));
m_type
,
m_name
.
str
,
m_defstr
.
str
));
if
(
m_type
==
TYPE_ENUM_FUNCTION
)
ret
=
sp_create_function
(
thd
,
name
->
c_ptr
(),
name
->
length
()
,
def
->
c_ptr
(),
def
->
length
()
);
m_name
.
str
,
m_name
.
length
,
m_defstr
.
str
,
m_defstr
.
length
);
else
ret
=
sp_create_procedure
(
thd
,
name
->
c_ptr
(),
name
->
length
()
,
def
->
c_ptr
(),
def
->
length
()
);
m_name
.
str
,
m_name
.
length
,
m_defstr
.
str
,
m_defstr
.
length
);
DBUG_RETURN
(
ret
);
}
...
...
@@ -186,7 +185,7 @@ int
sp_head
::
execute_function
(
THD
*
thd
,
Item
**
argp
,
uint
argcount
,
Item
**
resp
)
{
DBUG_ENTER
(
"sp_head::execute_function"
);
DBUG_PRINT
(
"info"
,
(
"function %s"
,
((
String
*
)
m_name
->
const_string
())
->
c_ptr
()
));
DBUG_PRINT
(
"info"
,
(
"function %s"
,
m_name
.
str
));
uint
csize
=
m_pcont
->
max_framesize
();
uint
params
=
m_pcont
->
params
();
sp_rcontext
*
octx
=
thd
->
spcont
;
...
...
@@ -220,7 +219,7 @@ int
sp_head
::
execute_procedure
(
THD
*
thd
,
List
<
Item
>
*
args
)
{
DBUG_ENTER
(
"sp_head::execute_procedure"
);
DBUG_PRINT
(
"info"
,
(
"procedure %s"
,
((
String
*
)
m_name
->
const_string
())
->
c_ptr
()
));
DBUG_PRINT
(
"info"
,
(
"procedure %s"
,
m_name
.
str
));
int
ret
;
sp_instr
*
p
;
uint
csize
=
m_pcont
->
max_framesize
();
...
...
sql/sp_head.h
View file @
1fc3582b
...
...
@@ -99,11 +99,9 @@ public:
char
*
name
(
uint
*
lenp
=
0
)
const
{
String
*
n
=
m_name
->
const_string
();
if
(
lenp
)
*
lenp
=
n
->
length
()
;
return
n
->
c_ptr
()
;
*
lenp
=
m_name
.
length
;
return
m_name
.
str
;
}
inline
Item_result
result
()
...
...
@@ -113,8 +111,8 @@ public:
private:
Item_string
*
m_name
;
Item_string
*
m_defstr
;
LEX_STRING
m_name
;
LEX_STRING
m_defstr
;
sp_pcontext
*
m_pcont
;
// Parse context
LEX
m_lex
;
// Temp. store for the other lex
DYNAMIC_ARRAY
m_instr
;
// The "instructions"
...
...
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