mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 02:30:06 +01:00
MDEV-8694 Wrong result for SELECT..WHERE a NOT LIKE 'a ' AND a='a'
Note, the patch for MDEV-8661 unintentionally fixed MDEV-8694 as well, as a side effect. Adding a real clear fix: implementing Item_func_like::propagate_equal_fields() with comments.
This commit is contained in:
parent
3bca8db4f9
commit
3ba2a958be
20 changed files with 803 additions and 36 deletions
|
@ -201,6 +201,10 @@ extern MY_UNI_CTYPE my_uni_ctype[256];
|
||||||
#define MY_CS_UNICODE_SUPPLEMENT 16384 /* Non-BMP Unicode characters */
|
#define MY_CS_UNICODE_SUPPLEMENT 16384 /* Non-BMP Unicode characters */
|
||||||
#define MY_CS_LOWER_SORT 32768 /* If use lower case as weight */
|
#define MY_CS_LOWER_SORT 32768 /* If use lower case as weight */
|
||||||
#define MY_CS_STRNXFRM_BAD_NWEIGHTS 0x10000 /* strnxfrm ignores "nweights" */
|
#define MY_CS_STRNXFRM_BAD_NWEIGHTS 0x10000 /* strnxfrm ignores "nweights" */
|
||||||
|
#define MY_CS_NOPAD 0x20000 /* if does not ignore trailing spaces */
|
||||||
|
#define MY_CS_NON1TO1 0x40000 /* Has a complex mapping from characters
|
||||||
|
to weights, e.g. contractions, expansions,
|
||||||
|
ignorable characters */
|
||||||
#define MY_CHARSET_UNDEFINED 0
|
#define MY_CHARSET_UNDEFINED 0
|
||||||
|
|
||||||
/* Character repertoire flags */
|
/* Character repertoire flags */
|
||||||
|
|
|
@ -37,3 +37,19 @@ SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
|
||||||
SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
|
SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
|
||||||
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
|
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-8694 Wrong result for SELECT..WHERE a NOT LIKE 'a ' AND a='a'
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
INSERT INTO t1 VALUES ('a'),('a ');
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
EXPLAIN EXTENDED SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of MDEV-8694
|
||||||
|
--echo #
|
||||||
|
|
|
@ -3008,6 +3008,31 @@ Warnings:
|
||||||
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ('%' = concat(`test`.`t1`.`c1`))
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ('%' = concat(`test`.`t1`.`c1`))
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
|
# MDEV-8694 Wrong result for SELECT..WHERE a NOT LIKE 'a ' AND a='a'
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varbinary(10) NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('a'),('a ');
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 1
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 1
|
||||||
|
EXPLAIN EXTENDED SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`a` AS `a`,length(`test`.`t1`.`a`) AS `LENGTH(a)` from `test`.`t1` where (`test`.`t1`.`a` = 'a')
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# End of MDEV-8694
|
||||||
|
#
|
||||||
|
#
|
||||||
# MDEV-7629 Regression: Bit and hex string literals changed column names in 10.0.14
|
# MDEV-7629 Regression: Bit and hex string literals changed column names in 10.0.14
|
||||||
#
|
#
|
||||||
SELECT _binary 0x7E, _binary X'7E', _binary B'01111110';
|
SELECT _binary 0x7E, _binary X'7E', _binary B'01111110';
|
||||||
|
|
|
@ -105,6 +105,126 @@ SET character_set_server= @safe_character_set_server;
|
||||||
SET collation_server= @safe_collation_server;
|
SET collation_server= @safe_collation_server;
|
||||||
SET character_set_client= @safe_character_set_client;
|
SET character_set_client= @safe_character_set_client;
|
||||||
SET character_set_results= @safe_character_set_results;
|
SET character_set_results= @safe_character_set_results;
|
||||||
|
#
|
||||||
|
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`c1` varchar(10) CHARACTER SET utf8 NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('a'),('a ');
|
||||||
|
SELECT * FROM t1 WHERE CONCAT(c1)='a';
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
a
|
||||||
|
SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a ';
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a '))
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`c1` varchar(10) CHARACTER SET utf8 NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('a'),('a ');
|
||||||
|
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
a
|
||||||
|
SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`)))
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`c1` varchar(10) CHARACTER SET utf8 NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('%'),('% ');
|
||||||
|
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
%
|
||||||
|
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`c1` varchar(10) CHARACTER SET utf8 NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('%'),('% ');
|
||||||
|
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
%
|
||||||
|
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# MDEV-8694 Wrong result for SELECT..WHERE a NOT LIKE 'a ' AND a='a'
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET utf8 NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('a'),('a ');
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 1
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 1
|
||||||
|
EXPLAIN EXTENDED SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`a` AS `a`,length(`test`.`t1`.`a`) AS `LENGTH(a)` from `test`.`t1` where ((not((`test`.`t1`.`a` like 'a '))) and (`test`.`t1`.`a` = 'a'))
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# End of MDEV-8694
|
||||||
|
#
|
||||||
SET @test_character_set= 'cp1250';
|
SET @test_character_set= 'cp1250';
|
||||||
SET @test_collation= 'cp1250_czech_cs';
|
SET @test_collation= 'cp1250_czech_cs';
|
||||||
SET @safe_character_set_server= @@character_set_server;
|
SET @safe_character_set_server= @@character_set_server;
|
||||||
|
|
|
@ -7755,6 +7755,31 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# MDEV-8694 Wrong result for SELECT..WHERE a NOT LIKE 'a ' AND a='a'
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('a'),('a ');
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 1
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 1
|
||||||
|
EXPLAIN EXTENDED SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`a` AS `a`,length(`test`.`t1`.`a`) AS `LENGTH(a)` from `test`.`t1` where ((`test`.`t1`.`a` = 'a') and (not((`test`.`t1`.`a` like 'a '))))
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# End of MDEV-8694
|
||||||
|
#
|
||||||
SET NAMES latin1 COLLATE latin1_bin;
|
SET NAMES latin1 COLLATE latin1_bin;
|
||||||
#
|
#
|
||||||
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
|
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
|
||||||
|
@ -7852,6 +7877,31 @@ Warnings:
|
||||||
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
|
# MDEV-8694 Wrong result for SELECT..WHERE a NOT LIKE 'a ' AND a='a'
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('a'),('a ');
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 1
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 1
|
||||||
|
EXPLAIN EXTENDED SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`a` AS `a`,length(`test`.`t1`.`a`) AS `LENGTH(a)` from `test`.`t1` where ((`test`.`t1`.`a` = 'a') and (not((`test`.`t1`.`a` like 'a '))))
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# End of MDEV-8694
|
||||||
|
#
|
||||||
|
#
|
||||||
# MDEV-6752 Trailing incomplete characters are not replaced to question marks on conversion
|
# MDEV-6752 Trailing incomplete characters are not replaced to question marks on conversion
|
||||||
#
|
#
|
||||||
SET NAMES utf8, character_set_connection=latin1;
|
SET NAMES utf8, character_set_connection=latin1;
|
||||||
|
|
|
@ -45,6 +45,126 @@ strcmp('a\t','a' )
|
||||||
SELECT strcmp('a\t','a ');
|
SELECT strcmp('a\t','a ');
|
||||||
strcmp('a\t','a ')
|
strcmp('a\t','a ')
|
||||||
0
|
0
|
||||||
|
#
|
||||||
|
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`c1` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('a'),('a ');
|
||||||
|
SELECT * FROM t1 WHERE CONCAT(c1)='a';
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
a
|
||||||
|
SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a ';
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a '))
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`c1` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('a'),('a ');
|
||||||
|
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
a
|
||||||
|
SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`)))
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`c1` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('%'),('% ');
|
||||||
|
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
%
|
||||||
|
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`c1` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('%'),('% ');
|
||||||
|
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
%
|
||||||
|
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# MDEV-8694 Wrong result for SELECT..WHERE a NOT LIKE 'a ' AND a='a'
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('a'),('a ');
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 1
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 1
|
||||||
|
EXPLAIN EXTENDED SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`a` AS `a`,length(`test`.`t1`.`a`) AS `LENGTH(a)` from `test`.`t1` where ((`test`.`t1`.`a` = 'a') and (not((`test`.`t1`.`a` like 'a '))))
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# End of MDEV-8694
|
||||||
|
#
|
||||||
create table t1 (
|
create table t1 (
|
||||||
a varchar(2) character set latin2 collate latin2_czech_cs,
|
a varchar(2) character set latin2 collate latin2_czech_cs,
|
||||||
primary key(a)
|
primary key(a)
|
||||||
|
|
|
@ -3115,6 +3115,126 @@ Zz 5A,7A
|
||||||
~ 7E
|
~ 7E
|
||||||
7F
|
7F
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
#
|
||||||
|
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`c1` varchar(10) CHARACTER SET tis620 NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('a'),('a ');
|
||||||
|
SELECT * FROM t1 WHERE CONCAT(c1)='a';
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
a
|
||||||
|
SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a ';
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a '))
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`c1` varchar(10) CHARACTER SET tis620 NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('a'),('a ');
|
||||||
|
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
a
|
||||||
|
SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`)))
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`c1` varchar(10) CHARACTER SET tis620 NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('%'),('% ');
|
||||||
|
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
%
|
||||||
|
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`c1` varchar(10) CHARACTER SET tis620 NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('%'),('% ');
|
||||||
|
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
%
|
||||||
|
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# MDEV-8694 Wrong result for SELECT..WHERE a NOT LIKE 'a ' AND a='a'
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET tis620 NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('a'),('a ');
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 1
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 1
|
||||||
|
EXPLAIN EXTENDED SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`a` AS `a`,length(`test`.`t1`.`a`) AS `LENGTH(a)` from `test`.`t1` where ((`test`.`t1`.`a` = 'a') and (not((`test`.`t1`.`a` like 'a '))))
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# End of MDEV-8694
|
||||||
|
#
|
||||||
SET collation_connection='tis620_bin';
|
SET collation_connection='tis620_bin';
|
||||||
create table t1 select repeat('a',4000) a;
|
create table t1 select repeat('a',4000) a;
|
||||||
delete from t1;
|
delete from t1;
|
||||||
|
@ -3212,6 +3332,126 @@ c2h
|
||||||
ab_def
|
ab_def
|
||||||
drop table t1;
|
drop table t1;
|
||||||
#
|
#
|
||||||
|
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`c1` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('a'),('a ');
|
||||||
|
SELECT * FROM t1 WHERE CONCAT(c1)='a';
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
a
|
||||||
|
SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a ';
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a '))
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`c1` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('a'),('a ');
|
||||||
|
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
a
|
||||||
|
SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
a
|
||||||
|
EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`)))
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`c1` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('%'),('% ');
|
||||||
|
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
%
|
||||||
|
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`c1` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('%'),('% ');
|
||||||
|
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
%
|
||||||
|
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
|
||||||
|
c1
|
||||||
|
%
|
||||||
|
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# MDEV-8694 Wrong result for SELECT..WHERE a NOT LIKE 'a ' AND a='a'
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('a'),('a ');
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 1
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 1
|
||||||
|
EXPLAIN EXTENDED SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`a` AS `a`,length(`test`.`t1`.`a`) AS `LENGTH(a)` from `test`.`t1` where ((`test`.`t1`.`a` = 'a') and (not((`test`.`t1`.`a` like 'a '))))
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# End of MDEV-8694
|
||||||
|
#
|
||||||
|
#
|
||||||
# Start of 5.6 tests
|
# Start of 5.6 tests
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
|
@ -8285,6 +8285,31 @@ Warnings:
|
||||||
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
|
# MDEV-8694 Wrong result for SELECT..WHERE a NOT LIKE 'a ' AND a='a'
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('a'),('a ');
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 1
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 1
|
||||||
|
EXPLAIN EXTENDED SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`a` AS `a`,length(`test`.`t1`.`a`) AS `LENGTH(a)` from `test`.`t1` where ((not((`test`.`t1`.`a` like 'a '))) and (`test`.`t1`.`a` = 'a'))
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# End of MDEV-8694
|
||||||
|
#
|
||||||
|
#
|
||||||
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
|
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
|
||||||
#
|
#
|
||||||
CREATE TABLE t1 AS SELECT REPEAT('a',10) AS c1 LIMIT 0;
|
CREATE TABLE t1 AS SELECT REPEAT('a',10) AS c1 LIMIT 0;
|
||||||
|
@ -8418,6 +8443,31 @@ Warnings:
|
||||||
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
|
# MDEV-8694 Wrong result for SELECT..WHERE a NOT LIKE 'a ' AND a='a'
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('a'),('a ');
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 1
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 1
|
||||||
|
EXPLAIN EXTENDED SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`a` AS `a`,length(`test`.`t1`.`a`) AS `LENGTH(a)` from `test`.`t1` where ((not((`test`.`t1`.`a` like 'a '))) and (`test`.`t1`.`a` = 'a'))
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# End of MDEV-8694
|
||||||
|
#
|
||||||
|
#
|
||||||
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
|
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
|
||||||
#
|
#
|
||||||
CREATE TABLE t1 AS SELECT REPEAT('a',10) AS c1 LIMIT 0;
|
CREATE TABLE t1 AS SELECT REPEAT('a',10) AS c1 LIMIT 0;
|
||||||
|
|
|
@ -5446,6 +5446,31 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# MDEV-8694 Wrong result for SELECT..WHERE a NOT LIKE 'a ' AND a='a'
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('a'),('a ');
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 2
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 2
|
||||||
|
EXPLAIN EXTENDED SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`a` AS `a`,length(`test`.`t1`.`a`) AS `LENGTH(a)` from `test`.`t1` where ((`test`.`t1`.`a` = 'a') and (not((`test`.`t1`.`a` like 'a '))))
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# End of MDEV-8694
|
||||||
|
#
|
||||||
SET NAMES latin1, collation_connection=ucs2_general_ci;
|
SET NAMES latin1, collation_connection=ucs2_general_ci;
|
||||||
#
|
#
|
||||||
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
|
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
|
||||||
|
@ -5542,6 +5567,31 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# MDEV-8694 Wrong result for SELECT..WHERE a NOT LIKE 'a ' AND a='a'
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET ucs2 NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('a'),('a ');
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 2
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 2
|
||||||
|
EXPLAIN EXTENDED SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`a` AS `a`,length(`test`.`t1`.`a`) AS `LENGTH(a)` from `test`.`t1` where ((`test`.`t1`.`a` = 'a') and (not((`test`.`t1`.`a` like 'a '))))
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# End of MDEV-8694
|
||||||
|
#
|
||||||
SET NAMES latin1;
|
SET NAMES latin1;
|
||||||
#
|
#
|
||||||
# MDEV-6661 PI() does not work well in UCS2/UTF16/UTF32 context
|
# MDEV-6661 PI() does not work well in UCS2/UTF16/UTF32 context
|
||||||
|
|
|
@ -6775,6 +6775,31 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# MDEV-8694 Wrong result for SELECT..WHERE a NOT LIKE 'a ' AND a='a'
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('a'),('a ');
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 1
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 1
|
||||||
|
EXPLAIN EXTENDED SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`a` AS `a`,length(`test`.`t1`.`a`) AS `LENGTH(a)` from `test`.`t1` where ((`test`.`t1`.`a` = 'a') and (not((`test`.`t1`.`a` like 'a '))))
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# End of MDEV-8694
|
||||||
|
#
|
||||||
SET NAMES utf8;
|
SET NAMES utf8;
|
||||||
#
|
#
|
||||||
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
|
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
|
||||||
|
@ -6872,6 +6897,31 @@ Warnings:
|
||||||
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
|
# MDEV-8694 Wrong result for SELECT..WHERE a NOT LIKE 'a ' AND a='a'
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` varchar(10) CHARACTER SET utf8 NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
INSERT INTO t1 VALUES ('a'),('a ');
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 1
|
||||||
|
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
a LENGTH(a)
|
||||||
|
a 1
|
||||||
|
EXPLAIN EXTENDED SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`a` AS `a`,length(`test`.`t1`.`a`) AS `LENGTH(a)` from `test`.`t1` where ((not((`test`.`t1`.`a` like 'a '))) and (`test`.`t1`.`a` = 'a'))
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# End of MDEV-8694
|
||||||
|
#
|
||||||
|
#
|
||||||
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
|
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
|
||||||
#
|
#
|
||||||
CREATE TABLE t1 AS SELECT REPEAT('a',10) AS c1 LIMIT 0;
|
CREATE TABLE t1 AS SELECT REPEAT('a',10) AS c1 LIMIT 0;
|
||||||
|
|
|
@ -12,6 +12,7 @@ SHOW COLLATION LIKE 'cp1250_czech_cs';
|
||||||
SET @test_character_set= 'cp1250';
|
SET @test_character_set= 'cp1250';
|
||||||
SET @test_collation= 'cp1250_general_ci';
|
SET @test_collation= 'cp1250_general_ci';
|
||||||
-- source include/ctype_common.inc
|
-- source include/ctype_common.inc
|
||||||
|
-- source include/ctype_like_cond_propagation.inc
|
||||||
|
|
||||||
SET @test_character_set= 'cp1250';
|
SET @test_character_set= 'cp1250';
|
||||||
SET @test_collation= 'cp1250_czech_cs';
|
SET @test_collation= 'cp1250_czech_cs';
|
||||||
|
|
|
@ -33,6 +33,7 @@ drop table t1;
|
||||||
|
|
||||||
set names latin2 collate latin2_czech_cs;
|
set names latin2 collate latin2_czech_cs;
|
||||||
--source include/ctype_pad_space.inc
|
--source include/ctype_pad_space.inc
|
||||||
|
--source include/ctype_like_cond_propagation.inc
|
||||||
|
|
||||||
# We can not use ctype_filesort.inc because
|
# We can not use ctype_filesort.inc because
|
||||||
# order of SPACE and TAB is not strict
|
# order of SPACE and TAB is not strict
|
||||||
|
|
|
@ -157,9 +157,11 @@ SET collation_connection='tis620_thai_ci';
|
||||||
-- source include/ctype_filesort.inc
|
-- source include/ctype_filesort.inc
|
||||||
-- source include/ctype_like_escape.inc
|
-- source include/ctype_like_escape.inc
|
||||||
--source include/ctype_ascii_order.inc
|
--source include/ctype_ascii_order.inc
|
||||||
|
-- source include/ctype_like_cond_propagation.inc
|
||||||
SET collation_connection='tis620_bin';
|
SET collation_connection='tis620_bin';
|
||||||
-- source include/ctype_filesort.inc
|
-- source include/ctype_filesort.inc
|
||||||
-- source include/ctype_like_escape.inc
|
-- source include/ctype_like_escape.inc
|
||||||
|
-- source include/ctype_like_cond_propagation.inc
|
||||||
|
|
||||||
# End of 4.1 tests
|
# End of 4.1 tests
|
||||||
|
|
||||||
|
|
|
@ -1614,6 +1614,38 @@ public:
|
||||||
Item_bool_func2::get_mm_tree(param, cond_ptr) :
|
Item_bool_func2::get_mm_tree(param, cond_ptr) :
|
||||||
Item_func::get_mm_tree(param, cond_ptr);
|
Item_func::get_mm_tree(param, cond_ptr);
|
||||||
}
|
}
|
||||||
|
Item* propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
LIKE differs from the regular comparison operator ('=') in the following:
|
||||||
|
- LIKE never ignores trailing spaces (even for PAD SPACE collations)
|
||||||
|
Propagation of equal fields with a PAD SPACE collation into LIKE
|
||||||
|
is not safe.
|
||||||
|
Example:
|
||||||
|
WHERE a='a ' AND a LIKE 'a' - returns true for 'a'
|
||||||
|
cannot be rewritten to:
|
||||||
|
WHERE a='a ' AND 'a ' LIKE 'a' - returns false for 'a'
|
||||||
|
Note, binary collations in MySQL/MariaDB, e.g. latin1_bin,
|
||||||
|
still have the PAD SPACE attribute and ignore trailing spaces!
|
||||||
|
- LIKE does not take into account contractions, expansions,
|
||||||
|
and ignorable characters.
|
||||||
|
Propagation of equal fields with contractions/expansions/ignorables
|
||||||
|
is also not safe.
|
||||||
|
|
||||||
|
It's safe to propagate my_charset_bin (BINARY/VARBINARY/BLOB) values,
|
||||||
|
because they do not ignore trailing spaces and have one-to-one mapping
|
||||||
|
between a string and its weights.
|
||||||
|
The below condition should be true only for my_charset_bin
|
||||||
|
(as of version 10.1.7).
|
||||||
|
*/
|
||||||
|
uint flags= Item_func_like::compare_collation()->state;
|
||||||
|
if ((flags & MY_CS_NOPAD) && !(flags & MY_CS_NON1TO1))
|
||||||
|
Item_args::propagate_equal_fields(thd,
|
||||||
|
Context(ANY_SUBST,
|
||||||
|
compare_collation()),
|
||||||
|
cond);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
const char *func_name() const { return "like"; }
|
const char *func_name() const { return "like"; }
|
||||||
bool fix_fields(THD *thd, Item **ref);
|
bool fix_fields(THD *thd, Item **ref);
|
||||||
void fix_length_and_dec()
|
void fix_length_and_dec()
|
||||||
|
|
|
@ -557,7 +557,7 @@ static MY_CHARSET_HANDLER my_charset_handler=
|
||||||
struct charset_info_st my_charset_bin =
|
struct charset_info_st my_charset_bin =
|
||||||
{
|
{
|
||||||
63,0,0, /* number */
|
63,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_PRIMARY,/* state */
|
MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_PRIMARY|MY_CS_NOPAD,/* state */
|
||||||
"binary", /* cs name */
|
"binary", /* cs name */
|
||||||
"binary", /* name */
|
"binary", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
|
|
@ -625,7 +625,8 @@ static MY_COLLATION_HANDLER my_collation_latin2_czech_ci_handler =
|
||||||
struct charset_info_st my_charset_latin2_czech_ci =
|
struct charset_info_st my_charset_latin2_czech_ci =
|
||||||
{
|
{
|
||||||
2,0,0, /* number */
|
2,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_CSSORT|MY_CS_STRNXFRM_BAD_NWEIGHTS, /* state */
|
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_CSSORT|
|
||||||
|
MY_CS_STRNXFRM_BAD_NWEIGHTS|MY_CS_NON1TO1, /* state */
|
||||||
"latin2", /* cs name */
|
"latin2", /* cs name */
|
||||||
"latin2_czech_cs", /* name */
|
"latin2_czech_cs", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
|
|
@ -736,7 +736,7 @@ static MY_COLLATION_HANDLER my_collation_german2_ci_handler=
|
||||||
struct charset_info_st my_charset_latin1_german2_ci=
|
struct charset_info_st my_charset_latin1_german2_ci=
|
||||||
{
|
{
|
||||||
31,0,0, /* number */
|
31,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM, /* state */
|
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_NON1TO1, /* state */
|
||||||
"latin1", /* cs name */
|
"latin1", /* cs name */
|
||||||
"latin1_german2_ci", /* name */
|
"latin1_german2_ci", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
|
|
@ -897,7 +897,7 @@ static MY_CHARSET_HANDLER my_charset_handler=
|
||||||
struct charset_info_st my_charset_tis620_thai_ci=
|
struct charset_info_st my_charset_tis620_thai_ci=
|
||||||
{
|
{
|
||||||
18,0,0, /* number */
|
18,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM, /* state */
|
MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM|MY_CS_NON1TO1, /* state */
|
||||||
"tis620", /* cs name */
|
"tis620", /* cs name */
|
||||||
"tis620_thai_ci", /* name */
|
"tis620_thai_ci", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
|
|
@ -35,6 +35,8 @@
|
||||||
#include "strings_def.h"
|
#include "strings_def.h"
|
||||||
#include <m_ctype.h>
|
#include <m_ctype.h>
|
||||||
|
|
||||||
|
#define MY_CS_COMMON_UCA_FLAGS (MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NON1TO1)
|
||||||
|
|
||||||
#define MY_UCA_CNT_FLAG_SIZE 4096
|
#define MY_UCA_CNT_FLAG_SIZE 4096
|
||||||
#define MY_UCA_CNT_FLAG_MASK 4095
|
#define MY_UCA_CNT_FLAG_MASK 4095
|
||||||
#define MY_UCA_CNT_HEAD 1
|
#define MY_UCA_CNT_HEAD 1
|
||||||
|
@ -22926,10 +22928,12 @@ MY_COLLATION_HANDLER my_collation_ucs2_uca_handler =
|
||||||
my_propagate_complex
|
my_propagate_complex
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define MY_CS_UCS2_UCA_FLAGS (MY_CS_COMMON_UCA_FLAGS|MY_CS_NONASCII)
|
||||||
|
|
||||||
struct charset_info_st my_charset_ucs2_unicode_ci=
|
struct charset_info_st my_charset_ucs2_unicode_ci=
|
||||||
{
|
{
|
||||||
128,0,0, /* number */
|
128,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* cs name */
|
"ucs2", /* cs name */
|
||||||
"ucs2_unicode_ci", /* name */
|
"ucs2_unicode_ci", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -22961,7 +22965,7 @@ struct charset_info_st my_charset_ucs2_unicode_ci=
|
||||||
struct charset_info_st my_charset_ucs2_icelandic_uca_ci=
|
struct charset_info_st my_charset_ucs2_icelandic_uca_ci=
|
||||||
{
|
{
|
||||||
129,0,0, /* number */
|
129,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* cs name */
|
"ucs2", /* cs name */
|
||||||
"ucs2_icelandic_ci",/* name */
|
"ucs2_icelandic_ci",/* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -22993,7 +22997,7 @@ struct charset_info_st my_charset_ucs2_icelandic_uca_ci=
|
||||||
struct charset_info_st my_charset_ucs2_latvian_uca_ci=
|
struct charset_info_st my_charset_ucs2_latvian_uca_ci=
|
||||||
{
|
{
|
||||||
130,0,0, /* number */
|
130,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* cs name */
|
"ucs2", /* cs name */
|
||||||
"ucs2_latvian_ci", /* name */
|
"ucs2_latvian_ci", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23025,7 +23029,7 @@ struct charset_info_st my_charset_ucs2_latvian_uca_ci=
|
||||||
struct charset_info_st my_charset_ucs2_romanian_uca_ci=
|
struct charset_info_st my_charset_ucs2_romanian_uca_ci=
|
||||||
{
|
{
|
||||||
131,0,0, /* number */
|
131,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* cs name */
|
"ucs2", /* cs name */
|
||||||
"ucs2_romanian_ci", /* name */
|
"ucs2_romanian_ci", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23057,7 +23061,7 @@ struct charset_info_st my_charset_ucs2_romanian_uca_ci=
|
||||||
struct charset_info_st my_charset_ucs2_slovenian_uca_ci=
|
struct charset_info_st my_charset_ucs2_slovenian_uca_ci=
|
||||||
{
|
{
|
||||||
132,0,0, /* number */
|
132,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* cs name */
|
"ucs2", /* cs name */
|
||||||
"ucs2_slovenian_ci",/* name */
|
"ucs2_slovenian_ci",/* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23089,7 +23093,7 @@ struct charset_info_st my_charset_ucs2_slovenian_uca_ci=
|
||||||
struct charset_info_st my_charset_ucs2_polish_uca_ci=
|
struct charset_info_st my_charset_ucs2_polish_uca_ci=
|
||||||
{
|
{
|
||||||
133,0,0, /* number */
|
133,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* cs name */
|
"ucs2", /* cs name */
|
||||||
"ucs2_polish_ci", /* name */
|
"ucs2_polish_ci", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23121,7 +23125,7 @@ struct charset_info_st my_charset_ucs2_polish_uca_ci=
|
||||||
struct charset_info_st my_charset_ucs2_estonian_uca_ci=
|
struct charset_info_st my_charset_ucs2_estonian_uca_ci=
|
||||||
{
|
{
|
||||||
134,0,0, /* number */
|
134,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* cs name */
|
"ucs2", /* cs name */
|
||||||
"ucs2_estonian_ci", /* name */
|
"ucs2_estonian_ci", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23153,7 +23157,7 @@ struct charset_info_st my_charset_ucs2_estonian_uca_ci=
|
||||||
struct charset_info_st my_charset_ucs2_spanish_uca_ci=
|
struct charset_info_st my_charset_ucs2_spanish_uca_ci=
|
||||||
{
|
{
|
||||||
135,0,0, /* number */
|
135,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* cs name */
|
"ucs2", /* cs name */
|
||||||
"ucs2_spanish_ci", /* name */
|
"ucs2_spanish_ci", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23185,7 +23189,7 @@ struct charset_info_st my_charset_ucs2_spanish_uca_ci=
|
||||||
struct charset_info_st my_charset_ucs2_swedish_uca_ci=
|
struct charset_info_st my_charset_ucs2_swedish_uca_ci=
|
||||||
{
|
{
|
||||||
136,0,0, /* number */
|
136,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* cs name */
|
"ucs2", /* cs name */
|
||||||
"ucs2_swedish_ci", /* name */
|
"ucs2_swedish_ci", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23217,7 +23221,7 @@ struct charset_info_st my_charset_ucs2_swedish_uca_ci=
|
||||||
struct charset_info_st my_charset_ucs2_turkish_uca_ci=
|
struct charset_info_st my_charset_ucs2_turkish_uca_ci=
|
||||||
{
|
{
|
||||||
137,0,0, /* number */
|
137,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* cs name */
|
"ucs2", /* cs name */
|
||||||
"ucs2_turkish_ci", /* name */
|
"ucs2_turkish_ci", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23249,7 +23253,7 @@ struct charset_info_st my_charset_ucs2_turkish_uca_ci=
|
||||||
struct charset_info_st my_charset_ucs2_czech_uca_ci=
|
struct charset_info_st my_charset_ucs2_czech_uca_ci=
|
||||||
{
|
{
|
||||||
138,0,0, /* number */
|
138,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* cs name */
|
"ucs2", /* cs name */
|
||||||
"ucs2_czech_ci", /* name */
|
"ucs2_czech_ci", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23282,7 +23286,7 @@ struct charset_info_st my_charset_ucs2_czech_uca_ci=
|
||||||
struct charset_info_st my_charset_ucs2_danish_uca_ci=
|
struct charset_info_st my_charset_ucs2_danish_uca_ci=
|
||||||
{
|
{
|
||||||
139,0,0, /* number */
|
139,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* cs name */
|
"ucs2", /* cs name */
|
||||||
"ucs2_danish_ci", /* name */
|
"ucs2_danish_ci", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23314,7 +23318,7 @@ struct charset_info_st my_charset_ucs2_danish_uca_ci=
|
||||||
struct charset_info_st my_charset_ucs2_lithuanian_uca_ci=
|
struct charset_info_st my_charset_ucs2_lithuanian_uca_ci=
|
||||||
{
|
{
|
||||||
140,0,0, /* number */
|
140,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* cs name */
|
"ucs2", /* cs name */
|
||||||
"ucs2_lithuanian_ci",/* name */
|
"ucs2_lithuanian_ci",/* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23346,7 +23350,7 @@ struct charset_info_st my_charset_ucs2_lithuanian_uca_ci=
|
||||||
struct charset_info_st my_charset_ucs2_slovak_uca_ci=
|
struct charset_info_st my_charset_ucs2_slovak_uca_ci=
|
||||||
{
|
{
|
||||||
141,0,0, /* number */
|
141,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* cs name */
|
"ucs2", /* cs name */
|
||||||
"ucs2_slovak_ci", /* name */
|
"ucs2_slovak_ci", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23378,7 +23382,7 @@ struct charset_info_st my_charset_ucs2_slovak_uca_ci=
|
||||||
struct charset_info_st my_charset_ucs2_spanish2_uca_ci=
|
struct charset_info_st my_charset_ucs2_spanish2_uca_ci=
|
||||||
{
|
{
|
||||||
142,0,0, /* number */
|
142,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* cs name */
|
"ucs2", /* cs name */
|
||||||
"ucs2_spanish2_ci", /* name */
|
"ucs2_spanish2_ci", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23411,7 +23415,7 @@ struct charset_info_st my_charset_ucs2_spanish2_uca_ci=
|
||||||
struct charset_info_st my_charset_ucs2_roman_uca_ci=
|
struct charset_info_st my_charset_ucs2_roman_uca_ci=
|
||||||
{
|
{
|
||||||
143,0,0, /* number */
|
143,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* cs name */
|
"ucs2", /* cs name */
|
||||||
"ucs2_roman_ci", /* name */
|
"ucs2_roman_ci", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23444,7 +23448,7 @@ struct charset_info_st my_charset_ucs2_roman_uca_ci=
|
||||||
struct charset_info_st my_charset_ucs2_persian_uca_ci=
|
struct charset_info_st my_charset_ucs2_persian_uca_ci=
|
||||||
{
|
{
|
||||||
144,0,0, /* number */
|
144,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* cs name */
|
"ucs2", /* cs name */
|
||||||
"ucs2_persian_ci", /* name */
|
"ucs2_persian_ci", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23477,7 +23481,7 @@ struct charset_info_st my_charset_ucs2_persian_uca_ci=
|
||||||
struct charset_info_st my_charset_ucs2_esperanto_uca_ci=
|
struct charset_info_st my_charset_ucs2_esperanto_uca_ci=
|
||||||
{
|
{
|
||||||
145,0,0, /* number */
|
145,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* cs name */
|
"ucs2", /* cs name */
|
||||||
"ucs2_esperanto_ci",/* name */
|
"ucs2_esperanto_ci",/* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23510,7 +23514,7 @@ struct charset_info_st my_charset_ucs2_esperanto_uca_ci=
|
||||||
struct charset_info_st my_charset_ucs2_hungarian_uca_ci=
|
struct charset_info_st my_charset_ucs2_hungarian_uca_ci=
|
||||||
{
|
{
|
||||||
146,0,0, /* number */
|
146,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* cs name */
|
"ucs2", /* cs name */
|
||||||
"ucs2_hungarian_ci",/* name */
|
"ucs2_hungarian_ci",/* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23542,7 +23546,7 @@ struct charset_info_st my_charset_ucs2_hungarian_uca_ci=
|
||||||
struct charset_info_st my_charset_ucs2_sinhala_uca_ci=
|
struct charset_info_st my_charset_ucs2_sinhala_uca_ci=
|
||||||
{
|
{
|
||||||
147,0,0, /* number */
|
147,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* csname */
|
"ucs2", /* csname */
|
||||||
"ucs2_sinhala_ci", /* name */
|
"ucs2_sinhala_ci", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23576,7 +23580,7 @@ struct charset_info_st my_charset_ucs2_sinhala_uca_ci=
|
||||||
struct charset_info_st my_charset_ucs2_german2_uca_ci=
|
struct charset_info_st my_charset_ucs2_german2_uca_ci=
|
||||||
{
|
{
|
||||||
148,0,0, /* number */
|
148,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* csname */
|
"ucs2", /* csname */
|
||||||
"ucs2_german2_ci", /* name */
|
"ucs2_german2_ci", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23608,7 +23612,7 @@ struct charset_info_st my_charset_ucs2_german2_uca_ci=
|
||||||
struct charset_info_st my_charset_ucs2_croatian_mysql561_uca_ci=
|
struct charset_info_st my_charset_ucs2_croatian_mysql561_uca_ci=
|
||||||
{
|
{
|
||||||
149,0,0, /* number */
|
149,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* cs name */
|
"ucs2", /* cs name */
|
||||||
"ucs2_croatian_mysql561_ci", /* name */
|
"ucs2_croatian_mysql561_ci", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23641,7 +23645,7 @@ struct charset_info_st my_charset_ucs2_croatian_mysql561_uca_ci=
|
||||||
struct charset_info_st my_charset_ucs2_croatian_uca_ci=
|
struct charset_info_st my_charset_ucs2_croatian_uca_ci=
|
||||||
{
|
{
|
||||||
MY_PAGE2_COLLATION_ID_UCS2,0,0, /* number */
|
MY_PAGE2_COLLATION_ID_UCS2,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* cs name */
|
"ucs2", /* cs name */
|
||||||
"ucs2_croatian_ci", /* name */
|
"ucs2_croatian_ci", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23674,7 +23678,7 @@ struct charset_info_st my_charset_ucs2_croatian_uca_ci=
|
||||||
struct charset_info_st my_charset_ucs2_myanmar_uca_ci=
|
struct charset_info_st my_charset_ucs2_myanmar_uca_ci=
|
||||||
{
|
{
|
||||||
MY_PAGE2_COLLATION_ID_UCS2+1,0,0, /* number */
|
MY_PAGE2_COLLATION_ID_UCS2+1,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* cs name */
|
"ucs2", /* cs name */
|
||||||
"ucs2_myanmar_ci", /* name */
|
"ucs2_myanmar_ci", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23707,7 +23711,7 @@ struct charset_info_st my_charset_ucs2_myanmar_uca_ci=
|
||||||
struct charset_info_st my_charset_ucs2_unicode_520_ci=
|
struct charset_info_st my_charset_ucs2_unicode_520_ci=
|
||||||
{
|
{
|
||||||
150,0,0, /* number */
|
150,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* cs name */
|
"ucs2", /* cs name */
|
||||||
"ucs2_unicode_520_ci",/* name */
|
"ucs2_unicode_520_ci",/* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23740,7 +23744,7 @@ struct charset_info_st my_charset_ucs2_unicode_520_ci=
|
||||||
struct charset_info_st my_charset_ucs2_vietnamese_ci=
|
struct charset_info_st my_charset_ucs2_vietnamese_ci=
|
||||||
{
|
{
|
||||||
151,0,0, /* number */
|
151,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UCS2_UCA_FLAGS,/* state */
|
||||||
"ucs2", /* csname */
|
"ucs2", /* csname */
|
||||||
"ucs2_vietnamese_ci",/* name */
|
"ucs2_vietnamese_ci",/* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
@ -23817,7 +23821,7 @@ static uchar ctype_utf8[] = {
|
||||||
|
|
||||||
extern MY_CHARSET_HANDLER my_charset_utf8_handler;
|
extern MY_CHARSET_HANDLER my_charset_utf8_handler;
|
||||||
|
|
||||||
#define MY_CS_UTF8MB3_UCA_FLAGS (MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE)
|
#define MY_CS_UTF8MB3_UCA_FLAGS MY_CS_COMMON_UCA_FLAGS
|
||||||
|
|
||||||
struct charset_info_st my_charset_utf8_unicode_ci=
|
struct charset_info_st my_charset_utf8_unicode_ci=
|
||||||
{
|
{
|
||||||
|
@ -24666,7 +24670,7 @@ struct charset_info_st my_charset_utf8_vietnamese_ci=
|
||||||
|
|
||||||
extern MY_CHARSET_HANDLER my_charset_utf8mb4_handler;
|
extern MY_CHARSET_HANDLER my_charset_utf8mb4_handler;
|
||||||
|
|
||||||
#define MY_CS_UTF8MB4_UCA_FLAGS (MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_UNICODE_SUPPLEMENT)
|
#define MY_CS_UTF8MB4_UCA_FLAGS (MY_CS_COMMON_UCA_FLAGS|MY_CS_UNICODE_SUPPLEMENT)
|
||||||
|
|
||||||
struct charset_info_st my_charset_utf8mb4_unicode_ci=
|
struct charset_info_st my_charset_utf8mb4_unicode_ci=
|
||||||
{
|
{
|
||||||
|
@ -25529,7 +25533,7 @@ MY_COLLATION_HANDLER my_collation_utf32_uca_handler =
|
||||||
|
|
||||||
extern MY_CHARSET_HANDLER my_charset_utf32_handler;
|
extern MY_CHARSET_HANDLER my_charset_utf32_handler;
|
||||||
|
|
||||||
#define MY_CS_UTF32_UCA_FLAGS (MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII)
|
#define MY_CS_UTF32_UCA_FLAGS (MY_CS_COMMON_UCA_FLAGS|MY_CS_NONASCII)
|
||||||
|
|
||||||
struct charset_info_st my_charset_utf32_unicode_ci=
|
struct charset_info_st my_charset_utf32_unicode_ci=
|
||||||
{
|
{
|
||||||
|
@ -26392,7 +26396,7 @@ MY_COLLATION_HANDLER my_collation_utf16_uca_handler =
|
||||||
|
|
||||||
extern MY_CHARSET_HANDLER my_charset_utf16_handler;
|
extern MY_CHARSET_HANDLER my_charset_utf16_handler;
|
||||||
|
|
||||||
#define MY_CS_UTF16_UCA_FLAGS (MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII)
|
#define MY_CS_UTF16_UCA_FLAGS (MY_CS_COMMON_UCA_FLAGS|MY_CS_NONASCII)
|
||||||
|
|
||||||
struct charset_info_st my_charset_utf16_unicode_ci=
|
struct charset_info_st my_charset_utf16_unicode_ci=
|
||||||
{
|
{
|
||||||
|
@ -27171,7 +27175,7 @@ struct charset_info_st my_charset_utf16_myanmar_uca_ci=
|
||||||
struct charset_info_st my_charset_utf16_unicode_520_ci=
|
struct charset_info_st my_charset_utf16_unicode_520_ci=
|
||||||
{
|
{
|
||||||
123,0,0, /* number */
|
123,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
MY_CS_UTF16_UCA_FLAGS,/* state */
|
||||||
"utf16", /* csname */
|
"utf16", /* csname */
|
||||||
"utf16_unicode_520_ci",/* name */
|
"utf16_unicode_520_ci",/* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
|
|
@ -690,7 +690,8 @@ static MY_COLLATION_HANDLER my_collation_czech_ci_handler =
|
||||||
struct charset_info_st my_charset_cp1250_czech_ci =
|
struct charset_info_st my_charset_cp1250_czech_ci =
|
||||||
{
|
{
|
||||||
34,0,0, /* number */
|
34,0,0, /* number */
|
||||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_CSSORT|MY_CS_STRNXFRM_BAD_NWEIGHTS, /* state */
|
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_CSSORT|
|
||||||
|
MY_CS_STRNXFRM_BAD_NWEIGHTS|MY_CS_NON1TO1, /* state */
|
||||||
"cp1250", /* cs name */
|
"cp1250", /* cs name */
|
||||||
"cp1250_czech_cs", /* name */
|
"cp1250_czech_cs", /* name */
|
||||||
"", /* comment */
|
"", /* comment */
|
||||||
|
|
Loading…
Add table
Reference in a new issue