码迷,mamicode.com
首页 > 其他好文 > 详细

create table

时间:2015-12-24 16:23:56      阅读:193      评论:0      收藏:0      [点我收藏+]

标签:

http://guduwhuzhe.iteye.com/blog/1887619

create table的调用路径如下(5.1.58):
do_command(sql_parse.cc)
->dispatch_command(sql_parse.cc)
   ->mysql_parse(sql_parse.cc)
      ->mysql_execute_command(sql_parse.cc)
         ->mysql_create_table(sql_table.cc)
            ->mysql_create_table_nolock(sql_table.cc),这里会持有LOCK_open
               ->rea_create_table(unireg.cc)
                  ->mysql_create_frm(unireg.cc)
                  ->ha_create_table(handler.cc)
                    ->handler::ha_create(handler.cc)
                       ->ha_innodb::create(handler/ha_innodb.cc)
                        ->create_table_def(handler/ha_innodb.cc),
                          ->row_create_table_for_mysql(row/row0mysql.c)
                        ->create_clustered_index_when_no_primary(handler/ha_innodb.cc)..when no primary key is defined..
                          ->row_create_index_for_mysql(row/row0mysql.c)
                        ->create_index(hanler/ha_innodb.cc)
                        ->row_table_add_foreign_constraints(row/row0mysql.c)

 

create table

标签:

原文地址:http://www.cnblogs.com/taek/p/5073395.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!