diff options
author | unknown <mikael/pappa@dator5.(none)> | 2006-08-08 09:58:55 -0400 |
---|---|---|
committer | unknown <mikael/pappa@dator5.(none)> | 2006-08-08 09:58:55 -0400 |
commit | 8ed7e1484aa638cf0911b62b32d54a7d945b4dfb (patch) | |
tree | ad1a1eed0e2e14e6ba4fe809c34e14a1a19315b0 /sql/ha_partition.cc | |
parent | 9cfcc21450b0c6defd13c1e231ad25cad6db855b (diff) | |
download | mariadb-git-8ed7e1484aa638cf0911b62b32d54a7d945b4dfb.tar.gz |
BUG#21173: SHOW TABLE STATUS crashes mysqld
Review fixes
mysql-test/r/partition.result:
New test cases
mysql-test/t/partition.test:
New test cases
sql/ha_partition.cc:
Added comments after review
+ removed erroneus setting
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r-- | sql/ha_partition.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 042b23632a6..10b531862fd 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -4186,12 +4186,16 @@ void ha_partition::info(uint flag) if (table->found_next_number_field) { + /* + 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(); } - else - stats.auto_increment_value= ~(ulonglong)(0); } if (flag & HA_STATUS_VARIABLE) { |