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
4a5eb6bd
Commit
4a5eb6bd
authored
Dec 19, 2007
by
serg@janus.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correct invalid values in SET GLOBAL var=DEFAULT
bug#33382
parent
4bb50356
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
82 deletions
+21
-82
mysql-test/r/bdb_notembedded.result
mysql-test/r/bdb_notembedded.result
+0
-35
mysql-test/r/variables.result
mysql-test/r/variables.result
+1
-1
mysql-test/t/bdb_notembedded.test
mysql-test/t/bdb_notembedded.test
+0
-38
mysql-test/t/variables.test
mysql-test/t/variables.test
+1
-1
sql/set_var.cc
sql/set_var.cc
+19
-7
No files found.
mysql-test/r/bdb_notembedded.result
deleted
100644 → 0
View file @
4bb50356
set autocommit=1;
reset master;
create table bug16206 (a int);
insert into bug16206 values(1);
start transaction;
insert into bug16206 values(2);
commit;
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4
f n Query 1 n use `test`; create table bug16206 (a int)
f n Query 1 n use `test`; insert into bug16206 values(1)
f n Query 1 n use `test`; insert into bug16206 values(2)
drop table bug16206;
reset master;
create table bug16206 (a int) engine= bdb;
insert into bug16206 values(0);
insert into bug16206 values(1);
start transaction;
insert into bug16206 values(2);
commit;
insert into bug16206 values(3);
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4
f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb
f n Query 1 n use `test`; insert into bug16206 values(0)
f n Query 1 n use `test`; insert into bug16206 values(1)
f n Query 1 n use `test`; BEGIN
f n Query 1 n use `test`; insert into bug16206 values(2)
f n Query 1 n use `test`; COMMIT
f n Query 1 n use `test`; insert into bug16206 values(3)
drop table bug16206;
set autocommit=0;
End of 5.0 tests
mysql-test/r/variables.result
View file @
4a5eb6bd
...
...
@@ -182,7 +182,7 @@ show global variables like 'myisam_max_sort_file_size';
Variable_name Value
myisam_max_sort_file_size 1048576
set GLOBAL myisam_max_sort_file_size=default;
show variables like 'myisam_max_sort_file_size';
show
global
variables like 'myisam_max_sort_file_size';
Variable_name Value
myisam_max_sort_file_size FILE_SIZE
set global net_retry_count=10, session net_retry_count=10;
...
...
mysql-test/t/bdb_notembedded.test
deleted
100644 → 0
View file @
4bb50356
--
source
include
/
not_embedded
.
inc
--
source
include
/
have_bdb
.
inc
#
# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode
#
set
autocommit
=
1
;
let
$VERSION
=
`select version()`
;
reset
master
;
create
table
bug16206
(
a
int
);
insert
into
bug16206
values
(
1
);
start
transaction
;
insert
into
bug16206
values
(
2
);
commit
;
--
replace_result
$VERSION
VERSION
--
replace_column
1
f
2
n
5
n
show
binlog
events
;
drop
table
bug16206
;
reset
master
;
create
table
bug16206
(
a
int
)
engine
=
bdb
;
insert
into
bug16206
values
(
0
);
insert
into
bug16206
values
(
1
);
start
transaction
;
insert
into
bug16206
values
(
2
);
commit
;
insert
into
bug16206
values
(
3
);
--
replace_result
$VERSION
VERSION
--
replace_column
1
f
2
n
5
n
show
binlog
events
;
drop
table
bug16206
;
set
autocommit
=
0
;
--
echo
End
of
5.0
tests
mysql-test/t/variables.test
View file @
4a5eb6bd
...
...
@@ -127,7 +127,7 @@ set GLOBAL myisam_max_sort_file_size=2000000;
show
global
variables
like
'myisam_max_sort_file_size'
;
set
GLOBAL
myisam_max_sort_file_size
=
default
;
--
replace_result
9223372036853727232
FILE_SIZE
2146435072
FILE_SIZE
show
variables
like
'myisam_max_sort_file_size'
;
show
global
variables
like
'myisam_max_sort_file_size'
;
set
global
net_retry_count
=
10
,
session
net_retry_count
=
10
;
set
global
net_buffer_length
=
1024
,
net_write_timeout
=
200
,
net_read_timeout
=
300
;
...
...
sql/set_var.cc
View file @
4a5eb6bd
...
...
@@ -113,8 +113,7 @@ static int check_max_delayed_threads(THD *thd, set_var *var);
static
void
fix_thd_mem_root
(
THD
*
thd
,
enum_var_type
type
);
static
void
fix_trans_mem_root
(
THD
*
thd
,
enum_var_type
type
);
static
void
fix_server_id
(
THD
*
thd
,
enum_var_type
type
);
static
ulonglong
fix_unsigned
(
THD
*
thd
,
ulonglong
num
,
const
struct
my_option
*
option_limits
);
static
ulonglong
fix_unsigned
(
THD
*
,
ulonglong
,
const
struct
my_option
*
);
static
bool
get_unsigned
(
THD
*
thd
,
set_var
*
var
);
static
void
throw_bounds_warning
(
THD
*
thd
,
const
char
*
name
,
ulonglong
num
);
static
KEY_CACHE
*
create_key_cache
(
const
char
*
name
,
uint
length
);
...
...
@@ -1524,8 +1523,10 @@ bool sys_var_long_ptr_global::update(THD *thd, set_var *var)
void
sys_var_long_ptr_global
::
set_default
(
THD
*
thd
,
enum_var_type
type
)
{
bool
not_used
;
pthread_mutex_lock
(
guard
);
*
value
=
(
ulong
)
option_limits
->
def_value
;
*
value
=
(
ulong
)
getopt_ull_limit_value
((
ulong
)
option_limits
->
def_value
,
option_limits
,
&
not_used
);
pthread_mutex_unlock
(
guard
);
}
...
...
@@ -1545,8 +1546,10 @@ bool sys_var_ulonglong_ptr::update(THD *thd, set_var *var)
void
sys_var_ulonglong_ptr
::
set_default
(
THD
*
thd
,
enum_var_type
type
)
{
bool
not_used
;
pthread_mutex_lock
(
&
LOCK_global_system_variables
);
*
value
=
(
ulonglong
)
option_limits
->
def_value
;
*
value
=
getopt_ull_limit_value
((
ulonglong
)
option_limits
->
def_value
,
option_limits
,
&
not_used
);
pthread_mutex_unlock
(
&
LOCK_global_system_variables
);
}
...
...
@@ -1616,8 +1619,11 @@ void sys_var_thd_ulong::set_default(THD *thd, enum_var_type type)
{
if
(
type
==
OPT_GLOBAL
)
{
bool
not_used
;
/* We will not come here if option_limits is not set */
global_system_variables
.
*
offset
=
(
ulong
)
option_limits
->
def_value
;
global_system_variables
.
*
offset
=
getopt_ull_limit_value
((
ulong
)
option_limits
->
def_value
,
option_limits
,
&
not_used
);
}
else
thd
->
variables
.
*
offset
=
global_system_variables
.
*
offset
;
...
...
@@ -1660,9 +1666,12 @@ void sys_var_thd_ha_rows::set_default(THD *thd, enum_var_type type)
{
if
(
type
==
OPT_GLOBAL
)
{
bool
not_used
;
/* We will not come here if option_limits is not set */
pthread_mutex_lock
(
&
LOCK_global_system_variables
);
global_system_variables
.
*
offset
=
(
ha_rows
)
option_limits
->
def_value
;
global_system_variables
.
*
offset
=
(
ha_rows
)
getopt_ull_limit_value
((
ha_rows
)
option_limits
->
def_value
,
option_limits
,
&
not_used
);
pthread_mutex_unlock
(
&
LOCK_global_system_variables
);
}
else
...
...
@@ -1709,8 +1718,11 @@ void sys_var_thd_ulonglong::set_default(THD *thd, enum_var_type type)
{
if
(
type
==
OPT_GLOBAL
)
{
bool
not_used
;
pthread_mutex_lock
(
&
LOCK_global_system_variables
);
global_system_variables
.
*
offset
=
(
ulonglong
)
option_limits
->
def_value
;
global_system_variables
.
*
offset
=
getopt_ull_limit_value
((
ulonglong
)
option_limits
->
def_value
,
option_limits
,
&
not_used
);
pthread_mutex_unlock
(
&
LOCK_global_system_variables
);
}
else
...
...
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