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