polardbxengine/mysql-test/suite/innodb/r/innodb-large-prefix.result

49 lines
1.3 KiB
Plaintext

#
# Bug #12699505 MEMORY LEAK IN ROW_CREATE_INDEX_FOR_MYSQL()
#
CREATE TABLE t1(a int not null,key(a,a)) ENGINE=InnoDB DEFAULT CHARSET=latin1;
ERROR 42S21: Duplicate column name 'a'
CREATE TABLE t1(a int,b text,key(b(768))) ENGINE=InnoDB DEFAULT CHARSET=latin1
ROW_FORMAT=COMPACT;
ERROR 42000: Specified key was too long; max key length is 767 bytes
CREATE TABLE t1(a int not null,b text) ENGINE=InnoDB DEFAULT CHARSET=latin1
ROW_FORMAT=COMPACT;
INSERT INTO t1 VALUES (1,''),(2,''),(3,''),(4,''),(5,''),(6,''),(7,'');
CREATE INDEX t1aa ON t1(a,a);
ERROR 42S21: Duplicate column name 'a'
CREATE INDEX t1b ON t1(b(768));
ERROR 42000: Specified key was too long; max key length is 767 bytes
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`b` text
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
SELECT * FROM t1;
a b
1
2
3
4
5
6
7
DROP TABLE t1;
CREATE TABLE t2(a int primary key, b text) ENGINE=InnoDB DEFAULT CHARSET=latin1
ROW_FORMAT=COMPACT;
INSERT INTO t2 VALUES (1,''),(2,''),(3,''),(4,''),(5,''),(6,''),(7,'');
CREATE INDEX t2aa ON t2(a,a);
ERROR 42S21: Duplicate column name 'a'
CREATE INDEX t2b ON t2(b(768));
ERROR 42000: Specified key was too long; max key length is 767 bytes
SELECT * FROM t2;
a b
1
2
3
4
5
6
7
DROP TABLE t2;