Loading Build-tools/Do-solaris-pkg +1 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ unlink $temp or warn "Unable to remove tempfile ($!)\n"; # First get some info $fullname =~ s,/+$,,; # Remove ending slash if any $fullname =~ /^((mysql)-\w+-?\w+?)-([\d\.]+\w?)-.+$/ $fullname =~ /^((mysql)(?:-\w+){1,3})-([\d\.]+\w?)-.+$/ or die "This name is not what I expected - \"$fullname\""; $default{"name"}= $2; Loading heap/hp_create.c +2 −1 Original line number Diff line number Diff line Loading @@ -137,6 +137,8 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef, keyinfo->write_key= hp_write_key; keyinfo->hash_buckets= 0; } if ((keyinfo->flag & HA_AUTO_KEY) && create_info->with_auto_increment) share->auto_key= i + 1; } share->min_records= min_records; share->max_records= max_records; Loading @@ -147,7 +149,6 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef, share->keys= keys; share->max_key_length= max_length; share->changed= 0; share->auto_key= create_info->auto_key; share->auto_key_type= create_info->auto_key_type; share->auto_increment= create_info->auto_increment; /* Must be allocated separately for rename to work */ Loading include/heap.h +1 −1 Original line number Diff line number Diff line Loading @@ -183,10 +183,10 @@ typedef struct st_heap_info typedef struct st_heap_create_info { uint auto_key; uint auto_key_type; ulong max_table_size; ulonglong auto_increment; my_bool with_auto_increment; } HP_CREATE_INFO; /* Prototypes for heap-functions */ Loading mysql-test/r/heap.result +42 −0 Original line number Diff line number Diff line Loading @@ -249,3 +249,45 @@ a 3 2 drop table t1; create table t1 (a bigint unsigned auto_increment primary key, b int, key (b, a)) engine=heap; insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); select * from t1; a b 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 drop table t1; create table t1 (a int not null, b int not null auto_increment, primary key(a, b), key(b)) engine=heap; insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); select * from t1; a b 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 drop table t1; mysql-test/t/heap.test +29 −0 Original line number Diff line number Diff line Loading @@ -195,3 +195,32 @@ delete from t1 where a is null; insert into t1 values ('2'), ('3'); select * from t1; drop table t1; # # Bug #8489: Strange auto_increment behaviour # create table t1 (a bigint unsigned auto_increment primary key, b int, key (b, a)) engine=heap; insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); select * from t1; drop table t1; create table t1 (a int not null, b int not null auto_increment, primary key(a, b), key(b)) engine=heap; insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); select * from t1; drop table t1; Loading
Build-tools/Do-solaris-pkg +1 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ unlink $temp or warn "Unable to remove tempfile ($!)\n"; # First get some info $fullname =~ s,/+$,,; # Remove ending slash if any $fullname =~ /^((mysql)-\w+-?\w+?)-([\d\.]+\w?)-.+$/ $fullname =~ /^((mysql)(?:-\w+){1,3})-([\d\.]+\w?)-.+$/ or die "This name is not what I expected - \"$fullname\""; $default{"name"}= $2; Loading
heap/hp_create.c +2 −1 Original line number Diff line number Diff line Loading @@ -137,6 +137,8 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef, keyinfo->write_key= hp_write_key; keyinfo->hash_buckets= 0; } if ((keyinfo->flag & HA_AUTO_KEY) && create_info->with_auto_increment) share->auto_key= i + 1; } share->min_records= min_records; share->max_records= max_records; Loading @@ -147,7 +149,6 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef, share->keys= keys; share->max_key_length= max_length; share->changed= 0; share->auto_key= create_info->auto_key; share->auto_key_type= create_info->auto_key_type; share->auto_increment= create_info->auto_increment; /* Must be allocated separately for rename to work */ Loading
include/heap.h +1 −1 Original line number Diff line number Diff line Loading @@ -183,10 +183,10 @@ typedef struct st_heap_info typedef struct st_heap_create_info { uint auto_key; uint auto_key_type; ulong max_table_size; ulonglong auto_increment; my_bool with_auto_increment; } HP_CREATE_INFO; /* Prototypes for heap-functions */ Loading
mysql-test/r/heap.result +42 −0 Original line number Diff line number Diff line Loading @@ -249,3 +249,45 @@ a 3 2 drop table t1; create table t1 (a bigint unsigned auto_increment primary key, b int, key (b, a)) engine=heap; insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); select * from t1; a b 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 drop table t1; create table t1 (a int not null, b int not null auto_increment, primary key(a, b), key(b)) engine=heap; insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); select * from t1; a b 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 drop table t1;
mysql-test/t/heap.test +29 −0 Original line number Diff line number Diff line Loading @@ -195,3 +195,32 @@ delete from t1 where a is null; insert into t1 values ('2'), ('3'); select * from t1; drop table t1; # # Bug #8489: Strange auto_increment behaviour # create table t1 (a bigint unsigned auto_increment primary key, b int, key (b, a)) engine=heap; insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); insert t1 (b) values (1); select * from t1; drop table t1; create table t1 (a int not null, b int not null auto_increment, primary key(a, b), key(b)) engine=heap; insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); insert t1 (a) values (1); select * from t1; drop table t1;