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
8cda87e4
Commit
8cda87e4
authored
Nov 27, 2009
by
Alfranio Correia
Browse files
Options
Browse Files
Download
Plain Diff
merge mysql-5.1-bugteam (local) --> mysql-5.1-bugteam
parents
14b9f46d
95e420c6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
75 additions
and
5 deletions
+75
-5
mysql-test/suite/rpl/r/rpl_row_create_table.result
mysql-test/suite/rpl/r/rpl_row_create_table.result
+26
-0
mysql-test/suite/rpl/t/rpl_row_create_table.test
mysql-test/suite/rpl/t/rpl_row_create_table.test
+36
-0
sql/sql_table.cc
sql/sql_table.cc
+13
-5
No files found.
mysql-test/suite/rpl/r/rpl_row_create_table.result
View file @
8cda87e4
...
@@ -476,4 +476,30 @@ master-bin.000001 # Table_map # # table_id: # (mysqltest1.with_select)
...
@@ -476,4 +476,30 @@ master-bin.000001 # Table_map # # table_id: # (mysqltest1.with_select)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # COMMIT
DROP DATABASE mysqltest1;
DROP DATABASE mysqltest1;
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CREATE TEMPORARY TABLE t7(c1 INT);
CREATE TABLE t5(c1 INT);
CREATE TABLE t4(c1 INT);
CREATE VIEW bug48506_t1 AS SELECT 1;
CREATE VIEW bug48506_t2 AS SELECT * FROM t4;
CREATE VIEW bug48506_t3 AS SELECT t5.c1 AS A, t4.c1 AS B FROM t5, t4;
CREATE TABLE bug48506_t4(c1 INT);
DROP VIEW bug48506_t1, bug48506_t2, bug48506_t3;
DROP TABLE bug48506_t4;
CREATE TABLE IF NOT EXISTS bug48506_t1 LIKE t7;
CREATE TABLE IF NOT EXISTS bug48506_t2 LIKE t7;
CREATE TABLE IF NOT EXISTS bug48506_t3 LIKE t7;
CREATE TABLE IF NOT EXISTS bug48506_t4 LIKE t7;
SHOW TABLES LIKE 'bug48506%';
Tables_in_test (bug48506%)
bug48506_t4
DROP VIEW IF EXISTS bug48506_t1, bug48506_t2, bug48506_t3;
DROP TEMPORARY TABLES t7;
DROP TABLES t4, t5;
DROP TABLES IF EXISTS bug48506_t4;
end of the tests
end of the tests
mysql-test/suite/rpl/t/rpl_row_create_table.test
View file @
8cda87e4
...
@@ -292,4 +292,40 @@ connection master;
...
@@ -292,4 +292,40 @@ connection master;
DROP
DATABASE
mysqltest1
;
DROP
DATABASE
mysqltest1
;
sync_slave_with_master
;
sync_slave_with_master
;
#
# BUG#48506: crash in CREATE TABLE <existing_view> IF NOT EXISTS LIKE
# <tmp_tbl> with RBL
#
source
include
/
master
-
slave
-
reset
.
inc
;
connection
master
;
CREATE
TEMPORARY
TABLE
t7
(
c1
INT
);
CREATE
TABLE
t5
(
c1
INT
);
CREATE
TABLE
t4
(
c1
INT
);
CREATE
VIEW
bug48506_t1
AS
SELECT
1
;
CREATE
VIEW
bug48506_t2
AS
SELECT
*
FROM
t4
;
CREATE
VIEW
bug48506_t3
AS
SELECT
t5
.
c1
AS
A
,
t4
.
c1
AS
B
FROM
t5
,
t4
;
CREATE
TABLE
bug48506_t4
(
c1
INT
);
--
disable_warnings
sync_slave_with_master
;
DROP
VIEW
bug48506_t1
,
bug48506_t2
,
bug48506_t3
;
DROP
TABLE
bug48506_t4
;
connection
master
;
CREATE
TABLE
IF
NOT
EXISTS
bug48506_t1
LIKE
t7
;
CREATE
TABLE
IF
NOT
EXISTS
bug48506_t2
LIKE
t7
;
CREATE
TABLE
IF
NOT
EXISTS
bug48506_t3
LIKE
t7
;
CREATE
TABLE
IF
NOT
EXISTS
bug48506_t4
LIKE
t7
;
--
enable_warnings
sync_slave_with_master
;
SHOW
TABLES
LIKE
'bug48506%'
;
connection
master
;
DROP
VIEW
IF
EXISTS
bug48506_t1
,
bug48506_t2
,
bug48506_t3
;
DROP
TEMPORARY
TABLES
t7
;
DROP
TABLES
t4
,
t5
;
DROP
TABLES
IF
EXISTS
bug48506_t4
;
source
include
/
master
-
slave
-
end
.
inc
;
--
echo
end
of
the
tests
--
echo
end
of
the
tests
sql/sql_table.cc
View file @
8cda87e4
...
@@ -5419,12 +5419,20 @@ goto binlog;
...
@@ -5419,12 +5419,20 @@ goto binlog;
}
}
VOID
(
pthread_mutex_unlock
(
&
LOCK_open
));
VOID
(
pthread_mutex_unlock
(
&
LOCK_open
));
IF_DBUG
(
int
result
=
)
/*
store_create_info
(
thd
,
table
,
&
query
,
The condition avoids a crash as described in BUG#48506. Other
create_info
,
FALSE
/* show_database */
);
binlogging problems related to CREATE TABLE IF NOT EXISTS LIKE
when the existing object is a view will be solved by BUG 47442.
*/
if
(
!
table
->
view
)
{
IF_DBUG
(
int
result
=
)
store_create_info
(
thd
,
table
,
&
query
,
create_info
,
FALSE
/* show_database */
);
DBUG_ASSERT
(
result
==
0
);
// store_create_info() always return 0
DBUG_ASSERT
(
result
==
0
);
// store_create_info() always return 0
write_bin_log
(
thd
,
TRUE
,
query
.
ptr
(),
query
.
length
());
write_bin_log
(
thd
,
TRUE
,
query
.
ptr
(),
query
.
length
());
}
}
}
else
// Case 1
else
// Case 1
write_bin_log
(
thd
,
TRUE
,
thd
->
query
(),
thd
->
query_length
());
write_bin_log
(
thd
,
TRUE
,
thd
->
query
(),
thd
->
query_length
());
...
...
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