nazolabo

なぞさんのブログ

MySQLのTritonn適用済みtarballが--with-debugだとビルドできない件

更新しました→http://d.hatena.ne.jp/nazone/20071004/p1
http://qwik.jp/tritonn/
mysql-5.0.45-tritonn-1.0.5で確認。
DBUG_ENTERとDBUG_RETURNの対応がとれてないっぽい。以下patch(ビルドは通ることは確認したけどこれで正しいという保証はない)
あとパッチ作ったの初めてなんでなんかやりかた間違ってたら教えてください。

diff -cr mysql-5.0.45-tritonn-1.0.5/myisam/ft_update.c mysql-5.0.45-tritonn-1.0.5-2/myisam/ft_update.c
*** mysql-5.0.45-tritonn-1.0.5/myisam/ft_update.c	2007-09-11 01:46:58.000000000 +0900
--- mysql-5.0.45-tritonn-1.0.5-2/myisam/ft_update.c	2007-09-24 01:01:26.000000000 +0900
***************
*** 506,516 ****
  /*
    this function is called by myisamchk only.
  */
! void ft_sen_index_truncate(MI_INFO *info)
  {
    char buf[FN_REFLEN];
    MYISAM_SHARE *share= info->s;
    uint i, keys= (uint) share->state.header.keys;
    for (i=0 ; i < keys ; i++)
    {
      if (share->keyinfo[i].flag & HA_FULLTEXT)
--- 506,517 ----
  /*
    this function is called by myisamchk only.
  */
! int ft_sen_index_truncate(MI_INFO *info)
  {
    char buf[FN_REFLEN];
    MYISAM_SHARE *share= info->s;
    uint i, keys= (uint) share->state.header.keys;
+   DBUG_ENTER("ft_sen_index_truncate");
    for (i=0 ; i < keys ; i++)
    {
      if (share->keyinfo[i].flag & HA_FULLTEXT)
***************
*** 538,542 ****
--- 539,544 ----
        }
      }
    }
+   DBUG_RETURN(-1);
  }
  #endif /* ENABLE_SENNA */
diff -cr mysql-5.0.45-tritonn-1.0.5/myisam/fulltext.h mysql-5.0.45-tritonn-1.0.5-2/myisam/fulltext.h
*** mysql-5.0.45-tritonn-1.0.5/myisam/fulltext.h	2007-09-11 01:46:58.000000000 +0900
--- mysql-5.0.45-tritonn-1.0.5-2/myisam/fulltext.h	2007-09-24 00:59:54.000000000 +0900
***************
*** 37,41 ****
  
  #ifdef ENABLE_SENNA 
  int ft_sen_index_add(MI_INFO *info, uint keynr, const byte *record, my_off_t pos);
! void ft_sen_index_truncate(MI_INFO *info);
  #endif
--- 37,41 ----
  
  #ifdef ENABLE_SENNA 
  int ft_sen_index_add(MI_INFO *info, uint keynr, const byte *record, my_off_t pos);
! int ft_sen_index_truncate(MI_INFO *info);
  #endif
diff -cr mysql-5.0.45-tritonn-1.0.5/sql/sql_show.cc mysql-5.0.45-tritonn-1.0.5-2/sql/sql_show.cc
*** mysql-5.0.45-tritonn-1.0.5/sql/sql_show.cc	2007-09-11 01:47:02.000000000 +0900
--- mysql-5.0.45-tritonn-1.0.5-2/sql/sql_show.cc	2007-09-24 01:03:07.000000000 +0900
***************
*** 4452,4464 ****
    char *file_name;
    Protocol* protocol = thd->protocol;
    char *db = lex->select_lex.db ? lex->select_lex.db : thd->db;
    if (!db) {
      my_error(ER_NO_DB_ERROR, MYF(0));
      DBUG_RETURN(TRUE);
    }
  
    const char *wild = lex->wild ? lex->wild->ptr() : "%";
-   DBUG_ENTER("senna_show_status");
    
    (void) my_snprintf(path, FN_LEN, "%s/%s", mysql_data_home, db);
    (void) unpack_dirname(path, path);
--- 4452,4466 ----
    char *file_name;
    Protocol* protocol = thd->protocol;
    char *db = lex->select_lex.db ? lex->select_lex.db : thd->db;
+ 
+   DBUG_ENTER("senna_show_status");
+  
    if (!db) {
      my_error(ER_NO_DB_ERROR, MYF(0));
      DBUG_RETURN(TRUE);
    }
  
    const char *wild = lex->wild ? lex->wild->ptr() : "%";
    
    (void) my_snprintf(path, FN_LEN, "%s/%s", mysql_data_home, db);
    (void) unpack_dirname(path, path);