Commit c75bee94 authored by Daniele Sciascia's avatar Daniele Sciascia Committed by Jan Lindström

MDEV-25538 Crash on REPAIR VIEW that was created from IS table

Remove calls to wsrep_append_fk_parent_table() during REPAIR/OPTIMIZE
TABLE processing. It turns out that REPAIR or OPTIMIZE commands on
table t, do not acquire MDL locks on parent tables of t (as shown in
the included test).  Thus making wsrep_append_fk_parent_table()
unnecessary for OPTIMIZE and REPAIR.
This also fixes MDEV-24446 and reenables test galera.mysql-wsrep#198.
Reviewed-by: default avatarJan Lindström <jan.lindstrom@mariadb.com>
parent f8c3d592
...@@ -32,7 +32,6 @@ galera_var_ignore_apply_errors : MDEV-26770 galera_var_ignore_apply_errors fails ...@@ -32,7 +32,6 @@ galera_var_ignore_apply_errors : MDEV-26770 galera_var_ignore_apply_errors fails
galera_var_node_address : MDEV-20485 Galera test failure galera_var_node_address : MDEV-20485 Galera test failure
galera_var_notify_cmd : MDEV-21905 Galera test galera_var_notify_cmd causes hang galera_var_notify_cmd : MDEV-21905 Galera test galera_var_notify_cmd causes hang
galera_var_retry_autocommit: MDEV-18181 Galera test failure on galera.galera_var_retry_autocommit galera_var_retry_autocommit: MDEV-18181 Galera test failure on galera.galera_var_retry_autocommit
mysql-wsrep#198 : MDEV-24446: galera.mysql-wsrep#198 MTR failed: query 'reap' failed: 2000: Unknown MySQL error
partition : MDEV-19958 Galera test failure on galera.partition partition : MDEV-19958 Galera test failure on galera.partition
query_cache: MDEV-15805 Test failure on galera.query_cache query_cache: MDEV-15805 Test failure on galera.query_cache
versioning_trx_id: MDEV-18590: galera.versioning_trx_id: Test failure: mysqltest: Result content mismatch versioning_trx_id: MDEV-18590: galera.versioning_trx_id: Test failure: mysqltest: Result content mismatch
......
connection node_2;
connection node_1;
CREATE TABLE parent (pk INTEGER PRIMARY KEY);
CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) );
INSERT INTO parent VALUES (1), (2), (3), (4);
INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
connection node_1;
START TRANSACTION;
SELECT * FROM parent FOR UPDATE;
pk
1
2
3
4
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
OPTIMIZE TABLE child;;
Table Op Msg_type Msg_text
test.child optimize note Table does not support optimize, doing recreate + analyze instead
test.child optimize status OK
connection node_1;
COMMIT;
DROP TABLE child, parent;
disconnect node_1a;
CREATE TABLE parent (pk INTEGER PRIMARY KEY);
CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON UPDATE CASCADE);
INSERT INTO parent VALUES (1), (2), (3), (4);
INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
connection node_1;
START TRANSACTION;
SELECT * FROM parent FOR UPDATE;
pk
1
2
3
4
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
OPTIMIZE TABLE child;;
Table Op Msg_type Msg_text
test.child optimize note Table does not support optimize, doing recreate + analyze instead
test.child optimize status OK
connection node_1;
COMMIT;
DROP TABLE child, parent;
disconnect node_1a;
CREATE TABLE parent (pk INTEGER PRIMARY KEY);
CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON DELETE CASCADE);
INSERT INTO parent VALUES (1), (2), (3), (4);
INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
connection node_1;
START TRANSACTION;
SELECT * FROM parent FOR UPDATE;
pk
1
2
3
4
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
OPTIMIZE TABLE child;;
Table Op Msg_type Msg_text
test.child optimize note Table does not support optimize, doing recreate + analyze instead
test.child optimize status OK
connection node_1;
COMMIT;
DROP TABLE child, parent;
disconnect node_1a;
CREATE TABLE parent (pk INTEGER PRIMARY KEY);
CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON UPDATE CASCADE ON DELETE CASCADE);
INSERT INTO parent VALUES (1), (2), (3), (4);
INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
connection node_1;
START TRANSACTION;
SELECT * FROM parent FOR UPDATE;
pk
1
2
3
4
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
OPTIMIZE TABLE child;;
Table Op Msg_type Msg_text
test.child optimize note Table does not support optimize, doing recreate + analyze instead
test.child optimize status OK
connection node_1;
COMMIT;
DROP TABLE child, parent;
disconnect node_1a;
CREATE TABLE parent (pk INTEGER PRIMARY KEY);
CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) );
INSERT INTO parent VALUES (1), (2), (3), (4);
INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
connection node_1;
START TRANSACTION;
SELECT * FROM parent FOR UPDATE;
pk
1
2
3
4
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
REPAIR TABLE child;;
Table Op Msg_type Msg_text
test.child repair note The storage engine for the table doesn't support repair
connection node_1;
COMMIT;
DROP TABLE child, parent;
disconnect node_1a;
CREATE TABLE parent (pk INTEGER PRIMARY KEY);
CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON UPDATE CASCADE);
INSERT INTO parent VALUES (1), (2), (3), (4);
INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
connection node_1;
START TRANSACTION;
SELECT * FROM parent FOR UPDATE;
pk
1
2
3
4
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
REPAIR TABLE child;;
Table Op Msg_type Msg_text
test.child repair note The storage engine for the table doesn't support repair
connection node_1;
COMMIT;
DROP TABLE child, parent;
disconnect node_1a;
CREATE TABLE parent (pk INTEGER PRIMARY KEY);
CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON DELETE CASCADE);
INSERT INTO parent VALUES (1), (2), (3), (4);
INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
connection node_1;
START TRANSACTION;
SELECT * FROM parent FOR UPDATE;
pk
1
2
3
4
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
REPAIR TABLE child;;
Table Op Msg_type Msg_text
test.child repair note The storage engine for the table doesn't support repair
connection node_1;
COMMIT;
DROP TABLE child, parent;
disconnect node_1a;
CREATE TABLE parent (pk INTEGER PRIMARY KEY);
CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON UPDATE CASCADE ON DELETE CASCADE);
INSERT INTO parent VALUES (1), (2), (3), (4);
INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
connection node_1;
START TRANSACTION;
SELECT * FROM parent FOR UPDATE;
pk
1
2
3
4
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
REPAIR TABLE child;;
Table Op Msg_type Msg_text
test.child repair note The storage engine for the table doesn't support repair
connection node_1;
COMMIT;
DROP TABLE child, parent;
disconnect node_1a;
CREATE TABLE parent (pk INTEGER PRIMARY KEY);
CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) );
INSERT INTO parent VALUES (1), (2), (3), (4);
INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
connection node_1;
START TRANSACTION;
SELECT * FROM parent FOR UPDATE;
pk
1
2
3
4
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
CHECK TABLE child;;
Table Op Msg_type Msg_text
test.child check status OK
connection node_1;
COMMIT;
DROP TABLE child, parent;
disconnect node_1a;
CREATE TABLE parent (pk INTEGER PRIMARY KEY);
CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON UPDATE CASCADE);
INSERT INTO parent VALUES (1), (2), (3), (4);
INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
connection node_1;
START TRANSACTION;
SELECT * FROM parent FOR UPDATE;
pk
1
2
3
4
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
CHECK TABLE child;;
Table Op Msg_type Msg_text
test.child check status OK
connection node_1;
COMMIT;
DROP TABLE child, parent;
disconnect node_1a;
CREATE TABLE parent (pk INTEGER PRIMARY KEY);
CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON DELETE CASCADE);
INSERT INTO parent VALUES (1), (2), (3), (4);
INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
connection node_1;
START TRANSACTION;
SELECT * FROM parent FOR UPDATE;
pk
1
2
3
4
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
CHECK TABLE child;;
Table Op Msg_type Msg_text
test.child check status OK
connection node_1;
COMMIT;
DROP TABLE child, parent;
disconnect node_1a;
CREATE TABLE parent (pk INTEGER PRIMARY KEY);
CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON UPDATE CASCADE ON DELETE CASCADE);
INSERT INTO parent VALUES (1), (2), (3), (4);
INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
connection node_1;
START TRANSACTION;
SELECT * FROM parent FOR UPDATE;
pk
1
2
3
4
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
CHECK TABLE child;;
Table Op Msg_type Msg_text
test.child check status OK
connection node_1;
COMMIT;
DROP TABLE child, parent;
disconnect node_1a;
CREATE TABLE parent (pk INTEGER PRIMARY KEY);
CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) );
INSERT INTO parent VALUES (1), (2), (3), (4);
INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
connection node_1;
START TRANSACTION;
SELECT * FROM parent FOR UPDATE;
pk
1
2
3
4
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
ANALYZE TABLE child;;
Table Op Msg_type Msg_text
test.child analyze status Engine-independent statistics collected
test.child analyze status OK
connection node_1;
COMMIT;
DROP TABLE child, parent;
disconnect node_1a;
CREATE TABLE parent (pk INTEGER PRIMARY KEY);
CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON UPDATE CASCADE);
INSERT INTO parent VALUES (1), (2), (3), (4);
INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
connection node_1;
START TRANSACTION;
SELECT * FROM parent FOR UPDATE;
pk
1
2
3
4
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
ANALYZE TABLE child;;
Table Op Msg_type Msg_text
test.child analyze status Engine-independent statistics collected
test.child analyze status OK
connection node_1;
COMMIT;
DROP TABLE child, parent;
disconnect node_1a;
CREATE TABLE parent (pk INTEGER PRIMARY KEY);
CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON DELETE CASCADE);
INSERT INTO parent VALUES (1), (2), (3), (4);
INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
connection node_1;
START TRANSACTION;
SELECT * FROM parent FOR UPDATE;
pk
1
2
3
4
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
ANALYZE TABLE child;;
Table Op Msg_type Msg_text
test.child analyze status Engine-independent statistics collected
test.child analyze status OK
connection node_1;
COMMIT;
DROP TABLE child, parent;
disconnect node_1a;
CREATE TABLE parent (pk INTEGER PRIMARY KEY);
CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON UPDATE CASCADE ON DELETE CASCADE);
INSERT INTO parent VALUES (1), (2), (3), (4);
INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
connection node_1;
START TRANSACTION;
SELECT * FROM parent FOR UPDATE;
pk
1
2
3
4
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
ANALYZE TABLE child;;
Table Op Msg_type Msg_text
test.child analyze status Engine-independent statistics collected
test.child analyze status OK
connection node_1;
COMMIT;
DROP TABLE child, parent;
disconnect node_1a;
connection node_2;
connection node_1;
CREATE TABLE t1(a int not null primary key) engine=innodb;
REPAIR TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair note The storage engine for the table doesn't support repair
CREATE VIEW v1 AS SELECT a FROM t1;
REPAIR VIEW v1;
Table Op Msg_type Msg_text
test.v1 repair status OK
DROP VIEW v1;
DROP TABLE t1;
CREATE VIEW v1 AS SELECT table_name FROM information_schema.tables;
REPAIR VIEW v1;
Table Op Msg_type Msg_text
test.v1 repair status OK
DROP VIEW v1;
...@@ -17,14 +17,6 @@ SET SESSION wsrep_sync_wait=0; ...@@ -17,14 +17,6 @@ SET SESSION wsrep_sync_wait=0;
--connection node_1b --connection node_1b
SET SESSION wsrep_sync_wait=0; SET SESSION wsrep_sync_wait=0;
--let $table_admin_command = OPTIMIZE
--source galera_ddl_fk_conflict.inc
--source galera_ddl_fk_conflict_with_tmp.inc
--let $table_admin_command = REPAIR
--source galera_ddl_fk_conflict.inc
--source galera_ddl_fk_conflict_with_tmp.inc
--let $table_admin_command = ALTER --let $table_admin_command = ALTER
--let $table_admin_command_end = ENGINE=INNODB --let $table_admin_command_end = ENGINE=INNODB
--source galera_ddl_fk_conflict.inc --source galera_ddl_fk_conflict.inc
......
# This test attempts to show that OPTIMIZE on a child table does NOT
# acquire MDL locks on the parent table. #
# param: $table_admin_command
# DDL table command to test, script will build full SQL statement:
# $table_admin_command TABLE c;
#
# param: $FK_constraint
# Foreign key constraint to use when creating the child table.
#
CREATE TABLE parent (pk INTEGER PRIMARY KEY);
--eval CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) $fk_constraint)
INSERT INTO parent VALUES (1), (2), (3), (4);
INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
--connection node_1
# Start a transaction that uses the parent table,
# so that we acquire MDL lock on parent.
START TRANSACTION;
SELECT * FROM parent FOR UPDATE;
# In a different connection, execute the table
# admin command (OPTIMIZE / REPAIR ...) on the child table.
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
--eval $table_admin_command TABLE child;
# Expect no conflict.
--connection node_1
COMMIT;
DROP TABLE child, parent;
--disconnect node_1a
#
# This test attempts to show that table admin commands
# (OPTIMIZE / REPAIR / ANALYZE ...) on child table,
# do NOT cause conflicts on parent table operations.
# Contrary to what is said in MDEV-21577, which claimed
# that OPTIMIZE and REPAIR do take MDL locks on parent
# table.
#
# Should this test start failing due to a conflict
# (i.e. ER_LOCK_DEADLOCK), then it might be that we
# are missing additional keys for certification
# on the corresponding table admin command.
--source include/galera_cluster.inc
--let $table_admin_command = OPTIMIZE
--let $fk_constraint =
--source galera_ddl_fk_no_conflict.inc
--let $fk_constraint = ON UPDATE CASCADE
--source galera_ddl_fk_no_conflict.inc
--let $fk_constraint = ON DELETE CASCADE
--source galera_ddl_fk_no_conflict.inc
--let $fk_constraint = ON UPDATE CASCADE ON DELETE CASCADE
--source galera_ddl_fk_no_conflict.inc
--let $table_admin_command = REPAIR
--let $fk_constraint =
--source galera_ddl_fk_no_conflict.inc
--let $fk_constraint = ON UPDATE CASCADE
--source galera_ddl_fk_no_conflict.inc
--let $fk_constraint = ON DELETE CASCADE
--source galera_ddl_fk_no_conflict.inc
--let $fk_constraint = ON UPDATE CASCADE ON DELETE CASCADE
--source galera_ddl_fk_no_conflict.inc
--let $table_admin_command = CHECK
--let $fk_constraint =
--source galera_ddl_fk_no_conflict.inc
--let $fk_constraint = ON UPDATE CASCADE
--source galera_ddl_fk_no_conflict.inc
--let $fk_constraint = ON DELETE CASCADE
--source galera_ddl_fk_no_conflict.inc
--let $fk_constraint = ON UPDATE CASCADE ON DELETE CASCADE
--source galera_ddl_fk_no_conflict.inc
--let $table_admin_command = ANALYZE
--let $fk_constraint =
--source galera_ddl_fk_no_conflict.inc
--let $fk_constraint = ON UPDATE CASCADE
--source galera_ddl_fk_no_conflict.inc
--let $fk_constraint = ON DELETE CASCADE
--source galera_ddl_fk_no_conflict.inc
--let $fk_constraint = ON UPDATE CASCADE ON DELETE CASCADE
--source galera_ddl_fk_no_conflict.inc
--source include/galera_cluster.inc
CREATE TABLE t1(a int not null primary key) engine=innodb;
REPAIR TABLE t1;
CREATE VIEW v1 AS SELECT a FROM t1;
REPAIR VIEW v1;
DROP VIEW v1;
DROP TABLE t1;
CREATE VIEW v1 AS SELECT table_name FROM information_schema.tables;
REPAIR VIEW v1;
DROP VIEW v1;
...@@ -436,49 +436,6 @@ static bool open_only_one_table(THD* thd, TABLE_LIST* table, ...@@ -436,49 +436,6 @@ static bool open_only_one_table(THD* thd, TABLE_LIST* table,
return open_error; return open_error;
} }
#ifdef WITH_WSREP
/*
OPTIMIZE, REPAIR and ALTER may take MDL locks not only for the affected table, but
also for the table referenced by foreign key constraint.
This wsrep_toi_replication() function handles TOI replication for OPTIMIZE and REPAIR
so that certification keys for potential FK parent tables are also appended in the
write set.
ALTER TABLE case is handled elsewhere.
*/
static bool wsrep_toi_replication(THD *thd, TABLE_LIST *tables)
{
LEX *lex= thd->lex;
/* only handle OPTIMIZE and REPAIR here */
switch (lex->sql_command)
{
case SQLCOM_OPTIMIZE:
case SQLCOM_REPAIR:
break;
default:
return false;
}
close_thread_tables(thd);
wsrep::key_array keys;
wsrep_append_fk_parent_table(thd, tables, &keys);
/* now TOI replication, with no locks held */
if (keys.empty())
{
if (!thd->lex->no_write_to_binlog &&
wsrep_to_isolation_begin(thd, NULL, NULL, tables))
return true;
}
else
{
if (!thd->lex->no_write_to_binlog &&
wsrep_to_isolation_begin(thd, NULL, NULL, tables, NULL, &keys))
return true;
}
return false;
}
#endif /* WITH_WSREP */
/* /*
RETURN VALUES RETURN VALUES
...@@ -550,16 +507,6 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables, ...@@ -550,16 +507,6 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
close_thread_tables(thd); close_thread_tables(thd);
for (table= tables; table; table= table->next_local) for (table= tables; table; table= table->next_local)
table->table= NULL; table->table= NULL;
#ifdef WITH_WSREP
if (WSREP(thd))
{
if(wsrep_toi_replication(thd, tables))
{
WSREP_INFO("wsrep TOI replication of has failed.");
goto err;
}
}
#endif /* WITH_WSREP */
for (table= tables; table; table= table->next_local) for (table= tables; table; table= table->next_local)
{ {
...@@ -1468,6 +1415,7 @@ bool Sql_cmd_optimize_table::execute(THD *thd) ...@@ -1468,6 +1415,7 @@ bool Sql_cmd_optimize_table::execute(THD *thd)
FALSE, UINT_MAX, FALSE)) FALSE, UINT_MAX, FALSE))
goto error; /* purecov: inspected */ goto error; /* purecov: inspected */
WSREP_TO_ISOLATION_BEGIN_WRTCHK(NULL, NULL, first_table);
res= (specialflag & SPECIAL_NO_NEW_FUNC) ? res= (specialflag & SPECIAL_NO_NEW_FUNC) ?
mysql_recreate_table(thd, first_table, true) : mysql_recreate_table(thd, first_table, true) :
mysql_admin_table(thd, first_table, &m_lex->check_opt, mysql_admin_table(thd, first_table, &m_lex->check_opt,
...@@ -1477,6 +1425,9 @@ bool Sql_cmd_optimize_table::execute(THD *thd) ...@@ -1477,6 +1425,9 @@ bool Sql_cmd_optimize_table::execute(THD *thd)
m_lex->first_select_lex()->table_list.first= first_table; m_lex->first_select_lex()->table_list.first= first_table;
m_lex->query_tables= first_table; m_lex->query_tables= first_table;
#ifdef WITH_WSREP
wsrep_error_label:
#endif /* WITH_WSREP */
error: error:
DBUG_RETURN(res); DBUG_RETURN(res);
} }
...@@ -1492,6 +1443,8 @@ bool Sql_cmd_repair_table::execute(THD *thd) ...@@ -1492,6 +1443,8 @@ bool Sql_cmd_repair_table::execute(THD *thd)
if (check_table_access(thd, SELECT_ACL | INSERT_ACL, first_table, if (check_table_access(thd, SELECT_ACL | INSERT_ACL, first_table,
FALSE, UINT_MAX, FALSE)) FALSE, UINT_MAX, FALSE))
goto error; /* purecov: inspected */ goto error; /* purecov: inspected */
WSREP_TO_ISOLATION_BEGIN_WRTCHK(NULL, NULL, first_table);
res= mysql_admin_table(thd, first_table, &m_lex->check_opt, "repair", res= mysql_admin_table(thd, first_table, &m_lex->check_opt, "repair",
TL_WRITE, 1, TL_WRITE, 1,
MY_TEST(m_lex->check_opt.sql_flags & TT_USEFRM), MY_TEST(m_lex->check_opt.sql_flags & TT_USEFRM),
...@@ -1501,6 +1454,9 @@ bool Sql_cmd_repair_table::execute(THD *thd) ...@@ -1501,6 +1454,9 @@ bool Sql_cmd_repair_table::execute(THD *thd)
m_lex->first_select_lex()->table_list.first= first_table; m_lex->first_select_lex()->table_list.first= first_table;
m_lex->query_tables= first_table; m_lex->query_tables= first_table;
#ifdef WITH_WSREP
wsrep_error_label:
#endif /* WITH_WSREP */
error: error:
DBUG_RETURN(res); DBUG_RETURN(res);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment