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
5693a272
Commit
5693a272
authored
Jun 11, 2003
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge gbichot@213.136.52.20:/home/bk/mysql-4.1
into mysql.com:/home/mysql_src/mysql-4.1
parents
41021a0f
b7e0c11a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
1 deletion
+35
-1
mysql-test/r/rpl_temporary.result
mysql-test/r/rpl_temporary.result
+2
-0
mysql-test/t/rpl_temporary.test
mysql-test/t/rpl_temporary.test
+8
-0
sql/set_var.cc
sql/set_var.cc
+16
-1
sql/set_var.h
sql/set_var.h
+9
-0
No files found.
mysql-test/r/rpl_temporary.result
View file @
5693a272
...
...
@@ -5,6 +5,8 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
reset master;
SET @@session.pseudo_thread_id=100;
ERROR HY000: Access denied. You need the SUPER privilege for this operation
drop table if exists t1,t2;
create table t1(f int);
create table t2(f int);
...
...
mysql-test/t/rpl_temporary.test
View file @
5693a272
...
...
@@ -19,6 +19,14 @@ connection master;
connect
(
con1
,
localhost
,
root
,,);
connect
(
con2
,
localhost
,
root
,,);
connect
(
con3
,
localhost
,
test
,,);
# We are going to use SET PSEUDO_THREAD_ID in this test;
# check that it requires the SUPER privilege.
connection
con3
;
--
error
1227
SET
@@
session
.
pseudo_thread_id
=
100
;
let
$VERSION
=
`select version()`
;
...
...
sql/set_var.cc
View file @
5693a272
...
...
@@ -168,7 +168,11 @@ sys_var_thd_ulong sys_max_error_count("max_error_count",
&
SV
::
max_error_count
);
sys_var_thd_ulong
sys_max_heap_table_size
(
"max_heap_table_size"
,
&
SV
::
max_heap_table_size
);
sys_var_thd_ulong
sys_pseudo_thread_id
(
"pseudo_thread_id"
,
/*
sys_pseudo_thread_id has its own class (instead of sys_var_thd_ulong) because
we want a check() function.
*/
sys_var_pseudo_thread_id
sys_pseudo_thread_id
(
"pseudo_thread_id"
,
&
SV
::
pseudo_thread_id
);
sys_var_thd_ha_rows
sys_max_join_size
(
"max_join_size"
,
&
SV
::
max_join_size
,
...
...
@@ -1454,6 +1458,17 @@ byte *sys_var_insert_id::value_ptr(THD *thd, enum_var_type type)
return
(
byte
*
)
&
thd
->
current_insert_id
;
}
bool
sys_var_pseudo_thread_id
::
check
(
THD
*
thd
,
set_var
*
var
)
{
if
(
thd
->
master_access
&
SUPER_ACL
)
return
0
;
else
{
my_error
(
ER_SPECIFIC_ACCESS_DENIED_ERROR
,
MYF
(
0
),
"SUPER"
);
return
1
;
}
}
#ifdef HAVE_REPLICATION
bool
sys_var_slave_skip_counter
::
check
(
THD
*
thd
,
set_var
*
var
)
...
...
sql/set_var.h
View file @
5693a272
...
...
@@ -212,6 +212,15 @@ class sys_var_thd_ulong :public sys_var_thd
byte
*
value_ptr
(
THD
*
thd
,
enum_var_type
type
);
};
class
sys_var_pseudo_thread_id
:
public
sys_var_thd_ulong
{
public:
sys_var_pseudo_thread_id
(
const
char
*
name_arg
,
ulong
SV
::*
offset_arg
)
:
sys_var_thd_ulong
(
name_arg
,
offset_arg
)
{}
bool
check
(
THD
*
thd
,
set_var
*
var
);
};
class
sys_var_thd_ha_rows
:
public
sys_var_thd
{
...
...
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