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
1907bf04
Commit
1907bf04
authored
Jul 23, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-6409 CREATE VIEW replication problem if error occurs in mysql_register_view
fix by Sriram Patil
parent
c1049657
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
3 deletions
+41
-3
mysql-test/suite/rpl/r/failed_create_view-6409.result
mysql-test/suite/rpl/r/failed_create_view-6409.result
+15
-0
mysql-test/suite/rpl/t/failed_create_view-6409.test
mysql-test/suite/rpl/t/failed_create_view-6409.test
+24
-0
sql/sql_view.cc
sql/sql_view.cc
+2
-3
No files found.
mysql-test/suite/rpl/r/failed_create_view-6409.result
0 → 100644
View file @
1907bf04
create table v1 (a int);
include/master-slave.inc
[connection master]
create table t1 (a int);
create view v1 as select * from t1;
ERROR 42S01: Table 'v1' already exists
show tables;
Tables_in_test
t1
v1
show tables;
Tables_in_test
t1
drop table if exists t1, v1;
include/rpl_end.inc
mysql-test/suite/rpl/t/failed_create_view-6409.test
0 → 100644
View file @
1907bf04
#
# MDEV-6409 CREATE VIEW replication problem if error occurs in mysql_register_view
#
#
#
# verify that failed CREATE VIEW is not replicated
create
table
v1
(
a
int
);
source
include
/
master
-
slave
.
inc
;
connection
master
;
create
table
t1
(
a
int
);
--
error
ER_TABLE_EXISTS_ERROR
create
view
v1
as
select
*
from
t1
;
show
tables
;
sync_slave_with_master
;
show
tables
;
connection
master
;
drop
table
if
exists
t1
,
v1
;
--
source
include
/
rpl_end
.
inc
sql/sql_view.cc
View file @
1907bf04
...
@@ -39,8 +39,7 @@
...
@@ -39,8 +39,7 @@
const
LEX_STRING
view_type
=
{
C_STRING_WITH_LEN
(
"VIEW"
)
};
const
LEX_STRING
view_type
=
{
C_STRING_WITH_LEN
(
"VIEW"
)
};
static
int
mysql_register_view
(
THD
*
thd
,
TABLE_LIST
*
view
,
static
int
mysql_register_view
(
THD
*
,
TABLE_LIST
*
,
enum_view_create_mode
);
enum_view_create_mode
mode
);
/*
/*
Make a unique name for an anonymous view column
Make a unique name for an anonymous view column
...
@@ -670,7 +669,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
...
@@ -670,7 +669,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
res
=
mysql_register_view
(
thd
,
view
,
mode
);
res
=
mysql_register_view
(
thd
,
view
,
mode
);
if
(
mysql_bin_log
.
is_open
())
if
(
!
res
&&
mysql_bin_log
.
is_open
())
{
{
String
buff
;
String
buff
;
const
LEX_STRING
command
[
3
]
=
const
LEX_STRING
command
[
3
]
=
...
...
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