Sergey,
two questions below,
On Do, 2008-05-01 at 23:32 +0400, Sergey Petrunia wrote:
> Below is the list of changes that have just been committed into a local
> 6.0 repository of sergefp. When sergefp does a push these changes
> will be propagated to the main repository and, within 24 hours after the
> push, to the public repository.
> For information on how to access the public repository
> see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
>
> ChangeSet@stripped, 2008-05-01 23:32:15+04:00, sergefp@stripped +9 -0
> ORDER BY ... LIMIT support for Falcon:
> - add FalconOrderByLimitHandling code which arranges for Falcon to do
> ordered index/range scans when SQL layer has LIMIT and ordering.
>
[cut]
> @@ -2737,6 +2739,31 @@ void StorageInterface::decodeRecord(ucha
> int StorageInterface::extra(ha_extra_function operation)
> {
> DBUG_ENTER("StorageInterface::extra");
> + if (operation == HA_EXTRA_ORDERBY_LIMIT)
> + {
> + /*
> + SQL Layer informs us that it is considering an ORDER BY .. LIMIT
> + query. It's time we could
> + 1. start returning HA_READ_ORDER flag from index_flags() calls,
> + which will make the SQL layer consider using indexes to
> + satisfy ORDER BY ... LIMIT.
> + 2. If doing #1, every index/range scan must return records in
> + index order.
> + */
> + fprintf(stderr, "ha_falcon->extra(HA_EXTRA_ORDERBY_LIMIT)\n");
Do we really need a fprintf() here?
> + ordered_index_reads= TRUE;
> + }
> + if (operation == HA_EXTRA_NO_ORDERBY_LIMIT)
> + {
> + /*
> + SQL Layer figured it won't be able to use index to resolve the
> + ORDER BY ... LIMIT. This could happen for a number of reasons,
> + but the result is that we don't have to return records in index
> + order.
> + */
> + fprintf(stderr, "ha_falcon->extra(HA_EXTRA_NO_ORDERBY_LIMIT)\n");
Same question about fprintf(), do we need it?
Best regards,
Hakan
--
Hakan Küçükyılmaz, Senior Software Engineer DBTG/MySQL +49 160
98953296
Sun Microsystems GmbH Sonnenallee 1, DE-85551 Kirchheim-Heimstetten
Geschaeftsfuehrer: Thomas Schroeder, Wolfang Engels, Dr. Roland Boemer
Vorsitz d. Aufs.rat.: Martin Haering HRB MUC 161028 49.011, 8.376