The patch for WL 1563 added a new duplicate key error message so that the
key name could be provided instead of the key number. But the error code
for the new message was used even though that did not need to change.
This could cause unnecessary problems for applications that used the old
ER_DUP_ENTRY error code to detect duplicate key errors.
Extending varchar column length with ALTER TABLE may result in unusable
memory table.
The problem is that we use fast ALTER TABLE in this case, which is not
supported by now.
This is fixed by refusing fast ALTER TABLE when extending varchar column.
In other words force copy of a table during ALTER TABLE.
Affects MEMORY tables in 5.1 only.
SELECT WHERE a= AND b=
Selecting data from memory table with varchar column and hash index over it
returns only first row matched.
Problem was that key length calculation for varchar columns didn't include
number of bytes to store length.
Fixed key length for varchar fields to include number of bytes to store length.
Two handler objects were present, one was used for an insert and the other for a select
The state of the statistics was local to the handler object and thus the other handler
object didn't notice the insert.
Fix included:
1) Add a new variable key_stat_version added to whenever statistics was considered in need
of update (previously key_stats_ok= FALSE in those places)
2) Add a new handler variable key_stat_version assigned whenever key_stats_ok= TRUE was set
previously
3) Fix records_in_range to return records if records <= 1
4) Fix records_in_range to add 2 to rec_per_key to ensure we don't specify 0 or 1 when it isn't
and thus invoking incorrect optimisations.
5) Fix unique key handling for HEAP table in records_in_range
- If number of records in table is 4, the calculated cost for using "index" and "range" become so close so that any rounding errors becomes visible.
- Added one more record to the tables for heap test and expoect "range" to be selected
- Decrease number of records in t1 for range and expect "index" to be choosen.
Fixed warnings by valgrind for sum_distinct.test
Enable buffered-record-reads after filesort for InnoDB tables with short primary key
Enabled sort-with-data for MyISAM temporary files
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