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
4a893c96
Commit
4a893c96
authored
Oct 06, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix use of "%*s" *printf() specifiers that were really meant to be
"%.*s". (Bug #13650)
parent
59e35d62
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
18 deletions
+19
-18
sql/sp.cc
sql/sp.cc
+16
-15
sql/sp_cache.cc
sql/sp_cache.cc
+1
-1
sql/sp_head.cc
sql/sp_head.cc
+2
-2
No files found.
sql/sp.cc
View file @
4a893c96
...
...
@@ -208,7 +208,7 @@ db_find_routine_aux(THD *thd, int type, sp_name *name, TABLE *table)
{
byte
key
[
MAX_KEY_LENGTH
];
// db, name, optional key length type
DBUG_ENTER
(
"db_find_routine_aux"
);
DBUG_PRINT
(
"enter"
,
(
"type: %d name: %*s"
,
DBUG_PRINT
(
"enter"
,
(
"type: %d name: %
.
*s"
,
type
,
name
->
m_name
.
length
,
name
->
m_name
.
str
));
/*
...
...
@@ -275,7 +275,7 @@ db_find_routine(THD *thd, int type, sp_name *name, sp_head **sphp)
ulong
sql_mode
;
Open_tables_state
open_tables_state_backup
;
DBUG_ENTER
(
"db_find_routine"
);
DBUG_PRINT
(
"enter"
,
(
"type: %d name: %*s"
,
DBUG_PRINT
(
"enter"
,
(
"type: %d name: %
.
*s"
,
type
,
name
->
m_name
.
length
,
name
->
m_name
.
str
));
*
sphp
=
0
;
// In case of errors
...
...
@@ -479,7 +479,8 @@ db_create_routine(THD *thd, int type, sp_head *sp)
char
olddb
[
128
];
bool
dbchanged
;
DBUG_ENTER
(
"db_create_routine"
);
DBUG_PRINT
(
"enter"
,
(
"type: %d name: %*s"
,
type
,
sp
->
m_name
.
length
,
sp
->
m_name
.
str
));
DBUG_PRINT
(
"enter"
,
(
"type: %d name: %.*s"
,
type
,
sp
->
m_name
.
length
,
sp
->
m_name
.
str
));
dbchanged
=
FALSE
;
if
((
ret
=
sp_use_new_db
(
thd
,
sp
->
m_db
.
str
,
olddb
,
sizeof
(
olddb
),
...
...
@@ -606,7 +607,7 @@ db_drop_routine(THD *thd, int type, sp_name *name)
TABLE
*
table
;
int
ret
;
DBUG_ENTER
(
"db_drop_routine"
);
DBUG_PRINT
(
"enter"
,
(
"type: %d name: %*s"
,
DBUG_PRINT
(
"enter"
,
(
"type: %d name: %
.
*s"
,
type
,
name
->
m_name
.
length
,
name
->
m_name
.
str
));
if
(
!
(
table
=
open_proc_table_for_update
(
thd
)))
...
...
@@ -628,7 +629,7 @@ db_update_routine(THD *thd, int type, sp_name *name, st_sp_chistics *chistics)
int
ret
;
bool
opened
;
DBUG_ENTER
(
"db_update_routine"
);
DBUG_PRINT
(
"enter"
,
(
"type: %d name: %*s"
,
DBUG_PRINT
(
"enter"
,
(
"type: %d name: %
.
*s"
,
type
,
name
->
m_name
.
length
,
name
->
m_name
.
str
));
if
(
!
(
table
=
open_proc_table_for_update
(
thd
)))
...
...
@@ -922,7 +923,7 @@ sp_find_procedure(THD *thd, sp_name *name, bool cache_only)
{
sp_head
*
sp
;
DBUG_ENTER
(
"sp_find_procedure"
);
DBUG_PRINT
(
"enter"
,
(
"name: %
*s.%
*s"
,
DBUG_PRINT
(
"enter"
,
(
"name: %
.*s.%.
*s"
,
name
->
m_db
.
length
,
name
->
m_db
.
str
,
name
->
m_name
.
length
,
name
->
m_name
.
str
));
...
...
@@ -980,7 +981,7 @@ sp_create_procedure(THD *thd, sp_head *sp)
{
int
ret
;
DBUG_ENTER
(
"sp_create_procedure"
);
DBUG_PRINT
(
"enter"
,
(
"name: %*s"
,
sp
->
m_name
.
length
,
sp
->
m_name
.
str
));
DBUG_PRINT
(
"enter"
,
(
"name: %
.
*s"
,
sp
->
m_name
.
length
,
sp
->
m_name
.
str
));
ret
=
db_create_routine
(
thd
,
TYPE_ENUM_PROCEDURE
,
sp
);
DBUG_RETURN
(
ret
);
...
...
@@ -992,7 +993,7 @@ sp_drop_procedure(THD *thd, sp_name *name)
{
int
ret
;
DBUG_ENTER
(
"sp_drop_procedure"
);
DBUG_PRINT
(
"enter"
,
(
"name: %*s"
,
name
->
m_name
.
length
,
name
->
m_name
.
str
));
DBUG_PRINT
(
"enter"
,
(
"name: %
.
*s"
,
name
->
m_name
.
length
,
name
->
m_name
.
str
));
ret
=
db_drop_routine
(
thd
,
TYPE_ENUM_PROCEDURE
,
name
);
if
(
!
ret
)
...
...
@@ -1006,7 +1007,7 @@ sp_update_procedure(THD *thd, sp_name *name, st_sp_chistics *chistics)
{
int
ret
;
DBUG_ENTER
(
"sp_update_procedure"
);
DBUG_PRINT
(
"enter"
,
(
"name: %*s"
,
name
->
m_name
.
length
,
name
->
m_name
.
str
));
DBUG_PRINT
(
"enter"
,
(
"name: %
.
*s"
,
name
->
m_name
.
length
,
name
->
m_name
.
str
));
ret
=
db_update_routine
(
thd
,
TYPE_ENUM_PROCEDURE
,
name
,
chistics
);
if
(
!
ret
)
...
...
@@ -1020,7 +1021,7 @@ sp_show_create_procedure(THD *thd, sp_name *name)
{
sp_head
*
sp
;
DBUG_ENTER
(
"sp_show_create_procedure"
);
DBUG_PRINT
(
"enter"
,
(
"name: %*s"
,
name
->
m_name
.
length
,
name
->
m_name
.
str
));
DBUG_PRINT
(
"enter"
,
(
"name: %
.
*s"
,
name
->
m_name
.
length
,
name
->
m_name
.
str
));
if
((
sp
=
sp_find_procedure
(
thd
,
name
)))
{
...
...
@@ -1072,7 +1073,7 @@ sp_find_function(THD *thd, sp_name *name, bool cache_only)
{
sp_head
*
sp
;
DBUG_ENTER
(
"sp_find_function"
);
DBUG_PRINT
(
"enter"
,
(
"name: %*s"
,
name
->
m_name
.
length
,
name
->
m_name
.
str
));
DBUG_PRINT
(
"enter"
,
(
"name: %
.
*s"
,
name
->
m_name
.
length
,
name
->
m_name
.
str
));
if
(
!
(
sp
=
sp_cache_lookup
(
&
thd
->
sp_func_cache
,
name
))
&&
!
cache_only
)
...
...
@@ -1089,7 +1090,7 @@ sp_create_function(THD *thd, sp_head *sp)
{
int
ret
;
DBUG_ENTER
(
"sp_create_function"
);
DBUG_PRINT
(
"enter"
,
(
"name: %*s"
,
sp
->
m_name
.
length
,
sp
->
m_name
.
str
));
DBUG_PRINT
(
"enter"
,
(
"name: %
.
*s"
,
sp
->
m_name
.
length
,
sp
->
m_name
.
str
));
ret
=
db_create_routine
(
thd
,
TYPE_ENUM_FUNCTION
,
sp
);
DBUG_RETURN
(
ret
);
...
...
@@ -1101,7 +1102,7 @@ sp_drop_function(THD *thd, sp_name *name)
{
int
ret
;
DBUG_ENTER
(
"sp_drop_function"
);
DBUG_PRINT
(
"enter"
,
(
"name: %*s"
,
name
->
m_name
.
length
,
name
->
m_name
.
str
));
DBUG_PRINT
(
"enter"
,
(
"name: %
.
*s"
,
name
->
m_name
.
length
,
name
->
m_name
.
str
));
ret
=
db_drop_routine
(
thd
,
TYPE_ENUM_FUNCTION
,
name
);
if
(
!
ret
)
...
...
@@ -1115,7 +1116,7 @@ sp_update_function(THD *thd, sp_name *name, st_sp_chistics *chistics)
{
int
ret
;
DBUG_ENTER
(
"sp_update_procedure"
);
DBUG_PRINT
(
"enter"
,
(
"name: %*s"
,
name
->
m_name
.
length
,
name
->
m_name
.
str
));
DBUG_PRINT
(
"enter"
,
(
"name: %
.
*s"
,
name
->
m_name
.
length
,
name
->
m_name
.
str
));
ret
=
db_update_routine
(
thd
,
TYPE_ENUM_FUNCTION
,
name
,
chistics
);
if
(
!
ret
)
...
...
@@ -1129,7 +1130,7 @@ sp_show_create_function(THD *thd, sp_name *name)
{
sp_head
*
sp
;
DBUG_ENTER
(
"sp_show_create_function"
);
DBUG_PRINT
(
"enter"
,
(
"name: %*s"
,
name
->
m_name
.
length
,
name
->
m_name
.
str
));
DBUG_PRINT
(
"enter"
,
(
"name: %
.
*s"
,
name
->
m_name
.
length
,
name
->
m_name
.
str
));
if
((
sp
=
sp_find_function
(
thd
,
name
)))
{
...
...
sql/sp_cache.cc
View file @
4a893c96
...
...
@@ -132,7 +132,7 @@ void sp_cache_insert(sp_cache **cp, sp_head *sp)
return
;
// End of memory error
c
->
version
=
Cversion
;
// No need to lock when reading long variable
}
DBUG_PRINT
(
"info"
,(
"sp_cache: inserting: %*s"
,
sp
->
m_qname
.
length
,
DBUG_PRINT
(
"info"
,(
"sp_cache: inserting: %
.
*s"
,
sp
->
m_qname
.
length
,
sp
->
m_qname
.
str
));
c
->
insert
(
sp
);
*
cp
=
c
;
// Update *cp if it was NULL
...
...
sql/sp_head.cc
View file @
4a893c96
...
...
@@ -280,7 +280,7 @@ sp_eval_func_item(THD *thd, Item **it_addr, enum enum_field_types type,
DBUG_PRINT
(
"info"
,
(
"STRING_RESULT: null"
));
goto
return_null_item
;
}
DBUG_PRINT
(
"info"
,(
"STRING_RESULT: %*s"
,
DBUG_PRINT
(
"info"
,(
"STRING_RESULT: %
.
*s"
,
s
->
length
(),
s
->
c_ptr_quick
()));
/*
Reuse mechanism in sp_eval_func_item() is only employed for assignments
...
...
@@ -354,7 +354,7 @@ sp_name::init_qname(THD *thd)
return
;
m_qname
.
length
=
m_sroutines_key
.
length
-
1
;
m_qname
.
str
=
m_sroutines_key
.
str
+
1
;
sprintf
(
m_qname
.
str
,
"%
*s.%
*s"
,
sprintf
(
m_qname
.
str
,
"%
.*s.%.
*s"
,
m_db
.
length
,
(
m_db
.
length
?
m_db
.
str
:
""
),
m_name
.
length
,
m_name
.
str
);
}
...
...
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