mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge bk-internal:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
This commit is contained in:
@ -167,5 +167,5 @@ select hex(s1) from t1;
|
||||
hex(s1)
|
||||
41
|
||||
drop table t1;
|
||||
create table t1 (a char(160) character set utf8, primary key(a));
|
||||
ERROR 42000: Specified key was too long; max key length is 255 bytes
|
||||
create table t1 (a text character set utf8, primary key(a(360)));
|
||||
ERROR 42000: Specified key was too long; max key length is 1000 bytes
|
||||
|
@ -185,3 +185,24 @@ NULL 2
|
||||
a 1
|
||||
a 2
|
||||
drop table t1;
|
||||
create table t1 (i int, a char(200), b text, unique (a), unique (b(300))) charset utf8;
|
||||
insert t1 values (1, repeat('a',210), repeat('b', 310));
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'a' at row 1
|
||||
insert t1 values (2, repeat(0xD0B1,215), repeat(0xD0B1, 310));
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'a' at row 1
|
||||
select i, length(a), length(b), char_length(a), char_length(b) from t1;
|
||||
i length(a) length(b) char_length(a) char_length(b)
|
||||
1 200 310 200 310
|
||||
2 400 620 200 310
|
||||
select i from t1 where a=repeat(_utf8 'a',200);
|
||||
i
|
||||
1
|
||||
select i from t1 where a=repeat(_utf8 0xD0B1,200);
|
||||
i
|
||||
2
|
||||
select i from t1 where b=repeat(_utf8 'b',310);
|
||||
i
|
||||
1
|
||||
drop table t1;
|
||||
|
@ -322,11 +322,11 @@ CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), KEY t1 (a, b, c));
|
||||
ERROR 42000: Specified key was too long; max key length is 500 bytes
|
||||
CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255));
|
||||
ALTER TABLE t1 ADD INDEX t1 (a, b, c);
|
||||
ERROR 42000: Specified key was too long; max key length is 500 bytes
|
||||
CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), KEY t1 (a, b, c, d, e));
|
||||
ERROR 42000: Specified key was too long; max key length is 1000 bytes
|
||||
CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255));
|
||||
ALTER TABLE t1 ADD INDEX t1 (a, b, c, d, e);
|
||||
ERROR 42000: Specified key was too long; max key length is 1000 bytes
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a int not null, b int, c int, key(b), key(c), key(a,b), key(c,a));
|
||||
INSERT into t1 values (0, null, 0), (0, null, 1), (0, null, 2), (0, null,3), (1,1,4);
|
||||
|
@ -346,16 +346,16 @@ HELLO MY 1
|
||||
a 1
|
||||
hello 1
|
||||
drop table t1;
|
||||
create table t1 (a text, unique (a(300)));
|
||||
ERROR 42000: Specified key was too long; max key length is 255 bytes
|
||||
create table t1 (a text, key (a(300)));
|
||||
create table t1 (a text, unique (a(2100)));
|
||||
ERROR 42000: Specified key was too long; max key length is 1000 bytes
|
||||
create table t1 (a text, key (a(2100)));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 255 bytes
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` text,
|
||||
KEY `a` (`a`(255))
|
||||
KEY `a` (`a`(1000))
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
|
Reference in New Issue
Block a user