惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Vercel News
Vercel News
Recorded Future
Recorded Future
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The GitHub Blog
The GitHub Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Google DeepMind News
Google DeepMind News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Microsoft Azure Blog
Microsoft Azure Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
M
MIT News - Artificial intelligence
云风的 BLOG
云风的 BLOG
Y
Y Combinator Blog
N
News | PayPal Newsroom
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Help Net Security
Help Net Security
博客园 - Franky
SecWiki News
SecWiki News
Recent Announcements
Recent Announcements
T
Troy Hunt's Blog
The Register - Security
The Register - Security
The Last Watchdog
The Last Watchdog
Webroot Blog
Webroot Blog
S
Security Affairs
博客园 - 司徒正美
S
Schneier on Security
I
InfoQ
博客园_首页
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
Threat Research - Cisco Blogs
Forbes - Security
Forbes - Security
腾讯CDC
N
Netflix TechBlog - Medium
N
News and Events Feed by Topic
Cloudbric
Cloudbric
T
The Exploit Database - CXSecurity.com
P
Proofpoint News Feed
A
About on SuperTechFans
Engineering at Meta
Engineering at Meta
Recent Commits to openclaw:main
Recent Commits to openclaw:main
B
Blog
V
Vulnerabilities – Threatpost
C
Check Point Blog
Google DeepMind News
Google DeepMind News
Google Online Security Blog
Google Online Security Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Hacker News - Newest:
Hacker News - Newest: "LLM"
C
Cisco Blogs
Schneier on Security
Schneier on Security
O
OpenAI News
K
Kaspersky official blog

蓝冰小站

从 CallBack 到 Promise,React 框架异步开发学习心得 2022年保研经历--快乐与痛苦并存的夏 | 蓝冰小站 DNS CCA记录与SSL证书申请 | 蓝冰小站 境内外分离并分离图片源的 Hexo 博客配置 | 蓝冰小站 【论文阅读】Computational Design of High-level Interlocking Puzzles 论文翻译——MeshCNN | 蓝冰小站 英文学术论文写作指南 | 蓝冰小站 Neural Marching Cubes——基于 ResNet 的 Marching Cubes 算法 【添翼工程】雅思课 | 蓝冰小站 【雅思哥】雅思口语会员课程笔记 | 蓝冰小站 【雅思哥】雅思 7 分备考 | 蓝冰小站 【雅思哥】雅思 FAQ | 蓝冰小站 C++ 中字符串与数字的拼接 | 蓝冰小站 退群杯——从闲聊到现实 | 蓝冰小站 Ubuntu 常见安装使用问题速查 | 蓝冰小站 基于 GitHub Actions + 宝塔 + DCDN 的 Hexo 博客配置 孤独 | 蓝冰小站 聊聊证书 | 蓝冰小站 CDN 是什么可以吃吗 | 蓝冰小站
【数据库实验】实验8解析 | 蓝冰小站
论文 · 2022-06-20 · via 蓝冰小站

在不开启自动提交的时候,用户对数据库的修改仅对自己可见,直到 commit 提交结果,或 rollback 撤回结果。commit 的结果无法 rollback,反之同理。

有一个例外,一些对表结构的操作(创建修改表结构,以及对索引的操作),会使得在操作之前自动 commit 提交事务,执行完再次 commit,使得这些操作是不可被撤销的。

网上对于这个实验只有答案,没有解释,来解释一下答案的来源。

序号 窗口 题号 执行语句 结果/解释
1 备用窗口 update test8_00 set age=88 当前用户可见 88,其他人不可见
2 备用窗口 结果 1 select * from test8_00 88
3 备用窗口 commit 提交成功,其他成员可见 88
4 备用窗口 rollback 该语句紧跟在 commit 后面无效
5 备用窗口 update test8_00 set age=age+1 当前用户可见 89,其他人为 88
6 备用窗口 rollback 回滚成功,所有成员可见 88
7 备用窗口 commit 该语句紧跟在 rollback 后面无效
8 备用窗口 update test8_00 set age=age+2 当前用户可见 90,其他人为 88
9 备用窗口 commit 提交成功,其他成员可见 90
10 备用窗口 结果 2 select * from test8_00 90
11 备用窗口 rollback 回滚查询语句对数据存储没有影响
12 主窗口 结果 3 select * from userb.test8_00 90
13 备用窗口 update test8_00 set age=age-2 当前用户可见 88,其他人为 90
14 备用窗口 update test8_00 set age=age-2 当前用户可见 86,其他人为 90
15 备用窗口 结果 4 select * from test8_00 86
16 主窗口 结果 5 select * from userb.test8_00 90
17 主窗口 commit 提交查询语句对数据存储没有影响
18 主窗口 结果 6 select * from userb.test8_00 90
19 主窗口 rollback 回滚查询语句对数据存储没有影响
20 主窗口 update userb.test8_00 set age=age-10 卡死,等待备用窗口提交或回滚后执行
21 备用窗口 结果 7 select * from test8_00 86
22 备用窗口 create table test8_01 as select * from test8_00 建表前提交之前事务,解冻主窗口,主 76 其他 86
23 备用窗口 rollback 创建表无法回滚
24 备用窗口 结果 8 select * from userb.test8_00 86
25 主窗口 结果 9 select * from userb.test8_00 76
26 主窗口 rollback 所有用户回归 86
27 主窗口 结果 10 select * from userb.test8_00 86