2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
7
drop table if exists t1;
8
create table t1(n char(30));
9
prepare stmt1 from 'insert into t1 values (?)';
10
set @var1= "from-master-1";
11
execute stmt1 using @var1;
12
set @var1= "from-master-2-'',";
13
execute stmt1 using @var1;
14
SELECT * FROM t1 ORDER BY n;
18
set @var2= 'insert into t1 values (concat("from-var-", ?))';
19
prepare stmt2 from @var2;
20
set @var1='from-master-3';
21
execute stmt2 using @var1;
22
SELECT * FROM t1 ORDER BY n;
26
from-var-from-master-3
30
########################################################################
32
# BUG#25843: Changing default database between PREPARE and EXECUTE of
33
# statement breaks binlog.
35
########################################################################
45
CREATE DATABASE mysqltest1;
46
CREATE TABLE t1(db_name CHAR(32), db_col_name CHAR(32));
48
PREPARE stmt_d_1 FROM 'INSERT INTO t1 VALUES(DATABASE(), @@collation_database)';
62
test latin1_swedish_ci
63
test latin1_swedish_ci
68
DROP DATABASE mysqltest1;
78
########################################################################