Commit graph

24 commits

Author SHA1 Message Date
Alexey Botchkov
6d14cae604 Bug#55146 Assertion `m_part_spec.start_part == m_part_spec.end_part' in index_read_idx_map
As we check for the impossible partitions earlier, it's possible that we don't find any
              suitable partitions at all. So this assertion just has to be corrected for this case.
      
per-file comments:
mysql-test/r/partition_innodb.result
Bug#55146      Assertion `m_part_spec.start_part == m_part_spec.end_part' in index_read_idx_map
        test result updated.

mysql-test/t/partition_innodb.test
Bug#55146      Assertion `m_part_spec.start_part == m_part_spec.end_part' in index_read_idx_map
        test case added.

sql/ha_partition.cc
Bug#55146      Assertion `m_part_spec.start_part == m_part_spec.end_part' in index_read_idx_map
        Assertion changed to '>=' as the  prune_partition_set() in the get_partition_set() can
        do start_part= end_part+1 if no possible partitions were found.
2010-08-12 15:59:02 +05:00
Mattias Jonsson
e62c30b5f8 merge 2010-03-12 11:52:38 +01:00
Mattias Jonsson
29b39e7a44 Bug#51830: Incorrect partition pruning on range partition
(regression)

Problem was that partition pruning did not exclude the
last partition if the range was beyond it
(i.e. not using MAXVALUE)

Fix was to not include the last partition if the
partitioning function value was not within the partition
range.

mysql-test/r/partition_innodb.result:
  Bug#51830: Incorrect partition pruning on range partition
  (regression)
  
  Updated result
mysql-test/r/partition_pruning.result:
  Bug#51830: Incorrect partition pruning on range partition
  (regression)
  
  Updated result
mysql-test/t/partition_innodb.test:
  Bug#51830: Incorrect partition pruning on range partition
  (regression)
  
  Added test for pruning in InnoDB, since it does not show
  for MyISAM due to 'Impossible WHERE noticed after reading
  const tables'.
mysql-test/t/partition_pruning.test:
  Bug#51830: Incorrect partition pruning on range partition
  (regression)
  
  Added test
sql/sql_partition.cc:
  Bug#51830: Incorrect partition pruning on range partition
  (regression)
  
  Also increase the partition id if not inside the last partition
  (and no MAXVALUE is defined).
  
  Added comments and DBUG_ASSERT.
2010-03-10 12:56:05 +01:00
Mattias Jonsson
48d986f511 Bug#50104: Partitioned table with just 1 partion works with fk
There was no check for foreign keys when altering partitioned
tables.

Added check for FK when altering partitioned tables.

mysql-test/r/partition_innodb.result:
  Bug#50104: Partitioned table with just 1 partion works with fk
  
  Updated test result
mysql-test/t/partition_innodb.test:
  Bug#50104: Partitioned table with just 1 partion works with fk
  
  Added test for adding FK on partitioned tables (both 1 and 2
  partitions)
sql/sql_partition.cc:
  Bug#50104: Partitioned table with just 1 partion works with fk
  
  Disabled adding foreign key when altering a partitioned table.
2010-03-04 12:29:22 +01:00
Mattias Jonsson
eab2be0aee Bug#47343: InnoDB fails to clean-up after lock wait timeout on
REORGANIZE PARTITION

There were several problems which lead to this this,
all related to bad error handling.

1) There was several bugs preventing the ddl-log to be used for
   cleaning up created files on error.

2) The error handling after the copy partition rows did not close
   and unlock the tables, resulting in deletion of partitions
   which were in use, which lead InnoDB to put the partition to
   drop in a background queue.

sql/ha_partition.cc:
  Bug#47343: InnoDB fails to clean-up after lock wait timeout on
             REORGANIZE PARTITION
  
  Better error handling, if partition has been created/opened/locked
  then make sure it is unlocked and closed before returning error.
  The delete of the newly created partition is handled by the ddl-log.
sql/sql_parse.cc:
  Bug#47343: InnoDB fails to clean-up after lock wait timeout on
             REORGANIZE PARTITION
  
  Fix a bug found when experimenting, thd could really be NULL here,
  as mentioned in the function header.
sql/sql_partition.cc:
  Bug#47343: InnoDB fails to clean-up after lock wait timeout on
             REORGANIZE PARTITION
  
  Used the correct .frm shadow name to put into the ddl-log.
  Really use the ddl-log to handle errors.
sql/sql_table.cc:
  Bug#47343: InnoDB fails to clean-up after lock wait timeout on
             REORGANIZE PARTITION
  
  Fixes of the ddl-log when used as error recovery (no crash).
  When executing an entry from memory (not read from disk)
  the name_len was not set correctly.
2010-01-18 17:49:18 +01:00
Sergey Vojtovich
eb7a3fc9cb Local merge. 2009-09-10 11:54:26 +05:00
Mikael Ronstrom
dd407c5228 Fix to ensure that all subpartitions gets deleted before renaming starts, BUG#47029 2009-09-07 10:37:54 +02:00
Sergey Vojtovich
32c7efa6b4 BUG#46483 - drop table of partitioned table may leave
extraneous file

Online/fast ALTER TABLE of a partitioned table may leave
temporary file in database directory.

Fixed by removing unnecessary call to
handler::ha_create_handler_files(), which was creating
partitioning definition file.

mysql-test/r/partition_innodb.result:
  A test case for BUG#46483.
mysql-test/t/partition_innodb.test:
  A test case for BUG#46483.
sql/unireg.cc:
  Do not call ha_create_handler_files() when we were requested
  to create only dot-frm file.
2009-09-02 16:19:28 +05:00
Mattias Jonsson
a5ec6953e1 Bug#40595: Non-matching rows not released with READ-COMMITTED
on tables with partitions

Problem was that the handler function try_semi_consistent_read
was not propagated to the innodb handler.

Solution was to implement that function in the partitioning
handler.

mysql-test/r/partition_innodb.result:
  Bug#40595: Non-matching rows not released with READ-COMMITTED
  on tables with partitions
  
  Updated test result.
mysql-test/t/partition_innodb.test:
  Bug#40595: Non-matching rows not released with READ-COMMITTED
  on tables with partitions
  
  Added test case for bug#40595.
  
  Note: the replace_regex is taking long time. I have not found
  any better regex (it takes time using 'sed' too).
sql/ha_partition.cc:
  Bug#40595: Non-matching rows not released with READ-COMMITTED
  on tables with partitions
  
  Added function to the partitioning handler for handling
  semi consistent reads (unlock_row was already implemented,
  and this is needed for unlock_row to work properly in innodb).
  It uses pruning for optimizing the call.
sql/ha_partition.h:
  Bug#40595: Non-matching rows not released with READ-COMMITTED
  on tables with partitions
  
  Added function to the partitioning handler for handling
  semi consistent reads (unlock_row was already implemented,
  and this is needed for unlock_row to work properly in innodb).
2008-11-10 21:13:24 +01:00
Mattias Jonsson
bb1ad9ce08 Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
The partitioning clause is only a very long single line, which is very
hard to interpret for a human. This patch breaks the partitioning
syntax into one line for the partitioning type, and one line per
partition/subpartition.

mysql-test/r/information_schema_part.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/r/partition.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/r/partition_archive.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/r/partition_datatype.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/r/partition_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/r/partition_mgm.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/r/partition_mgm_err.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/r/partition_not_windows.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/r/partition_range.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/r/partition_symlink.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/ndb/r/ndb_partition_key.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/ndb/r/ndb_partition_range.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/inc/partition_directory.inc:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Changed partitioning clause format for verifying the new output format.
mysql-test/suite/parts/r/ndb_dd_backuprestore.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/part_supported_sql_func_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/part_supported_sql_func_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/part_supported_sql_func_ndb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter1_1_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter1_1_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter1_2_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter1_2_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter2_1_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter2_1_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter2_2_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter2_2_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter3_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter3_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter4_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter4_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_auto_increment_archive.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_auto_increment_blackhole.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_auto_increment_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_auto_increment_memory.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_auto_increment_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_auto_increment_ndb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_basic_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_basic_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_basic_symlink_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_basic_symlink_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_bit_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_bit_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_bit_ndb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_char_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_char_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_datetime_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_datetime_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_decimal_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_decimal_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_engine_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_engine_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_engine_ndb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_float_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_float_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_int_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_int_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_int_ndb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc0_archive.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc0_memory.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc0_ndb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc1_archive.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc1_memory.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc1_ndb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc2_archive.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc2_memory.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc2_ndb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_special_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_special_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_syntax_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_syntax_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/rpl_partition.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/rpl/r/rpl_extraCol_innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/rpl/r/rpl_extraCol_myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/rpl/r/rpl_innodb_bug28430.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/rpl/r/rpl_row_basic_8partition.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Updated test result due to the new partitioning clause output format.
mysql-test/t/partition.test:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Added small tests for for the new partitioning clause output format.
mysql-test/t/partition_mgm.test:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Added small tests for for the new partitioning clause output format.
sql/sql_partition.cc:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Changed formatting of the partitioning clause from single line into
  multiple indented lines
sql/sql_show.cc:
  Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
  
  Changed formatting of the partitioning clause from single line into
  multiple indented lines
2008-11-04 08:43:21 +01:00
Mattias Jonsson
d3ea743015 Bug#37721: ORDER BY when WHERE contains non-partitioned
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.
2008-10-10 12:01:01 +02:00
unknown
7b5da0aa77 Merge pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.1-engines
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
2008-03-07 13:46:29 -08:00
unknown
d39f204876 Apply innodb-5.1-ss2146 and innodb-5.1-ss2178 snapshots.
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.
2008-01-14 22:55:50 -07:00
unknown
d84a0e5caa Bug#31931 Partitions: unjustified 'mix of handlers' error message
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
2008-01-09 13:15:50 +01:00
unknown
c3fceb409b Bug#32948: FKs allowed to reference partitioned table
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.
2007-12-06 14:43:06 +01:00
unknown
d742b9cb7d test fixed
mysql-test/r/partition_innodb.result:
  result fixed
mysql-test/t/partition_innodb.test:
  number of subpartitions fixed
2007-11-13 09:41:59 +04:00
unknown
f6e05571eb 'no innodb engine' test failure fixed
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
2007-11-12 14:26:09 +04:00
unknown
fc7a9058f1 BUG#30583 - Partition on DOUBLE key + INNODB + count(*) == crash
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).
2007-09-13 18:33:40 +05:00
unknown
dcef028f71 wl#2936 post-merge fixes
client/mysqltest.c:
  warnings
extra/comp_err.c:
  warnings
sql/event_queue.cc:
  warnings
sql/handler.h:
  warnings
sql/opt_range.cc:
  warnings
sql/opt_range.h:
  warnings
sql/rpl_mi.cc:
  warnings
sql/sql_class.cc:
  wl#2936 post-merge fixes, warnings
2007-04-16 18:16:17 +02:00
unknown
ee950898e3 Merge weblab.(none):/home/marcsql/TREE/mysql-5.1-base
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-rt-merge


include/my_pthread.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/partition_innodb.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
server-tools/instance-manager/IMService.cpp:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
2007-02-28 18:14:56 -07:00
unknown
b68a22019e BUG#26117 "index_merge sort-union over partitioned table crashes"
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
2007-02-27 22:01:03 +03:00
unknown
186e3ee534 Bug#24392 (SHOW ENGINE MUTEX STATUS is a synonym for SHOW INNODB STATUS)
Before this fix, the command SHOW ENGINE <name> STATUS would:
- print a warning if the engine name is unknown,
- proceed and implement the same behavior as SHOW ENGINE ALL STATUS,
and list the status of all the storage engines registered.

In particular, this behavior caused confusion about the command :
SHOW ENGINE MUTEX STATUS, which as a side effect would print the status
of the innodb engine when that engine is registered.

Also, before this fix, every time an unknown engine name was substituted by
the default engine (which happen unless SQL_MODE NO_ENGINE_SUBSTITUTION is
set), a malformed warning was raised.
For example, the command ALTER TABLE T1 ENGINE = X would print :
Warnings:
Error 1286 Unknown table engine 'X'

With this fix:
SHOW ENGINE <name> STATUS|LOGS|MUTEX
always fails with an error when the engine <name> is unknown.

For other commands, warnings about unknown engines are raised as:
Warnings:
Warning 1286 Unknown table engine 'X'

In other words, engine substitution never affect the SHOW ENGINE command,
since this would lead to very confusing results.


mysql-test/r/ndb_dd_basic.result:
  Warnings for unknown engines.
mysql-test/r/partition_innodb.result:
  Warnings for unknown engines.
mysql-test/r/ps_1general.result:
  Fixed SHOW ENGINE <name> STATUS|LOGS|MUTEX
mysql-test/r/show_check.result:
  Fixed SHOW ENGINE <name> STATUS|LOGS|MUTEX
mysql-test/t/ps_1general.test:
  Fixed SHOW ENGINE <name> STATUS|LOGS|MUTEX
mysql-test/t/show_check.test:
  Fixed SHOW ENGINE <name> STATUS|LOGS|MUTEX
sql/sql_yacc.yy:
  Fixed SHOW ENGINE <name> STATUS|LOGS|MUTEX
2007-01-23 15:14:08 -07:00
unknown
d710ccf82c Rearranged test cases, move InnoDB test cases to partition_innodb 2006-09-08 03:18:05 -04:00
unknown
3e12f98aa5 Moving test that requires innodb to partition_innodb
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''
2006-05-18 19:16:51 +02:00