Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.0(EOL), 10.1(EOL)
Description
In this script:
DROP TABLE IF EXISTS t1;
|
CREATE TABLE t1 (a VARBINARY(10));
|
INSERT INTO t1 VALUES ('a');
|
SELECT * FROM t1 WHERE COLLATION(a)='binary';
|
SELECT * FROM t1 WHERE a='a';
|
the two SELECT queries return one row.
Now if I join both conditions using AND in the same query:
SELECT * FROM t1 WHERE COLLATION(a)='binary' AND a='a';
|
It returns empty set.
A similar script:
DROP TABLE IF EXISTS t1;
|
CREATE TABLE t1 (a VARBINARY(10));
|
INSERT INTO t1 VALUES ('a');
|
SELECT * FROM t1 WHERE CHARSET(a)='binary';
|
SELECT * FROM t1 WHERE a='a';
|
SELECT * FROM t1 WHERE CHARSET(a)='binary' AND a='a';
|
A similar script:
DROP TABLE IF EXISTS t1;
|
CREATE TABLE t1 (a VARBINARY(10));
|
INSERT INTO t1 VALUES ('a');
|
SELECT * FROM t1 WHERE COERCIBILITY(a)=2;
|
SELECT * FROM t1 WHERE a='a';
|
SELECT * FROM t1 WHERE COERCIBILITY(a)=2 AND a='a';
|
A similar script:
DROP TABLE IF EXISTS t1;
|
CREATE TABLE t1 (a VARBINARY(10));
|
INSERT INTO t1 VALUES ('a');
|
SELECT * FROM t1 WHERE WEIGHT_STRING(a)='a';
|
SELECT * FROM t1 WHERE a='a';
|
SELECT * FROM t1 WHERE WEIGHT_STRING(a)='a' AND a='a';
|