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
42c2ef0f
Commit
42c2ef0f
authored
Oct 29, 2007
by
kaa@polly.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge polly.(none):/home/kaa/src/opt/bug29131/my50-bug29131
into polly.(none):/home/kaa/src/opt/mysql-5.0-opt
parents
46283f72
99f4b743
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
6 deletions
+62
-6
mysql-test/r/variables.result
mysql-test/r/variables.result
+16
-0
mysql-test/t/variables.test
mysql-test/t/variables.test
+14
-0
sql/mysql_priv.h
sql/mysql_priv.h
+2
-2
sql/mysqld.cc
sql/mysqld.cc
+2
-2
sql/set_var.cc
sql/set_var.cc
+6
-2
sql/set_var.h
sql/set_var.h
+22
-0
No files found.
mysql-test/r/variables.result
View file @
42c2ef0f
...
...
@@ -796,6 +796,22 @@ ERROR HY000: Variable 'hostname' is a read only variable
show variables like 'hostname';
Variable_name Value
hostname #
SHOW VARIABLES LIKE 'log';
Variable_name Value
log ON
SELECT @@log;
@@log
1
SET GLOBAL log=0;
ERROR HY000: Variable 'log' is a read only variable
SHOW VARIABLES LIKE 'log_slow_queries';
Variable_name Value
log_slow_queries ON
SELECT @@log_slow_queries;
@@log_slow_queries
1
SET GLOBAL log_slow_queries=0;
ERROR HY000: Variable 'log_slow_queries' is a read only variable
End of 5.0 tests
set global binlog_cache_size =@my_binlog_cache_size;
set global connect_timeout =@my_connect_timeout;
...
...
mysql-test/t/variables.test
View file @
42c2ef0f
...
...
@@ -682,6 +682,20 @@ set @@hostname= "anothername";
--
replace_column
2
#
show
variables
like
'hostname'
;
#
# Bug #29131: SHOW VARIABLES reports variable 'log' but SET doesn't recognize it
#
SHOW
VARIABLES
LIKE
'log'
;
SELECT
@@
log
;
--
error
1238
SET
GLOBAL
log
=
0
;
SHOW
VARIABLES
LIKE
'log_slow_queries'
;
SELECT
@@
log_slow_queries
;
--
error
1238
SET
GLOBAL
log_slow_queries
=
0
;
--
echo
End
of
5.0
tests
# This is at the very after the versioned tests, since it involves doing
...
...
sql/mysql_priv.h
View file @
42c2ef0f
...
...
@@ -1310,8 +1310,8 @@ extern bool opt_endinfo, using_udf_functions;
extern
my_bool
locked_in_memory
;
extern
bool
opt_using_transactions
,
mysqld_embedded
;
extern
bool
using_update_log
,
opt_large_files
,
server_id_supplied
;
extern
bool
opt_
log
,
opt_update_log
,
opt_bin_log
,
opt_slow
_log
,
opt_error_log
;
extern
my_bool
opt_log_queries_not_using_indexes
;
extern
bool
opt_
update_log
,
opt_bin
_log
,
opt_error_log
;
extern
my_bool
opt_log
,
opt_slow_log
,
opt_log
_queries_not_using_indexes
;
extern
bool
opt_disable_networking
,
opt_skip_show_db
;
extern
my_bool
opt_character_set_client_handshake
;
extern
bool
volatile
abort_loop
,
shutdown_in_progress
,
grant_option
;
...
...
sql/mysqld.cc
View file @
42c2ef0f
...
...
@@ -339,8 +339,8 @@ static my_bool opt_sync_bdb_logs;
/* Global variables */
bool
opt_
log
,
opt_update_log
,
opt_bin_log
,
opt_slow
_log
;
my_bool
opt_log_queries_not_using_indexes
=
0
;
bool
opt_
update_log
,
opt_bin
_log
;
my_bool
opt_log
,
opt_slow_log
,
opt_log
_queries_not_using_indexes
=
0
;
bool
opt_error_log
=
IF_WIN
(
1
,
0
);
bool
opt_disable_networking
=
0
,
opt_skip_show_db
=
0
;
my_bool
opt_character_set_client_handshake
=
1
;
...
...
sql/set_var.cc
View file @
42c2ef0f
...
...
@@ -201,6 +201,7 @@ sys_var_key_cache_long sys_key_cache_age_threshold("key_cache_age_threshold",
param_age_threshold
));
sys_var_bool_ptr
sys_local_infile
(
"local_infile"
,
&
opt_local_infile
);
sys_var_bool_const_ptr
sys_log
(
"log"
,
&
opt_log
);
sys_var_trust_routine_creators
sys_trust_routine_creators
(
"log_bin_trust_routine_creators"
,
&
trust_function_creators
);
...
...
@@ -213,6 +214,7 @@ sys_var_bool_ptr
sys_var_thd_ulong
sys_log_warnings
(
"log_warnings"
,
&
SV
::
log_warnings
);
sys_var_thd_ulong
sys_long_query_time
(
"long_query_time"
,
&
SV
::
long_query_time
);
sys_var_bool_const_ptr
sys_log_slow
(
"log_slow_queries"
,
&
opt_slow_log
);
sys_var_thd_bool
sys_low_priority_updates
(
"low_priority_updates"
,
&
SV
::
low_priority_updates
,
fix_low_priority_updates
);
...
...
@@ -665,9 +667,11 @@ sys_var *sys_variables[]=
&
sys_lc_time_names
,
&
sys_license
,
&
sys_local_infile
,
&
sys_log
,
&
sys_log_binlog
,
&
sys_log_off
,
&
sys_log_queries_not_using_indexes
,
&
sys_log_slow
,
&
sys_log_update
,
&
sys_log_warnings
,
&
sys_long_query_time
,
...
...
@@ -946,7 +950,7 @@ struct show_var_st init_vars[]= {
#ifdef HAVE_MLOCKALL
{
"locked_in_memory"
,
(
char
*
)
&
locked_in_memory
,
SHOW_BOOL
},
#endif
{
"log"
,
(
char
*
)
&
opt_log
,
SHOW_BOOL
},
{
sys_log
.
name
,
(
char
*
)
&
sys_log
,
SHOW_SYS
},
{
"log_bin"
,
(
char
*
)
&
opt_bin_log
,
SHOW_BOOL
},
{
sys_trust_function_creators
.
name
,(
char
*
)
&
sys_trust_function_creators
,
SHOW_SYS
},
{
"log_error"
,
(
char
*
)
log_error_file
,
SHOW_CHAR
},
...
...
@@ -955,7 +959,7 @@ struct show_var_st init_vars[]= {
#ifdef HAVE_REPLICATION
{
"log_slave_updates"
,
(
char
*
)
&
opt_log_slave_updates
,
SHOW_MY_BOOL
},
#endif
{
"log_slow_queries"
,
(
char
*
)
&
opt_slow_log
,
SHOW_BOOL
},
{
sys_log_slow
.
name
,
(
char
*
)
&
sys_log_slow
,
SHOW_SYS
},
{
sys_log_warnings
.
name
,
(
char
*
)
&
sys_log_warnings
,
SHOW_SYS
},
{
sys_long_query_time
.
name
,
(
char
*
)
&
sys_long_query_time
,
SHOW_SYS
},
{
sys_low_priority_updates
.
name
,
(
char
*
)
&
sys_low_priority_updates
,
SHOW_SYS
},
...
...
sql/set_var.h
View file @
42c2ef0f
...
...
@@ -160,6 +160,28 @@ class sys_var_bool_ptr :public sys_var
};
class
sys_var_bool_const_ptr
:
public
sys_var
{
public:
my_bool
*
value
;
sys_var_bool_const_ptr
(
const
char
*
name_arg
,
my_bool
*
value_arg
)
:
sys_var
(
name_arg
),
value
(
value_arg
)
{}
bool
check
(
THD
*
thd
,
set_var
*
var
)
{
return
1
;
}
bool
update
(
THD
*
thd
,
set_var
*
var
)
{
return
1
;
}
SHOW_TYPE
show_type
()
{
return
SHOW_MY_BOOL
;
}
byte
*
value_ptr
(
THD
*
thd
,
enum_var_type
type
,
LEX_STRING
*
base
)
{
return
(
byte
*
)
value
;
}
bool
check_update_type
(
Item_result
type
)
{
return
0
;
}
bool
is_readonly
()
const
{
return
1
;
}
};
class
sys_var_str
:
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