-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# 概述 | ||
|
||
在如今开源数据库的时代,越来越多的人开始研究数据库的源码,并给社区贡献代码,MySQL 官方每次发布新版本都要感谢一些在社区上贡献代码的程序员。 | ||
现在新的数据库时代也给 DBA 提出了更高的要求,学会调试源码,通过源码定位问题,这是 DBA 进阶的方向。MySQL 的源码有几百上千万行,想全部搞懂几乎是不可能的,研究源码一般推荐从某个功能点入手。 | ||
而学会调试源码,不管对研究源码或通过源码定位问题,都是必备的技能。 | ||
|
||
一般在实际应用中,`MySQL` 都是运行在 `Linux` 平台下,在 `Linux` 平台下一般是通过 `GDB(GNU symbolic debugger)`工具进行调试,`C/C++` 项目的开发和调试包括故障排查都是利用 `GDB` 完成的。 | ||
此外,VSCODE 这种 IDE 工具可以在本地的 Windows 操作系统下,通过 ssh 远程调试 Linux 平台下的 MySQL | ||
如果要在 Windows 上调试 Windows Vscode 插件 | ||
|
||
- C/C++ | ||
- C/C++ Clang Command Adapter | ||
- CodeLLDB | ||
- CMake Tools | ||
|
||
- <span style="color:blue">**重要的事情提前说**:mysql8.x 是天坑,编译时文件解压的空间强烈建议>40G!!!!30G 真得很勉强,成功全靠运气!编译等了 one hour,系统告诉你硬盘空间不足:)<span style="color:blue"> | ||
- **重要的事情提前说**:请准备好足够的时间,我 8 核 16G 的服务器,编译了很长时间,大概是三个多小时 | ||
- **重要的事情提前说**:编译异常后,需要删除对应的 cmake cache 后再次进行编译,否则每次都会读取缓存进行相同的报错。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters