-
Guilhem Bichot authored
Any use of the BINARY keyword in a query when (and only when) the goal is to specify a _bin collation of a character set, now triggers a warning like this: 'BINARY as attribute of a type' is deprecated and will be removed in a future release. Please use a CHARACTER SET clause with _bin collation instead Examples: create table t1 (v varchar(10) binary); create table t1 (v varchar(10) character set latin1 binary); create table t1 (v varchar(10) binary ascii); select cast('a' as char(2) binary); All above statements now send a warning. But the ones below still don't, as they do select a "binary" *charset*, not just a "_bin" collation of another charset create table t1 (v binary(10)); create table t1 (v varchar(10)) character set binary; alter table t1 character set binary; create database mysqltest2 default character set = binary; set names binary; select convert("123" using binary); Approved by Gleb Shchepa <gleb.shchepa@oracle.com>
Guilhem Bichot authoredAny use of the BINARY keyword in a query when (and only when) the goal is to specify a _bin collation of a character set, now triggers a warning like this: 'BINARY as attribute of a type' is deprecated and will be removed in a future release. Please use a CHARACTER SET clause with _bin collation instead Examples: create table t1 (v varchar(10) binary); create table t1 (v varchar(10) character set latin1 binary); create table t1 (v varchar(10) binary ascii); select cast('a' as char(2) binary); All above statements now send a warning. But the ones below still don't, as they do select a "binary" *charset*, not just a "_bin" collation of another charset create table t1 (v binary(10)); create table t1 (v varchar(10)) character set binary; alter table t1 character set binary; create database mysqltest2 default character set = binary; set names binary; select convert("123" using binary); Approved by Gleb Shchepa <gleb.shchepa@oracle.com>
Loading