for(counter=1;counter<=3;counter strike 1.6 )intflag=0;

 上传我的文档
 下载
 收藏
该文档贡献者很忙,什么也没留下。
 下载此文档
正在努力加载中...
how not to program in c
111 broken programs and 3 working ones, or why does 2 .
下载积分:2500
内容提示:how not to program in c
111 broken programs and 3 working ones, or why does 2 2=5986:(如何不计划在c
中111破项目和3的工作,或者为
文档格式:PDF|
浏览次数:0|
上传日期: 20:38:10|
文档星级:
该用户还上传了这些文档
how not to program in c
111 broken programs and
官方公共微信mysql同步GLOBAL sql_slave_skip_counter解释
大家都知道,当slave出现错误时,可以通过SET GLOBAL sql_slave_skip_counter = N来跳过错误,但是这个N,又真正代表什么呢。
This statement skips the next N events from the master
即他是跳过N个events,这里最重要的是理解event的含义
在中,对于sql的 binary log 他实际上是由一连串的event组成的一个组,即事务组。
我们在master上可以通过
SHOW BINLOG EVENTS 来查看一个sql里有多少个event。
通过例子来说明下,真正的event的含义:
show slave status
Last_Errno: 1062
Last_Error: Error 'Duplicate entry '193' for key 'PRIMARY'' on query. Default database: 'ssldb'. Query: 'insert slave_no_skip1& values (193,'y10')'
Skip_Counter: 0
在 master 上,执行
mysql& SHOW BINLOG EVENTS in 'mysql-bin.; from ;
+------------------+----------+------------+-----------+-------------+--------------------------------------------------------+
| Log_name&&&&&&&& | Pos&&&&& | Event_type | Server_id | End_log_pos | Info&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& |
+------------------+----------+------------+-----------+-------------+--------------------------------------------------------+
| mysql-bin.000010 |
| Query&&&&& |&&&&&&&& 1 |&&&
| BEGIN&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& |
1| mysql-bin.000010 |
| Query&&&&& |&&&&&&&& 1 |&&&
| use `ssldb`; insert slave_no_skip1& values (193,'y10') |
2| mysql-bin.000010 |
| Xid&&&&&&& |&&&&&&&& 1 |&&&
| COMMIT /* xid=4529451 */&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& |
3| mysql-bin.000010 |
| Query&&&&& |&&&&&&&& 1 |&&&
| BEGIN&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& |
4| mysql-bin.000010 |
| Query&&&&& |&&&&&&&& 1 |&&&
| use `ssldb`; insert slave_no_skip1 values (194,'y11')& |
5| mysql-bin.000010 |
| Xid&&&&&&& |&&&&&&&& 1 |&&&
| COMMIT /* xid=4529452 */&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& |
6| mysql-bin.000010 |
| Query&&&&& |&&&&&&&& 1 |&&&
| BEGIN&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& |
7| mysql-bin.000010 |
| Query&&&&& |&&&&&&&& 1 |&&&
| use `ssldb`; insert slave_no_skip1 values (195,'y12')& |
8| mysql-bin.000010 |
| Xid&&&&&&& |&&&&&&&& 1 |&&&
| COMMIT /* xid=4529453 */&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& |
9| mysql-bin.000010 |
| Query&&&&& |&&&&&&&& 1 |&&&
| BEGIN&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& |
10| mysql-bin.000010 |
| Query&&&&& |&&&&&&&& 1 |&&&
| use `ssldb`; insert slave_no_skip1& values (196,'y13') |
11| mysql-bin.000010 |
| Xid&&&&&&& |&&&&&&&& 1 |&&&
| COMMIT /* xid=4529454 */&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& |
12| mysql-bin.000010 |
| Query&&&&& |&&&&&&&& 1 |&&&
| BEGIN&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& |
13| mysql-bin.000010 |
| Query&&&&& |&&&&&&&& 1 |&&&
| use `ssldb`; insert slave_no_skip1& values (197,'y14') |
14| mysql-bin.000010 |
| Xid&&&&&&& |&&&&&&&& 1 |&&&
| COMMIT /* xid=4529455 */&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& |
15| mysql-bin.000010 |
| Query&&&&& |&&&&&&&& 1 |&&&
| BEGIN&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& |
16| mysql-bin.000010 |
| Query&&&&& |&&&&&&&& 1 |&&&
| use `ssldb`; insert slave_no_skip1& values (198,'y15') |
17| mysql-bin.000010 |
| Xid&&&&&&& |&&&&&&&& 1 |&&&
| COMMIT /* xid=4529456 */&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& |
18| mysql-bin.000010 |
| Query&&&&& |&&&&&&&& 1 |&&&
| BEGIN&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& |
19| mysql-bin.000010 |
| Query&&&&& |&&&&&&&& 1 |&&&
| use `ssldb`; insert slave_no_skip1& values (199,'y16') |
20| mysql-bin.000010 |
| Xid&&&&&&& |&&&&&&&& 1 |&&&
| COMMIT /* xid=4529457 */&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& |
21| mysql-bin.000010 |
| Query&&&&& |&&&&&&&& 1 |&&&
| BEGIN&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& |
22| mysql-bin.000010 |
| Query&&&&& |&&&&&&&& 1 |&&&
| use `ssldb`; insert slave_no_skip1& values (190,'y17') |
| mysql-bin.000010 |
| Xid&&&&&&& |&&&&&&&& 1 |&&&
| COMMIT /* xid=4529458 */&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& |
+------------------+----------+------------+-----------+-------------+--------------------------------------------------------+
24 rows in set (0.00 sec)&&&&&&&&
通过错误可知,他是use `ssldb`; insert slave_no_skip1& values (193,'y10') 这条语句导致错误了
如果我们想跳到最后一条语句&use `ssldb`; insert slave_no_skip1& values (190,'y17')&的话 ,我们必须简单计算下中间有多少个event
很明显,是21,那么我们可以执行SET GLOBAL sql_slave_skip_counter =21(这里你SET GLOBAL sql_slave_skip_counter =19或者20都可以)
在slave 在次执行show slave status查看
Last_Errno: 1062
Last_Error: Error 'Duplicate entry '190' for key 'PRIMARY'' on query. Default database: 'ssldb'. Query: 'insert slave_no_skip1& values (190,'y17')'
Skip_Counter: 0
可见 他已经如我所愿,跳到use `ssldb`; insert slave_no_skip1& values (190,'y17')这里了。
以下是我遇到的情况,同事在试命令.搞的同步出错.
&&&&&&&&& Slave_SQL_Running: No
&&&&&&&&&&& Replicate_Do_DB:
&&&&&&& Replicate_Ignore_DB:
&&&&&&&& Replicate_Do_Table:
&&&& Replicate_Ignore_Table:
&&& Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
&&&&&&&&&&&&&&&& Last_Errno: 1103
&&&&&&&&&&&&&&&& Last_Error: Error 'Incorrect table name 'aaaaaa.t_period'' on query. Default database: 'aaaaaa'. Query: 'CREATE TABLE if not exists `aaaaaa.t_period` (& `Fid` bigint NOT NULL AUTO_INCREMENT,& `Ftype` int(3) NOT NULL DEFAULT '0',& `Fuid` int(11) NOT NULL DEFAULT '0',& `Fquest_id` int(11) NOT NULL DEFAULT '0',& `Fstep` int(3) NOT NULL DEFAULT '0',& `Ffinish_time` datetime NOT NULL DEFAULT ' 00:00:00',& PRIMARY KEY (`Fid`),& UNIQUE KEY (`Ftype`, `Fuid`, `Fquest_id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8'
&&&&&&&&&&&&&& Skip_Counter: 0
&&&&&&& Exec_Master_Log_Pos:
执行到这句出错了.Exec_Master_Log_Pos:
在master上查询 mysql -uroot -e &SHOW BINLOG EVENTS in& 'mysql-bin.; from
limit 100;&就这一条命令字节跳过即可.
如果错误events比较多,可以按上面的情况处理.
还可以在my.cnf中设置如下选项自动跳过这种错误.
slave-skip-errors=1062
(window.slotbydup=window.slotbydup || []).push({
id: '2467140',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467141',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467142',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467143',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467148',
container: s,
size: '1000,90',
display: 'inlay-fix'君,已阅读到文档的结尾了呢~~
Counter V1.0概要设计说明书
扫扫二维码,随身浏览文档
手机或平板扫扫即可继续访问
Counter V1.0概要设计说明书
举报该文档为侵权文档。
举报该文档含有违规或不良信息。
反馈该文档无法正常浏览。
举报该文档为重复文档。
推荐理由:
将文档分享至:
分享完整地址
文档地址:
粘贴到BBS或博客
flash地址:
支持嵌入FLASH地址的网站使用
html代码:
&embed src='/DocinViewer-4.swf' width='100%' height='600' type=application/x-shockwave-flash ALLOWFULLSCREEN='true' ALLOWSCRIPTACCESS='always'&&/embed&
450px*300px480px*400px650px*490px
支持嵌入HTML代码的网站使用
您的内容已经提交成功
您所提交的内容需要审核后才能发布,请您等待!
3秒自动关闭窗口

我要回帖

更多关于 counter strike 1.6 的文章

 

随机推荐