Additional information about index sorting in EXPLAIN QUERY PLAN. (CVS 3176)

FossilOrigin-Name: 39dd969527a107b2a6bb94dfc35d93850917faa8
diff --git a/src/where.c b/src/where.c
index d1ff00f..1c156c2 100644
--- a/src/where.c
+++ b/src/where.c
@@ -16,7 +16,7 @@
 ** so is applicable.  Because this module is responsible for selecting
 ** indices, you might also think of this module as the "query optimizer".
 **
-** $Id: where.c,v 1.206 2006/03/28 23:55:58 drh Exp $
+** $Id: where.c,v 1.207 2006/04/21 09:38:37 drh Exp $
 */
 #include "sqliteInt.h"
 
@@ -1593,6 +1593,9 @@
       }else if( pLevel->flags & (WHERE_ROWID_EQ|WHERE_ROWID_RANGE) ){
         zMsg = sqlite3MPrintf("%z USING PRIMARY KEY", zMsg);
       }
+      if( pLevel->flags & WHERE_ORDERBY ){
+        zMsg = sqlite3MPrintf("%z ORDER BY", zMsg);
+      }
       sqlite3VdbeOp3(v, OP_Explain, i, pLevel->iFrom, zMsg, P3_DYNAMIC);
     }
 #endif /* SQLITE_OMIT_EXPLAIN */