MVCC
基本概念当前读(直接读取数据页最新版本):读取的是记录的最新版本,读取时还要保证其他并发事务不能修改当前记录,会对读取的记录进行加锁。对于一些日常操作,如:select...lock in share mode、select ... for update、update、isnert、delete都是一种当前读快照读:…
kmp匹配 代码:
#include<bits/stdc++.h>
using namespace std;
const int N=1e5+6;
const int M=1e6+6;
char s[M];//长串
char p[N];//模式串
int ne[N];//next指针 ,后退的指针
int main(){int n,m;cin>>n>>p+1>>m>>s+1;//计算ne //ne[1]…