Loading heap/hp_create.c +2 −1 Original line number Diff line number Diff line Loading @@ -168,6 +168,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 @@ -178,7 +180,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 @@ -665,3 +665,45 @@ length(v) 65530 drop table t1; set storage_engine=MyISAM; 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 @@ -406,3 +406,32 @@ drop table t1; # Reset varchar test # eval set storage_engine=$default; # # 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; sql/filesort.cc +5 −2 Original line number Diff line number Diff line Loading @@ -475,8 +475,11 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select, if (*killed) { DBUG_PRINT("info",("Sort killed by user")); if (!indexfile && !quick_select) { (void) file->extra(HA_EXTRA_NO_CACHE); file->ha_rnd_end(); } DBUG_RETURN(HA_POS_ERROR); /* purecov: inspected */ } if (error == 0) Loading Loading
heap/hp_create.c +2 −1 Original line number Diff line number Diff line Loading @@ -168,6 +168,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 @@ -178,7 +180,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 @@ -665,3 +665,45 @@ length(v) 65530 drop table t1; set storage_engine=MyISAM; 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 @@ -406,3 +406,32 @@ drop table t1; # Reset varchar test # eval set storage_engine=$default; # # 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;
sql/filesort.cc +5 −2 Original line number Diff line number Diff line Loading @@ -475,8 +475,11 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select, if (*killed) { DBUG_PRINT("info",("Sort killed by user")); if (!indexfile && !quick_select) { (void) file->extra(HA_EXTRA_NO_CACHE); file->ha_rnd_end(); } DBUG_RETURN(HA_POS_ERROR); /* purecov: inspected */ } if (error == 0) Loading