diff options
Diffstat (limited to 'mysql-test/r/type_blob.result')
-rw-r--r-- | mysql-test/r/type_blob.result | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index 255b7f0d942..e9861266b78 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -7,11 +7,11 @@ b text YES NULL c blob YES NULL d mediumtext YES NULL e longtext YES NULL -CREATE TABLE t2 (a char(257), b varchar(70000) binary, c varchar(70000000)); +CREATE TABLE t2 (a char(257), b varbinary(70000), c varchar(70000000)); Warnings: -Warning 1245 Converting column 'a' from CHAR to TEXT -Warning 1245 Converting column 'b' from CHAR to BLOB -Warning 1245 Converting column 'c' from CHAR to TEXT +Warning 1246 Converting column 'a' from CHAR to TEXT +Warning 1246 Converting column 'b' from CHAR to BLOB +Warning 1246 Converting column 'c' from CHAR to TEXT show columns from t2; Field Type Null Key Default Extra a text YES NULL @@ -57,7 +57,7 @@ select * from t1; a Where drop table t1; -create table t1 (t text,c char(10),b blob, d char(10) binary); +create table t1 (t text,c char(10),b blob, d binary(10)); insert into t1 values (NULL,NULL,NULL,NULL); insert into t1 values ("","","",""); insert into t1 values ("hello","hello","hello","hello"); @@ -73,14 +73,14 @@ Field Type Collation Null Key Default Extra Privileges Comment t text latin1_swedish_ci YES NULL select,insert,update,references c varchar(10) latin1_swedish_ci YES NULL select,insert,update,references b blob NULL YES NULL select,insert,update,references -d varchar(10) binary YES NULL select,insert,update,references +d varbinary(10) NULL YES NULL select,insert,update,references lock tables t1 WRITE; show full fields from t1; Field Type Collation Null Key Default Extra Privileges Comment t text latin1_swedish_ci YES NULL select,insert,update,references c varchar(10) latin1_swedish_ci YES NULL select,insert,update,references b blob NULL YES NULL select,insert,update,references -d varchar(10) binary YES NULL select,insert,update,references +d varbinary(10) NULL YES NULL select,insert,update,references unlock tables; select t from t1 where t like "hello"; t @@ -346,9 +346,17 @@ HELLO MY 1 a 1 hello 1 drop table t1; -create table t1 (a text, key (a(300))); -ERROR HY000: Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the storage engine doesn't support unique sub keys -create table t1 (a text, key (a(255))); +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 1000 bytes +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` text, + KEY `a` (`a`(1000)) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; CREATE TABLE t1 ( t1_id bigint(21) NOT NULL auto_increment, @@ -656,3 +664,9 @@ id txt 2 Chevy 4 Ford drop table t1; +CREATE TABLE t1 ( i int(11) NOT NULL default '0', c text NOT NULL, PRIMARY KEY (i), KEY (c(1),c(1))); +INSERT t1 VALUES (1,''),(2,''),(3,'asdfh'),(4,''); +select max(i) from t1 where c = ''; +max(i) +4 +drop table t1; |