diff options
author | unknown <ramil/ram@ramil.myoffice.izhnet.ru> | 2007-06-07 16:05:26 +0500 |
---|---|---|
committer | unknown <ramil/ram@ramil.myoffice.izhnet.ru> | 2007-06-07 16:05:26 +0500 |
commit | b2ac71091b9930710f3578bf85f4a8aa910967e6 (patch) | |
tree | 29b15ce822d7b295af5ca7b24fcd2d76e88e8179 /sql | |
parent | ba585d6d0e9560c0929905840f1333b7820eaefd (diff) | |
parent | ded1efac7b7e17a0f167553ff59a2ebb8acef9b1 (diff) | |
download | mariadb-git-b2ac71091b9930710f3578bf85f4a8aa910967e6.tar.gz |
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into mysql.com:/home/ram/work/b28806/b28806.5.1
Diffstat (limited to 'sql')
-rw-r--r-- | sql/ha_partition.cc | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index e9f4bc4c745..0c4f3cf708f 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -4253,22 +4253,16 @@ int ha_partition::info(uint flag) if (flag & HA_STATUS_AUTO) { - ulonglong nb_reserved_values; + ulonglong auto_increment_value= 0; DBUG_PRINT("info", ("HA_STATUS_AUTO")); - /* we don't want to reserve any values, it's pure information */ - - if (table->found_next_number_field) + file_array= m_file; + do { - /* - Can only call get_auto_increment for tables that actually - have auto_increment columns, otherwise there will be - problems in handlers that don't expect get_auto_increment - for non-autoincrement tables. - */ - get_auto_increment(0, 0, 0, &stats.auto_increment_value, - &nb_reserved_values); - release_auto_increment(); - } + file= *file_array; + file->info(HA_STATUS_AUTO); + set_if_bigger(auto_increment_value, file->stats.auto_increment_value); + } while (*(++file_array)); + stats.auto_increment_value= auto_increment_value; } if (flag & HA_STATUS_VARIABLE) { |