MySQL 从接收连接到执行连接命令的一个源码流程
函数从上到下的调用顺序
mysqld_main
handle_connections_methods
handle_connections_sockets_thread
handle_connections_sockets
create_new_thread
create_thread_to_handle_connection
handle_one_connection
do_handle_one_connection
login_connection
prepare_new_connection_state
execute_init_command
dispatch_command
执行命令
switch (command)
{
case COM_INIT_DB:
…
case COM_STMT_EXECUTE:
{
mysqld_stmt_execute(thd, packet, packet_length);
break;
}
…
}
execute_loop
execute
mysql_execute_command
switch (lex->sql_command) {此处就是各种查询命令的执行,该部分代码是非常非常的长了MySQL内存池结构源码 my_alloc.hMySQL 服务器监听客户端连接源码相关资讯 MySQL教程
- 30分钟带你快速入门MySQL教程 (02月03日)
- MySQL教程:关于I/O内存方面的一些 (01月24日)
- CentOS上开启MySQL远程访问权限 (01/29/2013 10:58:40)
| - MySQL教程:关于checkpoint机制 (01月24日)
- MySQL::Sandbox (04/14/2013 08:03:38)
- 生产环境MySQL 5.5.x单机多实例配 (11/02/2012 21:02:36)
|
本文评论 查看全部评论 (0)