- 论坛徽章:
- 1
|
mysql> select version();
+----------------------+
| version() |
+----------------------+
| 5.1.57-community-log |
+----------------------+
1 row in set (0.09 sec)
mysql> show variables like '%binlog_format%'
-> ;
+---------------+-----------+
| Variable_name | Value |
+---------------+-----------+
| binlog_format | STATEMENT |
+---------------+-----------+
1 row in set (0.00 sec)
[ERROR] Slave SQL: Error 'Query execution was interrupted' on query. Default database: 'database_name'. Query: 'insert into t(col1,col1,....) select 'Demo1',col2,col3.... where '
Error_code: 1317
insert into PRODUCT
(ID,
STATE_DATE,
REC,
PRODUCT_ID,
VISIT_TIME,
ADD_TIMES,
ORDER_TIME,
SESSION,
IS_ID,
TYPE)
select 'Demo1',
STATE_DATE,
REC,
PRODUCT_ID,
VISIT_TIME,
ADD_TIMES,
ORDER_TIME,
SESSION,
IS_ID,
TYPE
from PRODUCT
where id = 'name'
and state_date = 20150614;
PRODUCT表上没有主键和索引
每天一个shell脚本,都要这么执行,最近每天早上都要手工处理
1、SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
2、手工在slave执行 insert into select
3、start slave;
什么原因导致的呢?按网上说是master执行一半,异常中止,slave有一致性风险,所以抛1317的error code,但是我这个是每天shell跑的脚本,应该不会master异常中止啊。 |
|