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
6d5b723b
Commit
6d5b723b
authored
Jun 02, 2015
by
Nirbhay Choubey
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '5.5-galera' into 10.0-galera
parents
3eb8bc01
9eff9ed5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
10 deletions
+61
-10
mysql-test/suite/galera/r/create.result
mysql-test/suite/galera/r/create.result
+31
-0
mysql-test/suite/galera/t/create.test
mysql-test/suite/galera/t/create.test
+24
-0
sql/mysqld.cc
sql/mysqld.cc
+5
-2
sql/sql_parse.cc
sql/sql_parse.cc
+1
-8
No files found.
mysql-test/suite/galera/r/create.result
View file @
6d5b723b
...
...
@@ -24,5 +24,36 @@ SET @@GLOBAL.wsrep_forced_binlog_format=@wsrep_forced_binlog_format_saved;
# MDEV-7673: CREATE TABLE SELECT fails on Galera cluster
#
CREATE TABLE t1 (i INT) ENGINE=INNODB DEFAULT CHARSET=utf8 SELECT 1 as i;
SELECT * FROM t1;
i
1
SELECT * FROM t1;
i
1
DROP TABLE t1;
#
# MDEV-8166 : Adding index on new table from select crashes Galera
# cluster
#
CREATE TABLE t1(i int(11) NOT NULL DEFAULT '0') ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO t1(i) VALUES (1), (2), (3);
CREATE TABLE t2 (i INT) SELECT i FROM t1;
ALTER TABLE t2 ADD INDEX idx(i);
SELECT * FROM t2;
i
1
2
3
SELECT * FROM t2;
i
1
2
3
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`i` int(11) DEFAULT NULL,
KEY `idx` (`i`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1, t2;
# End of tests
mysql-test/suite/galera/t/create.test
View file @
6d5b723b
...
...
@@ -25,10 +25,34 @@ SET @@GLOBAL.wsrep_forced_binlog_format=@wsrep_forced_binlog_format_saved;
--
echo
#
--
echo
# MDEV-7673: CREATE TABLE SELECT fails on Galera cluster
--
echo
#
--
connection
node_1
CREATE
TABLE
t1
(
i
INT
)
ENGINE
=
INNODB
DEFAULT
CHARSET
=
utf8
SELECT
1
as
i
;
SELECT
*
FROM
t1
;
--
connection
node_2
SELECT
*
FROM
t1
;
# Cleanup
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-8166 : Adding index on new table from select crashes Galera
--
echo
# cluster
--
echo
#
--
connection
node_1
CREATE
TABLE
t1
(
i
int
(
11
)
NOT
NULL
DEFAULT
'0'
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
INSERT
INTO
t1
(
i
)
VALUES
(
1
),
(
2
),
(
3
);
CREATE
TABLE
t2
(
i
INT
)
SELECT
i
FROM
t1
;
ALTER
TABLE
t2
ADD
INDEX
idx
(
i
);
SELECT
*
FROM
t2
;
--
connection
node_2
SELECT
*
FROM
t2
;
SHOW
CREATE
TABLE
t2
;
# Cleanup
DROP
TABLE
t1
,
t2
;
--
echo
# End of tests
sql/mysqld.cc
View file @
6d5b723b
...
...
@@ -4966,8 +4966,6 @@ static int init_server_components()
}
#endif
DBUG_ASSERT
(
!
opt_bin_log
||
opt_bin_logname
);
if
(
opt_bin_log
)
{
/* Reports an error and aborts, if the --log-bin's path
...
...
@@ -5052,6 +5050,11 @@ static int init_server_components()
{
set_ports
();
// this is also called in network_init() later but we need
// to know mysqld_port now - lp:1071882
/*
Plugin initialization (plugin_init()) hasn't happened yet, set
maria_hton to 0.
*/
maria_hton
=
0
;
wsrep_init_startup
(
true
);
}
}
...
...
sql/sql_parse.cc
View file @
6d5b723b
...
...
@@ -3301,17 +3301,10 @@ case SQLCOM_PREPARE:
/* Store reference to table in case of LOCK TABLES */
create_info
.
table
=
create_table
->
table
;
#ifdef WITH_WSREP
if
(
WSREP
(
thd
)
&&
(
!
thd
->
is_current_stmt_binlog_format_row
()
||
!
(
create_info
.
tmp_table
())))
WSREP_TO_ISOLATION_BEGIN
(
create_table
->
db
,
create_table
->
table_name
,
NULL
)
#endif
/*
select_create is currently not re-execution friendly and
needs to be created for every execution of a PS/SP.
Note: In wsrep-patch, CTAS is handled like a regular transaction.
*/
if
((
result
=
new
select_create
(
create_table
,
&
create_info
,
...
...
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