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