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
5bf7046f
Commit
5bf7046f
authored
Apr 11, 2017
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding the const quafilier to "sp_name *" parameters in a few routine.
parent
958e634d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
19 deletions
+21
-19
sql/sp.cc
sql/sp.cc
+13
-11
sql/sp.h
sql/sp.h
+6
-6
sql/sp_cache.cc
sql/sp_cache.cc
+1
-1
sql/sp_cache.h
sql/sp_cache.h
+1
-1
No files found.
sql/sp.cc
View file @
5bf7046f
...
...
@@ -38,7 +38,7 @@
#define SP_TYPE_STRING(type) stored_procedure_type_to_str(type)
static
int
db_load_routine
(
THD
*
thd
,
stored_procedure_type
type
,
sp_name
*
name
,
db_load_routine
(
THD
*
thd
,
stored_procedure_type
type
,
const
sp_name
*
name
,
sp_head
**
sphp
,
sql_mode_t
sql_mode
,
const
char
*
params
,
const
char
*
returns
,
const
char
*
body
,
st_sp_chistics
&
chistics
,
...
...
@@ -469,7 +469,7 @@ static TABLE *open_proc_table_for_update(THD *thd)
*/
static
int
db_find_routine_aux
(
THD
*
thd
,
stored_procedure_type
type
,
sp_name
*
name
,
db_find_routine_aux
(
THD
*
thd
,
stored_procedure_type
type
,
const
sp_name
*
name
,
TABLE
*
table
)
{
uchar
key
[
MAX_KEY_LENGTH
];
// db, name, optional key length type
...
...
@@ -523,7 +523,7 @@ db_find_routine_aux(THD *thd, stored_procedure_type type, sp_name *name,
*/
static
int
db_find_routine
(
THD
*
thd
,
stored_procedure_type
type
,
sp_name
*
name
,
db_find_routine
(
THD
*
thd
,
stored_procedure_type
type
,
const
sp_name
*
name
,
sp_head
**
sphp
)
{
TABLE
*
table
;
...
...
@@ -809,7 +809,7 @@ Bad_db_error_handler::handle_condition(THD *thd,
static
int
db_load_routine
(
THD
*
thd
,
stored_procedure_type
type
,
sp_name
*
name
,
sp_head
**
sphp
,
const
sp_name
*
name
,
sp_head
**
sphp
,
sql_mode_t
sql_mode
,
const
char
*
params
,
const
char
*
returns
,
const
char
*
body
,
st_sp_chistics
&
chistics
,
LEX_STRING
*
definer_user_name
,
LEX_STRING
*
definer_host_name
,
...
...
@@ -966,7 +966,7 @@ sp_returns_type(THD *thd, String &result, sp_head *sp)
*/
static
int
sp_drop_routine_internal
(
THD
*
thd
,
stored_procedure_type
type
,
sp_name
*
name
,
TABLE
*
table
)
const
sp_name
*
name
,
TABLE
*
table
)
{
DBUG_ENTER
(
"sp_drop_routine_internal"
);
...
...
@@ -1332,7 +1332,7 @@ sp_create_routine(THD *thd, stored_procedure_type type, sp_head *sp)
*/
int
sp_drop_routine
(
THD
*
thd
,
stored_procedure_type
type
,
sp_name
*
name
)
sp_drop_routine
(
THD
*
thd
,
stored_procedure_type
type
,
const
sp_name
*
name
)
{
TABLE
*
table
;
int
ret
;
...
...
@@ -1386,7 +1386,7 @@ sp_drop_routine(THD *thd, stored_procedure_type type, sp_name *name)
*/
int
sp_update_routine
(
THD
*
thd
,
stored_procedure_type
type
,
sp_name
*
name
,
sp_update_routine
(
THD
*
thd
,
stored_procedure_type
type
,
const
sp_name
*
name
,
st_sp_chistics
*
chistics
)
{
TABLE
*
table
;
...
...
@@ -1670,7 +1670,8 @@ sp_drop_db_routines(THD *thd, char *db)
*/
bool
sp_show_create_routine
(
THD
*
thd
,
stored_procedure_type
type
,
sp_name
*
name
)
sp_show_create_routine
(
THD
*
thd
,
stored_procedure_type
type
,
const
sp_name
*
name
)
{
sp_head
*
sp
;
...
...
@@ -1725,7 +1726,7 @@ sp_show_create_routine(THD *thd, stored_procedure_type type, sp_name *name)
*/
sp_head
*
sp_find_routine
(
THD
*
thd
,
stored_procedure_type
type
,
sp_name
*
name
,
sp_find_routine
(
THD
*
thd
,
stored_procedure_type
type
,
const
sp_name
*
name
,
sp_cache
**
cp
,
bool
cache_only
)
{
sp_head
*
sp
;
...
...
@@ -1950,7 +1951,7 @@ bool sp_add_used_routine(Query_tables_list *prelocking_ctx, Query_arena *arena,
*/
void
sp_add_used_routine
(
Query_tables_list
*
prelocking_ctx
,
Query_arena
*
arena
,
sp_name
*
rt
,
enum
stored_procedure_type
rt_type
)
const
sp_name
*
rt
,
enum
stored_procedure_type
rt_type
)
{
MDL_key
key
((
rt_type
==
TYPE_ENUM_FUNCTION
)
?
MDL_key
::
FUNCTION
:
MDL_key
::
PROCEDURE
,
...
...
@@ -2123,7 +2124,8 @@ int sp_cache_routine(THD *thd, Sroutine_hash_entry *rt,
@retval non-0 Error while loading routine from mysql,proc table.
*/
int
sp_cache_routine
(
THD
*
thd
,
enum
stored_procedure_type
type
,
sp_name
*
name
,
int
sp_cache_routine
(
THD
*
thd
,
enum
stored_procedure_type
type
,
const
sp_name
*
name
,
bool
lookup_only
,
sp_head
**
sp
)
{
int
ret
=
0
;
...
...
sql/sp.h
View file @
5bf7046f
...
...
@@ -122,7 +122,7 @@ sp_drop_db_routines(THD *thd, char *db);
bool
lock_db_routines
(
THD
*
thd
,
char
*
db
);
sp_head
*
sp_find_routine
(
THD
*
thd
,
stored_procedure_type
type
,
sp_name
*
name
,
sp_find_routine
(
THD
*
thd
,
stored_procedure_type
type
,
const
sp_name
*
name
,
sp_cache
**
cp
,
bool
cache_only
);
int
...
...
@@ -131,24 +131,24 @@ sp_cache_routine(THD *thd, Sroutine_hash_entry *rt,
int
sp_cache_routine
(
THD
*
thd
,
stored_procedure_type
type
,
sp_name
*
name
,
sp_cache_routine
(
THD
*
thd
,
stored_procedure_type
type
,
const
sp_name
*
name
,
bool
lookup_only
,
sp_head
**
sp
);
bool
sp_exist_routines
(
THD
*
thd
,
TABLE_LIST
*
procs
,
bool
is_proc
);
bool
sp_show_create_routine
(
THD
*
thd
,
stored_procedure_type
type
,
sp_name
*
name
);
sp_show_create_routine
(
THD
*
thd
,
stored_procedure_type
type
,
const
sp_name
*
name
);
bool
sp_create_routine
(
THD
*
thd
,
stored_procedure_type
type
,
sp_head
*
sp
);
int
sp_update_routine
(
THD
*
thd
,
stored_procedure_type
type
,
sp_name
*
name
,
sp_update_routine
(
THD
*
thd
,
stored_procedure_type
type
,
const
sp_name
*
name
,
st_sp_chistics
*
chistics
);
int
sp_drop_routine
(
THD
*
thd
,
stored_procedure_type
type
,
sp_name
*
name
);
sp_drop_routine
(
THD
*
thd
,
stored_procedure_type
type
,
const
sp_name
*
name
);
/**
...
...
@@ -192,7 +192,7 @@ class Sroutine_hash_entry
Procedures for handling sets of stored routines used by statement or routine.
*/
void
sp_add_used_routine
(
Query_tables_list
*
prelocking_ctx
,
Query_arena
*
arena
,
sp_name
*
rt
,
stored_procedure_type
rt_type
);
const
sp_name
*
rt
,
stored_procedure_type
rt_type
);
bool
sp_add_used_routine
(
Query_tables_list
*
prelocking_ctx
,
Query_arena
*
arena
,
const
MDL_key
*
key
,
TABLE_LIST
*
belong_to_view
);
void
sp_remove_not_own_routines
(
Query_tables_list
*
prelocking_ctx
);
...
...
sql/sp_cache.cc
View file @
5bf7046f
...
...
@@ -189,7 +189,7 @@ void sp_cache_insert(sp_cache **cp, sp_head *sp)
NULL if the routine not found.
*/
sp_head
*
sp_cache_lookup
(
sp_cache
**
cp
,
sp_name
*
name
)
sp_head
*
sp_cache_lookup
(
sp_cache
**
cp
,
const
sp_name
*
name
)
{
char
buf
[
NAME_LEN
*
2
+
2
];
sp_cache
*
c
=
*
cp
;
...
...
sql/sp_cache.h
View file @
5bf7046f
...
...
@@ -59,7 +59,7 @@ void sp_cache_init();
void
sp_cache_end
();
void
sp_cache_clear
(
sp_cache
**
cp
);
void
sp_cache_insert
(
sp_cache
**
cp
,
sp_head
*
sp
);
sp_head
*
sp_cache_lookup
(
sp_cache
**
cp
,
sp_name
*
name
);
sp_head
*
sp_cache_lookup
(
sp_cache
**
cp
,
const
sp_name
*
name
);
void
sp_cache_invalidate
();
void
sp_cache_flush_obsolete
(
sp_cache
**
cp
,
sp_head
**
sp
);
ulong
sp_cache_version
();
...
...
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