当前位置:网站首页>Advanced MySQL: how to learn MySQL source code

Advanced MySQL: how to learn MySQL source code

2022-06-13 07:37:00 Fish is not fish

Written in the beginning

Recently, I have seen that many people do not know how to deal with the problem , My previous approach was nothing more than to query blog information , But sometimes there is a big difference , So there is no standard , So sometimes I feel helpless , So many small partners may want to check the source code , But I don't know how to view the source code , Here I would like to share my own problems in my work , How to view the source code . Not a big guy , Just share your experience .

The tools needed

1. Database source code package :
Official download address : https://dev.mysql.com/downloads/mysql/
Or mine. CSDN Uploading resources can be downloaded for free .

2. View tools
I used it myself pycharm Community Edition ( Because the professional edition charges , Support genuine ):
Download address :https://www.jetbrains.com/pycharm/download

3. Code base
At least there must be some C C++ Code base , Otherwise, you may not understand

How to view the source code

1. First, unzip the source package into a folder
 Insert picture description here
2. open pycharm CE Tools , choice open Here's the picture :
 Insert picture description here
3. After importing successfully , Whole MySQL The source code will be loaded , Here's the picture :
 Insert picture description here

4. The key is coming. ******* Focus on
Then we will report the problem as an error , such as error code, Or the parameters you want to view , such as innodb_io_capacity This parameter , Let's search as follows :
Select... Under the root directory Find in Files:
 Insert picture description here
To search
 Insert picture description here
Here you can use the direction keys on the keyboard to switch the lock search results above , Remember to ignore .test file , This file is tested and not really implemented , After finding the determined, press enter to locate the position containing the information in the function , Then look up and down , You can see it in a few books .

summary

This is just my own way of learning , May be different from others , But I can really solve many problems in my work , This is what I learned from a young brother , He went to check the source code if he was unsure about the problem , It's a quick fix , It's really convenient . I hope I can help you .

原网站

版权声明
本文为[Fish is not fish]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202270547441202.html