mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/alexi/dev/mysql-5.0-14614
This commit is contained in:
@@ -122,3 +122,15 @@ a=b && a=c
|
|||||||
1
|
1
|
||||||
drop function bug12480;
|
drop function bug12480;
|
||||||
drop table t1;
|
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;
|
||||||
|
@@ -133,6 +133,35 @@ select a=b && a=c from t1;
|
|||||||
drop function bug12480;
|
drop function bug12480;
|
||||||
drop table t1;
|
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
|
# End of test
|
||||||
#
|
#
|
||||||
|
@@ -1162,10 +1162,12 @@ bool mysql_change_db(THD *thd, const char *name, bool no_access_check)
|
|||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
end:
|
end:
|
||||||
x_free(thd->db);
|
if (!(thd->slave_thread))
|
||||||
|
x_free(thd->db);
|
||||||
if (dbname && dbname[0] == 0)
|
if (dbname && dbname[0] == 0)
|
||||||
{
|
{
|
||||||
x_free(dbname);
|
if (!(thd->slave_thread))
|
||||||
|
x_free(dbname);
|
||||||
thd->db= NULL;
|
thd->db= NULL;
|
||||||
thd->db_length= 0;
|
thd->db_length= 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user