2002-11-16 20:19:10 +02:00
|
|
|
drop table if exists t1, t2, t3, t4;
|
|
|
|
drop table if exists t1, t2, t3, t4;
|
2002-10-24 17:46:14 -06:00
|
|
|
start slave;
|
2001-11-04 15:43:41 +02:00
|
|
|
Could not initialize master info structure, check permisions on master.info
|
2002-10-24 17:46:14 -06:00
|
|
|
start slave;
|
2001-11-04 15:43:41 +02:00
|
|
|
Could not initialize master info structure, check permisions on master.info
|
2002-09-11 06:40:08 +03:00
|
|
|
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
|
2001-11-04 15:43:41 +02:00
|
|
|
Could not initialize master info
|
2001-09-27 23:05:54 -06:00
|
|
|
reset slave;
|
2002-09-11 06:40:08 +03:00
|
|
|
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
|
2001-09-27 23:05:54 -06:00
|
|
|
reset master;
|
2002-10-24 17:46:14 -06:00
|
|
|
start slave;
|
2002-08-24 02:08:10 +03:00
|
|
|
create temporary table temp_table (a char(80) not null);
|
|
|
|
insert into temp_table values ("testing temporary tables");
|
2001-09-27 23:05:54 -06:00
|
|
|
create table t1 (s text);
|
|
|
|
insert into t1 values('Could not break slave'),('Tried hard');
|
|
|
|
show slave status;
|
2002-04-01 21:46:23 -07:00
|
|
|
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
2002-10-29 15:11:13 -07:00
|
|
|
127.0.0.1 root MASTER_PORT 60 master-bin.000001 417 slave-relay-bin.000001 461 master-bin.000001 Yes Yes 0 0 417 461
|
2001-09-27 23:05:54 -06:00
|
|
|
select * from t1;
|
2000-12-27 03:31:06 +02:00
|
|
|
s
|
|
|
|
Could not break slave
|
|
|
|
Tried hard
|
2001-09-27 23:05:54 -06:00
|
|
|
flush logs;
|
2001-11-28 16:11:05 +02:00
|
|
|
create table t2(m int not null auto_increment primary key);
|
2001-09-27 23:05:54 -06:00
|
|
|
insert into t2 values (34),(67),(123);
|
|
|
|
flush logs;
|
2002-10-24 18:32:42 -06:00
|
|
|
show binary logs;
|
2000-12-27 03:31:06 +02:00
|
|
|
Log_name
|
2002-10-29 15:11:13 -07:00
|
|
|
master-bin.000001
|
|
|
|
master-bin.000002
|
|
|
|
master-bin.000003
|
2002-08-24 02:08:10 +03:00
|
|
|
create table t3 select * from temp_table;
|
|
|
|
select * from t3;
|
|
|
|
a
|
|
|
|
testing temporary tables
|
|
|
|
drop table temp_table, t3;
|
2001-09-27 23:05:54 -06:00
|
|
|
insert into t2 values(1234);
|
2001-11-28 16:11:05 +02:00
|
|
|
set insert_id=1234;
|
|
|
|
insert into t2 values(NULL);
|
2002-07-23 18:31:22 +03:00
|
|
|
set global sql_slave_skip_counter=1;
|
2002-10-24 17:46:14 -06:00
|
|
|
start slave;
|
2003-03-11 13:49:06 +04:00
|
|
|
purge master logs to 'master-bin.000002';
|
|
|
|
show binary logs;
|
|
|
|
Log_name
|
|
|
|
master-bin.000002
|
|
|
|
master-bin.000003
|
|
|
|
purge logs before now();
|
2002-10-24 18:32:42 -06:00
|
|
|
show binary logs;
|
2000-12-27 03:31:06 +02:00
|
|
|
Log_name
|
2002-10-29 15:11:13 -07:00
|
|
|
master-bin.000003
|
2001-09-27 23:05:54 -06:00
|
|
|
insert into t2 values (65);
|
|
|
|
show slave status;
|
2002-04-01 21:46:23 -07:00
|
|
|
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
2002-10-29 15:11:13 -07:00
|
|
|
127.0.0.1 root MASTER_PORT 60 master-bin.000003 290 slave-relay-bin.000001 1088 master-bin.000003 Yes Yes 0 0 290 1088
|
2001-09-27 23:05:54 -06:00
|
|
|
select * from t2;
|
2000-12-27 03:31:06 +02:00
|
|
|
m
|
|
|
|
34
|
2001-01-24 09:15:34 -07:00
|
|
|
65
|
2000-12-27 03:31:06 +02:00
|
|
|
67
|
|
|
|
123
|
2001-01-24 09:15:34 -07:00
|
|
|
1234
|
2002-08-24 02:08:10 +03:00
|
|
|
create temporary table temp_table (a char(80) not null);
|
|
|
|
insert into temp_table values ("testing temporary tables part 2");
|
2001-09-27 23:05:54 -06:00
|
|
|
create table t3 (n int);
|
2002-08-24 02:08:10 +03:00
|
|
|
create table t4 select * from temp_table;
|
2002-10-24 18:32:42 -06:00
|
|
|
show binary logs;
|
2001-01-24 09:15:34 -07:00
|
|
|
Log_name
|
2002-10-29 15:11:13 -07:00
|
|
|
master-bin.000003
|
|
|
|
master-bin.000004
|
|
|
|
master-bin.000005
|
|
|
|
master-bin.000006
|
2001-09-27 23:05:54 -06:00
|
|
|
show master status;
|
2001-02-19 23:08:24 -07:00
|
|
|
File Position Binlog_do_db Binlog_ignore_db
|
2002-10-29 15:11:13 -07:00
|
|
|
master-bin.000006 838
|
2002-08-24 02:08:10 +03:00
|
|
|
select * from t4;
|
|
|
|
a
|
|
|
|
testing temporary tables part 2
|
2001-09-27 23:05:54 -06:00
|
|
|
show slave status;
|
2002-04-01 21:46:23 -07:00
|
|
|
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
2002-10-29 15:11:13 -07:00
|
|
|
127.0.0.1 root MASTER_PORT 60 master-bin.000006 838 slave-relay-bin.000001 8067 master-bin.000006 Yes Yes 0 0 838 8067
|
2001-09-27 23:05:54 -06:00
|
|
|
lock tables t3 read;
|
|
|
|
select count(*) from t3 where n >= 4;
|
2001-01-24 09:15:34 -07:00
|
|
|
count(*)
|
|
|
|
100
|
2001-09-27 23:05:54 -06:00
|
|
|
unlock tables;
|
2002-09-22 18:02:39 +03:00
|
|
|
drop table if exists t1,t2,t3,t4;
|