MYSQLのソースコードを眺めてみました。
システムインフラを中心に仕事してきたので、CやC++は大学、卒業後のCとLIPSでの開発以来なので、
殆ど初心者ですが少しずつ眺める程度に勉強しておこうと思います。
ソースをダウンロードしてコアファイルのある、
以下のフォルダーを確認してみました。
[root@HOME001 sql]# pwd /home/mysql/mysql-5.5.29/sql [root@HOME001 sql]#
mysqld.ccだけでも約8000行あり、他にもソースは多々あります。
必要に応じて基本動作のイメージを掴む程度で。
[root@HOME001 sql]# cat mysqld.cc | egrep -n -A5 -i "/\*" | egrep -A5 -i "PAGE" 157:#endif /* HAVE_SOLARIS_LARGE_PAGES */ 158- 159-#ifdef _AIX41 160-int initgroups(const char *,unsigned int); 161-#endif 162- -- 3232-#ifdef HAVE_LARGE_PAGES 3233: /* Initialize large page size */ 3234- if (opt_large_pages && (opt_large_page_size= my_get_large_page_size())) 3235- { 3236- DBUG_PRINT("info", ("Large page set, large_page_size = %d", 3237- opt_large_page_size)); 3238- my_use_large_pages= 1; -- 3244: /* 3245- Either not configured to use large pages or Linux haven't 3246- been compiled with large page support 3247- */ 3248- } 3249:#endif /* HAVE_LARGE_PAGES */ 3250-#ifdef HAVE_SOLARIS_LARGE_PAGES 3251:#define LARGE_PAGESIZE (4*1024*1024) /* 4MB */ 3252:#define SUPER_LARGE_PAGESIZE (256*1024*1024) /* 256MB */ 3253- if (opt_large_pages) 3254- { 3255: /* 3256- tell the kernel that we want to use 4/256MB page for heap storage 3257- and also for the stack. We use 4 MByte as default and if the 3258- super-large-page is set we increase it to 256 MByte. 256 MByte 3259- is for server installations with GBytes of RAM memory where 3260- the MySQL Server will have page caches and other memory regions -- 3299:#endif /* HAVE_SOLARIS_LARGE_PAGES */ 3300- 3301: /* connections and databases needs lots of files */ 3302- { 3303- uint files, wanted_files, max_open_files; 3304- -- 6595- {"Tc_log_max_pages_used", (char*) &tc_log_max_pages_used, SHOW_LONG}, 6596- {"Tc_log_page_size", (char*) &tc_log_page_size, SHOW_LONG}, -- 6625:/** Compares two options' names, treats - and _ the same */ 6626-static int option_cmp(my_option *a, my_option *b) 6627-{ 6628- const char *sa= a->name; -- 7869- { &key_PAGE_cond, "PAGE::cond", 0}, 7870- { &key_COND_active, "TC_LOG_MMAP::COND_active", 0}, 7871- { &key_COND_pool, "TC_LOG_MMAP::COND_pool", 0}, 7872:#endif /* HAVE_MMAP */ 7873- { &key_BINLOG_COND_prep_xids, "MYSQL_BIN_LOG::COND_prep_xids", 0}, 7874- { &key_BINLOG_update_cond, "MYSQL_BIN_LOG::update_cond", 0}, [root@HOME001 sql]#