2002-11-16 19:19:10 +01:00
|
|
|
drop table if exists t1, t2, t3, t4;
|
|
|
|
drop table if exists t1, t2, t3, t4;
|
2002-10-25 01:46:14 +02:00
|
|
|
start slave;
|
2003-06-04 17:28:51 +02:00
|
|
|
ERROR HY000: Could not initialize master info structure, check permisions on master.info
|
2002-10-25 01:46:14 +02:00
|
|
|
start slave;
|
2003-06-04 17:28:51 +02:00
|
|
|
ERROR HY000: Could not initialize master info structure, check permisions on master.info
|
2002-09-11 05:40:08 +02:00
|
|
|
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
|
2003-08-18 23:08:08 +02:00
|
|
|
ERROR HY000: Could not initialize master info structure, check permisions on master.info
|
2001-09-28 07:05:54 +02:00
|
|
|
reset slave;
|
2002-09-11 05:40:08 +02:00
|
|
|
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
|
2001-09-28 07:05:54 +02:00
|
|
|
reset master;
|
2002-10-25 01:46:14 +02:00
|
|
|
start slave;
|
2002-08-24 01:08:10 +02:00
|
|
|
create temporary table temp_table (a char(80) not null);
|
|
|
|
insert into temp_table values ("testing temporary tables");
|
2001-09-28 07:05:54 +02:00
|
|
|
create table t1 (s text);
|
|
|
|
insert into t1 values('Could not break slave'),('Tried hard');
|
|
|
|
show slave status;
|
2003-10-09 00:06:21 +02:00
|
|
|
Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master
|
|
|
|
Waiting for master to send event 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 None 0 No #
|
2001-09-28 07:05:54 +02:00
|
|
|
select * from t1;
|
2000-12-27 02:31:06 +01:00
|
|
|
s
|
|
|
|
Could not break slave
|
|
|
|
Tried hard
|
2001-09-28 07:05:54 +02:00
|
|
|
flush logs;
|
2001-11-28 15:11:05 +01:00
|
|
|
create table t2(m int not null auto_increment primary key);
|
2001-09-28 07:05:54 +02:00
|
|
|
insert into t2 values (34),(67),(123);
|
|
|
|
flush logs;
|
2002-10-25 02:32:42 +02:00
|
|
|
show binary logs;
|
2000-12-27 02:31:06 +01:00
|
|
|
Log_name
|
2002-10-29 23:11:13 +01:00
|
|
|
master-bin.000001
|
|
|
|
master-bin.000002
|
|
|
|
master-bin.000003
|
2002-08-24 01:08:10 +02:00
|
|
|
create table t3 select * from temp_table;
|
|
|
|
select * from t3;
|
|
|
|
a
|
|
|
|
testing temporary tables
|
|
|
|
drop table temp_table, t3;
|
2001-09-28 07:05:54 +02:00
|
|
|
insert into t2 values(1234);
|
2001-11-28 15:11:05 +01:00
|
|
|
set insert_id=1234;
|
|
|
|
insert into t2 values(NULL);
|
2002-07-23 17:31:22 +02:00
|
|
|
set global sql_slave_skip_counter=1;
|
2002-10-25 01:46:14 +02:00
|
|
|
start slave;
|
2003-03-11 10:49:06 +01:00
|
|
|
purge master logs to 'master-bin.000002';
|
2003-07-12 23:31:21 +02:00
|
|
|
show master logs;
|
|
|
|
Log_name
|
|
|
|
master-bin.000002
|
|
|
|
master-bin.000003
|
|
|
|
purge binary logs to 'master-bin.000002';
|
2003-03-11 10:49:06 +01:00
|
|
|
show binary logs;
|
|
|
|
Log_name
|
|
|
|
master-bin.000002
|
|
|
|
master-bin.000003
|
2003-07-12 23:31:21 +02:00
|
|
|
purge master logs before now();
|
2002-10-25 02:32:42 +02:00
|
|
|
show binary logs;
|
2000-12-27 02:31:06 +01:00
|
|
|
Log_name
|
2002-10-29 23:11:13 +01:00
|
|
|
master-bin.000003
|
2001-09-28 07:05:54 +02:00
|
|
|
insert into t2 values (65);
|
|
|
|
show slave status;
|
2003-10-09 00:06:21 +02:00
|
|
|
Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master
|
|
|
|
Waiting for master to send event 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 None 0 No #
|
2001-09-28 07:05:54 +02:00
|
|
|
select * from t2;
|
2000-12-27 02:31:06 +01:00
|
|
|
m
|
|
|
|
34
|
2001-01-24 17:15:34 +01:00
|
|
|
65
|
2000-12-27 02:31:06 +01:00
|
|
|
67
|
|
|
|
123
|
2001-01-24 17:15:34 +01:00
|
|
|
1234
|
2002-08-24 01:08:10 +02:00
|
|
|
create temporary table temp_table (a char(80) not null);
|
|
|
|
insert into temp_table values ("testing temporary tables part 2");
|
2001-09-28 07:05:54 +02:00
|
|
|
create table t3 (n int);
|
2002-08-24 01:08:10 +02:00
|
|
|
create table t4 select * from temp_table;
|
2002-10-25 02:32:42 +02:00
|
|
|
show binary logs;
|
2001-01-24 17:15:34 +01:00
|
|
|
Log_name
|
2002-10-29 23:11:13 +01:00
|
|
|
master-bin.000003
|
|
|
|
master-bin.000004
|
2001-09-28 07:05:54 +02:00
|
|
|
show master status;
|
2001-02-20 07:08:24 +01:00
|
|
|
File Position Binlog_do_db Binlog_ignore_db
|
2003-08-11 21:44:43 +02:00
|
|
|
master-bin.000004 2886
|
2002-08-24 01:08:10 +02:00
|
|
|
select * from t4;
|
|
|
|
a
|
|
|
|
testing temporary tables part 2
|
2001-09-28 07:05:54 +02:00
|
|
|
show slave status;
|
2003-10-09 00:06:21 +02:00
|
|
|
Slave_IO_State 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 Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master
|
|
|
|
Waiting for master to send event 127.0.0.1 root MASTER_PORT 60 master-bin.000004 2886 slave-relay-bin.000001 7891 master-bin.000004 Yes Yes 0 0 2886 7891 None 0 No #
|
2001-09-28 07:05:54 +02:00
|
|
|
lock tables t3 read;
|
|
|
|
select count(*) from t3 where n >= 4;
|
2001-01-24 17:15:34 +01:00
|
|
|
count(*)
|
|
|
|
100
|
2001-09-28 07:05:54 +02:00
|
|
|
unlock tables;
|
2002-09-22 17:02:39 +02:00
|
|
|
drop table if exists t1,t2,t3,t4;
|