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
1d526f31
Commit
1d526f31
authored
Dec 05, 2017
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.1 into 10.2
parents
d1ab8903
63cbb982
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
35 additions
and
66 deletions
+35
-66
mysql-test/extra/rpl_tests/rpl_log.test
mysql-test/extra/rpl_tests/rpl_log.test
+2
-0
mysql-test/include/filter_file.inc
mysql-test/include/filter_file.inc
+10
-1
mysql-test/include/show_binlog_events.inc
mysql-test/include/show_binlog_events.inc
+1
-7
mysql-test/include/show_events.inc
mysql-test/include/show_events.inc
+7
-0
mysql-test/suite/rpl/r/rpl_row_log.result
mysql-test/suite/rpl/r/rpl_row_log.result
+0
-2
mysql-test/suite/rpl/r/rpl_row_log_innodb.result
mysql-test/suite/rpl/r/rpl_row_log_innodb.result
+0
-2
mysql-test/suite/rpl/r/rpl_stm_log.result
mysql-test/suite/rpl/r/rpl_stm_log.result
+0
-2
storage/innobase/dict/dict0defrag_bg.cc
storage/innobase/dict/dict0defrag_bg.cc
+8
-31
storage/xtradb/dict/dict0stats_bg.cc
storage/xtradb/dict/dict0stats_bg.cc
+7
-21
No files found.
mysql-test/extra/rpl_tests/rpl_log.test
View file @
1d526f31
...
...
@@ -65,6 +65,8 @@ flush logs;
# To make it predictable, we do a useless update now, but which has the
# interest of making the slave catch both rotate events.
let
$skip_checkpoint_events
=
1
;
eval
create
table
t3
(
a
int
)
ENGINE
=
$engine_type
;
# Sync slave and force it to start on another binary log
...
...
mysql-test/include/filter_file.inc
View file @
1d526f31
...
...
@@ -53,6 +53,9 @@
#
# $rpl_debug
# If set, verbose debug info is printed.
#
# $filter_script
# If set, rows matching this regexp will be filtered out
--
let
$include_filename
=
filter_file
.
inc
--
source
include
/
begin_include_file
.
inc
...
...
@@ -67,10 +70,12 @@ if ($rpl_debug)
--
let
_FF_PRE_SCRIPT
=
$pre_script
--
let
_FF_SCRIPT
=
$script
--
let
_FF_FILTER_SCRIPT
=
$filter_script
--
let
_FF_INPUT_FILE
=
$input_file
--
let
_FF_OUTPUT_FILE
=
$output_file
--
let
_FF_SELECT_COLUMNS
=
$select_columns
--
let
_FF_DEBUG
=
$rpl_debug
if
(
!
$output_file
)
{
--
let
_FF_OUTPUT_FILE
=
$input_file
...
...
@@ -79,6 +84,7 @@ perl;
my
$pre_script
=
$ENV
{
'_FF_PRE_SCRIPT'
};
$pre_script
=~
s
/
DOLLAR
/
\$
/
g
;
my
$script
=
$ENV
{
'_FF_SCRIPT'
};
my
$filter_script
=
$ENV
{
'_FF_FILTER_SCRIPT'
};
$script
=~
s
/
DOLLAR
/
\$
/
g
;
my
$input_file
=
$ENV
{
'_FF_INPUT_FILE'
};
my
$output_file
=
$ENV
{
'_FF_OUTPUT_FILE'
};
...
...
@@ -123,7 +129,10 @@ perl;
{
'
.
$script
.
'
}
$filtered_contents .= $_."\n";
if (!$filter_script || ! m/$filter_script/)
{
$filtered_contents .= $_."\n";
}
}
close FILE or die "Error closing $input_file: $!";
open FILE, "> $output_file" or die "Error opening $output_file: $!";
...
...
mysql-test/include/show_binlog_events.inc
View file @
1d526f31
...
...
@@ -7,7 +7,7 @@
# [--let $binlog_file= [<FILENAME> | LAST]]
# [--let $binlog_start= <POSITION> ]
# [--let $binlog_limit= 1, 3 ]
# [--let $
keep_gtid
_events= 1]
# [--let $
skip_checkpoint
_events= 1]
# --source include/show_binlog_events.inc
#
# Parameters:
...
...
@@ -26,12 +26,6 @@
# Limit for the 'LIMIT' clause of SHOW BINLOG EVENTS, i.e.:
# $binlog_limit= 3 -- print three events
# $binlog_limit= 4, 3 -- skip four events, print the three next events
#
# $keep_gtid_events
# By default, Gtid_log_event and Previous_gtid_log_event are
# filtered out, so that the output is independent of whether GTIDs
# are enabled or not. If this flag is set, events are kept but
# the actual GTID values are masked out.
--
let
$include_filename
=
show_binlog_events
.
inc
--
source
include
/
begin_include_file
.
inc
...
...
mysql-test/include/show_events.inc
View file @
1d526f31
...
...
@@ -104,8 +104,15 @@ let $script=
s
{
DOLLARmysqltest_vardir
}{
MYSQLTEST_VARDIR
}
g
;
||
--
let
$pre_script
=
my
DOLLARmysqltest_vardir
=
DOLLARENV
{
'MYSQLTEST_VARDIR'
};
--
delimiter
;
if
(
$skip_checkpoint_events
)
{
let
$filter_script
=
Binlog_checkpoint
;
}
#--let $select_columns= 1 3 6
--
let
$input_file
=
$output_file
--
source
include
/
filter_file
.
inc
...
...
mysql-test/suite/rpl/r/rpl_row_log.result
View file @
1d526f31
...
...
@@ -226,7 +226,6 @@ master-bin.000001 # Query # # COMMIT
master-bin.000001 # Rotate # # master-bin.000002;pos=POS
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Binlog_checkpoint # # master-bin.000002
master-bin.000002 # Gtid # # GTID #-#-#
master-bin.000002 # Query # # use `test`; create table t3 (a int)ENGINE=MyISAM
master-bin.000002 # Gtid # # GTID #-#-#
...
...
@@ -268,7 +267,6 @@ slave-bin.000001 # Query # # use `test`; create table t3 (a int)ENGINE=MyISAM
slave-bin.000001 # Rotate # # slave-bin.000002;pos=POS
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000002 # Binlog_checkpoint # # slave-bin.000002
slave-bin.000002 # Gtid # # GTID #-#-#
slave-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=MyISAM
slave-bin.000002 # Gtid # # BEGIN GTID #-#-#
...
...
mysql-test/suite/rpl/r/rpl_row_log_innodb.result
View file @
1d526f31
...
...
@@ -226,7 +226,6 @@ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Rotate # # master-bin.000002;pos=POS
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Binlog_checkpoint # # master-bin.000002
master-bin.000002 # Gtid # # GTID #-#-#
master-bin.000002 # Query # # use `test`; create table t3 (a int)ENGINE=InnoDB
master-bin.000002 # Gtid # # GTID #-#-#
...
...
@@ -268,7 +267,6 @@ slave-bin.000001 # Query # # use `test`; create table t3 (a int)ENGINE=InnoDB
slave-bin.000001 # Rotate # # slave-bin.000002;pos=POS
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000002 # Binlog_checkpoint # # slave-bin.000002
slave-bin.000002 # Gtid # # GTID #-#-#
slave-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=InnoDB
slave-bin.000002 # Gtid # # BEGIN GTID #-#-#
...
...
mysql-test/suite/rpl/r/rpl_stm_log.result
View file @
1d526f31
...
...
@@ -222,7 +222,6 @@ master-bin.000001 # Query # # COMMIT
master-bin.000001 # Rotate # # master-bin.000002;pos=POS
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Binlog_checkpoint # # master-bin.000002
master-bin.000002 # Gtid # # GTID #-#-#
master-bin.000002 # Query # # use `test`; create table t3 (a int)ENGINE=MyISAM
master-bin.000002 # Gtid # # GTID #-#-#
...
...
@@ -260,7 +259,6 @@ slave-bin.000001 # Query # # use `test`; create table t3 (a int)ENGINE=MyISAM
slave-bin.000001 # Rotate # # slave-bin.000002;pos=POS
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000002 # Binlog_checkpoint # # slave-bin.000002
slave-bin.000002 # Gtid # # GTID #-#-#
slave-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=MyISAM
slave-bin.000002 # Gtid # # BEGIN GTID #-#-#
...
...
storage/innobase/dict/dict0defrag_bg.cc
View file @
1d526f31
...
...
@@ -207,11 +207,9 @@ stats and eventually save its stats. */
static
void
dict_stats_process_entry_from_defrag_pool
()
/*=======================================*/
{
table_id_t
table_id
;
index_id_t
index_id
;
dberr_t
err
=
DB_SUCCESS
;
ut_ad
(
!
srv_read_only_mode
);
...
...
@@ -230,40 +228,19 @@ dict_stats_process_entry_from_defrag_pool()
table
=
dict_table_open_on_id
(
table_id
,
TRUE
,
DICT_TABLE_OP_OPEN_ONLY_IF_CACHED
);
if
(
table
==
NULL
)
{
mutex_exit
(
&
dict_sys
->
mutex
);
return
;
}
dict_index_t
*
index
=
table
&&
!
table
->
corrupted
?
dict_table_find_index_on_id
(
table
,
index_id
)
:
NULL
;
/* Check whether table is corrupted */
if
(
table
->
corrupted
)
{
dict_table_close
(
table
,
TRUE
,
FALSE
);
if
(
!
index
||
dict_index_is_corrupted
(
index
))
{
if
(
table
)
{
dict_table_close
(
table
,
TRUE
,
FALSE
);
}
mutex_exit
(
&
dict_sys
->
mutex
);
return
;
}
mutex_exit
(
&
dict_sys
->
mutex
);
dict_index_t
*
index
=
dict_table_find_index_on_id
(
table
,
index_id
);
if
(
index
==
NULL
)
{
return
;
}
/* Check whether index is corrupted */
if
(
dict_index_is_corrupted
(
index
))
{
dict_table_close
(
table
,
FALSE
,
FALSE
);
return
;
}
err
=
dict_stats_save_defrag_stats
(
index
);
if
(
err
!=
DB_SUCCESS
)
{
ib
::
error
()
<<
"Saving defragmentation status for table "
<<
index
->
table
->
name
.
m_name
<<
" index "
<<
index
->
name
()
<<
" failed "
<<
err
;
}
dict_stats_save_defrag_stats
(
index
);
dict_table_close
(
table
,
FALSE
,
FALSE
);
}
...
...
storage/xtradb/dict/dict0stats_bg.cc
View file @
1d526f31
...
...
@@ -479,7 +479,6 @@ stats and eventually save its stats. */
static
void
dict_stats_process_entry_from_defrag_pool
()
/*=======================================*/
{
table_id_t
table_id
;
index_id_t
index_id
;
...
...
@@ -501,30 +500,17 @@ dict_stats_process_entry_from_defrag_pool()
table
=
dict_table_open_on_id
(
table_id
,
TRUE
,
DICT_TABLE_OP_OPEN_ONLY_IF_CACHED
);
if
(
table
==
NULL
)
{
mutex_exit
(
&
dict_sys
->
mutex
);
return
;
}
dict_index_t
*
index
=
table
&&
!
table
->
corrupted
?
dict_table_find_index_on_id
(
table
,
index_id
)
:
NULL
;
/* Check whether table is corrupted */
if
(
table
->
corrupted
)
{
dict_table_close
(
table
,
TRUE
,
FALSE
);
if
(
!
index
||
dict_index_is_corrupted
(
index
))
{
if
(
table
)
{
dict_table_close
(
table
,
TRUE
,
FALSE
);
}
mutex_exit
(
&
dict_sys
->
mutex
);
return
;
}
mutex_exit
(
&
dict_sys
->
mutex
);
dict_index_t
*
index
=
dict_table_find_index_on_id
(
table
,
index_id
);
if
(
index
==
NULL
)
{
return
;
}
/* Check whether index is corrupted */
if
(
dict_index_is_corrupted
(
index
))
{
dict_table_close
(
table
,
FALSE
,
FALSE
);
return
;
}
dict_stats_save_defrag_stats
(
index
);
dict_table_close
(
table
,
FALSE
,
FALSE
);
...
...
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