ITPub博客

首页 > 数据库 > MySQL > Mysql源码分析2

Mysql源码分析2

原创 MySQL 作者:dongyu2013 时间:2014-03-26 21:40:48 0 删除 编辑
get_options()出现在init_common_variables中
Get server options from the command line, and perform related server initializations.
struct system_variables global_system_variables;
struct system_variables max_system_variables;
system_variables 解释如下
 How dynamically allocated system variables are handled:
 The global_system_variables and max_system_variables are "authoritative"
 They both should have the same 'version' and 'size'.
 When attempting to access a dynamic variable, if the session version
 is out of date, then the session version is updated and realloced if
 neccessary and bytes copied from global to make up for missing data.
mysqld.cc 处理多线程还是单线程 在get_options中
  if (thread_handling <= SCHEDULER_ONE_THREAD_PER_CONNECTION)
    one_thread_per_connection_scheduler();    ------》调用handle_one_connection
  else    /* thread_handling == SCHEDULER_NO_THREADS) */
    one_thread_scheduler();



来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29012686/viewspace-1130271/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 伙伴算法例子
下一篇: C++虚函数bug
请登录后发表评论 登录
全部评论

注册时间:2013-12-25

  • 博文量
    263
  • 访问量
    209261