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
fb69d642
Commit
fb69d642
authored
Aug 20, 2012
by
Igor Babaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug mdev-463.
RBR should be turned off when an ANALYZE TABLE command is executed.
parent
fd7059d2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
0 deletions
+39
-0
mysql-test/r/stat_tables_rbr.result
mysql-test/r/stat_tables_rbr.result
+10
-0
mysql-test/t/stat_tables_rbr.test
mysql-test/t/stat_tables_rbr.test
+18
-0
sql/sql_admin.cc
sql/sql_admin.cc
+11
-0
No files found.
mysql-test/r/stat_tables_rbr.result
0 → 100644
View file @
fb69d642
#
# Bug mdev-463: assertion failure when running ANALYZE with RBR on
#
SET GLOBAL use_stat_tables = PREFERABLY;
CREATE TABLE t1 (i INT) ENGINE=InnoDB;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
DROP TABLE t1;
SET GLOBAL use_stat_tables = DEFAULT;
mysql-test/t/stat_tables_rbr.test
0 → 100644
View file @
fb69d642
--
source
include
/
have_binlog_format_row
.
inc
--
source
include
/
have_innodb
.
inc
--
echo
#
--
echo
# Bug mdev-463: assertion failure when running ANALYZE with RBR on
--
echo
#
SET
GLOBAL
use_stat_tables
=
PREFERABLY
;
--
connect
(
con1
,
localhost
,
root
,,)
CREATE
TABLE
t1
(
i
INT
)
ENGINE
=
InnoDB
;
ANALYZE
TABLE
t1
;
# Cleanup
DROP
TABLE
t1
;
SET
GLOBAL
use_stat_tables
=
DEFAULT
;
--
disconnect
con1
sql/sql_admin.cc
View file @
fb69d642
...
@@ -322,6 +322,8 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
...
@@ -322,6 +322,8 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
int
result_code
;
int
result_code
;
int
compl_result_code
;
int
compl_result_code
;
bool
need_repair_or_alter
=
0
;
bool
need_repair_or_alter
=
0
;
bool
save_binlog_row_based
=
0
;
DBUG_ENTER
(
"mysql_admin_table"
);
DBUG_ENTER
(
"mysql_admin_table"
);
DBUG_PRINT
(
"enter"
,
(
"extra_open_options: %u"
,
extra_open_options
));
DBUG_PRINT
(
"enter"
,
(
"extra_open_options: %u"
,
extra_open_options
));
...
@@ -415,6 +417,11 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
...
@@ -415,6 +417,11 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
*/
*/
open_error
=
open_and_lock_tables
(
thd
,
table
,
TRUE
,
0
);
open_error
=
open_and_lock_tables
(
thd
,
table
,
TRUE
,
0
);
if
(
lex
->
sql_command
==
SQLCOM_ANALYZE
)
{
if
((
save_binlog_row_based
=
thd
->
is_current_stmt_binlog_format_row
()))
thd
->
clear_current_stmt_binlog_format_row
();
}
}
}
thd
->
prepare_derived_at_open
=
FALSE
;
thd
->
prepare_derived_at_open
=
FALSE
;
...
@@ -954,6 +961,8 @@ send_result_message:
...
@@ -954,6 +961,8 @@ send_result_message:
trans_commit_stmt
(
thd
);
trans_commit_stmt
(
thd
);
trans_commit_implicit
(
thd
);
trans_commit_implicit
(
thd
);
close_thread_tables
(
thd
);
close_thread_tables
(
thd
);
if
(
save_binlog_row_based
)
thd
->
set_current_stmt_binlog_format_row
();
thd
->
mdl_context
.
release_transactional_locks
();
thd
->
mdl_context
.
release_transactional_locks
();
/*
/*
...
@@ -986,6 +995,8 @@ err:
...
@@ -986,6 +995,8 @@ err:
trans_rollback_stmt
(
thd
);
trans_rollback_stmt
(
thd
);
trans_rollback
(
thd
);
trans_rollback
(
thd
);
close_thread_tables
(
thd
);
// Shouldn't be needed
close_thread_tables
(
thd
);
// Shouldn't be needed
if
(
save_binlog_row_based
)
thd
->
set_current_stmt_binlog_format_row
();
thd
->
mdl_context
.
release_transactional_locks
();
thd
->
mdl_context
.
release_transactional_locks
();
if
(
table
)
if
(
table
)
table
->
table
=
0
;
table
->
table
=
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