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
61a365e6
Commit
61a365e6
authored
Mar 20, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more sys_var_str fixes
parent
d1f1bbef
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
9 deletions
+23
-9
mysql-test/r/variables.result
mysql-test/r/variables.result
+9
-0
mysql-test/t/variables.test
mysql-test/t/variables.test
+9
-0
sql/set_var.cc
sql/set_var.cc
+5
-9
No files found.
mysql-test/r/variables.result
View file @
61a365e6
...
...
@@ -384,6 +384,15 @@ select @@session.key_buffer_size;
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable
set ft_boolean_syntax = @@init_connect;
ERROR HY000: Variable 'ft_boolean_syntax' is a GLOBAL variable and should be set with SET GLOBAL
set global ft_boolean_syntax = @@init_connect;
ERROR 42000: Variable 'ft_boolean_syntax' can't be set to the value of ''
set init_connect = NULL;
ERROR HY000: Variable 'init_connect' is a GLOBAL variable and should be set with SET GLOBAL
set global init_connect = NULL;
set ft_boolean_syntax = @@init_connect;
ERROR HY000: Variable 'ft_boolean_syntax' is a GLOBAL variable and should be set with SET GLOBAL
set global ft_boolean_syntax = @@init_connect;
ERROR 42000: Variable 'ft_boolean_syntax' can't be set to the value of ''
select @@global.max_user_connections,@@local.max_join_size;
@@global.max_user_connections @@session.max_join_size
100 200
...
...
mysql-test/t/variables.test
View file @
61a365e6
...
...
@@ -272,6 +272,15 @@ select @@session.key_buffer_size;
--
error
1229
set
ft_boolean_syntax
=
@@
init_connect
;
--
error
1231
set
global
ft_boolean_syntax
=
@@
init_connect
;
--
error
1229
set
init_connect
=
NULL
;
set
global
init_connect
=
NULL
;
--
error
1229
set
ft_boolean_syntax
=
@@
init_connect
;
--
error
1231
set
global
ft_boolean_syntax
=
@@
init_connect
;
#
# swap
...
...
sql/set_var.cc
View file @
61a365e6
...
...
@@ -835,15 +835,11 @@ bool sys_var_str::check(THD *thd, set_var *var)
bool
update_sys_var_str
(
sys_var_str
*
var_str
,
rw_lock_t
*
var_mutex
,
set_var
*
var
)
{
char
*
res
=
0
,
*
old_value
;
uint
new_length
=
0
;
/* If the string is "", delete old init command */
if
(
var
&&
(
new_length
=
var
->
value
->
str_value
.
length
()))
{
if
(
!
(
res
=
my_strdup_with_length
((
byte
*
)
var
->
value
->
str_value
.
ptr
(),
new_length
,
MYF
(
0
))))
char
*
res
=
0
,
*
old_value
=
(
char
*
)(
var
?
var
->
value
->
str_value
.
ptr
()
:
0
);
uint
new_length
=
(
var
?
var
->
value
->
str_value
.
length
()
:
0
);
if
(
!
old_value
)
old_value
=
""
;
if
(
!
(
res
=
my_strdup_with_length
(
old_value
,
new_length
,
MYF
(
0
))))
return
1
;
}
/*
Replace the old value in such a way that the any thread using
the value will work.
...
...
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