diff options
author | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2007-12-06 16:39:42 +0400 |
---|---|---|
committer | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2007-12-06 16:39:42 +0400 |
commit | b6c0c1754c5d378de3d37ca02b21df7dfaa3b229 (patch) | |
tree | 1262241315c1aab40ae58d6b903e3ed0cfdbe98b /sql/ha_partition.cc | |
parent | d742b9cb7d6ddbaa882df365ab3c4c656fc20d95 (diff) | |
download | mariadb-git-b6c0c1754c5d378de3d37ca02b21df7dfaa3b229.tar.gz |
Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table).
ha_partition::update_create_info() just calls update_create_info
of a first partition, so only get the autoincrement maximum
of the first partition, so SHOW CREATE TABLE can show
small AUTO_INCREMENT parameters.
Fixed by implementing ha_partition::update_create_info() in a way
other handlers work.
HA_ARCHIVE:stats.auto_increment handling made consistent with other engines
mysql-test/r/archive.result:
Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table).
test result fixed
mysql-test/r/partition.result:
Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table).
test result
mysql-test/suite/rpl/r/rpl_innodb_bug28430.result:
Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table).
test result fixed
mysql-test/t/partition.test:
Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table).
test added as rpl_innodb_bug28430 is INNOBASE specific while
the bug is not
sql/ha_partition.cc:
Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table).
ha_partition::update_create_info() implemented
storage/archive/ha_archive.cc:
Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table).
ha_archive.stats.auto_increment now contains next (not last used) value
of auto_increment to be consistent with other engines
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r-- | sql/ha_partition.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 8afaab71160..15dcc4f3b4a 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -1598,7 +1598,11 @@ error: void ha_partition::update_create_info(HA_CREATE_INFO *create_info) { - m_file[0]->update_create_info(create_info); + info(HA_STATUS_AUTO); + + if (!(create_info->used_fields & HA_CREATE_USED_AUTO)) + create_info->auto_increment_value= stats.auto_increment_value; + return; } |