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
8630ca9a
Commit
8630ca9a
authored
Dec 12, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't want host in the definer's column.
parent
cabd28c6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
mysql-test/r/sp.result
mysql-test/r/sp.result
+5
-5
sql/sp.cc
sql/sp.cc
+1
-3
No files found.
mysql-test/r/sp.result
View file @
8630ca9a
...
...
@@ -918,7 +918,7 @@ n f
drop table fac;
show function status like '%f%';
Name Type Definer Modified Created Security_type Comment
fac FUNCTION root
@localhost
0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER
fac FUNCTION root 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER
drop procedure ifac;
drop function fac;
show function status like '%f%';
...
...
@@ -1011,8 +1011,8 @@ end loop;
end
show procedure status like '%p%';
Name Type Definer Modified Created Security_type Comment
ip PROCEDURE root
@localhost
0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER
opp PROCEDURE root
@localhost
0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER
ip PROCEDURE root 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER
opp PROCEDURE root 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER
call ip(200);
select * from primes where i=45 or i=100 or i=199;
i p
...
...
@@ -1074,7 +1074,7 @@ comment "111111111111" sql security invoker
insert into test.t1 values (x, y);
show procedure status like 'bar';
Name Type Definer Modified Created Security_type Comment
bar PROCEDURE root
@localhost
0000-00-00 00:00:00 0000-00-00 00:00:00 INVOKER 111111111111
bar PROCEDURE root 0000-00-00 00:00:00 0000-00-00 00:00:00 INVOKER 111111111111
alter procedure bar name bar2 comment "2222222222" sql security definer;
alter procedure bar2 name bar comment "3333333333";
alter procedure bar;
...
...
@@ -1085,7 +1085,7 @@ bar CREATE PROCEDURE bar(x char(16), y int)
insert into test.t1 values (x, y)
show procedure status like 'bar';
Name Type Definer Modified Created Security_type Comment
bar PROCEDURE root
@localhost
0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER 3333333333
bar PROCEDURE root 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER 3333333333
drop procedure bar;
drop table t1;
drop table t2;
sql/sp.cc
View file @
8630ca9a
...
...
@@ -265,7 +265,6 @@ db_create_routine(THD *thd, int type, sp_head *sp)
int
ret
;
TABLE
*
table
;
TABLE_LIST
tables
;
char
creator
[
HOSTNAME_LENGTH
+
USERNAME_LENGTH
+
2
];
memset
(
&
tables
,
0
,
sizeof
(
tables
));
tables
.
db
=
(
char
*
)
"mysql"
;
...
...
@@ -276,7 +275,6 @@ db_create_routine(THD *thd, int type, sp_head *sp)
else
{
restore_record
(
table
,
default_values
);
// Get default values for fields
strxmov
(
creator
,
thd
->
user
,
"@"
,
thd
->
host_or_ip
,
NullS
);
if
(
table
->
fields
!=
MYSQL_PROC_FIELD_COUNT
)
{
...
...
@@ -302,7 +300,7 @@ db_create_routine(THD *thd, int type, sp_head *sp)
table
->
field
[
MYSQL_PROC_FIELD_BODY
]
->
store
(
sp
->
m_body
.
str
,
sp
->
m_body
.
length
,
system_charset_info
);
table
->
field
[
MYSQL_PROC_FIELD_DEFINER
]
->
store
(
creator
,
(
uint
)
strlen
(
creato
r
),
system_charset_info
);
store
(
thd
->
user
,
(
uint
)
strlen
(
thd
->
use
r
),
system_charset_info
);
((
Field_timestamp
*
)
table
->
field
[
MYSQL_PROC_FIELD_CREATED
])
->
set_time
();
table
->
field
[
MYSQL_PROC_FIELD_SQL_MODE
]
->
store
((
longlong
)
thd
->
variables
.
sql_mode
);
...
...
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