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
8f2deb59
Commit
8f2deb59
authored
Dec 12, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/alexi/dev/mysql-5.0-14614
parents
992cc7fb
7ab151a7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
2 deletions
+45
-2
mysql-test/r/rpl_trigger.result
mysql-test/r/rpl_trigger.result
+12
-0
mysql-test/t/rpl_trigger.test
mysql-test/t/rpl_trigger.test
+29
-0
sql/sql_db.cc
sql/sql_db.cc
+4
-2
No files found.
mysql-test/r/rpl_trigger.result
View file @
8f2deb59
...
...
@@ -122,3 +122,15 @@ a=b && a=c
1
drop function bug12480;
drop table t1;
create table t1 (i int);
create table t2 (i int);
create trigger tr1 before insert on t1 for each row
begin
insert into t2 values (1);
end|
create database other;
use other;
insert into test.t1 values (1);
use test;
drop table t1,t2;
drop database other;
mysql-test/t/rpl_trigger.test
View file @
8f2deb59
...
...
@@ -133,6 +133,35 @@ select a=b && a=c from t1;
drop
function
bug12480
;
drop
table
t1
;
#
# #14614: Replication of tables with trigger generates error message if databases is changed
# Note. The error message is emitted by _myfree() using fprintf() to the stderr
# and because of that does not fall into the .result file.
#
create
table
t1
(
i
int
);
create
table
t2
(
i
int
);
delimiter
|
;
create
trigger
tr1
before
insert
on
t1
for
each
row
begin
insert
into
t2
values
(
1
);
end
|
delimiter
;
|
create
database
other
;
use
other
;
insert
into
test
.
t1
values
(
1
);
save_master_pos
;
connection
slave
;
sync_with_master
;
connection
master
;
use
test
;
drop
table
t1
,
t2
;
drop
database
other
;
#
# End of test
#
...
...
sql/sql_db.cc
View file @
8f2deb59
...
...
@@ -1162,10 +1162,12 @@ bool mysql_change_db(THD *thd, const char *name, bool no_access_check)
DBUG_RETURN
(
1
);
}
end:
x_free
(
thd
->
db
);
if
(
!
(
thd
->
slave_thread
))
x_free
(
thd
->
db
);
if
(
dbname
&&
dbname
[
0
]
==
0
)
{
x_free
(
dbname
);
if
(
!
(
thd
->
slave_thread
))
x_free
(
dbname
);
thd
->
db
=
NULL
;
thd
->
db_length
=
0
;
}
...
...
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