summaryrefslogtreecommitdiff
path: root/mysql-test/r/partition.result
diff options
context:
space:
mode:
authorunknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru>2007-06-07 15:50:13 +0500
committerunknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru>2007-06-07 15:50:13 +0500
commit675d0941d9f0311dba7f5348ad4e287871d3b76a (patch)
tree555e7ee267ac4c279063746544643ae1348f4435 /mysql-test/r/partition.result
parent10a21ed042e39c8800893dbb8ba711d54daf4896 (diff)
downloadmariadb-git-675d0941d9f0311dba7f5348ad4e287871d3b76a.tar.gz
Fix for bug #28806: Running SHOW TABLE STATUS during high INSERT load crashes server
Problem: getting an autoincrement value for a partition table in the ::info() method we call the get_auto_increment() for all partitions. That may cause a problem for at least MyISAM tables that rely on some table state (in this particular case table->naxt_nuber_field is set to 0 in the mysql_insert() and we get a crash). Moreover, calling get_auto_increment() is superfluous there. Fix: use ::info(HA_STATUS_AUTO) calls to get autoincrement values for partitions instead of get_auto_increment() ones in the ha_partition::info(). mysql-test/r/partition.result: Fix for bug #28806: Running SHOW TABLE STATUS during high INSERT load crashes server - test result. mysql-test/t/partition.test: Fix for bug #28806: Running SHOW TABLE STATUS during high INSERT load crashes server - test case. sql/ha_partition.cc: Fix for bug #28806: Running SHOW TABLE STATUS during high INSERT load crashes server - use info(HA_STATUS_AUTO) calls to get autoincrement values for partitions, set the auto_increment_value as the biggest one.
Diffstat (limited to 'mysql-test/r/partition.result')
-rw-r--r--mysql-test/r/partition.result14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result
index de477310fe3..dddd82f3a8d 100644
--- a/mysql-test/r/partition.result
+++ b/mysql-test/r/partition.result
@@ -1235,4 +1235,18 @@ aaa 2
drop table t1;
create table t1 (s1 bigint) partition by list (s1) (partition p1 values in (-9223372036854775808));
drop table t1;
+create table t1(a int auto_increment, b int, primary key (b, a))
+partition by hash(b) partitions 2;
+insert into t1 values (null, 1);
+show table status;
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 MyISAM 10 Fixed 1 9 9 0 0 0 1 NULL NULL NULL latin1_swedish_ci NULL partitioned
+drop table t1;
+create table t1(a int auto_increment primary key)
+partition by key(a) partitions 2;
+insert into t1 values (null), (null), (null);
+show table status;
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 MyISAM 10 Fixed 3 7 21 0 0 0 4 NULL NULL NULL latin1_swedish_ci NULL partitioned
+drop table t1;
End of 5.1 tests