[Groonga-mysql-commit] mroonga/mroonga at 7a2fe71 [master] mysql57 test: don't care order

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Apr 20 23:47:12 JST 2016


Kouhei Sutou	2016-04-20 23:47:12 +0900 (Wed, 20 Apr 2016)

  New Revision: 7a2fe71e908b0d9fd7aaf3d771f7f276fa005943
  https://github.com/mroonga/mroonga/commit/7a2fe71e908b0d9fd7aaf3d771f7f276fa005943

  Message:
    mysql57 test: don't care order

  Modified files:
    mysql-test/mroonga/wrapper/fulltext/matched_and_not_matched/r/have_where_no_order.result
    mysql-test/mroonga/wrapper/fulltext/matched_and_not_matched/t/have_where_no_order.test

  Modified: mysql-test/mroonga/wrapper/fulltext/matched_and_not_matched/r/have_where_no_order.result (+6 -3)
===================================================================
--- mysql-test/mroonga/wrapper/fulltext/matched_and_not_matched/r/have_where_no_order.result    2016-04-20 23:36:15 +0900 (81ce556)
+++ mysql-test/mroonga/wrapper/fulltext/matched_and_not_matched/r/have_where_no_order.result    2016-04-20 23:47:12 +0900 (39ab80e)
@@ -10,15 +10,18 @@ FULLTEXT KEY (not_matched)
 INSERT INTO texts VALUES (1, 'Hello1', 'World1');
 INSERT INTO texts VALUES (2, 'Hello2', 'World2');
 INSERT INTO texts VALUES (3, 'Hello3', 'World3');
-SELECT id,
+SELECT *
+FROM (SELECT id,
 matched,
 not_matched,
 MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE),
 MATCH(not_matched) AGAINST('+Hello' IN BOOLEAN MODE)
 FROM texts
-WHERE MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE);
+WHERE MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE))
+AS searched_texts
+ORDER BY id;
 id	matched	not_matched	MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE)	MATCH(not_matched) AGAINST('+Hello' IN BOOLEAN MODE)
 1	Hello1	World1	1	0
-3	Hello3	World3	1	0
 2	Hello2	World2	1	0
+3	Hello3	World3	1	0
 DROP TABLE texts;

  Modified: mysql-test/mroonga/wrapper/fulltext/matched_and_not_matched/t/have_where_no_order.test (+10 -7)
===================================================================
--- mysql-test/mroonga/wrapper/fulltext/matched_and_not_matched/t/have_where_no_order.test    2016-04-20 23:36:15 +0900 (e6e748a)
+++ mysql-test/mroonga/wrapper/fulltext/matched_and_not_matched/t/have_where_no_order.test    2016-04-20 23:47:12 +0900 (8c0eba1)
@@ -35,13 +35,16 @@ INSERT INTO texts VALUES (1, 'Hello1', 'World1');
 INSERT INTO texts VALUES (2, 'Hello2', 'World2');
 INSERT INTO texts VALUES (3, 'Hello3', 'World3');
 
-SELECT id,
-       matched,
-       not_matched,
-       MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE),
-       MATCH(not_matched) AGAINST('+Hello' IN BOOLEAN MODE)
-     FROM texts
-    WHERE MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE);
+SELECT *
+  FROM (SELECT id,
+               matched,
+               not_matched,
+               MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE),
+               MATCH(not_matched) AGAINST('+Hello' IN BOOLEAN MODE)
+             FROM texts
+            WHERE MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE))
+        AS searched_texts
+ ORDER BY id;
 
 DROP TABLE texts;
 
-------------- next part --------------
HTML����������������������������...
Download 



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