diff options
author | unknown <gluh@eagle.intranet.mysql.r18.ru> | 2006-04-10 20:54:42 +0500 |
---|---|---|
committer | unknown <gluh@eagle.intranet.mysql.r18.ru> | 2006-04-10 20:54:42 +0500 |
commit | 3f934196103cc61d9c68dd5044b78d0976f46304 (patch) | |
tree | bfe95678fa7d473fefb73ab8da7306cdfc431dd6 /mysql-test | |
parent | ee72e2a55a09e9074bbecb0b18afb9db309383c9 (diff) | |
download | mariadb-git-3f934196103cc61d9c68dd5044b78d0976f46304.tar.gz |
Fix for bug#18753 Partitions: auto_increment fails
Current auto increment value is placed in partition in which latest
record was saved. So to get auto_increment they have to scan
all partitions and return max value.
mysql-test/r/partition.result:
Fix for bug#18753 Partitions: auto_increment fails
test case
mysql-test/t/partition.test:
Fix for bug#18753 Partitions: auto_increment fails
test case
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/partition.result | 17 | ||||
-rw-r--r-- | mysql-test/t/partition.test | 15 |
2 files changed, 32 insertions, 0 deletions
diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index 2e293df50e2..324605faf79 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -839,4 +839,21 @@ 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 Dynamic 0 0 0 0 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned DROP TABLE t1; +create table t1 (s1 int auto_increment primary key) +partition by list (s1) +(partition p1 values in (1), +partition p2 values in (2), +partition p3 values in (3)); +insert into t1 values (null); +insert into t1 values (null); +insert into t1 values (null); +select auto_increment from information_schema.tables where table_name='t1'; +auto_increment +4 +select * from t1; +s1 +1 +2 +3 +drop table t1; End of 5.1 tests diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index a3aa3f6f025..dee83f551a0 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -956,4 +956,19 @@ PARTITION p2 VALUES LESS THAN (30) ENGINE = MyISAM); SHOW TABLE STATUS; DROP TABLE t1; +# +# Bug#18753 Partitions: auto_increment fails +# +create table t1 (s1 int auto_increment primary key) +partition by list (s1) +(partition p1 values in (1), + partition p2 values in (2), + partition p3 values in (3)); +insert into t1 values (null); +insert into t1 values (null); +insert into t1 values (null); +select auto_increment from information_schema.tables where table_name='t1'; +select * from t1; +drop table t1; + --echo End of 5.1 tests |