[Tritonn-commit 78] [svn] [88] copy sql/sql_select.cc to libmysqld/sql_select. cc to update for bugfix.

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2008年 1月 23日 (水) 17:38:36 JST


Revision: 88
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=tritonn&view=rev&rev=88
Author:   mir
Date:     2008-01-23 17:38:35 +0900 (Wed, 23 Jan 2008)

Log Message:
-----------
copy sql/sql_select.cc to libmysqld/sql_select.cc to update for bugfix.

Modified Paths:
--------------
    tags/tritonn-1.0.9-mysql-5.0.51/libmysqld/sql_select.cc

Modified: tags/tritonn-1.0.9-mysql-5.0.51/libmysqld/sql_select.cc
===================================================================
--- tags/tritonn-1.0.9-mysql-5.0.51/libmysqld/sql_select.cc	2008-01-23 08:32:57 UTC (rev 87)
+++ tags/tritonn-1.0.9-mysql-5.0.51/libmysqld/sql_select.cc	2008-01-23 08:38:35 UTC (rev 88)
@@ -2288,7 +2288,7 @@
     }
   }
 #ifdef ENABLE_SENNA
-  my_thread_var->sen_flags = select_lex->ftfunc_list->elements ? SENNA_MATCH : 0;
+  if (select_lex->ftfunc_list->elements) {my_thread_var->sen_flags |= SENNA_MATCH; }
   if (join->select_distinct) { my_thread_var->sen_flags |= SENNA_DISTINCT; }
 #endif /* ENABLE_SENNA */
   if ((err= join->optimize()))
@@ -2324,6 +2324,9 @@
   }
 
 err:
+#ifdef ENABLE_SENNA
+  my_thread_var->sen_flags &= SENNA_USE_2IND;
+#endif
   if (free_join)
   {
     thd_proc_info(thd, "end");
@@ -10645,7 +10648,8 @@
     join->thd->row_count= 0;
 
 #ifdef ENABLE_SENNA
-    decide_read_or_skip(join, join_tab, needs_record);
+    if (my_thread_var->sen_flags & SENNA_USE_2IND)
+      decide_read_or_skip(join, join_tab, needs_record);
 #endif /* ENABLE_SENNA */
     error= (*join_tab->read_first_record)(join_tab);
     rc= evaluate_join_record(join, join_tab, error, report_error);
@@ -10654,7 +10658,8 @@
   while (rc == NESTED_LOOP_OK)
   {
 #ifdef ENABLE_SENNA
-    decide_read_or_skip(join, join_tab, needs_record);
+    if (my_thread_var->sen_flags & SENNA_USE_2IND)
+      decide_read_or_skip(join, join_tab, needs_record);
 #endif /* ENABLE_SENNA */
     error= info->read_record(info);
     rc= evaluate_join_record(join, join_tab, error, report_error);
@@ -11321,7 +11326,7 @@
        (SENNA_MATCH | SENNA_DO_READ_RECORD | SENNA_IF_READ_RECORD))
       == (SENNA_MATCH | SENNA_DO_READ_RECORD)) {
     //error=tab->table->file->index_first(NULL);
-    statistic_increment(tab->table->in_use->status_var.senna_2ind_count, &LOCK_status);
+    //statistic_increment(tab->table->in_use->status_var.senna_2ind_count, &LOCK_status);
     return 0;
   } else
 #endif /* ENABLE_SENNA */
@@ -11346,7 +11351,7 @@
        (SENNA_MATCH | SENNA_DO_READ_RECORD | SENNA_IF_READ_RECORD))
       == (SENNA_MATCH | SENNA_DO_READ_RECORD)) {
     //error=info->file->index_next(NULL);
-    statistic_increment(info->thd->status_var.senna_2ind_count, &LOCK_status);
+    //statistic_increment(info->thd->status_var.senna_2ind_count, &LOCK_status);
     return 0;
   } else
 #endif /* ENABLE_SENNA */
@@ -11383,7 +11388,7 @@
        (SENNA_MATCH | SENNA_DO_READ_RECORD | SENNA_IF_READ_RECORD))
       == (SENNA_MATCH | SENNA_DO_READ_RECORD)) {
     //error=tab->table->file->index_last(NULL);
-    statistic_increment(tab->table->in_use->status_var.senna_2ind_count, &LOCK_status);
+    //statistic_increment(tab->table->in_use->status_var.senna_2ind_count, &LOCK_status);
     return 0;
   } else
 #endif /* ENABLE_SENNA */
@@ -11404,7 +11409,7 @@
        (SENNA_MATCH | SENNA_DO_READ_RECORD | SENNA_IF_READ_RECORD))
       == (SENNA_MATCH | SENNA_DO_READ_RECORD)) {
     //error=info->file->index_prev(NULL);
-    statistic_increment(info->thd->status_var.senna_2ind_count, &LOCK_status);
+    //statistic_increment(info->thd->status_var.senna_2ind_count, &LOCK_status);
     return 0;
   } else
 #endif /* ENABLE_SENNA */




Tritonn-commit メーリングリストの案内
Back to archive index