File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 28
28
ac
29
29
DROP TABLE t0,t1;
30
30
ALTER DATABASE test CHARACTER SET utf8mb4 COLLATE utf8mb4_uca1400_ai_ci;
31
+ #
32
+ # MDEV-35419 Server crashes when a adding column to the table which has a primary key using hash
33
+ #
34
+ create table t1 (a int,primary key using hash (a)) engine=innodb;
35
+ alter table t1 add b int;
36
+ drop table t1;
37
+ # End of 11.7 tests
Original file line number Diff line number Diff line change @@ -36,3 +36,14 @@ SELECT * FROM t1;
36
36
DROP TABLE t0,t1;
37
37
38
38
--source include/test_db_charset_restore.inc
39
+
40
+ --echo #
41
+ --echo # MDEV-35419 Server crashes when a adding column to the table which has a primary key using hash
42
+ --echo #
43
+ # it's not really using hash, it ignores the declaration
44
+ # for ALTER from MEMORY and back to be possible
45
+ create table t1 (a int,primary key using hash (a)) engine=innodb;
46
+ alter table t1 add b int;
47
+ drop table t1;
48
+
49
+ --echo # End of 11.7 tests
Original file line number Diff line number Diff line change @@ -3884,7 +3884,7 @@ innobase_create_index_def(
3884
3884
index->rebuild = new_clustered;
3885
3885
3886
3886
if (key_clustered) {
3887
- DBUG_ASSERT (key->algorithm <= HA_KEY_ALG_BTREE );
3887
+ DBUG_ASSERT (key->algorithm <= HA_KEY_ALG_HASH );
3888
3888
DBUG_ASSERT (key->flags & HA_NOSAME);
3889
3889
index->ind_type = DICT_CLUSTERED | DICT_UNIQUE;
3890
3890
} else if (key->algorithm == HA_KEY_ALG_FULLTEXT) {
You can’t perform that action at this time.
0 commit comments