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
0059a918
Commit
0059a918
authored
Oct 26, 2017
by
Alice Sherepa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
innodb_zip
parent
dc2c77a6
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
52 additions
and
168 deletions
+52
-168
mysql-test/suite/innodb/include/checksum_not_strict.inc
mysql-test/suite/innodb/include/checksum_not_strict.inc
+0
-5
mysql-test/suite/innodb/include/innodb_simulate_comp_failures.inc
...st/suite/innodb/include/innodb_simulate_comp_failures.inc
+23
-18
mysql-test/suite/innodb/include/innodb_stats_table_flag.inc
mysql-test/suite/innodb/include/innodb_stats_table_flag.inc
+0
-88
mysql-test/suite/innodb/include/innodb_stats_table_flag_analyze.inc
.../suite/innodb/include/innodb_stats_table_flag_analyze.inc
+0
-12
mysql-test/suite/innodb/include/innodb_wl6501_crash.inc
mysql-test/suite/innodb/include/innodb_wl6501_crash.inc
+12
-12
mysql-test/suite/innodb/include/innodb_wl6501_crash_temp.inc
mysql-test/suite/innodb/include/innodb_wl6501_crash_temp.inc
+2
-2
mysql-test/suite/innodb/include/restart_and_reinit.inc
mysql-test/suite/innodb/include/restart_and_reinit.inc
+3
-13
mysql-test/suite/innodb_zip/include/innodb_create_tab_indx.inc
...-test/suite/innodb_zip/include/innodb_create_tab_indx.inc
+2
-4
mysql-test/suite/innodb_zip/include/innodb_load_data.inc
mysql-test/suite/innodb_zip/include/innodb_load_data.inc
+1
-3
mysql-test/suite/innodb_zip/include/innodb_stats_comp_index.inc
...test/suite/innodb_zip/include/innodb_stats_comp_index.inc
+2
-4
mysql-test/suite/innodb_zip/include/innodb_wl6501_crash.inc
mysql-test/suite/innodb_zip/include/innodb_wl6501_crash.inc
+5
-5
mysql-test/suite/innodb_zip/include/innodb_wl6501_crash_temp.inc
...est/suite/innodb_zip/include/innodb_wl6501_crash_temp.inc
+2
-2
No files found.
mysql-test/suite/innodb/include/checksum_not_strict.inc
deleted
100644 → 0
View file @
dc2c77a6
if
(
`SELECT @@GLOBAL.innodb_checksum_algorithm like 'strict_%'`
)
{
--
skip
This
test
cannot
be
run
when
innodb_checksum_algorithm
is
in
strict
mode
}
mysql-test/suite/innodb/include/innodb_simulate_comp_failures.inc
View file @
0059a918
...
...
@@ -5,24 +5,17 @@
--
source
include
/
not_embedded
.
inc
--
source
include
/
have_innodb
.
inc
--
disable_query_log
# record the file format in order to restore in the end.
--
let
$file_format_save
=
`SELECT @@innodb_file_format`
--
let
$file_format_max_save
=
`SELECT @@innodb_file_format_max`
--
let
$simulate_comp_failures_save
=
`SELECT @@innodb_simulate_comp_failures`
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
;
SET
GLOBAL
INNODB_FILE_FORMAT
=
'Barracuda'
;
--
enable_warnings
# since this test generates lot of errors in log, suppress checking errors
call
mtr
.
add_suppression
(
".*"
);
--
disable_query_log
call
mtr
.
add_suppression
(
"InnoDB: Simulating a compression failure for table `test`
\\
.`t1`"
);
--
enable_query_log
# create the table with compressed pages of size 8K.
CREATE
TABLE
t1
(
id
INT
AUTO_INCREMENT
PRIMARY
KEY
,
msg
VARCHAR
(
255
),
KEY
msg_i
(
msg
))
ENGINE
=
INNODB
ROW_FORMAT
=
COMPRESSED
KEY_BLOCK_SIZE
=
8
;
SHOW
CREATE
TABLE
t1
;
# percentage of compressions that will be forced to fail
SET
GLOBAL
innodb_simulate_comp_failures
=
25
;
...
...
@@ -30,25 +23,30 @@ SET GLOBAL innodb_simulate_comp_failures = 25;
--
disable_result_log
let
$num_inserts_ind
=
$num_inserts
;
let
$commit_iterations
=
50
;
while
(
$num_inserts_ind
)
{
let
$repeat
=
`select floor(rand() * 10)`
;
eval
INSERT
INTO
t1
(
id
,
msg
)
VALUES
(
$num_inserts_ind
,
REPEAT
(
'abcdefghijklmnopqrstuvwxyz'
,
$repeat
));
eval
INSERT
INTO
t1
(
id
,
msg
)
VALUES
(
$num_inserts_ind
,
REPEAT
(
'abcdefghijklmnopqrstuvwxyz'
,
$repeat
));
dec
$num_inserts_ind
;
}
--
enable_query_log
--
enable_result_log
SELECT
COUNT
(
*
)
FROM
t1
;
COMMIT
;
SELECT
COUNT
(
id
)
FROM
t1
;
--
disable_query_log
--
disable_result_log
# do random ops, making sure that some pages will get fragmented and reorganized.
let
$num_ops_ind
=
$num_ops
;
let
$commit_count
=
$commit_iterations
;
BEGIN
;
while
(
$num_ops_ind
)
{
...
...
@@ -133,15 +131,22 @@ while($num_ops_ind)
}
}
dec
$commit_count
;
if (!
$commit_count
)
{
let
$commit_count
=
$commit_iterations
;
COMMIT;
BEGIN;
}
dec
$num_ops_ind
;
}
COMMIT;
# final cleanup
DROP TABLE t1;
# restore innodb_file_format and innodb_file_format_max
eval SET GLOBAL innodb_file_format =
\"
$file_format_save
\"
;
eval SET GLOBAL innodb_file_format_max =
\"
$file_format_max_save
\"
;
eval SET GLOBAL innodb_simulate_comp_failures =
$simulate_comp_failures_save
;
--enable_query_log
mysql-test/suite/innodb/include/innodb_stats_table_flag.inc
deleted
100644 → 0
View file @
dc2c77a6
#
--
echo
=====
--
echo
===
Test
ANALYZE
behavior
after
default
creation
--
echo
=====
CREATE
TABLE
test_ps_flag
(
a
INT
)
ENGINE
=
INNODB
;
--
source
suite
/
innodb
/
include
/
innodb_stats_table_flag_analyze
.
inc
DROP
TABLE
test_ps_flag
;
CREATE
TABLE
test_ps_flag
(
a
INT
)
ENGINE
=
INNODB
STATS_PERSISTENT
=
default
;
--
source
suite
/
innodb
/
include
/
innodb_stats_table_flag_analyze
.
inc
DROP
TABLE
test_ps_flag
;
#
--
echo
=====
--
echo
===
Test
ANALYZE
behavior
after
creation
with
explicit
PS
=
OFF
--
echo
=====
CREATE
TABLE
test_ps_flag
(
a
INT
)
ENGINE
=
INNODB
STATS_PERSISTENT
=
0
;
--
source
suite
/
innodb
/
include
/
innodb_stats_table_flag_analyze
.
inc
DROP
TABLE
test_ps_flag
;
#
--
echo
=====
--
echo
===
Test
ANALYZE
behavior
after
creation
with
explicit
PS
=
ON
--
echo
=====
CREATE
TABLE
test_ps_flag
(
a
INT
)
ENGINE
=
INNODB
STATS_PERSISTENT
=
1
;
--
source
suite
/
innodb
/
include
/
innodb_stats_table_flag_analyze
.
inc
DROP
TABLE
test_ps_flag
;
#
--
echo
=====
--
echo
===
Test
ANALYZE
behavior
after
creation
with
explicit
PS
=
OFF
,
--
echo
===
then
ALTER
to
ON
,
then
ALTER
to
OFF
,
then
ALTER
to
default
--
echo
=====
CREATE
TABLE
test_ps_flag
(
a
INT
)
ENGINE
=
INNODB
STATS_PERSISTENT
=
0
;
ALTER
TABLE
test_ps_flag
STATS_PERSISTENT
=
1
;
# also check that the change from the ALTER TABLE survives server restart
--
source
include
/
restart_mysqld
.
inc
--
source
suite
/
innodb
/
include
/
innodb_stats_table_flag_analyze
.
inc
ALTER
TABLE
test_ps_flag
STATS_PERSISTENT
=
0
;
--
source
suite
/
innodb
/
include
/
innodb_stats_table_flag_analyze
.
inc
ALTER
TABLE
test_ps_flag
STATS_PERSISTENT
=
default
;
--
source
suite
/
innodb
/
include
/
innodb_stats_table_flag_analyze
.
inc
DROP
TABLE
test_ps_flag
;
#
--
echo
=====
--
echo
===
Test
ANALYZE
behavior
after
creation
with
explicit
PS
=
ON
,
--
echo
===
then
ALTER
to
OFF
,
then
ALTER
to
ON
,
then
ALTER
to
default
--
echo
=====
CREATE
TABLE
test_ps_flag
(
a
INT
)
ENGINE
=
INNODB
STATS_PERSISTENT
=
1
;
ALTER
TABLE
test_ps_flag
STATS_PERSISTENT
=
0
;
# also check that the change from the ALTER TABLE survives server restart
--
source
include
/
restart_mysqld
.
inc
--
source
suite
/
innodb
/
include
/
innodb_stats_table_flag_analyze
.
inc
ALTER
TABLE
test_ps_flag
STATS_PERSISTENT
=
1
;
--
source
suite
/
innodb
/
include
/
innodb_stats_table_flag_analyze
.
inc
ALTER
TABLE
test_ps_flag
STATS_PERSISTENT
=
default
;
--
source
suite
/
innodb
/
include
/
innodb_stats_table_flag_analyze
.
inc
DROP
TABLE
test_ps_flag
;
mysql-test/suite/innodb/include/innodb_stats_table_flag_analyze.inc
deleted
100644 → 0
View file @
dc2c77a6
SHOW
CREATE
TABLE
test_ps_flag
;
DELETE
FROM
mysql
.
innodb_index_stats
WHERE
table_name
=
'test_ps_flag'
;
DELETE
FROM
mysql
.
innodb_table_stats
WHERE
table_name
=
'test_ps_flag'
;
# must be 0, we have just deleted the rows
SELECT
COUNT
(
*
)
AS
cnt_before
FROM
mysql
.
innodb_table_stats
WHERE
table_name
=
'test_ps_flag'
;
ANALYZE
TABLE
test_ps_flag
;
# if the table is PS enabled, then this should be 1 and 0 otherwise
SELECT
COUNT
(
*
)
AS
cnt_after
FROM
mysql
.
innodb_table_stats
WHERE
table_name
=
'test_ps_flag'
;
mysql-test/suite/innodb/include/innodb_wl6501_crash.inc
View file @
0059a918
...
...
@@ -62,7 +62,7 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select
*
from
t
;
check
table
t
;
#
set
session
debug
=
"+d,ib_trunc_crash_while_writing_redo_log"
;
set
session
debug
_dbug
=
"+d,ib_trunc_crash_while_writing_redo_log"
;
--
source
include
/
expect_crash
.
inc
--
error
2013
truncate
table
t
;
...
...
@@ -92,7 +92,7 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select
*
from
t
;
check
table
t
;
#
set
session
debug
=
"+d,ib_trunc_crash_after_redo_log_write_complete"
;
set
session
debug
_dbug
=
"+d,ib_trunc_crash_after_redo_log_write_complete"
;
--
source
include
/
expect_crash
.
inc
--
error
2013
truncate
table
t
;
...
...
@@ -124,7 +124,7 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select
*
from
t
;
check
table
t
;
#
set
session
debug
=
"+d,ib_trunc_crash_on_drop_of_clust_index"
;
set
session
debug
_dbug
=
"+d,ib_trunc_crash_on_drop_of_clust_index"
;
--
source
include
/
expect_crash
.
inc
--
error
2013
truncate
table
t
;
...
...
@@ -152,7 +152,7 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select
*
from
t
;
check
table
t
;
#
set
session
debug
=
"+d,ib_trunc_crash_on_drop_of_uniq_index"
;
set
session
debug
_dbug
=
"+d,ib_trunc_crash_on_drop_of_uniq_index"
;
--
source
include
/
expect_crash
.
inc
--
error
2013
truncate
table
t
;
...
...
@@ -181,7 +181,7 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select
*
from
t
;
check
table
t
;
#
set
session
debug
=
"+d,ib_trunc_crash_on_drop_of_sec_index"
;
set
session
debug
_dbug
=
"+d,ib_trunc_crash_on_drop_of_sec_index"
;
--
source
include
/
expect_crash
.
inc
--
error
2013
truncate
table
t
;
...
...
@@ -215,7 +215,7 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select
*
from
t
;
check
table
t
;
#
set
session
debug
=
"+d,ib_trunc_crash_drop_reinit_done_create_to_start"
;
set
session
debug
_dbug
=
"+d,ib_trunc_crash_drop_reinit_done_create_to_start"
;
--
source
include
/
expect_crash
.
inc
--
error
2013
truncate
table
t
;
...
...
@@ -247,7 +247,7 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select
*
from
t
;
check
table
t
;
#
set
session
debug
=
"+d,ib_trunc_crash_on_create_of_clust_index"
;
set
session
debug
_dbug
=
"+d,ib_trunc_crash_on_create_of_clust_index"
;
--
source
include
/
expect_crash
.
inc
--
error
2013
truncate
table
t
;
...
...
@@ -275,7 +275,7 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select
*
from
t
;
check
table
t
;
#
set
session
debug
=
"+d,ib_trunc_crash_on_create_of_uniq_index"
;
set
session
debug
_dbug
=
"+d,ib_trunc_crash_on_create_of_uniq_index"
;
--
source
include
/
expect_crash
.
inc
--
error
2013
truncate
table
t
;
...
...
@@ -303,7 +303,7 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select
*
from
t
;
check
table
t
;
#
set
session
debug
=
"+d,ib_trunc_crash_on_create_of_sec_index"
;
set
session
debug
_dbug
=
"+d,ib_trunc_crash_on_create_of_sec_index"
;
--
source
include
/
expect_crash
.
inc
--
error
2013
truncate
table
t
;
...
...
@@ -336,7 +336,7 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select
*
from
t
;
check
table
t
;
#
set
session
debug
=
"+d,ib_trunc_crash_on_updating_dict_sys_info"
;
set
session
debug
_dbug
=
"+d,ib_trunc_crash_on_updating_dict_sys_info"
;
--
source
include
/
expect_crash
.
inc
--
error
2013
truncate
table
t
;
...
...
@@ -368,7 +368,7 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select
*
from
t
;
check
table
t
;
#
set
session
debug
=
"+d,ib_trunc_crash_before_log_removal"
;
set
session
debug
_dbug
=
"+d,ib_trunc_crash_before_log_removal"
;
--
source
include
/
expect_crash
.
inc
--
error
2013
truncate
table
t
;
...
...
@@ -395,7 +395,7 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select
*
from
t
;
check
table
t
;
#
set
session
debug
=
"+d,ib_trunc_crash_after_truncate_done"
;
set
session
debug
_dbug
=
"+d,ib_trunc_crash_after_truncate_done"
;
--
source
include
/
expect_crash
.
inc
--
error
2013
truncate
table
t
;
...
...
mysql-test/suite/innodb/include/innodb_wl6501_crash_temp.inc
View file @
0059a918
...
...
@@ -56,7 +56,7 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select
*
from
t
;
check
table
t
;
#
set
session
debug
=
"+d,ib_trunc_crash_drop_reinit_done_create_to_start"
;
set
session
debug
_dbug
=
"+d,ib_trunc_crash_drop_reinit_done_create_to_start"
;
--
source
include
/
expect_crash
.
inc
--
error
2013
truncate
table
t
;
...
...
@@ -83,7 +83,7 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select
*
from
t
;
check
table
t
;
#
set
session
debug
=
"+d,ib_trunc_crash_on_updating_dict_sys_info"
;
set
session
debug
_dbug
=
"+d,ib_trunc_crash_on_updating_dict_sys_info"
;
--
source
include
/
expect_crash
.
inc
--
error
2013
truncate
table
t
;
...
...
mysql-test/suite/innodb/include/restart_and_reinit.inc
View file @
0059a918
...
...
@@ -6,26 +6,16 @@
source
include
/
not_embedded
.
inc
;
--
disable_query_log
call
mtr
.
add_suppression
(
"InnoDB: New log files created"
);
call
mtr
.
add_suppression
(
"InnoDB: Creating foreign key constraint system tables"
);
let
$innodb_index_stats
=
query_get_value
(
show
create
table
mysql
.
innodb_index_stats
,
Create
Table
,
1
);
let
$innodb_table_stats
=
query_get_value
(
show
create
table
mysql
.
innodb_table_stats
,
Create
Table
,
1
);
let
$database
=
`select database()`
;
drop
table
mysql
.
innodb_index_stats
,
mysql
.
innodb_table_stats
;
let
$_server_id
=
`SELECT @@server_id`
;
let
$_expect_file_name
=
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
$_server_id
.
expect
;
let
$datadir
=
`SELECT @@datadir`
;
exec
echo
"wait"
>
$_expect_file_name
;
shutdown_server
;
remove_file
$datadir
/
ib_logfile0
;
remove_file
$datadir
/
ib_logfile1
;
--
source
include
/
shutdown_mysqld
.
inc
remove_files_wildcard
$datadir
ib_logfile
*
;
remove_file
$datadir
/
ibdata1
;
exec
echo
"restart"
>
$_expect_file_name
;
enable_reconnect
;
source
include
/
wait_until_connected_again
.
inc
;
disable_reconnect
;
--
source
include
/
start_mysqld
.
inc
--
disable_query_log
use
mysql
;
...
...
mysql-test/suite/innodb_zip/include/innodb_create_tab_indx.inc
View file @
0059a918
--
echo
===============
--
echo
create
table
&
Index
--
echo
===============
--
echo
# Create table & Index
eval
CREATE
TABLE
tab5
(
col_1
TINYBLOB
,
col_2
TINYTEXT
,
col_3
BLOB
,
col_4
TEXT
,
col_5
MEDIUMBLOB
,
col_6
MEDIUMTEXT
,
...
...
mysql-test/suite/innodb_zip/include/innodb_load_data.inc
View file @
0059a918
--
echo
===============
--
echo
Load
the
data
--
echo
===============
--
echo
# Load the data
SET
@
col_1
=
repeat
(
'a'
,
100
);
SET
@
col_2
=
repeat
(
'b'
,
100
);
...
...
mysql-test/suite/innodb_zip/include/innodb_stats_comp_index.inc
View file @
0059a918
--
echo
===============
--
echo
Check
the
stats
of
the
table
--
echo
Check
the
size
of
the
ibd
file
--
echo
===============
--
echo
# Check the stats of the table
--
echo
# Check the size of the ibd file
--
echo
# testcase : pass = 1 fail = 0
SELECT
count
(
*
)
>
0
as
"compress_stat"
...
...
mysql-test/suite/innodb_zip/include/innodb_wl6501_crash.inc
View file @
0059a918
...
...
@@ -65,7 +65,7 @@ check table t;
#
set
session
debug_dbug
=
"+d,ib_trunc_crash_while_writing_redo_log"
;
--
source
include
/
expect_crash
.
inc
#
--error 2013
--
error
2013
truncate
table
t
;
#
--
source
include
/
start_mysqld
.
inc
...
...
@@ -96,7 +96,7 @@ check table t;
#
set
session
debug_dbug
=
"+d,ib_trunc_crash_after_redo_log_write_complete"
;
--
source
include
/
expect_crash
.
inc
#
--error 2013
--
error
2013
truncate
table
t
;
--
source
include
/
start_mysqld
.
inc
...
...
@@ -128,7 +128,7 @@ check table t;
#
set
session
debug_dbug
=
"+d,ib_trunc_crash_on_drop_of_clust_index"
;
--
source
include
/
expect_crash
.
inc
#
--error 2013
--
error
2013
truncate
table
t
;
#
--
source
include
/
start_mysqld
.
inc
...
...
@@ -156,7 +156,7 @@ check table t;
#
set
session
debug_dbug
=
"+d,ib_trunc_crash_on_drop_of_uniq_index"
;
--
source
include
/
expect_crash
.
inc
#
--error 2013
--
error
2013
truncate
table
t
;
#
--
source
include
/
start_mysqld
.
inc
...
...
@@ -185,7 +185,7 @@ check table t;
#
set
session
debug_dbug
=
"+d,ib_trunc_crash_on_drop_of_sec_index"
;
--
source
include
/
expect_crash
.
inc
#
--error 2013
--
error
2013
truncate
table
t
;
#
--
source
include
/
start_mysqld
.
inc
...
...
mysql-test/suite/innodb_zip/include/innodb_wl6501_crash_temp.inc
View file @
0059a918
...
...
@@ -56,7 +56,7 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select
*
from
t
;
check
table
t
;
#
set
session
debug
=
"+d,ib_trunc_crash_drop_reinit_done_create_to_start"
;
set
session
debug
_dbug
=
"+d,ib_trunc_crash_drop_reinit_done_create_to_start"
;
--
source
include
/
expect_crash
.
inc
--
error
2013
truncate
table
t
;
...
...
@@ -83,7 +83,7 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select
*
from
t
;
check
table
t
;
#
set
session
debug
=
"+d,ib_trunc_crash_on_updating_dict_sys_info"
;
set
session
debug
_dbug
=
"+d,ib_trunc_crash_on_updating_dict_sys_info"
;
--
source
include
/
expect_crash
.
inc
--
error
2013
truncate
table
t
;
...
...
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