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
af6db482
Commit
af6db482
authored
Dec 13, 2007
by
dkatz@damien-katzs-computer.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into damien-katzs-computer.local:/Users/dkatz/51runtime
parents
d099e6a2
4abafe26
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
1 deletion
+40
-1
mysql-test/r/no-threads.result
mysql-test/r/no-threads.result
+4
-0
mysql-test/t/no-threads.test
mysql-test/t/no-threads.test
+10
-0
sql/set_var.cc
sql/set_var.cc
+8
-1
sql/set_var.h
sql/set_var.h
+18
-0
No files found.
mysql-test/r/no-threads.result
View file @
af6db482
...
...
@@ -7,3 +7,7 @@ select 1+2;
SHOW GLOBAL VARIABLES LIKE 'thread_handling';
Variable_name Value
thread_handling no-threads
select @@session.thread_handling;
ERROR HY000: Variable 'thread_handling' is a GLOBAL variable
set GLOBAL thread_handling='one-thread';
ERROR HY000: Variable 'thread_handling' is a read only variable
mysql-test/t/no-threads.test
View file @
af6db482
...
...
@@ -4,3 +4,13 @@
select
1
+
1
;
select
1
+
2
;
SHOW
GLOBAL
VARIABLES
LIKE
'thread_handling'
;
#
# Bug #30651 Problems with thread_handling system variable
#
--
error
ER_INCORRECT_GLOBAL_LOCAL_VAR
select
@@
session
.
thread_handling
;
--
error
ER_INCORRECT_GLOBAL_LOCAL_VAR
set
GLOBAL
thread_handling
=
'one-thread'
;
sql/set_var.cc
View file @
af6db482
...
...
@@ -385,7 +385,7 @@ static sys_var_thd_ulong sys_trans_alloc_block_size(&vars, "transaction_alloc_bl
static
sys_var_thd_ulong
sys_trans_prealloc_size
(
&
vars
,
"transaction_prealloc_size"
,
&
SV
::
trans_prealloc_size
,
0
,
fix_trans_mem_root
);
sys_var_
thd_enum
sys_thread_handling
(
&
vars
,
"thread_handling"
,
sys_var_
enum_const
sys_thread_handling
(
&
vars
,
"thread_handling"
,
&
SV
::
thread_handling
,
&
thread_handling_typelib
,
NULL
);
...
...
@@ -1184,6 +1184,13 @@ uchar *sys_var_enum::value_ptr(THD *thd, enum_var_type type, LEX_STRING *base)
return
(
uchar
*
)
enum_names
->
type_names
[
*
value
];
}
uchar
*
sys_var_enum_const
::
value_ptr
(
THD
*
thd
,
enum_var_type
type
,
LEX_STRING
*
base
)
{
return
(
uchar
*
)
enum_names
->
type_names
[
global_system_variables
.
*
offset
];
}
bool
sys_var_thd_ulong
::
check
(
THD
*
thd
,
set_var
*
var
)
{
return
(
sys_var_thd
::
check
(
thd
,
var
)
||
...
...
sql/set_var.h
View file @
af6db482
...
...
@@ -305,6 +305,24 @@ class sys_var_enum :public sys_var
};
class
sys_var_enum_const
:
public
sys_var
{
ulong
SV
::*
offset
;
TYPELIB
*
enum_names
;
public:
sys_var_enum_const
(
sys_var_chain
*
chain
,
const
char
*
name_arg
,
ulong
SV
::*
offset_arg
,
TYPELIB
*
typelib
,
sys_after_update_func
func
)
:
sys_var
(
name_arg
,
func
),
offset
(
offset_arg
),
enum_names
(
typelib
)
{
chain_sys_var
(
chain
);
}
bool
check
(
THD
*
thd
,
set_var
*
var
)
{
return
1
;
}
bool
update
(
THD
*
thd
,
set_var
*
var
)
{
return
1
;
}
SHOW_TYPE
show_type
()
{
return
SHOW_CHAR
;
}
bool
check_update_type
(
Item_result
type
)
{
return
1
;
}
bool
is_readonly
()
const
{
return
1
;
}
uchar
*
value_ptr
(
THD
*
thd
,
enum_var_type
type
,
LEX_STRING
*
base
);
};
class
sys_var_thd
:
public
sys_var
{
public:
...
...
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