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
a112a80b
Commit
a112a80b
authored
Feb 22, 2022
by
Vlad Lesin
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.4 into 10.5
parents
b69191bb
f6f055a1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
6 deletions
+20
-6
include/mysql/plugin.h
include/mysql/plugin.h
+3
-1
mysql-test/main/plugin.result
mysql-test/main/plugin.result
+4
-0
mysql-test/main/plugin.test
mysql-test/main/plugin.test
+1
-0
sql/sql_plugin.cc
sql/sql_plugin.cc
+6
-4
storage/example/ha_example.cc
storage/example/ha_example.cc
+5
-0
storage/innobase/os/os0file.cc
storage/innobase/os/os0file.cc
+1
-1
No files found.
include/mysql/plugin.h
View file @
a112a80b
...
@@ -233,6 +233,7 @@ typedef int (*mysql_show_var_func)(MYSQL_THD, struct st_mysql_show_var*, void *,
...
@@ -233,6 +233,7 @@ typedef int (*mysql_show_var_func)(MYSQL_THD, struct st_mysql_show_var*, void *,
#define PLUGIN_VAR_NOCMDARG 0x1000
/* No argument for cmd line */
#define PLUGIN_VAR_NOCMDARG 0x1000
/* No argument for cmd line */
#define PLUGIN_VAR_RQCMDARG 0x0000
/* Argument required for cmd line */
#define PLUGIN_VAR_RQCMDARG 0x0000
/* Argument required for cmd line */
#define PLUGIN_VAR_OPCMDARG 0x2000
/* Argument optional for cmd line */
#define PLUGIN_VAR_OPCMDARG 0x2000
/* Argument optional for cmd line */
#define PLUGIN_VAR_DEPRECATED 0x4000
/* Server variable is deprecated */
#define PLUGIN_VAR_MEMALLOC 0x8000
/* String needs memory allocated */
#define PLUGIN_VAR_MEMALLOC 0x8000
/* String needs memory allocated */
struct
st_mysql_sys_var
;
struct
st_mysql_sys_var
;
...
@@ -286,7 +287,8 @@ typedef void (*mysql_var_update_func)(MYSQL_THD thd,
...
@@ -286,7 +287,8 @@ typedef void (*mysql_var_update_func)(MYSQL_THD thd,
#define PLUGIN_VAR_MASK \
#define PLUGIN_VAR_MASK \
(PLUGIN_VAR_READONLY | PLUGIN_VAR_NOSYSVAR | \
(PLUGIN_VAR_READONLY | PLUGIN_VAR_NOSYSVAR | \
PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_NOCMDARG | \
PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_NOCMDARG | \
PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_MEMALLOC)
PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_RQCMDARG | \
PLUGIN_VAR_DEPRECATED | PLUGIN_VAR_MEMALLOC)
#define MYSQL_PLUGIN_VAR_HEADER \
#define MYSQL_PLUGIN_VAR_HEADER \
int flags; \
int flags; \
...
...
mysql-test/main/plugin.result
View file @
a112a80b
...
@@ -40,11 +40,15 @@ a
...
@@ -40,11 +40,15 @@ a
set global example_ulong_var=500;
set global example_ulong_var=500;
set global example_enum_var= e1;
set global example_enum_var= e1;
set session example_int_var= -1;
set session example_int_var= -1;
set global example_deprecated_var=1;
Warnings:
Warning 1287 '@@example_deprecated_var' is deprecated and will be removed in a future release
show status like 'example%';
show status like 'example%';
Variable_name Value
Variable_name Value
Example_func_example enum_var is 0, ulong_var is 500, int_var is -1, double_var is 8.500000, really
Example_func_example enum_var is 0, ulong_var is 500, int_var is -1, double_var is 8.500000, really
show variables like 'example%';
show variables like 'example%';
Variable_name Value
Variable_name Value
example_deprecated_var 0
example_double_thdvar 8.500000
example_double_thdvar 8.500000
example_double_var 8.500000
example_double_var 8.500000
example_enum_var e1
example_enum_var e1
...
...
mysql-test/main/plugin.test
View file @
a112a80b
...
@@ -27,6 +27,7 @@ SELECT * FROM t1;
...
@@ -27,6 +27,7 @@ SELECT * FROM t1;
set
global
example_ulong_var
=
500
;
set
global
example_ulong_var
=
500
;
set
global
example_enum_var
=
e1
;
set
global
example_enum_var
=
e1
;
set
session
example_int_var
=
-
1
;
set
session
example_int_var
=
-
1
;
set
global
example_deprecated_var
=
1
;
show
status
like
'example%'
;
show
status
like
'example%'
;
show
variables
like
'example%'
;
show
variables
like
'example%'
;
...
...
sql/sql_plugin.cc
View file @
a112a80b
...
@@ -311,7 +311,8 @@ class sys_var_pluginvar: public sys_var, public Sql_alloc
...
@@ -311,7 +311,8 @@ class sys_var_pluginvar: public sys_var, public Sql_alloc
struct
st_mysql_sys_var
*
plugin_var
;
struct
st_mysql_sys_var
*
plugin_var
;
sys_var_pluginvar
(
sys_var_chain
*
chain
,
const
char
*
name_arg
,
sys_var_pluginvar
(
sys_var_chain
*
chain
,
const
char
*
name_arg
,
st_plugin_int
*
p
,
st_mysql_sys_var
*
plugin_var_arg
);
st_plugin_int
*
p
,
st_mysql_sys_var
*
plugin_var_arg
,
const
char
*
substitute
);
sys_var_pluginvar
*
cast_pluginvar
()
{
return
this
;
}
sys_var_pluginvar
*
cast_pluginvar
()
{
return
this
;
}
uchar
*
real_value_ptr
(
THD
*
thd
,
enum_var_type
type
)
const
;
uchar
*
real_value_ptr
(
THD
*
thd
,
enum_var_type
type
)
const
;
TYPELIB
*
plugin_var_typelib
(
void
)
const
;
TYPELIB
*
plugin_var_typelib
(
void
)
const
;
...
@@ -3412,11 +3413,11 @@ static int pluginvar_sysvar_flags(const st_mysql_sys_var *p)
...
@@ -3412,11 +3413,11 @@ static int pluginvar_sysvar_flags(const st_mysql_sys_var *p)
}
}
sys_var_pluginvar
::
sys_var_pluginvar
(
sys_var_chain
*
chain
,
const
char
*
name_arg
,
sys_var_pluginvar
::
sys_var_pluginvar
(
sys_var_chain
*
chain
,
const
char
*
name_arg
,
st_plugin_int
*
p
,
st_mysql_sys_var
*
pv
)
st_plugin_int
*
p
,
st_mysql_sys_var
*
pv
,
const
char
*
substitute
)
:
sys_var
(
chain
,
name_arg
,
pv
->
comment
,
pluginvar_sysvar_flags
(
pv
),
:
sys_var
(
chain
,
name_arg
,
pv
->
comment
,
pluginvar_sysvar_flags
(
pv
),
0
,
pv
->
flags
&
PLUGIN_VAR_NOCMDOPT
?
-
1
:
0
,
NO_ARG
,
0
,
pv
->
flags
&
PLUGIN_VAR_NOCMDOPT
?
-
1
:
0
,
NO_ARG
,
pluginvar_show_type
(
pv
),
0
,
pluginvar_show_type
(
pv
),
0
,
NULL
,
VARIABLE_NOT_IN_BINLOG
,
NULL
,
NULL
,
NULL
),
NULL
,
VARIABLE_NOT_IN_BINLOG
,
NULL
,
NULL
,
substitute
),
plugin
(
p
),
plugin_var
(
pv
)
plugin
(
p
),
plugin_var
(
pv
)
{
{
plugin_var
->
name
=
name_arg
;
plugin_var
->
name
=
name_arg
;
...
@@ -4158,7 +4159,8 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
...
@@ -4158,7 +4159,8 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
my_casedn_str
(
&
my_charset_latin1
,
varname
);
my_casedn_str
(
&
my_charset_latin1
,
varname
);
convert_dash_to_underscore
(
varname
,
len
-
1
);
convert_dash_to_underscore
(
varname
,
len
-
1
);
}
}
v
=
new
(
mem_root
)
sys_var_pluginvar
(
&
chain
,
varname
,
tmp
,
o
);
const
char
*
s
=
o
->
flags
&
PLUGIN_VAR_DEPRECATED
?
""
:
NULL
;
v
=
new
(
mem_root
)
sys_var_pluginvar
(
&
chain
,
varname
,
tmp
,
o
,
s
);
v
->
test_load
=
(
var
?
&
var
->
loaded
:
&
static_unload
);
v
->
test_load
=
(
var
?
&
var
->
loaded
:
&
static_unload
);
DBUG_ASSERT
(
static_unload
==
FALSE
);
DBUG_ASSERT
(
static_unload
==
FALSE
);
...
...
storage/example/ha_example.cc
View file @
a112a80b
...
@@ -1060,12 +1060,17 @@ static MYSQL_THDVAR_DOUBLE(
...
@@ -1060,12 +1060,17 @@ static MYSQL_THDVAR_DOUBLE(
1000.5
,
1000.5
,
0
);
0
);
static
MYSQL_THDVAR_INT
(
deprecated_var
,
PLUGIN_VAR_RQCMDARG
|
PLUGIN_VAR_DEPRECATED
,
"-1..1"
,
NULL
,
NULL
,
0
,
-
1
,
1
,
0
);
static
struct
st_mysql_sys_var
*
example_system_variables
[]
=
{
static
struct
st_mysql_sys_var
*
example_system_variables
[]
=
{
MYSQL_SYSVAR
(
enum_var
),
MYSQL_SYSVAR
(
enum_var
),
MYSQL_SYSVAR
(
ulong_var
),
MYSQL_SYSVAR
(
ulong_var
),
MYSQL_SYSVAR
(
int_var
),
MYSQL_SYSVAR
(
int_var
),
MYSQL_SYSVAR
(
double_var
),
MYSQL_SYSVAR
(
double_var
),
MYSQL_SYSVAR
(
double_thdvar
),
MYSQL_SYSVAR
(
double_thdvar
),
MYSQL_SYSVAR
(
deprecated_var
),
MYSQL_SYSVAR
(
varopt_default
),
MYSQL_SYSVAR
(
varopt_default
),
NULL
NULL
};
};
...
...
storage/innobase/os/os0file.cc
View file @
a112a80b
...
@@ -4031,7 +4031,7 @@ static bool is_drive_on_ssd(DWORD nr)
...
@@ -4031,7 +4031,7 @@ static bool is_drive_on_ssd(DWORD nr)
sizeof
storage_query
,
&
seek_penalty
,
sizeof
seek_penalty
,
sizeof
storage_query
,
&
seek_penalty
,
sizeof
seek_penalty
,
&
bytes_written
,
nullptr
))
&
bytes_written
,
nullptr
))
{
{
on_ssd
=
seek_penalty
.
IncursSeekPenalty
;
on_ssd
=
!
seek_penalty
.
IncursSeekPenalty
;
}
}
else
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