diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/ctype_utf8.result | 34 | ||||
-rw-r--r-- | mysql-test/r/func_str.result | 7 | ||||
-rw-r--r-- | mysql-test/r/range.result | 7 | ||||
-rw-r--r-- | mysql-test/r/user_var-binlog.result | 4 | ||||
-rw-r--r-- | mysql-test/r/view.result | 13 | ||||
-rw-r--r-- | mysql-test/t/ctype_utf8.test | 6 | ||||
-rw-r--r-- | mysql-test/t/func_str.test | 1 | ||||
-rw-r--r-- | mysql-test/t/range.test | 5 | ||||
-rw-r--r-- | mysql-test/t/view.test | 11 |
9 files changed, 58 insertions, 30 deletions
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index 1695f1c67e8..5516be88b75 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -1079,29 +1079,31 @@ char(53647) select char(0xff,0x8f); char(0xff,0x8f) ÿ -Warnings: -Warning 1300 Invalid utf8 character string: 'FF8F' set sql_mode=traditional; select char(0xff,0x8f); char(0xff,0x8f) -NULL -Warnings: -Error 1300 Invalid utf8 character string: 'FF8F' +ÿ +select convert(char(0xff,0x8f) using utf8); +convert(char(0xff,0x8f) using utf8) +ÿ select char(195); char(195) -NULL -Warnings: -Error 1300 Invalid utf8 character string: 'C3' +Ã +select convert(char(195) using utf8); +convert(char(195) using utf8) +Ã select char(196); char(196) -NULL -Warnings: -Error 1300 Invalid utf8 character string: 'C4' -select char(2557); -char(2557) -NULL -Warnings: -Error 1300 Invalid utf8 character string: 'FD' +Ä +select convert(char(196) using utf8); +convert(char(196) using utf8) +Ä +select hex(char(2557)); +hex(char(2557)) +09FD +select hex(convert(char(2557) using utf8)); +hex(convert(char(2557) using utf8)) +09FD set names utf8; create table t1 (a char(1)) default character set utf8; create table t2 (a char(1)) default character set utf8; diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index d250d2fce84..a305bf20bff 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -21,6 +21,9 @@ length(_latin1'\n\t\n\b\0\\_\\%\\') select concat('monty',' was here ','again'),length('hello'),char(ascii('h')),ord('h'); concat('monty',' was here ','again') length('hello') char(ascii('h')) ord('h') monty was here again 5 h 104 +select hex(char(256)); +hex(char(256)) +0100 select locate('he','hello'),locate('he','hello',2),locate('lo','hello',2) ; locate('he','hello') locate('he','hello',2) locate('lo','hello',2) 1 0 4 @@ -598,7 +601,7 @@ collation(hex(130)) coercibility(hex(130)) latin1_swedish_ci 4 select collation(char(130)), coercibility(hex(130)); collation(char(130)) coercibility(hex(130)) -latin1_swedish_ci 4 +binary 4 select collation(format(130,10)), coercibility(format(130,10)); collation(format(130,10)) coercibility(format(130,10)) latin1_swedish_ci 4 @@ -720,7 +723,7 @@ t1 CREATE TABLE `t1` ( `oct(130)` varchar(64) NOT NULL default '', `conv(130,16,10)` varchar(64) NOT NULL default '', `hex(130)` varchar(6) NOT NULL default '', - `char(130)` varchar(1) NOT NULL default '', + `char(130)` varbinary(1) NOT NULL default '', `format(130,10)` varchar(4) NOT NULL default '', `left(_latin2'a',1)` varchar(1) character set latin2 NOT NULL default '', `right(_latin2'a',1)` varchar(1) character set latin2 NOT NULL default '', diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result index 69c150fc0b7..6dedd020249 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -809,4 +809,11 @@ id select_type table type possible_keys key key_len ref rows Extra explain select * from t2 where a = 'a' or a='a '; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref a a 13 const # Using where +update t1 set a='b' where a<>'a'; +explain select * from t1 where a not between 'b' and 'b'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 13 NULL # Using where +select * from t1 where a not between 'b' and 'b'; +a filler +a drop table t1,t2,t3; diff --git a/mysql-test/r/user_var-binlog.result b/mysql-test/r/user_var-binlog.result index 17ac8809d52..700ec7b09e0 100644 --- a/mysql-test/r/user_var-binlog.result +++ b/mysql-test/r/user_var-binlog.result @@ -11,7 +11,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 98 User var 1 139 @`a b`=_latin1 0x68656C6C6F COLLATE latin1_swedish_ci master-bin.000001 139 Query 1 231 use `test`; INSERT INTO t1 VALUES(@`a b`) master-bin.000001 231 User var 1 273 @`var1`=_latin1 0x273B616161 COLLATE latin1_swedish_ci -master-bin.000001 273 User var 1 311 @`var2`=_latin1 0x61 COLLATE latin1_swedish_ci +master-bin.000001 273 User var 1 311 @`var2`=_binary 0x61 COLLATE binary master-bin.000001 311 Query 1 411 use `test`; insert into t1 values (@var1),(@var2) /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; @@ -24,7 +24,7 @@ SET @@session.sql_mode=0; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; INSERT INTO t1 VALUES(@`a b`); SET @`var1`:=_latin1 0x273B616161 COLLATE `latin1_swedish_ci`; -SET @`var2`:=_latin1 0x61 COLLATE `latin1_swedish_ci`; +SET @`var2`:=_binary 0x61 COLLATE `binary`; SET TIMESTAMP=10000; insert into t1 values (@var1),(@var2); # End of log file diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index e52ec950c8c..14187703ca3 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -847,13 +847,16 @@ cast(1 as char(3)) drop view v1; create table t1 (a int); create view v1 as select a from t1; -create database seconddb; -rename table v1 to seconddb.v1; -ERROR HY000: Changing schema from 'test' to 'seconddb' is not allowed. +create view v3 as select a from t1; +create database mysqltest; +rename table v1 to mysqltest.v1; +ERROR HY000: Changing schema from 'test' to 'mysqltest' is not allowed. rename table v1 to v2; +rename table v3 to v1, v2 to t1; +ERROR 42S01: Table 't1' already exists drop table t1; -drop view v2; -drop database seconddb; +drop view v2,v3; +drop database mysqltest; create view v1 as select 'a',1; create view v2 as select * from v1 union all select * from v1; create view v3 as select * from v2 where 1 = (select `1` from v2); diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test index 8194dbdb438..d186ca8a1f6 100644 --- a/mysql-test/t/ctype_utf8.test +++ b/mysql-test/t/ctype_utf8.test @@ -880,9 +880,13 @@ select char(0xff,0x8f); # incorrect value in strict mode: return NULL with "Error" level warning set sql_mode=traditional; select char(0xff,0x8f); +select convert(char(0xff,0x8f) using utf8); select char(195); +select convert(char(195) using utf8); select char(196); -select char(2557); +select convert(char(196) using utf8); +select hex(char(2557)); +select hex(convert(char(2557) using utf8)); # # Bug#12891: UNION doesn't return DISTINCT result for multi-byte characters diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index 6cd27903a42..ac2bf820257 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -15,6 +15,7 @@ select bit_length('\n\t\r\b\0\_\%\\'); select char_length('\n\t\r\b\0\_\%\\'); select length(_latin1'\n\t\n\b\0\\_\\%\\'); select concat('monty',' was here ','again'),length('hello'),char(ascii('h')),ord('h'); +select hex(char(256)); select locate('he','hello'),locate('he','hello',2),locate('lo','hello',2) ; select instr('hello','HE'), instr('hello',binary 'HE'), instr(binary 'hello','HE'); select position(binary 'll' in 'hello'),position('a' in binary 'hello'); diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test index 11c5e8d7bc5..89376d33f61 100644 --- a/mysql-test/t/range.test +++ b/mysql-test/t/range.test @@ -625,4 +625,9 @@ explain select * from t2 where a between 'a' and 'a '; --replace_column 9 # explain select * from t2 where a = 'a' or a='a '; +update t1 set a='b' where a<>'a'; +--replace_column 9 # +explain select * from t1 where a not between 'b' and 'b'; +select * from t1 where a not between 'b' and 'b'; + drop table t1,t2,t3; diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 15c8cccf69c..f49191130f5 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -790,13 +790,16 @@ drop view v1; # create table t1 (a int); create view v1 as select a from t1; -create database seconddb; +create view v3 as select a from t1; +create database mysqltest; -- error 1450 -rename table v1 to seconddb.v1; +rename table v1 to mysqltest.v1; rename table v1 to v2; +--error 1050 +rename table v3 to v1, v2 to t1; drop table t1; -drop view v2; -drop database seconddb; +drop view v2,v3; +drop database mysqltest; # # bug handling from VIEWs |