index column
There was actually two problems
1) when clustered pk, order by non pk index should also
compare with pk as last resort to differ keys from each
other
2) bug in the index search handling in ha_partition (was
found when extending the test case
Solution to 1 was to include the pk in key compare if
clustered pk and search on other index.
Solution for 2 was to remove the optimization from
ordered scan to unordered scan if clustered pk.
mysql-test/r/partition_innodb.result:
Bug#37721: ORDER BY when WHERE contains non-partitioned
index column
updated test result.
mysql-test/t/partition_innodb.test:
Bug#37721: ORDER BY when WHERE contains non-partitioned
index column
Added test case for bug verification.
sql/ha_partition.cc:
Bug#37721: ORDER BY when WHERE contains non-partitioned
index column
using m_curr_key_info with both given index and PK
if clustered PK.
Also including PK in read_set.
Added debug prints for easier verification.
sql/ha_partition.h:
Bug#37721: ORDER BY when WHERE contains non-partitioned
index column
Changed m_curr_key_info to a null terminated array
with max 2 keys and a terminating null.
For use with key_rec_cmp with both given index and PK.
sql/key.cc:
Bug#37721: ORDER BY when WHERE contains non-partitioned
index column
added handling of a null terminated array of keys for
use in compare.
into pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/merge.20080307/mysql-5.1
configure.in:
Auto merged
include/mysql/plugin.h:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/r/partition_innodb.result:
Auto merged
mysql-test/t/information_schema.test:
Auto merged
mysql-test/t/partition_innodb.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/slave.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
storage/myisam/mi_dynrec.c:
Auto merged
Fixes:
Bug #18942: DROP DATABASE does not drop an orphan FOREIGN KEY constraint
Fix Bug#18942 by dropping all foreign key constraints at the end of
DROP DATABASE. Usually, by then, there are no foreign constraints
left because all of them are dropped when the relevant tables are
dropped. This code is to ensure that any orphaned FKs are wiped too.
Bug #29157: UPDATE, changed rows incorrect
Return HA_ERR_RECORD_IS_THE_SAME from ha_innobase::update_row() if no
columns were updated.
Bug #32440: InnoDB free space info does not appear in SHOW TABLE STATUS or I_S
Put information about the free space in a tablespace in
INFORMATION_SCHEMA.TABLES.DATA_FREE. This information was previously
available in INFORMATION_SCHEMA.TABLES.TABLE_COMMENT, but MySQL has
removed it from there recently.
The stored value is in kilobytes.
This can be considered as a permanent workaround to
http://bugs.mysql.com/32440. "Workaround" becasue that bug is about the
data missing from TABLE_COMMENT and this is actually not solved.
mysql-test/r/innodb.result:
New tests for bugs fixed as part of snapshots innodb-5.1-ss2146 and innodb-5.1-ss2178
mysql-test/r/partition_innodb.result:
Update results - InnoDB now sets Data_length (show table status)
mysql-test/t/innodb.test:
New tests for bugs fixed as part of snapshots innodb-5.1-ss2146 and innodb-5.1-ss2178
mysql-test/t/partition_innodb.test:
Mask out Data_Free in show table status, because it varies depending on
which tests have been run.
storage/innobase/handler/ha_innodb.cc:
Apply innodb-5.1-ss2146 and innodb-5.1-ss2178 snapshots.
Revision r2178:
branches/5.1:
Merge r2177 from trunk/:
Fix Bug#29157 "UPDATE, changed rows incorrect":
Return HA_ERR_RECORD_IS_THE_SAME from ha_innobase::update_row() if no
columns were updated.
Revision r2169:
branches/5.1:
Bug#32440:
Put information about the free space in a tablespace in
INFORMATION_SCHEMA.TABLES.DATA_FREE. This information was previously
available in INFORMATION_SCHEMA.TABLES.TABLE_COMMENT, but MySQL has
removed it from there recently.
The stored value is in kilobytes.
This can be considered as a permanent workaround to
http://bugs.mysql.com/32440. "Workaround" becasue that bug is about the
data missing from TABLE_COMMENT and this is actually not solved.
storage/innobase/row/row0mysql.c:
Apply innodb-5.1-ss2146 and innodb-5.1-ss2178 snapshots.
Revision r2161:
branches/5.1:
Merge r2160 from trunk/:
Fix Bug#18942 by dropping all foreign key constraints at the end of
DROP DATABASE. Usually, by then, there are no foreign constraints
left because all of them are dropped when the relevant tables are
dropped. This code is to ensure that any orphaned FKs are wiped too.
storage/innobase/trx/trx0trx.c:
Apply innodb-5.1-ss2146 and innodb-5.1-ss2178 snapshots.
Problem was that the mix of handlers was not consistent between
CREATE and ALTER
changed so that it works like:
- All partitions must use the same engine
AND it must be the same as the table.
- if one does NOT specify an engine on the table level
then one must either NOT specify any engine on any
partition/subpartition OR for ALL partitions/subpartitions
Note: that after a table have been created, the storage engine
is specified for all parts of the table (table/partition/subpartition)
and so when using alter, one does not need to specify it (unless one
wants to change the storage engine, then one have to specify it on the
table level)
mysql-test/r/partition.result:
Bug#31931 Partitions: unjustified 'mix of handlers' error message
test result updated
mysql-test/r/partition_innodb.result:
Bug#31931 Partitions: unjustified 'mix of handlers' error message
test result updated
mysql-test/suite/ndb/r/ndb_partition_key.result:
Bug#31931 Partitions: unjustified 'mix of handlers' error message
test result updated
mysql-test/suite/ndb/t/ndb_partition_key.test:
Bug#31931 Partitions: unjustified 'mix of handlers' error message
test case update
mysql-test/suite/parts/inc/partition_engine.inc:
Bug#31931 Partitions: unjustified 'mix of handlers' error message
test case updated
mysql-test/suite/parts/r/ndb_partition_key.result:
Bug#31931 Partitions: unjustified 'mix of handlers' error message
test result updated
mysql-test/suite/parts/r/partition_engine_innodb.result:
Bug#31931 Partitions: unjustified 'mix of handlers' error message
test result updated
mysql-test/suite/parts/r/partition_engine_myisam.result:
Bug#31931 Partitions: unjustified 'mix of handlers' error message
test result updated
mysql-test/suite/parts/t/ndb_partition_key.test:
Bug#31931 Partitions: unjustified 'mix of handlers' error message
test case updated
mysql-test/t/partition.test:
Bug#31931 Partitions: unjustified 'mix of handlers' error message
test case updated
mysql-test/t/partition_innodb.test:
Bug#31931 Partitions: unjustified 'mix of handlers' error message
test case updated
sql/partition_info.cc:
Bug#31931 Partitions: unjustified 'mix of handlers' error message
moved the check_engine_condition here from sql_partition.cc
created a new check_engine_mix from check_native_partitioned in
sql_partition.cc
sql/partition_info.h:
Bug#31931 Partitions: unjustified 'mix of handlers' error message
non static function check_engine_mix (now used in sql_partition.cc)
sql/sql_partition.cc:
Bug#31931 Partitions: unjustified 'mix of handlers' error message
moved check_engine_condition to partition_info.cc and moved out some
common code in check_native_partitioned to check_engine_mix in
partition_info.cc
Problem: when alter to partitioned table,
it does not see it as change of engine.
Solution: If alter includes partitioning, check if it is possible
to change engines (eg. is the table referenced by a FK)
mysql-test/r/partition_innodb.result:
Bug#32948: FKs allowed to reference partitioned table
test result
mysql-test/t/partition_innodb.test:
Bug#32948: FKs allowed to reference partitioned table
test case
sql/sql_table.cc:
Bug#32948: FKs allowed to reference partitioned table
if alter to partitioning, it is the same as changing engine.
mysql-test/r/partition.result:
test result fixed
mysql-test/r/partition_innodb.result:
test result fixed
mysql-test/t/partition.test:
test moved to partition_innodb
mysql-test/t/partition_innodb.test:
test moved from partition.test
Issuing SELECT COUNT(*) against partitioned InnoDB table may cause
server crash.
Fixed that not all required fields were included into read_set.
mysql-test/r/partition_innodb.result:
A test case for BUG#30583.
mysql-test/t/partition_innodb.test:
A test case for BUG#30583.
sql/ha_partition.cc:
Ensure that all fields of current key are included into read_set,
as partitioning requires them for sorting
(see ha_partition::handle_ordered_index_scan).
Before the fix:
ha_partition objects had ha_partition::m_part_info==NULL and that caused
crash
After:
- The new ha_partition::clone() function makes the clones use parent's
m_part_info value.
- The parent ha_partition object remains responsible for deallocation of
m_part_info.
mysql-test/r/partition_innodb.result:
BUG#26117 "index_merge sort-union over partitioned table crashes"
- Testcase
mysql-test/t/partition_innodb.test:
BUG#26117 "index_merge sort-union over partitioned table crashes"
- Testcase
mysql-test/r/partition_innodb.result:
New BitKeeper file ``mysql-test/r/partition_innodb.result''
mysql-test/t/partition_innodb.test:
New BitKeeper file ``mysql-test/t/partition_innodb.test''