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
d8e127f9
Commit
d8e127f9
authored
Dec 22, 2015
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.1' into bb-10.1-serg
parents
02781512
d58a7702
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
136 additions
and
21 deletions
+136
-21
mysql-test/r/gis.result
mysql-test/r/gis.result
+1
-1
mysql-test/suite/funcs_1/r/is_columns_is.result
mysql-test/suite/funcs_1/r/is_columns_is.result
+2
-2
mysql-test/suite/roles/show_grants_replicated.result
mysql-test/suite/roles/show_grants_replicated.result
+57
-0
mysql-test/suite/roles/show_grants_replicated.test
mysql-test/suite/roles/show_grants_replicated.test
+41
-0
scripts/wsrep_sst_xtrabackup-v2.sh
scripts/wsrep_sst_xtrabackup-v2.sh
+22
-12
sql/sql_show.cc
sql/sql_show.cc
+12
-5
sql/sql_yacc.yy
sql/sql_yacc.yy
+1
-1
No files found.
mysql-test/r/gis.result
View file @
d8e127f9
...
...
@@ -1727,7 +1727,7 @@ Table Create Table
SPATIAL_REF_SYS CREATE TEMPORARY TABLE `SPATIAL_REF_SYS` (
`SRID` smallint(5) NOT NULL DEFAULT '0',
`AUTH_NAME` varchar(512) NOT NULL DEFAULT '',
`AUTH_SRID`
small
int(5) NOT NULL DEFAULT '0',
`AUTH_SRID` int(5) NOT NULL DEFAULT '0',
`SRTEXT` varchar(2048) NOT NULL DEFAULT ''
) ENGINE=MEMORY DEFAULT CHARSET=utf8
create table t1(g GEOMETRY, pt POINT);
...
...
mysql-test/suite/funcs_1/r/is_columns_is.result
View file @
d8e127f9
...
...
@@ -326,7 +326,7 @@ def information_schema SESSION_STATUS VARIABLE_VALUE 2 NO varchar 2048 6144 NUL
def information_schema SESSION_VARIABLES VARIABLE_NAME 1 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
def information_schema SESSION_VARIABLES VARIABLE_VALUE 2 NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select
def information_schema SPATIAL_REF_SYS AUTH_NAME 2 NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select
def information_schema SPATIAL_REF_SYS AUTH_SRID 3 0 NO
smallint NULL NULL 5 0 NULL NULL NULL small
int(5) select
def information_schema SPATIAL_REF_SYS AUTH_SRID 3 0 NO
int NULL NULL 10 0 NULL NULL NULL
int(5) select
def information_schema SPATIAL_REF_SYS SRID 1 0 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) select
def information_schema SPATIAL_REF_SYS SRTEXT 4 NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select
def information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select
...
...
@@ -855,7 +855,7 @@ NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datet
3.0000 information_schema SESSION_VARIABLES VARIABLE_VALUE varchar 2048 6144 utf8 utf8_general_ci varchar(2048)
NULL information_schema SPATIAL_REF_SYS SRID smallint NULL NULL NULL NULL smallint(5)
3.0000 information_schema SPATIAL_REF_SYS AUTH_NAME varchar 512 1536 utf8 utf8_general_ci varchar(512)
NULL information_schema SPATIAL_REF_SYS AUTH_SRID
smallint NULL NULL NULL NULL small
int(5)
NULL information_schema SPATIAL_REF_SYS AUTH_SRID
int NULL NULL NULL NULL
int(5)
3.0000 information_schema SPATIAL_REF_SYS SRTEXT varchar 2048 6144 utf8 utf8_general_ci varchar(2048)
3.0000 information_schema STATISTICS TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema STATISTICS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
...
...
mysql-test/suite/roles/show_grants_replicated.result
0 → 100644
View file @
d8e127f9
include/master-slave.inc
[connection master]
create user u1;
create role r1;
#
# On master SHOW GRANTS work both for the user and the role:
show grants for u1;
Grants for u1@%
GRANT USAGE ON *.* TO 'u1'@'%'
show grants for r1;
Grants for r1
GRANT USAGE ON *.* TO 'r1'
#
connection slave;
#
# The role has been replicated,
# it's visible in mysql.user and I_S:
#
select user, host, is_role from mysql.user where user in ('u1', 'r1');
user host is_role
r1 Y
u1 % N
select * from information_schema.applicable_roles;
GRANTEE ROLE_NAME IS_GRANTABLE IS_DEFAULT
root@localhost r1 YES NO
#
# Check show grants for the new user.
show grants for u1;
Grants for u1@%
GRANT USAGE ON *.* TO 'u1'@'%'
#
# Check show grants for the new role.
show grants for r1;
Grants for r1
GRANT USAGE ON *.* TO 'r1'
#
# Check if flushing privileges preserves the state.
flush privileges;
show grants for r1;
Grants for r1
GRANT USAGE ON *.* TO 'r1'
#
# Check SHOW GRANTS after setting the role.
set role r1;
show grants;
Grants for root@localhost
GRANT r1 TO 'root'@'localhost' WITH ADMIN OPTION
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
GRANT USAGE ON *.* TO 'r1'
show grants for r1;
Grants for r1
GRANT USAGE ON *.* TO 'r1'
connection master;
drop role r1;
drop user u1;
include/rpl_end.inc
mysql-test/suite/roles/show_grants_replicated.test
0 → 100644
View file @
d8e127f9
--
source
include
/
master
-
slave
.
inc
--
enable_connect_log
create
user
u1
;
create
role
r1
;
--
echo
#
--
echo
# On master SHOW GRANTS work both for the user and the role:
show
grants
for
u1
;
show
grants
for
r1
;
--
echo
#
--
sync_slave_with_master
--
echo
#
--
echo
# The role has been replicated,
--
echo
# it's visible in mysql.user and I_S:
--
echo
#
--
sorted_result
select
user
,
host
,
is_role
from
mysql
.
user
where
user
in
(
'u1'
,
'r1'
);
select
*
from
information_schema
.
applicable_roles
;
--
echo
#
--
echo
# Check show grants for the new user.
show
grants
for
u1
;
--
echo
#
--
echo
# Check show grants for the new role.
show
grants
for
r1
;
--
echo
#
--
echo
# Check if flushing privileges preserves the state.
flush
privileges
;
show
grants
for
r1
;
--
echo
#
--
echo
# Check SHOW GRANTS after setting the role.
set
role
r1
;
show
grants
;
show
grants
for
r1
;
connection
master
;
drop
role
r1
;
drop
user
u1
;
--
disable_connect_log
--
sync_slave_with_master
--
source
include
/
rpl_end
.
inc
scripts/wsrep_sst_xtrabackup-v2.sh
View file @
d8e127f9
...
...
@@ -191,9 +191,9 @@ get_transfer()
exit
2
fi
if
[[
$encrypt
-eq
2
||
$encrypt
-eq
3
]]
&&
!
socat
-V
|
grep
-q
WITH_OPENSSL
;
then
wsrep_log_
info
"NOTE: socat is not openssl enabled, falling back to plain transfer
"
e
ncrypt
=
-1
if
[[
$encrypt
-eq
2
||
$encrypt
-eq
3
]]
&&
!
socat
-V
|
grep
-q
"WITH_OPENSSL 1"
;
then
wsrep_log_
error
"Encryption requested, but socat is not OpenSSL enabled (encrypt=
$encrypt
)
"
e
xit
2
fi
if
[[
$encrypt
-eq
2
]]
;
then
...
...
@@ -204,25 +204,35 @@ get_transfer()
fi
stagemsg+
=
"-OpenSSL-Encrypted-2"
if
[[
"
$WSREP_SST_OPT_ROLE
"
==
"joiner"
]]
;
then
wsrep_log_info
"Decrypting with
PEM
$tpem
, CA:
$tcert
"
tcmd
=
"socat -u openssl-listen:
${
TSST_PORT
}
,reuseaddr,cert=
$
tpem
,cafile=
${
tcert
}${
sockopt
}
stdio"
wsrep_log_info
"Decrypting with
cert=
${
tpem
}
, cafile=
${
tcert
}
"
tcmd
=
"socat -u openssl-listen:
${
TSST_PORT
}
,reuseaddr,cert=
$
{
tpem
}
,cafile=
${
tcert
}${
sockopt
}
stdio"
else
wsrep_log_info
"Encrypting with
PEM
$tpem
, CA:
$tcert
"
tcmd
=
"socat -u stdio openssl-connect:
${
REMOTEIP
}
:
${
TSST_PORT
}
,cert=
$
tpem
,cafile=
${
tcert
}${
sockopt
}
"
wsrep_log_info
"Encrypting with
cert=
${
tpem
}
, cafile=
${
tcert
}
"
tcmd
=
"socat -u stdio openssl-connect:
${
REMOTEIP
}
:
${
TSST_PORT
}
,cert=
$
{
tpem
}
,cafile=
${
tcert
}${
sockopt
}
"
fi
elif
[[
$encrypt
-eq
3
]]
;
then
wsrep_log_info
"Using openssl based encryption with socat: with key and crt"
if
[[
-z
$tpem
||
-z
$tkey
]]
;
then
if
[[
-z
$tpem
||
-z
$tkey
]]
;
then
wsrep_log_error
"Both certificate and key files required"
exit
22
fi
stagemsg+
=
"-OpenSSL-Encrypted-3"
if
[[
"
$WSREP_SST_OPT_ROLE
"
==
"joiner"
]]
;
then
wsrep_log_info
"Decrypting with certificate
$tpem
, key
$tkey
"
tcmd
=
"socat -u openssl-listen:
${
TSST_PORT
}
,reuseaddr,cert=
$tpem
,key=
${
tkey
}
,verify=0
${
sockopt
}
stdio"
if
[[
-z
$tcert
]]
;
then
wsrep_log_info
"Decrypting with cert=
${
tpem
}
, key=
${
tkey
}
, verify=0"
tcmd
=
"socat -u openssl-listen:
${
TSST_PORT
}
,reuseaddr,cert=
${
tpem
}
,key=
${
tkey
}
,verify=0
${
sockopt
}
stdio"
else
wsrep_log_info
"Decrypting with cert=
${
tpem
}
, key=
${
tkey
}
, cafile=
${
tcert
}
"
tcmd
=
"socat -u openssl-listen:
${
TSST_PORT
}
,reuseaddr,cert=
${
tpem
}
,key=
${
tkey
}
,cafile=
${
tcert
}${
sockopt
}
stdio"
fi
else
wsrep_log_info
"Encrypting with certificate
$tpem
, key
$tkey
"
tcmd
=
"socat -u stdio openssl-connect:
${
REMOTEIP
}
:
${
TSST_PORT
}
,cert=
$tpem
,key=
${
tkey
}
,verify=0
${
sockopt
}
"
if
[[
-z
$tcert
]]
;
then
wsrep_log_info
"Encrypting with cert=
${
tpem
}
, key=
${
tkey
}
, verify=0"
tcmd
=
"socat -u stdio openssl-connect:
${
REMOTEIP
}
:
${
TSST_PORT
}
,cert=
${
tpem
}
,key=
${
tkey
}
,verify=0
${
sockopt
}
"
else
wsrep_log_info
"Encrypting with cert=
${
tpem
}
, key=
${
tkey
}
, cafile=
${
tcert
}
"
tcmd
=
"socat -u stdio openssl-connect:
${
REMOTEIP
}
:
${
TSST_PORT
}
,cert=
${
tpem
}
,key=
${
tkey
}
,cafile=
${
tcert
}${
sockopt
}
"
fi
fi
else
...
...
sql/sql_show.cc
View file @
d8e127f9
...
...
@@ -344,14 +344,21 @@ static int fill_spatial_ref_sys(THD *thd, TABLE_LIST *tables, COND *cond)
table
->
field
[
0
]
->
store
(
-
1
,
FALSE
);
/*SRID*/
table
->
field
[
1
]
->
store
(
STRING_WITH_LEN
(
"Not defined"
),
cs
);
/*AUTH_NAME*/
table
->
field
[
2
]
->
store
(
-
1
,
FALSE
);
/*AUTH_SRID*/
table
->
field
[
3
]
->
store
(
STRING_WITH_LEN
(
""
),
cs
);
/*SRTEXT*/
table
->
field
[
3
]
->
store
(
STRING_WITH_LEN
(
"LOCAL_CS[
\"
Spatial reference wasn't specified
\"
,"
"LOCAL_DATUM[
\"
Unknown
\"
,0],"
"UNIT[
\"
m
\"
,1.0],"
"AXIS[
\"
x
\"
,EAST],"
"AXIS[
\"
y
\"
,NORTH]]"
),
cs
);
/*SRTEXT*/
if
(
schema_table_store_record
(
thd
,
table
))
goto
exit
;
table
->
field
[
0
]
->
store
(
0
,
TRUE
);
/*SRID*/
table
->
field
[
1
]
->
store
(
STRING_WITH_LEN
(
"Cartesian plane"
),
cs
);
/*AUTH_NAME*/
table
->
field
[
2
]
->
store
(
0
,
TRUE
);
/*AUTH_SRID*/
table
->
field
[
3
]
->
store
(
STRING_WITH_LEN
(
""
),
cs
);
/*SRTEXT*/
table
->
field
[
1
]
->
store
(
STRING_WITH_LEN
(
"EPSG"
),
cs
);
/*AUTH_NAME*/
table
->
field
[
2
]
->
store
(
404000
,
TRUE
);
/*AUTH_SRID*/
table
->
field
[
3
]
->
store
(
STRING_WITH_LEN
(
"LOCAL_CS[
\"
Wildcard 2D cartesian plane in metric unit
\"
,"
"LOCAL_DATUM[
\"
Unknown
\"
,0],"
"UNIT[
\"
m
\"
,1.0],"
"AXIS[
\"
x
\"
,EAST],"
"AXIS[
\"
y
\"
,NORTH],"
"AUTHORITY[
\"
EPSG
\"
,
\"
404000
\"
]]"
),
cs
);
/*SRTEXT*/
if
(
schema_table_store_record
(
thd
,
table
))
goto
exit
;
...
...
@@ -8978,7 +8985,7 @@ ST_FIELD_INFO spatial_ref_sys_fields_info[]=
{
{
"SRID"
,
5
,
MYSQL_TYPE_SHORT
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
{
"AUTH_NAME"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
{
"AUTH_SRID"
,
5
,
MYSQL_TYPE_
SHORT
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
{
"AUTH_SRID"
,
5
,
MYSQL_TYPE_
LONG
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
{
"SRTEXT"
,
2048
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
};
...
...
sql/sql_yacc.yy
View file @
d8e127f9
...
...
@@ -12696,7 +12696,7 @@ show_param:
MYSQL_YYABORT;
Lex->grant_user->user= current_user_and_current_role;
}
| GRANTS FOR_SYM user_or_role
| GRANTS FOR_SYM user_or_role
clear_privileges
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_SHOW_GRANTS;
...
...
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