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
64ab0fb7
Commit
64ab0fb7
authored
Jan 05, 2018
by
Jan Lindström
Committed by
GitHub
Jan 05, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #534 from tempesta-tech/upstream/test_innodb_encryption
Tests: detect table count for some encryption tests
parents
c9ad134e
64afa5be
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
mysql-test/suite/encryption/t/debug_key_management.test
mysql-test/suite/encryption/t/debug_key_management.test
+3
-2
mysql-test/suite/encryption/t/encrypt_and_grep.test
mysql-test/suite/encryption/t/encrypt_and_grep.test
+2
-1
mysql-test/suite/encryption/t/innodb_encryption.test
mysql-test/suite/encryption/t/innodb_encryption.test
+4
-2
No files found.
mysql-test/suite/encryption/t/debug_key_management.test
View file @
64ab0fb7
...
@@ -8,13 +8,14 @@ if (`select count(*) = 0 from information_schema.plugins
...
@@ -8,13 +8,14 @@ if (`select count(*) = 0 from information_schema.plugins
set
global
innodb_encrypt_tables
=
ON
;
set
global
innodb_encrypt_tables
=
ON
;
show
variables
like
'innodb_encrypt%'
;
show
variables
like
'innodb_encrypt%'
;
let
$wait_condition
=
select
count
(
*
)
=
3
from
information_schema
.
innodb_tablespaces_encryption
where
current_key_version
=
1
;
--
let
$tables_count
=
`select count(*) + 1 from information_schema.tables where engine = 'InnoDB'`
let
$wait_condition
=
select
count
(
*
)
=
$tables_count
from
information_schema
.
innodb_tablespaces_encryption
where
current_key_version
=
1
;
--
source
include
/
wait_condition
.
inc
--
source
include
/
wait_condition
.
inc
select
count
(
*
)
from
information_schema
.
innodb_tablespaces_encryption
where
current_key_version
<>
1
;
select
count
(
*
)
from
information_schema
.
innodb_tablespaces_encryption
where
current_key_version
<>
1
;
set
global
debug_key_management_version
=
10
;
set
global
debug_key_management_version
=
10
;
let
$wait_condition
=
select
count
(
*
)
=
3
from
information_schema
.
innodb_tablespaces_encryption
where
current_key_version
=
10
;
let
$wait_condition
=
select
count
(
*
)
=
$tables_count
from
information_schema
.
innodb_tablespaces_encryption
where
current_key_version
=
10
;
--
source
include
/
wait_condition
.
inc
--
source
include
/
wait_condition
.
inc
select
count
(
*
)
from
information_schema
.
innodb_tablespaces_encryption
where
current_key_version
<>
10
;
select
count
(
*
)
from
information_schema
.
innodb_tablespaces_encryption
where
current_key_version
<>
10
;
...
...
mysql-test/suite/encryption/t/encrypt_and_grep.test
View file @
64ab0fb7
...
@@ -60,7 +60,8 @@ SET GLOBAL innodb_encrypt_tables = off;
...
@@ -60,7 +60,8 @@ SET GLOBAL innodb_encrypt_tables = off;
--
echo
# Wait max 10 min for key encryption threads to decrypt all spaces
--
echo
# Wait max 10 min for key encryption threads to decrypt all spaces
--
let
$wait_timeout
=
600
--
let
$wait_timeout
=
600
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
5
FROM
INFORMATION_SCHEMA
.
INNODB_TABLESPACES_ENCRYPTION
WHERE
MIN_KEY_VERSION
=
0
AND
CURRENT_KEY_VERSION
=
0
;
--
let
$tables_count
=
`select count(*) from information_schema.tables where engine = 'InnoDB'`
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
$tables_count
FROM
INFORMATION_SCHEMA
.
INNODB_TABLESPACES_ENCRYPTION
WHERE
MIN_KEY_VERSION
=
0
AND
CURRENT_KEY_VERSION
=
0
;
--
source
include
/
wait_condition
.
inc
--
source
include
/
wait_condition
.
inc
SELECT
NAME
FROM
INFORMATION_SCHEMA
.
INNODB_TABLESPACES_ENCRYPTION
WHERE
MIN_KEY_VERSION
=
0
;
SELECT
NAME
FROM
INFORMATION_SCHEMA
.
INNODB_TABLESPACES_ENCRYPTION
WHERE
MIN_KEY_VERSION
=
0
;
...
...
mysql-test/suite/encryption/t/innodb_encryption.test
View file @
64ab0fb7
...
@@ -14,9 +14,11 @@ SHOW VARIABLES LIKE 'innodb_encrypt%';
...
@@ -14,9 +14,11 @@ SHOW VARIABLES LIKE 'innodb_encrypt%';
SET
GLOBAL
innodb_encrypt_tables
=
ON
;
SET
GLOBAL
innodb_encrypt_tables
=
ON
;
--
let
$tables_count
=
`select count(*) + 1 from information_schema.tables where engine = 'InnoDB'`
--
echo
# Wait max 10 min for key encryption threads to encrypt all spaces
--
echo
# Wait max 10 min for key encryption threads to encrypt all spaces
--
let
$wait_timeout
=
600
--
let
$wait_timeout
=
600
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
>=
3
FROM
INFORMATION_SCHEMA
.
INNODB_TABLESPACES_ENCRYPTION
WHERE
MIN_KEY_VERSION
<>
0
;
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
>=
$tables_count
FROM
INFORMATION_SCHEMA
.
INNODB_TABLESPACES_ENCRYPTION
WHERE
MIN_KEY_VERSION
<>
0
;
--
source
include
/
wait_condition
.
inc
--
source
include
/
wait_condition
.
inc
SELECT
NAME
FROM
INFORMATION_SCHEMA
.
INNODB_TABLESPACES_ENCRYPTION
WHERE
MIN_KEY_VERSION
=
0
;
SELECT
NAME
FROM
INFORMATION_SCHEMA
.
INNODB_TABLESPACES_ENCRYPTION
WHERE
MIN_KEY_VERSION
=
0
;
...
@@ -59,7 +61,7 @@ SET GLOBAL innodb_encryption_threads=@start_global_value;
...
@@ -59,7 +61,7 @@ SET GLOBAL innodb_encryption_threads=@start_global_value;
--
echo
# Wait max 10 min for key encryption threads to encrypt all spaces
--
echo
# Wait max 10 min for key encryption threads to encrypt all spaces
--
let
$wait_timeout
=
600
--
let
$wait_timeout
=
600
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
>=
3
FROM
INFORMATION_SCHEMA
.
INNODB_TABLESPACES_ENCRYPTION
WHERE
MIN_KEY_VERSION
<>
0
;
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
>=
$tables_count
FROM
INFORMATION_SCHEMA
.
INNODB_TABLESPACES_ENCRYPTION
WHERE
MIN_KEY_VERSION
<>
0
;
--
source
include
/
wait_condition
.
inc
--
source
include
/
wait_condition
.
inc
SELECT
NAME
FROM
INFORMATION_SCHEMA
.
INNODB_TABLESPACES_ENCRYPTION
WHERE
MIN_KEY_VERSION
=
0
;
SELECT
NAME
FROM
INFORMATION_SCHEMA
.
INNODB_TABLESPACES_ENCRYPTION
WHERE
MIN_KEY_VERSION
=
0
;
...
...
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