diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/func_system.result | 3 | ||||
-rw-r--r-- | mysql-test/r/func_test.result | 3 | ||||
-rw-r--r-- | mysql-test/r/type_blob.result | 32 | ||||
-rw-r--r-- | mysql-test/t/func_system.test | 1 | ||||
-rw-r--r-- | mysql-test/t/func_test.test | 1 | ||||
-rw-r--r-- | mysql-test/t/type_blob.test | 28 |
6 files changed, 67 insertions, 1 deletions
diff --git a/mysql-test/r/func_system.result b/mysql-test/r/func_system.result index 5ea4ed5e4e0..83c2ad6e020 100644 --- a/mysql-test/r/func_system.result +++ b/mysql-test/r/func_system.result @@ -4,3 +4,6 @@ test 1 select version()>="3.23.29"; version()>="3.23.29" 1 +select TRUE,FALSE,NULL; +TRUE FALSE NULL +1 0 NULL diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result index 8cfae44b9dd..9fcf03db838 100644 --- a/mysql-test/r/func_test.result +++ b/mysql-test/r/func_test.result @@ -46,6 +46,9 @@ select 3 ^ 11, 1 ^ 1, 1 ^ 0, 1 ^ NULL, NULL ^ 1; select 1 XOR 1, 1 XOR 0, 0 XOR 1, 0 XOR 0, NULL XOR 1, 1 XOR NULL, 0 XOR NULL; 1 XOR 1 1 XOR 0 0 XOR 1 0 XOR 0 NULL XOR 1 1 XOR NULL 0 XOR NULL 0 1 1 0 NULL NULL NULL +select 10 % 7, 10 mod 7, 10 div 3; +10 % 7 10 mod 7 10 div 3 +3 3 3 select 5 between 0 and 10 between 0 and 1,(5 between 0 and 10) between 0 and 1; 5 between 0 and 10 between 0 and 1 (5 between 0 and 10) between 0 and 1 0 1 diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index c99d22c2889..ba8d4f770f6 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -1,4 +1,36 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7; +CREATE TABLE t1 (a blob, b text, c blob(250), d text(70000), e text(70000000)); +show columns from t1; +Field Type Null Key Default Extra +a blob YES NULL +b text character set latin1 YES NULL +c blob YES NULL +d mediumtext character set latin1 YES NULL +e longtext character set latin1 YES NULL +CREATE TABLE t2 (a char(257), b varchar(70000) binary, c varchar(70000000)); +Warnings: +Warning 1244 Converting column 'a' from CHAR to TEXT +Warning 1244 Converting column 'b' from CHAR to BLOB +Warning 1244 Converting column 'c' from CHAR to TEXT +show columns from t2; +Field Type Null Key Default Extra +a text character set latin1 YES NULL +b mediumblob YES NULL +c longtext character set latin1 YES NULL +create table t3 (a long, b long byte); +show create TABLE t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `a` mediumtext character set latin1, + `b` mediumblob +) TYPE=MyISAM CHARSET=latin1 +drop table t1,t2,t3 +#; +CREATE TABLE t1 (a char(257) default "hello"); +Too big column length for column 'a' (max = 255). Use BLOB instead +CREATE TABLE t2 (a blob default "hello"); +BLOB column 'a' can't have a default value +drop table if exists t1,t2; create table t1 (nr int(5) not null auto_increment,b blob,str char(10), primary key (nr)); insert into t1 values (null,"a","A"); insert into t1 values (null,"bbb","BBB"); diff --git a/mysql-test/t/func_system.test b/mysql-test/t/func_system.test index 052e0530cf6..c69526644f4 100644 --- a/mysql-test/t/func_system.test +++ b/mysql-test/t/func_system.test @@ -4,3 +4,4 @@ select database(),user() like "%@%"; select version()>="3.23.29"; +select TRUE,FALSE,NULL; diff --git a/mysql-test/t/func_test.test b/mysql-test/t/func_test.test index f5ad2e21c73..8810aefc20f 100644 --- a/mysql-test/t/func_test.test +++ b/mysql-test/t/func_test.test @@ -17,6 +17,7 @@ select 2 in (3,2,5,9,5,1),"monty" in ("david","monty","allan"), 1.2 in (1.4,1.2, select -1.49 or -1.49,0.6 or 0.6; select 3 ^ 11, 1 ^ 1, 1 ^ 0, 1 ^ NULL, NULL ^ 1; select 1 XOR 1, 1 XOR 0, 0 XOR 1, 0 XOR 0, NULL XOR 1, 1 XOR NULL, 0 XOR NULL; +select 10 % 7, 10 mod 7, 10 div 3; # # Wrong usage of functions diff --git a/mysql-test/t/type_blob.test b/mysql-test/t/type_blob.test index 2b23617ec8b..234daeabc2b 100644 --- a/mysql-test/t/type_blob.test +++ b/mysql-test/t/type_blob.test @@ -1,8 +1,34 @@ # +# Basic cleanup +# +drop table if exists t1,t2,t3,t4,t5,t6,t7; + +# +# Check syntax for creating BLOB/TEXT +# + +CREATE TABLE t1 (a blob, b text, c blob(250), d text(70000), e text(70000000)); +show columns from t1; +CREATE TABLE t2 (a char(257), b varchar(70000) binary, c varchar(70000000)); +show columns from t2; +create table t3 (a long, b long byte); +show create TABLE t3; +drop table t1,t2,t3 + +# +# Check errors with blob +# + +--error 1074 +CREATE TABLE t1 (a char(257) default "hello"); +--error 1101 +CREATE TABLE t2 (a blob default "hello"); +drop table if exists t1,t2; + +# # test of full join with blob # -drop table if exists t1,t2,t3,t4,t5,t6,t7; create table t1 (nr int(5) not null auto_increment,b blob,str char(10), primary key (nr)); insert into t1 values (null,"a","A"); insert into t1 values (null,"bbb","BBB"); |