问题处理借鉴至网上的内容
重新做主从,完全同步
在主库新建一张表后,在slave 段发现数据没有同步过去。
mysql version:5.6.10
os :rhel 5.6
解决步骤如下:
1.主库进行锁表,防止数据写入
mysql> flush tables with read lock;
解锁命令:
Mysql> unlock tables;
2.进行数...
分类:
数据库 时间:
2015-03-17 12:31:28
阅读次数:
178
ReentrantLock是一个较为常用的锁对象。在上次分析的uil开源项目中也多次被用到,下面谈谈其概念和基本使用。概念一个可重入的互斥锁定 Lock,它具有与使用 synchronized 相同的一些基本行为和语义,但功能更强大。名词解释:互斥表示同一时刻,多个线程中,只能有一个线程能获得该锁。...
分类:
数据库 时间:
2015-03-17 12:04:37
阅读次数:
194
create proc sp_lockinfo @kill_lock_spid bit=1, --是否杀掉阻塞的进程,1 杀掉, 0 仅显示 @show_spid_if_nolock bit=1, --如果没有阻塞的进程,是否显示正常进程信息,1 显示,0 不显示 @dbname s...
分类:
数据库 时间:
2015-03-17 12:02:40
阅读次数:
211
1.memcmp可否用来比较结构体?strcmp和memcpy的区别?
2.软中断和硬中断的区别?
3.进程间通信的几种方式?
4.kmalloc和vmalloc差别?
5.应用层的mmap和内核态的vmalloc对内存访问的差别?
6.用户态是否可以直接访问内核态内存?
7.PCIe中MSI中断如何触发?
8.怎么知道一个文件的大小?
9.spin_lock在单核和多核模式下的区...
分类:
系统相关 时间:
2015-03-17 00:53:02
阅读次数:
190
A:一个master 线程(innodb 几乎在这个线程上实现有所有功能)B:一个lock 监控线程C:一个错误监控线程D:四个IO线程(insert buffer thread\log thread\write thread\read thread) 在windows 平台下可以通过 innod....
分类:
数据库 时间:
2015-03-17 00:38:03
阅读次数:
367
At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door...
分类:
其他好文 时间:
2015-03-16 16:06:29
阅读次数:
153
今天更新时候出现了点小问题,一开始更新到一半,我嫌速度慢,就取消掉了。更新了sources.list之后再执行sudo apt-get update 提示我出错了E: Could not get lock /var/lib/apt/lists/lock - open (11 Resource tem...
分类:
其他好文 时间:
2015-03-15 21:11:39
阅读次数:
227
上来先看MSDN关于lock的叙述:lock 关键字将语句块标记为临界区,方法是获取给定对象的互斥锁,执行语句,然后释放该锁。 下面的示例包含一个 lock 语句。lock 关键字可确保当一个线程位于代码的临界区时,另一个线程不会进入该临界区。 如果其他线程尝试进入锁定的代码,则它将一直等待(即被阻...
分类:
其他好文 时间:
2015-03-15 09:24:20
阅读次数:
211
linaro 发布的内核版本中,提供了一套wakelock接口与google的wakelock接口实现了无缝对接,该套接口共有6个;
struct wake_lock{
struct wakeup_source ws;
};
static inline void wake_lock_init(struct wake_lock *lock,int type,const char* name...
分类:
其他好文 时间:
2015-03-15 00:53:17
阅读次数:
402
没有什么特别的,就是按照题意进行模拟,代码有点长。。。
#include
#include
#include
#include
#include
using namespace std;
const int maxn = 222;
int n,t[10],q;
int Value[maxn];
/*
1 a = 1
2 print
3 lock
4 ...
分类:
其他好文 时间:
2015-03-14 20:05:30
阅读次数:
153