Commit graph

16 commits

Author SHA1 Message Date
Vasil Dimov
793dee2d5c Make main.endspace more deterministic
Followup to vasil.dimov@oracle.com-20100817063430-inglmzgdtj95t29d
which didn't fully fix the test because the order of the returned
rows was different in embedded and non-embedded version. So the only
way to fix this is to add an ORDER BY clause.
2010-08-17 14:54:29 +03:00
Vasil Dimov
15fd2b4ffa Adjust endspace.result
This is a followup to vasil.dimov@oracle.com-20100816142329-yimenbuktd416z1a
which improved the sampling algorithm. The endspace test is non-deterministic
because it does not include ORDER BY clause in its queries.
2010-08-17 09:34:30 +03:00
igor@olga.mysql.com
cf39429295 Fixed bug#28404.
This patch adds cost estimation for the queries with ORDER BY / GROUP BY
and LIMIT. 
If there was a ref/range access to the table whose rows were required
to be ordered in the result set the optimizer always employed this access
though a scan by a different index that was compatible with the required 
order could be cheaper to produce the first L rows of the result set.
Now for such queries the optimizer makes a choice between the cheapest
ref/range accesses not compatible with the given order and index scans
compatible with it.
2007-08-02 12:45:56 -07:00
gkodinov/kgeorge@magare.gmz
c03a483c51 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/WL3527-5.1-opt
2007-03-09 17:54:13 +02:00
gkodinov/kgeorge@macbook.gmz
b9c82eaa89 WL#3527: Extend IGNORE INDEX so places where index is ignored
can be specified
Currently MySQL allows one to specify what indexes to ignore during
join optimization. The scope of the current USE/FORCE/IGNORE INDEX 
statement is only the FROM clause, while all other clauses are not 
affected.

However, in certain cases, the optimizer
may incorrectly choose an index for sorting and/or grouping, and
produce an inefficient query plan.

This task provides the means to specify what indexes are
ignored/used for what operation in a more fine-grained manner, thus
making it possible to manually force a better plan. We do this
by extending the current IGNORE/USE/FORCE INDEX syntax to:

IGNORE/USE/FORCE INDEX [FOR {JOIN | ORDER | GROUP BY}]

so that:
- if no FOR is specified, the index hint will apply everywhere.
- if MySQL is started with the compatibility option --old_mode then
  an index hint without a FOR clause works as in 5.0 (i.e, the 
  index will only be ignored for JOINs, but can still be used to
  compute ORDER BY).

See the WL#3527 for further details.
2007-03-05 19:08:41 +02:00
igor@olga.mysql.com
a2d4a042d0 Fixed bug #25971: indexes on text columns were ignored when ref accesses
were evaluated.
According to the new rules for string comparison partial indexes on text
columns can be used in the same cases when partial indexes on varchar
columns can be used.
2007-02-14 22:06:41 -08:00
heikki@hundin.mysql.fi
f4660bb1a1 endspace.result:
Update endspace.result now that InnoDB pads BLOBs properly with spaces in comparisons
2005-03-17 17:44:28 +02:00
heikki@hundin.mysql.fi
4eee23bca0 endspace.result:
Someone has fixed the calculation of length() for a returned InnoDB VARCHAR value: update endspace.result to have the correct value length('teststring') == 10
2005-03-17 17:44:26 +02:00
heikki@hundin.mysql.fi
cb88409e07 data0type.h, row0sel.c:
Fix a crash in a simple search with a key: the dtype->len of a true VARCHAR is the payload maximum len in bytes: it does not include the 2 bytes MySQL uses to store the string length
ha_innodb.cc:
  Fix a crash in true VARCHARs in test-innodb: we passed a wrong pointer to the column conversion in an UPDATE
rowid_order_innodb.result, ps_3innodb.result, innodb.result, endspace.result:
  Edit InnoDB test results to reflect the arrival of true VARCHARs
2005-03-16 14:28:54 +02:00
monty@mysql.com
67ce247965 Add support for up to VARCHAR (size up to 65535)
Renamed HA_VAR_LENGTH to HA_VAR_LENGTH_PART
Renamed in all files FIELD_TYPE_STRING and FIELD_TYPE_VAR_STRING to MYSQL_TYPE_STRING and MYSQL_TYPE_VAR_STRING to make it easy to catch all possible errors
Added support for VARCHAR KEYS to heap
Removed support for ISAM
Now only long VARCHAR columns are changed to TEXT on demand (not CHAR)
Internal temporary files can now use fixed length tables if the used VARCHAR columns are short
2004-12-06 02:00:37 +02:00
monty@mysql.com
ceba1429b7 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
2004-08-26 18:27:33 +03:00
monty@mysql.com
ea687ba5da Portability fixes
Fixed bug in end space handle for WHERE text_column="constant"
2004-08-26 18:26:38 +03:00
bar@mysql.com
87537752e2 "SELECT BINARY x" now means "SELECT CAST(x AS BINARY)". 2004-08-26 16:31:37 +05:00
bar@mysql.com
2496e85b84 Bug#4521: unique key prefix interacts poorly with utf8.
Fix for binary collations for MyISAM and HEAP BTREE.
This patch also changes trailing spaces behaviour for
binary collations. Binary collations now have PAD 
characteristic too.
2004-08-19 15:15:10 +05:00
serg@serg.mylan
9de748d1d3 results fixed after merge 2004-07-20 11:00:10 +02:00
monty@mysql.com
ebc3b3afac BTREE-indexes in HEAP tables can now be used to optimize ORDER BY
Don't read character set files if we are using only the default charset. In most cases the user will not anymore get a warning about missing character set files
Compare strings with space extend instead of space strip. Now the following comparisons holds:  "a" == "a " and "a\t" < "a". (Bug #3152).
Note: Because of the above fix, one has to do a REPAIR on any table that has an ascii character < 32 last in a CHAR/VARCHAR/TEXT columns.
2004-03-25 15:05:01 +02:00