Mysql源代码阅读笔记(九) 查询执行
来源:互联网 发布:mac phpmyadmin下载 编辑:程序博客网 时间:2024/05/01 05:32
查询执行
查询执行的入口点:
/**
Parse a query.
@param thd Current thread
@param rawbuf Begining of the query text
@param length Length of the query text
@param[out] found_semicolon For multi queries, position of the character of
the next query in the query text.
*/
void mysql_parse(THD *thd, char *rawbuf, uint length,
Parser_state *parser_state)
在做查询解析之前,先要再查询缓冲里查找,如果找到,则直接利用以前的查询结果。
query_cache_send_result_to_client(thd, rawbuf, length)
但是执行这个函数之前需要,执行一些对lex->safe_to_cache_query 和thd->server_status的清理操作:
lex_start(thd);
mysql_reset_thd_for_next_command(thd);
为什么会这样呢?我们需要具体阅读query_cache_send_result_to_client()的代码。
- Mysql源代码阅读笔记(九) 查询执行
- Mysql源代码阅读笔记(七)查询缓冲
- mysql(九)MySQL如何执行关联查询
- Mysql源代码阅读笔记(一) 代码流程
- Mysql源代码阅读笔记(四) 服务器监听
- Mysql源代码阅读笔记(二) 重要数据结构
- Mysql源代码阅读笔记(三) 重要的宏
- Mysql源代码阅读笔记(六)命令汇总
- Mysql源代码阅读笔记(八) 词法、语法分析器
- Mysql源代码阅读笔记(一) 命令行参数
- struts源代码阅读(struts 的执行)
- 高性能mysql笔记(八)查询执行基础
- mysql阅读查询执行计划的简要说明
- PRML 阅读笔记(九)<3.1-3.2>
- 《HTTP权威指南》阅读笔记(九)
- Mysql源代码阅读笔记(一) 系统变量和系统状态变量
- flask源代码阅读笔记(一)
- Cassandra源代码阅读笔记
- iphone 读写 固定文件格式
- 传智播客河南分校3月.NET,JAVA班火热报名中
- Cache 优化过程中必须考虑的因素之一 Cache 优化过程中必须考虑的因素之一
- Cocoa:NSOperation和NSOperationQueue
- Android permission 访问权限大全
- Mysql源代码阅读笔记(九) 查询执行
- Android 使用Parcelable序列化对象
- Android.os.AsyncTask类
- 第三周任务3-1
- memset(&si, 0, sizeof(STARTUPINFO)); CreateProcess
- oracle在相同数据库将一个用户的数据备份到另一个用户
- linux 命令 3.12
- 安装vmware tools
- 传智播客河南分校3月.NET,JAVA班火热报名中 TEL 18637115379 qq 1303771985