[Groonga-mysql-commit] mroonga/mroonga [fix-for-visual-studio] groonga_fast_order_limit is not incremented (#845) Thanks to Mitsuhiro Shibuya

Back to archive index

Kentoku SHIBA null+****@clear*****
Thu Oct 4 11:18:51 JST 2012


Kentoku SHIBA	2011-04-02 16:03:31 +0900 (Sat, 02 Apr 2011)

  New Revision: 1431b4c45c1a7114725d249591636307dffc5202
  https://github.com/mroonga/mroonga/commit/1431b4c45c1a7114725d249591636307dffc5202

  Log:
    groonga_fast_order_limit is not incremented (#845) Thanks to Mitsuhiro Shibuya

  Modified files:
    doc/ja/source/news.rst
    ha_mroonga.cc
    test/sql/r/order_limit_performance.result
    test/sql/t/order_limit_performance.test

  Modified: doc/ja/source/news.rst (+13 -0)
===================================================================
--- doc/ja/source/news.rst    2011-03-30 13:39:42 +0900 (1cc8f98)
+++ doc/ja/source/news.rst    2011-04-02 16:03:31 +0900 (563b8b9)
@@ -5,6 +5,19 @@
 最新ニュース
 ============
 
+0.6 リリース - 
+-------------------------
+
+修正
+++++
+
+* ORDER BY LIMITの高速化が機能しないケースがある問題の修正。#845
+
+感謝
+++++
+
+* Mitsuhiro Shibuyaさん
+
 0.5 リリース - 2011/03/29
 -------------------------
 

  Modified: ha_mroonga.cc (+1 -1)
===================================================================
--- ha_mroonga.cc    2011-03-30 13:39:42 +0900 (2be2a77)
+++ ha_mroonga.cc    2011-04-02 16:03:31 +0900 (54c819a)
@@ -2392,7 +2392,7 @@ void ha_mroonga::check_fast_order_limit()
 
   if (
     thd_sql_command(ha_thd()) == SQLCOM_SELECT &&
-    !select_lex->n_sum_items &&
+    !select_lex->with_sum_func &&
     !select_lex->group_list.elements &&
     !select_lex->having &&
     select_lex->table_list.elements == 1 &&

  Modified: test/sql/r/order_limit_performance.result (+12 -0)
===================================================================
--- test/sql/r/order_limit_performance.result    2011-03-30 13:39:42 +0900 (5c3a14c)
+++ test/sql/r/order_limit_performance.result    2011-04-02 16:03:31 +0900 (b1ccebb)
@@ -120,4 +120,16 @@ aa ii uu ee oo	1
 show status like 'groonga_fast_order_limit';
 Variable_name	Value
 groonga_fast_order_limit	8
+select count(*) from t1 where match(c3) against("ii");
+count(*)
+3
+show status like 'groonga_fast_order_limit';
+Variable_name	Value
+groonga_fast_order_limit	8
+select * from t1 where match(c3) against("ii") order by c1 desc limit 1;
+c1	c2	c3	_id	_score
+5	50	aa ii uu ii oo	5	2
+show status like 'groonga_fast_order_limit';
+Variable_name	Value
+groonga_fast_order_limit	9
 drop table t1;

  Modified: test/sql/t/order_limit_performance.test (+4 -0)
===================================================================
--- test/sql/t/order_limit_performance.test    2011-03-30 13:39:42 +0900 (d65a01b)
+++ test/sql/t/order_limit_performance.test    2011-04-02 16:03:31 +0900 (88afa9d)
@@ -59,6 +59,10 @@ select c3, _id from t1 where match(c3) against("ii") order by _id;
 show status like 'groonga_fast_order_limit';
 select c3, _id from t1 where match(c3) against("ii") order by _id limit 1;
 show status like 'groonga_fast_order_limit';
+select count(*) from t1 where match(c3) against("ii");
+show status like 'groonga_fast_order_limit';
+select * from t1 where match(c3) against("ii") order by c1 desc limit 1;
+show status like 'groonga_fast_order_limit';
 drop table t1;
 
 --source suite/groonga/include/groonga_deinit.inc
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-mysql-commit mailing list
Back to archive index