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
53b9f755
Commit
53b9f755
authored
Jan 24, 2015
by
Nirbhay Choubey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-7374 : Losing connection to MySQL while running ALTER TABLE
Backport from 10.1.
parent
b5201200
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
75 additions
and
48 deletions
+75
-48
mysql-test/suite/wsrep/r/alter_table_innodb.result
mysql-test/suite/wsrep/r/alter_table_innodb.result
+8
-0
mysql-test/suite/wsrep/t/alter_table_innodb.opt
mysql-test/suite/wsrep/t/alter_table_innodb.opt
+1
-0
mysql-test/suite/wsrep/t/alter_table_innodb.test
mysql-test/suite/wsrep/t/alter_table_innodb.test
+10
-0
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+28
-24
storage/xtradb/handler/ha_innodb.cc
storage/xtradb/handler/ha_innodb.cc
+28
-24
No files found.
mysql-test/suite/wsrep/r/alter_table_innodb.result
0 → 100644
View file @
53b9f755
#
# MDEV-7374 : Losing connection to MySQL while running ALTER TABLE
#
CREATE TABLE t1(i INT) ENGINE=INNODB;
INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8);
INSERT INTO t1 SELECT a.* FROM t1 a, t1 b, t1 c, t1 d, t1 e;
ALTER TABLE t1 MODIFY i FLOAT;
DROP TABLE t1;
mysql-test/suite/wsrep/t/alter_table_innodb.opt
0 → 100644
View file @
53b9f755
--wsrep-on=0
mysql-test/suite/wsrep/t/alter_table_innodb.test
0 → 100644
View file @
53b9f755
--
source
include
/
have_innodb
.
inc
--
echo
#
--
echo
# MDEV-7374 : Losing connection to MySQL while running ALTER TABLE
--
echo
#
CREATE
TABLE
t1
(
i
INT
)
ENGINE
=
INNODB
;
INSERT
INTO
t1
VALUES
(
1
),(
2
),(
3
),(
4
),(
5
),(
6
),(
7
),(
8
);
INSERT
INTO
t1
SELECT
a
.*
FROM
t1
a
,
t1
b
,
t1
c
,
t1
d
,
t1
e
;
ALTER
TABLE
t1
MODIFY
i
FLOAT
;
DROP
TABLE
t1
;
storage/innobase/handler/ha_innodb.cc
View file @
53b9f755
...
...
@@ -7470,19 +7470,21 @@ ha_innobase::write_row(
;
}
else
if
(
src_table
==
prebuilt
->
table
)
{
#ifdef WITH_WSREP
switch
(
wsrep_run_wsrep_commit
(
user_thd
,
wsrep_hton
,
1
))
{
case
WSREP_TRX_OK
:
break
;
case
WSREP_TRX_SIZE_EXCEEDED
:
case
WSREP_TRX_CERT_FAIL
:
case
WSREP_TRX_ERROR
:
DBUG_RETURN
(
1
);
}
if
(
wsrep_on
(
user_thd
))
{
switch
(
wsrep_run_wsrep_commit
(
user_thd
,
wsrep_hton
,
1
))
{
case
WSREP_TRX_OK
:
break
;
case
WSREP_TRX_SIZE_EXCEEDED
:
case
WSREP_TRX_CERT_FAIL
:
case
WSREP_TRX_ERROR
:
DBUG_RETURN
(
1
);
}
if
(
binlog_hton
->
commit
(
binlog_hton
,
user_thd
,
1
))
DBUG_RETURN
(
1
);
wsrep_post_commit
(
user_thd
,
TRUE
);
if
(
binlog_hton
->
commit
(
binlog_hton
,
user_thd
,
1
))
DBUG_RETURN
(
1
);
wsrep_post_commit
(
user_thd
,
TRUE
);
}
#endif
/* WITH_WSREP */
/* Source table is not in InnoDB format:
no need to re-acquire locks on it. */
...
...
@@ -7495,19 +7497,21 @@ ha_innobase::write_row(
prebuilt
->
sql_stat_start
=
TRUE
;
}
else
{
#ifdef WITH_WSREP
switch
(
wsrep_run_wsrep_commit
(
user_thd
,
wsrep_hton
,
1
))
{
case
WSREP_TRX_OK
:
break
;
case
WSREP_TRX_SIZE_EXCEEDED
:
case
WSREP_TRX_CERT_FAIL
:
case
WSREP_TRX_ERROR
:
DBUG_RETURN
(
1
);
}
if
(
wsrep_on
(
user_thd
))
{
switch
(
wsrep_run_wsrep_commit
(
user_thd
,
wsrep_hton
,
1
))
{
case
WSREP_TRX_OK
:
break
;
case
WSREP_TRX_SIZE_EXCEEDED
:
case
WSREP_TRX_CERT_FAIL
:
case
WSREP_TRX_ERROR
:
DBUG_RETURN
(
1
);
}
if
(
binlog_hton
->
commit
(
binlog_hton
,
user_thd
,
1
))
DBUG_RETURN
(
1
);
wsrep_post_commit
(
user_thd
,
TRUE
);
if
(
binlog_hton
->
commit
(
binlog_hton
,
user_thd
,
1
))
DBUG_RETURN
(
1
);
wsrep_post_commit
(
user_thd
,
TRUE
);
}
#endif
/* WITH_WSREP */
/* Ensure that there are no other table locks than
LOCK_IX and LOCK_AUTO_INC on the destination table. */
...
...
storage/xtradb/handler/ha_innodb.cc
View file @
53b9f755
...
...
@@ -8045,19 +8045,21 @@ ha_innobase::write_row(
;
}
else
if
(
src_table
==
prebuilt
->
table
)
{
#ifdef WITH_WSREP
switch
(
wsrep_run_wsrep_commit
(
user_thd
,
wsrep_hton
,
1
))
{
case
WSREP_TRX_OK
:
break
;
case
WSREP_TRX_SIZE_EXCEEDED
:
case
WSREP_TRX_CERT_FAIL
:
case
WSREP_TRX_ERROR
:
DBUG_RETURN
(
1
);
}
if
(
wsrep_on
(
user_thd
))
{
switch
(
wsrep_run_wsrep_commit
(
user_thd
,
wsrep_hton
,
1
))
{
case
WSREP_TRX_OK
:
break
;
case
WSREP_TRX_SIZE_EXCEEDED
:
case
WSREP_TRX_CERT_FAIL
:
case
WSREP_TRX_ERROR
:
DBUG_RETURN
(
1
);
}
if
(
binlog_hton
->
commit
(
binlog_hton
,
user_thd
,
1
))
DBUG_RETURN
(
1
);
wsrep_post_commit
(
user_thd
,
TRUE
);
if
(
binlog_hton
->
commit
(
binlog_hton
,
user_thd
,
1
))
DBUG_RETURN
(
1
);
wsrep_post_commit
(
user_thd
,
TRUE
);
}
#endif
/* WITH_WSREP */
/* Source table is not in InnoDB format:
no need to re-acquire locks on it. */
...
...
@@ -8070,19 +8072,21 @@ ha_innobase::write_row(
prebuilt
->
sql_stat_start
=
TRUE
;
}
else
{
#ifdef WITH_WSREP
switch
(
wsrep_run_wsrep_commit
(
user_thd
,
wsrep_hton
,
1
))
{
case
WSREP_TRX_OK
:
break
;
case
WSREP_TRX_SIZE_EXCEEDED
:
case
WSREP_TRX_CERT_FAIL
:
case
WSREP_TRX_ERROR
:
DBUG_RETURN
(
1
);
}
if
(
wsrep_on
(
user_thd
))
{
switch
(
wsrep_run_wsrep_commit
(
user_thd
,
wsrep_hton
,
1
))
{
case
WSREP_TRX_OK
:
break
;
case
WSREP_TRX_SIZE_EXCEEDED
:
case
WSREP_TRX_CERT_FAIL
:
case
WSREP_TRX_ERROR
:
DBUG_RETURN
(
1
);
}
if
(
binlog_hton
->
commit
(
binlog_hton
,
user_thd
,
1
))
DBUG_RETURN
(
1
);
wsrep_post_commit
(
user_thd
,
TRUE
);
if
(
binlog_hton
->
commit
(
binlog_hton
,
user_thd
,
1
))
DBUG_RETURN
(
1
);
wsrep_post_commit
(
user_thd
,
TRUE
);
}
#endif
/* WITH_WSREP */
/* Ensure that there are no other table locks than
LOCK_IX and LOCK_AUTO_INC on the destination table. */
...
...
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